Struct carapax::types::SendInvoice
source · pub struct SendInvoice { /* private fields */ }
Expand description
Sends an invoice.
Implementations§
source§impl SendInvoice
impl SendInvoice
sourcepub fn new<A, B, C, D, E, F, G>(
chat_id: A,
title: B,
description: C,
payload: D,
provider_token: E,
currency: F,
prices: G
) -> SendInvoice
pub fn new<A, B, C, D, E, F, G>( chat_id: A, title: B, description: C, payload: D, provider_token: E, currency: F, prices: G ) -> SendInvoice
Creates a new SendInvoice
.
§Arguments
chat_id
- Unique identifier of the target chat.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
- Payments provider token, obtained via Bot Father.currency
- Three-letter ISO 4217 currency code, see more on currencies.prices
- Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.).
sourcepub fn with_disable_notification(self, value: bool) -> SendInvoice
pub fn with_disable_notification(self, value: bool) -> SendInvoice
Sets a new value for a disable_notification
flag.
§Arguments
value
- Indicates whether to send the message silently or not; a user will receive a notification without sound.
sourcepub fn with_message_thread_id(self, value: i64) -> SendInvoice
pub fn with_message_thread_id(self, value: i64) -> SendInvoice
Sets a new message thread ID.
§Arguments
value
- Unique identifier of the target message thread; supergroups only.
sourcepub fn with_parameters(self, value: InvoiceParameters) -> SendInvoice
pub fn with_parameters(self, value: InvoiceParameters) -> SendInvoice
sourcepub fn with_protect_content(self, value: bool) -> SendInvoice
pub fn with_protect_content(self, value: bool) -> SendInvoice
Sets a new value for a protect_content
flag.
§Arguments
value
- Indicates whether to protect the contents of the sent message from forwarding and saving.
sourcepub fn with_reply_markup<T>(self, value: T) -> SendInvoicewhere
T: Into<InlineKeyboardMarkup>,
pub fn with_reply_markup<T>(self, value: T) -> SendInvoicewhere
T: Into<InlineKeyboardMarkup>,
Sets a new reply markup.
§Arguments
value
- Reply markup.
If empty, one ‘Pay total price’ button will be shown. If not empty, the first button must be a Pay button.
sourcepub fn with_reply_parameters(self, value: ReplyParameters) -> SendInvoice
pub fn with_reply_parameters(self, value: ReplyParameters) -> SendInvoice
sourcepub fn with_start_parameter<T>(self, value: T) -> SendInvoice
pub fn with_start_parameter<T>(self, value: T) -> SendInvoice
Sets a new unique deep-linking parameter.
§Arguments
value
- Value of the parameter.
If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter.
Trait Implementations§
source§impl Clone for SendInvoice
impl Clone for SendInvoice
source§fn clone(&self) -> SendInvoice
fn clone(&self) -> SendInvoice
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 SendInvoice
impl Debug for SendInvoice
source§impl Method for SendInvoice
impl Method for SendInvoice
source§impl Serialize for SendInvoice
impl Serialize for SendInvoice
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 SendInvoice
impl RefUnwindSafe for SendInvoice
impl Send for SendInvoice
impl Sync for SendInvoice
impl Unpin for SendInvoice
impl UnwindSafe for SendInvoice
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