[−][src]Struct carapax::prelude::SendInvoice
Send invoice
Methods
impl SendInvoice
[src]
pub fn new<S>(
chat_id: i64,
title: S,
description: S,
payload: S,
provider_token: S,
start_parameter: S,
currency: S,
prices: Vec<LabeledPrice>
) -> SendInvoice where
S: Into<String>,
[src]
chat_id: i64,
title: S,
description: S,
payload: S,
provider_token: S,
start_parameter: S,
currency: S,
prices: Vec<LabeledPrice>
) -> SendInvoice where
S: Into<String>,
Creates a new SendInvoice with empty optional parameters
Arguments
- chat_id - Unique identifier for the target private 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 Botfather
- start_parameter - Unique deep-linking parameter that can be used to generate this invoice when used as a start parameter
- 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.)
pub fn provider_data<S>(self, provider_data: S) -> SendInvoice where
S: Into<String>,
[src]
S: Into<String>,
JSON-encoded data about the invoice, which will be shared with the payment provider
A detailed description of required fields should be provided by the payment provider
pub fn photo_url<S>(self, photo_url: S) -> SendInvoice where
S: Into<String>,
[src]
S: Into<String>,
URL of the product photo for the invoice
Can be a photo of the goods or a marketing image for a service People like it better when they see what they are paying for
pub fn photo_size(self, photo_size: i64) -> SendInvoice
[src]
Photo size
pub fn photo_width(self, photo_width: i64) -> SendInvoice
[src]
Photo width
pub fn photo_height(self, photo_height: i64) -> SendInvoice
[src]
Photo height
pub fn need_name(self, need_name: bool) -> SendInvoice
[src]
Pass True, if you require the user's full name to complete the order
pub fn need_phone_number(self, need_phone_number: bool) -> SendInvoice
[src]
Pass True, if you require the user's phone number to complete the order
pub fn need_email(self, need_email: bool) -> SendInvoice
[src]
Pass True, if you require the user's email address to complete the order
pub fn need_shipping_address(self, need_shipping_address: bool) -> SendInvoice
[src]
Pass True, if you require the user's shipping address to complete the order
pub fn send_phone_number_to_provider(
self,
send_phone_number_to_provider: bool
) -> SendInvoice
[src]
self,
send_phone_number_to_provider: bool
) -> SendInvoice
Pass True, if user's phone number should be sent to provider
pub fn send_email_to_provider(self, send_email_to_provider: bool) -> SendInvoice
[src]
Pass True, if user's email address should be sent to provider
pub fn flexible(self, is_flexible: bool) -> SendInvoice
[src]
Pass True, if the final price depends on the shipping method
pub fn disable_notification(self, disable_notification: bool) -> SendInvoice
[src]
Sends the message silently
Users will receive a notification with no sound
pub fn reply_to_message_id(self, reply_to_message_id: i64) -> SendInvoice
[src]
If the message is a reply, ID of the original message
pub fn reply_markup<I>(self, reply_markup: I) -> SendInvoice where
I: Into<InlineKeyboardMarkup>,
[src]
I: Into<InlineKeyboardMarkup>,
Inline keyboard
If empty, one 'Pay total price' button will be shown If not empty, the first button must be a Pay button
Trait Implementations
impl Serialize for SendInvoice
[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl Debug for SendInvoice
[src]
impl Method for SendInvoice
[src]
type Response = Message
Type of successful result in API response
fn get_request(&self) -> Result<RequestBuilder, Error>
[src]
impl Clone for SendInvoice
[src]
fn clone(&self) -> SendInvoice
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl Send for SendInvoice
impl Sync for SendInvoice
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,