Skip to main content

InputInvoiceMessageContent

Struct InputInvoiceMessageContent 

Source
pub struct InputInvoiceMessageContent {
Show 20 fields pub title: String, pub description: String, pub payload: String, pub provider_token: Option<String>, pub currency: String, pub prices: Vec<LabeledPrice>, pub max_tip_amount: Option<u64>, pub suggested_tip_amounts: Option<Vec<u64>>, pub provider_data: Option<String>, pub photo_url: Option<String>, pub photo_size: Option<u64>, pub photo_width: Option<u32>, pub photo_height: Option<u32>, pub need_name: Option<bool>, pub need_phone_number: Option<bool>, pub need_email: Option<bool>, pub need_shipping_address: Option<bool>, pub send_phone_number_to_provider: Option<bool>, pub send_email_to_provider: Option<bool>, pub is_flexible: Option<bool>,
}
Expand description

An invoice message to send as an inline query result.

Fields§

§title: String

Product name (1–32 characters).

§description: String

Product description (1–255 characters).

§payload: String

Bot-defined invoice payload (1–128 bytes).

§provider_token: Option<String>

Payment provider token; not required for Telegram Stars.

§currency: String

Three-letter ISO 4217 currency code.

§prices: Vec<LabeledPrice>

Price breakdown as a list of labeled portions.

§max_tip_amount: Option<u64>

Maximum accepted tip amount in the smallest currency unit.

§suggested_tip_amounts: Option<Vec<u64>>

Suggested tip amounts in the smallest currency unit.

§provider_data: Option<String>

JSON-encoded data about the invoice for the payment provider.

§photo_url: Option<String>

URL of the product photo.

§photo_size: Option<u64>

Photo size in bytes.

§photo_width: Option<u32>

Photo width in pixels.

§photo_height: Option<u32>

Photo height in pixels.

§need_name: Option<bool>

Requests the buyer’s full name.

§need_phone_number: Option<bool>

Requests the buyer’s phone number.

§need_email: Option<bool>

Requests the buyer’s email address.

§need_shipping_address: Option<bool>

Requests the buyer’s shipping address.

§send_phone_number_to_provider: Option<bool>

Passes the buyer’s phone number to the payment provider.

§send_email_to_provider: Option<bool>

Passes the buyer’s email address to the payment provider.

§is_flexible: Option<bool>

true if the final price depends on the shipping method.

Trait Implementations§

Source§

impl Clone for InputInvoiceMessageContent

Source§

fn clone(&self) -> InputInvoiceMessageContent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InputInvoiceMessageContent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for InputInvoiceMessageContent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for InputInvoiceMessageContent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.