Add iinvoice type documentation

bot-api-6.1
Ilya Kaznacheev 2020-10-24 23:23:18 +03:00
parent 25c494b335
commit 6964c7af4e
No known key found for this signature in database
GPG Key ID: 7E2C1D8A4AB37D50
1 changed files with 13 additions and 4 deletions

View File

@ -1633,10 +1633,19 @@ type InputContactMessageContent struct {
// Invoice contains basic information about an invoice. // Invoice contains basic information about an invoice.
type Invoice struct { type Invoice struct {
// Title product name
Title string `json:"title"` Title string `json:"title"`
// Description product description
Description string `json:"description"` Description string `json:"description"`
// StartParameter unique bot deep-linking parameter that can be used to generate this invoice
StartParameter string `json:"start_parameter"` StartParameter string `json:"start_parameter"`
// Currency three-letter ISO 4217 currency code
// (see https://core.telegram.org/bots/payments#supported-currencies)
Currency string `json:"currency"` 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"` TotalAmount int `json:"total_amount"`
} }