tg_flows/types/invoice.rs
1use serde::{Deserialize, Serialize};
2
3/// This object contains basic information about an invoice.
4///
5/// [The official docs](https://core.telegram.org/bots/api#invoice).
6#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
7pub struct Invoice {
8 /// Product name.
9 pub title: String,
10
11 /// Product description.
12 pub description: String,
13
14 /// Unique bot deep-linking parameter that can be used to generate this
15 /// invoice.
16 pub start_parameter: String,
17
18 /// Three-letter ISO 4217 currency code.
19 pub currency: String,
20
21 /// Total price in the smallest units of the currency (integer, **not**
22 /// float/double). For example, for a price of `US$ 1.45` pass `amount =
23 /// 145`. See the exp parameter in [`currencies.json`], it shows the number
24 /// of digits past the decimal point for each currency (2 for the
25 /// majority of currencies).
26 ///
27 /// [`currencies.json`]: https://core.telegram.org/bots/payments/currencies.json
28 pub total_amount: i32,
29}