Struct tbot::types::parameters::Invoice
source · pub struct Invoice { /* private fields */ }
Expand description
Miscellaneous parameters for Invoice methods and types.
Implementations§
source§impl Invoice
impl Invoice
sourcepub fn new(
title: impl Into<String>,
description: impl Into<String>,
payload: impl Into<String>,
provider_token: impl Into<String>,
currency: impl Into<String>,
prices: impl Into<Vec<LabeledPrice>>
) -> Self
pub fn new(
title: impl Into<String>,
description: impl Into<String>,
payload: impl Into<String>,
provider_token: impl Into<String>,
currency: impl Into<String>,
prices: impl Into<Vec<LabeledPrice>>
) -> Self
Constructs an Invoice
.
sourcepub fn provider_data(self, provider_data: impl Into<String>) -> Self
pub fn provider_data(self, provider_data: impl Into<String>) -> Self
Configures data for your payment provider.
Reflects the provider_data
parameter.
sourcepub fn photo(self, photo: Photo) -> Self
pub fn photo(self, photo: Photo) -> Self
Configures a photo for the invoice.
Reflects the photo_url
, photo_width
and photo_height
parameters.
sourcepub const fn is_name_needed(self, is_needed: bool) -> Self
pub const fn is_name_needed(self, is_needed: bool) -> Self
Configures whether the user must specify their name.
Reflects the need_name
parameters.
sourcepub const fn is_phone_number_needed(self, is_needed: bool) -> Self
pub const fn is_phone_number_needed(self, is_needed: bool) -> Self
Configures whether the user must specify their phone number.
Reflects the need_phone_number
parameter.
sourcepub const fn is_email_needed(self, is_needed: bool) -> Self
pub const fn is_email_needed(self, is_needed: bool) -> Self
Configures whether the user must specify their email.
Reflects the need_email
parameter.
sourcepub const fn is_shipping_address_needed(self, is_needed: bool) -> Self
pub const fn is_shipping_address_needed(self, is_needed: bool) -> Self
Configures whether the user must specify their shipping address.
Reflects the need_shipping_address
parameter.
sourcepub const fn should_send_phone_number_to_provider(self, must_send: bool) -> Self
pub const fn should_send_phone_number_to_provider(self, must_send: bool) -> Self
Configures whether the user’s phone must be sent to your payment
provider. Reflects the send_phone_number_to_provider
parameter.
sourcepub const fn should_send_email_to_provider(self, must_send: bool) -> Self
pub const fn should_send_email_to_provider(self, must_send: bool) -> Self
Configures whether the user’s email must be sent to your payment
provider. Reflects the send_email_to_provider
parameter.
sourcepub const fn is_flexible(self, is_flexible: bool) -> Self
pub const fn is_flexible(self, is_flexible: bool) -> Self
Configures whether the final price depends on the shipping method.
Reflects the is_flexible
parameter.