@@ -1644,39 +1644,69 @@ type Invoice struct {
1644
1644
Currency string `json:"currency"`
1645
1645
// TotalAmount otal price in the smallest units of the currency (integer, not float/double).
1646
1646
// For example, for a price of US$ 1.45 pass amount = 145.
1647
- // See the exp parameter in currencies.json, it shows the number of digits
1648
- // past the decimal point for each currency (2 for the majority of currencies).
1647
+ // See the exp parameter in currencies.json
1648
+ // (https://core.telegram.org/bots/payments/currencies.json),
1649
+ // it shows the number of digits past the decimal point
1650
+ // for each currency (2 for the majority of currencies).
1649
1651
TotalAmount int `json:"total_amount"`
1650
1652
}
1651
1653
1652
1654
// LabeledPrice represents a portion of the price for goods or services.
1653
1655
type LabeledPrice struct {
1654
- Label string `json:"label"`
1655
- Amount int `json:"amount"`
1656
+ // Label portion label
1657
+ Label string `json:"label"`
1658
+ // Amount price of the product in the smallest units of the currency (integer, not float/double).
1659
+ // For example, for a price of US$ 1.45 pass amount = 145.
1660
+ // See the exp parameter in currencies.json
1661
+ // (https://core.telegram.org/bots/payments/currencies.json),
1662
+ // it shows the number of digits past the decimal point
1663
+ // for each currency (2 for the majority of currencies).
1664
+ Amount int `json:"amount"`
1656
1665
}
1657
1666
1658
1667
// ShippingAddress represents a shipping address.
1659
1668
type ShippingAddress struct {
1669
+ // CountryCode ISO 3166-1 alpha-2 country code
1660
1670
CountryCode string `json:"country_code"`
1661
- State string `json:"state"`
1662
- City string `json:"city"`
1671
+ // State if applicable
1672
+ State string `json:"state"`
1673
+ // City city
1674
+ City string `json:"city"`
1675
+ // StreetLine1 fFirst line for the address
1663
1676
StreetLine1 string `json:"street_line1"`
1677
+ // StreetLine2 second line for the address
1664
1678
StreetLine2 string `json:"street_line2"`
1665
- PostCode string `json:"post_code"`
1679
+ // PostCode address post code
1680
+ PostCode string `json:"post_code"`
1666
1681
}
1667
1682
1668
1683
// OrderInfo represents information about an order.
1669
1684
type OrderInfo struct {
1670
- Name string `json:"name,omitempty"`
1671
- PhoneNumber string `json:"phone_number,omitempty"`
1672
- Email string `json:"email,omitempty"`
1685
+ // Name user name
1686
+ //
1687
+ // optional
1688
+ Name string `json:"name,omitempty"`
1689
+ // PhoneNumber user's phone number
1690
+ //
1691
+ // optional
1692
+ PhoneNumber string `json:"phone_number,omitempty"`
1693
+ // Email user email
1694
+ //
1695
+ // optional
1696
+ Email string `json:"email,omitempty"`
1697
+ // ShippingAddress user shipping address
1698
+ //
1699
+ // optional
1673
1700
ShippingAddress * ShippingAddress `json:"shipping_address,omitempty"`
1674
1701
}
1675
1702
1676
1703
// ShippingOption represents one shipping option.
1677
1704
type ShippingOption struct {
1678
- ID string `json:"id"`
1679
- Title string `json:"title"`
1705
+ // ID shipping option identifier
1706
+ ID string `json:"id"`
1707
+ // Title option title
1708
+ Title string `json:"title"`
1709
+ // Prices list of price portions
1680
1710
Prices * []LabeledPrice `json:"prices"`
1681
1711
}
1682
1712
0 commit comments