Struct botapi::gen_methods::CallCreateInvoiceLink
source · pub struct CallCreateInvoiceLink<'a> { /* private fields */ }
Implementations§
source§impl<'a> CallCreateInvoiceLink<'a>
impl<'a> CallCreateInvoiceLink<'a>
sourcepub fn description(self, description: &'a str) -> Self
pub fn description(self, description: &'a str) -> Self
Product description, 1-255 characters
sourcepub fn payload(self, payload: &'a str) -> Self
pub fn payload(self, payload: &'a str) -> Self
Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
sourcepub fn provider_token(self, provider_token: &'a str) -> Self
pub fn provider_token(self, provider_token: &'a str) -> Self
Payment provider token, obtained via BotFather
sourcepub fn currency(self, currency: &'a str) -> Self
pub fn currency(self, currency: &'a str) -> Self
Three-letter ISO 4217 currency code, see more on currencies
sourcepub fn prices(self, prices: &'a Vec<LabeledPrice>) -> Self
pub fn prices(self, prices: &'a Vec<LabeledPrice>) -> Self
Price breakdown, a JSON-serialized list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
sourcepub fn max_tip_amount(self, max_tip_amount: i64) -> Self
pub fn max_tip_amount(self, max_tip_amount: i64) -> Self
The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0
sourcepub fn suggested_tip_amounts(self, suggested_tip_amounts: Vec<i64>) -> Self
pub fn suggested_tip_amounts(self, suggested_tip_amounts: Vec<i64>) -> Self
A JSON-serialized array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
sourcepub fn provider_data(self, provider_data: &'a str) -> Self
pub fn provider_data(self, provider_data: &'a str) -> Self
JSON-serialized 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.
sourcepub fn photo_url(self, photo_url: &'a str) -> Self
pub fn photo_url(self, photo_url: &'a str) -> Self
URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service.
sourcepub fn photo_size(self, photo_size: i64) -> Self
pub fn photo_size(self, photo_size: i64) -> Self
Photo size in bytes
sourcepub fn photo_width(self, photo_width: i64) -> Self
pub fn photo_width(self, photo_width: i64) -> Self
Photo width
sourcepub fn photo_height(self, photo_height: i64) -> Self
pub fn photo_height(self, photo_height: i64) -> Self
Photo height
sourcepub fn need_name(self, need_name: bool) -> Self
pub fn need_name(self, need_name: bool) -> Self
Pass True if you require the user’s full name to complete the order
sourcepub fn need_phone_number(self, need_phone_number: bool) -> Self
pub fn need_phone_number(self, need_phone_number: bool) -> Self
Pass True if you require the user’s phone number to complete the order
sourcepub fn need_email(self, need_email: bool) -> Self
pub fn need_email(self, need_email: bool) -> Self
Pass True if you require the user’s email address to complete the order
sourcepub fn need_shipping_address(self, need_shipping_address: bool) -> Self
pub fn need_shipping_address(self, need_shipping_address: bool) -> Self
Pass True if you require the user’s shipping address to complete the order
sourcepub fn send_phone_number_to_provider(
self,
send_phone_number_to_provider: bool
) -> Self
pub fn send_phone_number_to_provider( self, send_phone_number_to_provider: bool ) -> Self
Pass True if the user’s phone number should be sent to the provider
sourcepub fn send_email_to_provider(self, send_email_to_provider: bool) -> Self
pub fn send_email_to_provider(self, send_email_to_provider: bool) -> Self
Pass True if the user’s email address should be sent to the provider
sourcepub fn is_flexible(self, is_flexible: bool) -> Self
pub fn is_flexible(self, is_flexible: bool) -> Self
Pass True if the final price depends on the shipping method