pub struct SendInvoiceBuilder { /* private fields */ }Expand description
Builder for the SendInvoice structure
Implementations§
Source§impl SendInvoiceBuilder
impl SendInvoiceBuilder
Sourcepub fn new(
chat_id: ChatId,
title: String,
description: String,
payload: String,
provider_token: String,
currency: String,
) -> Self
pub fn new( chat_id: ChatId, title: String, description: String, payload: String, provider_token: String, currency: String, ) -> Self
Instantiate the builder with the fields chat_id, title, description, payload, provider_token, currency, prices, max_tip_amount, suggested_tip_amounts, start_parameter, provider_data, photo_url, photo_size, photo_width, photo_height, need_name, need_phone_number, need_email, need_shipping_address, send_phone_number_to_provider, send_email_to_provider, is_flexible, disable_notification, protect_content, reply_to_message_id, allow_sending_without_reply, reply_markup
Sourcepub fn prices(self, val: Vec<LabeledPrice>) -> Self
pub fn prices(self, val: Vec<LabeledPrice>) -> Self
Set the field prices to the given value
Sourcepub fn max_tip_amount(self, val: i64) -> Self
pub fn max_tip_amount(self, val: i64) -> Self
Set the field max_tip_amount to the given value
Sourcepub fn suggested_tip_amounts(self, val: Vec<i64>) -> Self
pub fn suggested_tip_amounts(self, val: Vec<i64>) -> Self
Set the field suggested_tip_amounts to the given value
Sourcepub fn start_parameter(self, val: String) -> Self
pub fn start_parameter(self, val: String) -> Self
Set the field start_parameter to the given value
Sourcepub fn provider_data(self, val: String) -> Self
pub fn provider_data(self, val: String) -> Self
Set the field provider_data to the given value
Sourcepub fn photo_size(self, val: i64) -> Self
pub fn photo_size(self, val: i64) -> Self
Set the field photo_size to the given value
Sourcepub fn photo_width(self, val: i64) -> Self
pub fn photo_width(self, val: i64) -> Self
Set the field photo_width to the given value
Sourcepub fn photo_height(self, val: i64) -> Self
pub fn photo_height(self, val: i64) -> Self
Set the field photo_height to the given value
Sourcepub fn need_phone_number(self, val: bool) -> Self
pub fn need_phone_number(self, val: bool) -> Self
Set the field need_phone_number to the given value
Sourcepub fn need_email(self, val: bool) -> Self
pub fn need_email(self, val: bool) -> Self
Set the field need_email to the given value
Sourcepub fn need_shipping_address(self, val: bool) -> Self
pub fn need_shipping_address(self, val: bool) -> Self
Set the field need_shipping_address to the given value
Sourcepub fn send_phone_number_to_provider(self, val: bool) -> Self
pub fn send_phone_number_to_provider(self, val: bool) -> Self
Set the field send_phone_number_to_provider to the given value
Sourcepub fn send_email_to_provider(self, val: bool) -> Self
pub fn send_email_to_provider(self, val: bool) -> Self
Set the field send_email_to_provider to the given value
Sourcepub fn is_flexible(self, val: bool) -> Self
pub fn is_flexible(self, val: bool) -> Self
Set the field is_flexible to the given value
Sourcepub fn disable_notification(self, val: bool) -> Self
pub fn disable_notification(self, val: bool) -> Self
Set the field disable_notification to the given value
Sourcepub fn protect_content(self, val: bool) -> Self
pub fn protect_content(self, val: bool) -> Self
Set the field protect_content to the given value
Sourcepub fn reply_to_message_id(self, val: i64) -> Self
pub fn reply_to_message_id(self, val: i64) -> Self
Set the field reply_to_message_id to the given value
Sourcepub fn allow_sending_without_reply(self, val: bool) -> Self
pub fn allow_sending_without_reply(self, val: bool) -> Self
Set the field allow_sending_without_reply to the given value
Sourcepub fn reply_markup(self, val: InlineKeyboardMarkup) -> Self
pub fn reply_markup(self, val: InlineKeyboardMarkup) -> Self
Set the field reply_markup to the given value