@@ -1740,21 +1740,42 @@ type SuccessfulPayment struct {
1740
1740
1741
1741
// ShippingQuery contains information about an incoming shipping query.
1742
1742
type ShippingQuery struct {
1743
- ID string `json:"id"`
1744
- From * User `json:"from"`
1745
- InvoicePayload string `json:"invoice_payload"`
1743
+ // ID unique query identifier
1744
+ ID string `json:"id"`
1745
+ // From user who sent the query
1746
+ From * User `json:"from"`
1747
+ // InvoicePayload bot specified invoice payload
1748
+ InvoicePayload string `json:"invoice_payload"`
1749
+ // ShippingAddress user specified shipping address
1746
1750
ShippingAddress * ShippingAddress `json:"shipping_address"`
1747
1751
}
1748
1752
1749
1753
// PreCheckoutQuery contains information about an incoming pre-checkout query.
1750
1754
type PreCheckoutQuery struct {
1751
- ID string `json:"id"`
1752
- From * User `json:"from"`
1753
- Currency string `json:"currency"`
1754
- TotalAmount int `json:"total_amount"`
1755
- InvoicePayload string `json:"invoice_payload"`
1756
- ShippingOptionID string `json:"shipping_option_id,omitempty"`
1757
- OrderInfo * OrderInfo `json:"order_info,omitempty"`
1755
+ // ID unique query identifier
1756
+ ID string `json:"id"`
1757
+ // From user who sent the query
1758
+ From * User `json:"from"`
1759
+ // Currency three-letter ISO 4217 currency code
1760
+ // // (see https://core.telegram.org/bots/payments#supported-currencies)
1761
+ Currency string `json:"currency"`
1762
+ // TotalAmount total price in the smallest units of the currency (integer, not float/double).
1763
+ // // For example, for a price of US$ 1.45 pass amount = 145.
1764
+ // // See the exp parameter in currencies.json,
1765
+ // // (https://core.telegram.org/bots/payments/currencies.json)
1766
+ // // it shows the number of digits past the decimal point
1767
+ // // for each currency (2 for the majority of currencies).
1768
+ TotalAmount int `json:"total_amount"`
1769
+ // InvoicePayload bot specified invoice payload
1770
+ InvoicePayload string `json:"invoice_payload"`
1771
+ // ShippingOptionID identifier of the shipping option chosen by the user
1772
+ //
1773
+ // optional
1774
+ ShippingOptionID string `json:"shipping_option_id,omitempty"`
1775
+ // OrderInfo order info provided by the user
1776
+ //
1777
+ // optional
1778
+ OrderInfo * OrderInfo `json:"order_info,omitempty"`
1758
1779
}
1759
1780
1760
1781
// Error is an error containing extra information returned by the Telegram API.
@@ -1770,6 +1791,9 @@ func (e Error) Error() string {
1770
1791
1771
1792
// BotCommand represents a bot command.
1772
1793
type BotCommand struct {
1773
- Command string `json:"command"`
1794
+ // Command text of the command, 1-32 characters.
1795
+ // Can contain only lowercase English letters, digits and underscores.
1796
+ Command string `json:"command"`
1797
+ // Description of the command, 3-256 characters.
1774
1798
Description string `json:"description"`
1775
1799
}
0 commit comments