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,
currency: D,
prices: E,
) -> Selfwhere
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,
currency: D,
prices: E,
) -> Selfwhere
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.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_business_connection_id<T>(self, value: T) -> Self
pub fn with_business_connection_id<T>(self, value: T) -> Self
Sets a new business connection ID.
§Arguments
value- Unique identifier of the business connection on behalf of which the link will be created.
Sourcepub fn with_parameters(self, value: InvoiceParameters) -> Self
pub fn with_parameters(self, value: InvoiceParameters) -> Self
Sourcepub fn with_subscription_period(self, value: Integer) -> Self
pub fn with_subscription_period(self, value: Integer) -> Self
Sets a new subscription period.
§Arguments
value- The number of seconds the subscription will be active for before the next payment. The currency must be set to “XTR” (Telegram Stars) if the parameter is used. Currently, it must always be 2592000 (30 days) if specified.
Trait Implementations§
Source§impl Clone for CreateInvoiceLink
impl Clone for CreateInvoiceLink
Source§fn clone(&self) -> CreateInvoiceLink
fn clone(&self) -> CreateInvoiceLink
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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
Auto Trait Implementations§
impl Freeze for CreateInvoiceLink
impl RefUnwindSafe for CreateInvoiceLink
impl Send for CreateInvoiceLink
impl Sync for CreateInvoiceLink
impl Unpin for CreateInvoiceLink
impl UnsafeUnpin 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