Struct carapax::types::CreateInvoiceLink
source · pub struct CreateInvoiceLink { /* private fields */ }
Expand description
Creates a link for an invoice.
Returns the created invoice link as String on success.
Implementations§
source§impl CreateInvoiceLink
impl CreateInvoiceLink
sourcepub fn new<A, B, C, D, E>(
title: A,
description: B,
payload: C,
provider_token: D,
currency: D,
prices: E
) -> CreateInvoiceLinkwhere
A: Into<String>,
B: Into<String>,
C: Into<String>,
D: Into<String>,
E: IntoIterator<Item = LabeledPrice>,
pub fn new<A, B, C, D, E>(
title: A,
description: B,
payload: C,
provider_token: D,
currency: D,
prices: E
) -> CreateInvoiceLinkwhere
A: Into<String>,
B: Into<String>,
C: Into<String>,
D: Into<String>,
E: IntoIterator<Item = LabeledPrice>,
Creates a new CreateInvoiceLink
.
§Arguments
title
- Product name; 1-32 characters.description
- Product description; 1-255 characters.payload
- Bot-defined invoice payload; 1-128 bytes; this will not be displayed to the user; use for your internal processes.provider_token
- Payment provider token, obtained via BotFather.currency
- Three-letter ISO 4217 currency code, see more on currencies.prices
- Price breakdown (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.).
sourcepub fn with_parameters(self, value: InvoiceParameters) -> CreateInvoiceLink
pub fn with_parameters(self, value: InvoiceParameters) -> CreateInvoiceLink
Trait Implementations§
source§impl Clone for CreateInvoiceLink
impl Clone for CreateInvoiceLink
source§fn clone(&self) -> CreateInvoiceLink
fn clone(&self) -> CreateInvoiceLink
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CreateInvoiceLink
impl Debug for CreateInvoiceLink
source§impl Method for CreateInvoiceLink
impl Method for CreateInvoiceLink
source§impl Serialize for CreateInvoiceLink
impl Serialize for CreateInvoiceLink
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CreateInvoiceLink
impl RefUnwindSafe for CreateInvoiceLink
impl Send for CreateInvoiceLink
impl Sync for CreateInvoiceLink
impl Unpin for CreateInvoiceLink
impl UnwindSafe for CreateInvoiceLink
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more