Layer 220
constructor
premiumGiftCodeOption#257e962b flags:# users:int months:int store_product:flags.0?string store_quantity:flags.1?int currency:string amount:long = PremiumGiftCodeOption;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Users int Number of users which will be able to activate the gift codes.
Months int Duration in months of each gifted Telegram Premium subscription.
StoreProduct flags.0?string Identifier of the store product associated with the option, official apps only.
StoreQuantity flags.1?int Number of times the store product must be paid
Currency string Three-letter ISO 4217 currency code
Amount long Total 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).

Gogram Example

// Creating PremiumGiftCodeOption constructor
obj := &tg.PremiumGiftCodeOption{
    Users: 0,
    Months: 0,
    Currency: "...",
    Amount: int64(0),

    // Optional fields:
    // StoreProduct: "...",
    // StoreQuantity: 0,
}