all repos — telegram-bot-api @ 6964c7af4e996f1d810386673a1aa286a5846cbb

Golang bindings for the Telegram Bot API

Add iinvoice type documentation
Ilya Kaznacheev ilya@kaznacheev.me
Sat, 24 Oct 2020 23:23:18 +0300
commit

6964c7af4e996f1d810386673a1aa286a5846cbb

parent

25c494b33521571360e1e71e78159e8510c64c51

1 files changed, 13 insertions(+), 4 deletions(-)

jump to
M types.gotypes.go

@@ -1633,11 +1633,20 @@ }

// Invoice contains basic information about an invoice. type Invoice struct { - Title string `json:"title"` - Description string `json:"description"` + // Title product name + Title string `json:"title"` + // Description product description + Description string `json:"description"` + // StartParameter unique bot deep-linking parameter that can be used to generate this invoice StartParameter string `json:"start_parameter"` - Currency string `json:"currency"` - TotalAmount int `json:"total_amount"` + // Currency three-letter ISO 4217 currency code + // (see https://core.telegram.org/bots/payments#supported-currencies) + Currency string `json:"currency"` + // TotalAmount otal price in the smallest units of the currency (integer, not float/double). + // For example, for a price of US$ 1.45 pass 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). + TotalAmount int `json:"total_amount"` } // LabeledPrice represents a portion of the price for goods or services.