Package org.drinkless.tdlib

# Class TdApi.PremiumGiftPaymentOption

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.PremiumGiftPaymentOption

Enclosing class:
  `TdApi`

public static class TdApi.PremiumGiftPaymentOption extends TdApi.Object
Describes an option for gifting Telegram Premium to a user. Use telegramPaymentPurposePremiumGift for out-of-store payments or payments in Telegram Stars.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `long`
  `amount`
  The amount to pay, in the smallest units of the currency.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `String`
  `currency`
  ISO 4217 currency code for the payment.
  `int`
  `discountPercentage`
  The discount associated with this option, as a percentage.
  `int`
  `monthCount`
  Number of months the Telegram Premium subscription will be active.
  `long`
  `starCount`
  The alternative Telegram Star amount to pay; 0 if payment in Telegram Stars is not possible.
  `TdApi.Sticker`
  `sticker`
  A sticker to be shown along with the option; may be null if unknown.
  `String`
  `storeProductId`
  Identifier of the store product associated with the option.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PremiumGiftPaymentOption()`
  Describes an option for gifting Telegram Premium to a user.
  `PremiumGiftPaymentOption(String currency, long amount, long starCount, int discountPercentage, int monthCount, String storeProductId, TdApi.Sticker sticker)`
  Describes an option for gifting Telegram Premium to a user.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getConstructor()`
  Returns an identifier uniquely determining type of the object.

  ### Methods inherited from class org.drinkless.tdlib.TdApi.Object

  `toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### currency

    public String currency
    ISO 4217 currency code for the payment.

  - ### amount

    public long amount
    The amount to pay, in the smallest units of the currency.

  - ### starCount

    public long starCount
    The alternative Telegram Star amount to pay; 0 if payment in Telegram Stars is not possible.

  - ### discountPercentage

    public int discountPercentage
    The discount associated with this option, as a percentage.

  - ### monthCount

    public int monthCount
    Number of months the Telegram Premium subscription will be active.

  - ### storeProductId

    public String storeProductId
    Identifier of the store product associated with the option.

  - ### sticker

    @Nullable public TdApi.Sticker sticker
    A sticker to be shown along with the option; may be null if unknown.

  - ### CONSTRUCTOR

    public static final int CONSTRUCTOR
    Identifier uniquely determining type of the object.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### PremiumGiftPaymentOption

    public PremiumGiftPaymentOption()
    Describes an option for gifting Telegram Premium to a user. Use telegramPaymentPurposePremiumGift for out-of-store payments or payments in Telegram Stars.

  - ### PremiumGiftPaymentOption

    public PremiumGiftPaymentOption(String currency, long amount, long starCount, int discountPercentage, int monthCount, String storeProductId, TdApi.Sticker sticker)
    Describes an option for gifting Telegram Premium to a user. Use telegramPaymentPurposePremiumGift for out-of-store payments or payments in Telegram Stars.
    Parameters:
      `currency` - ISO 4217 currency code for the payment.
      `amount` - The amount to pay, in the smallest units of the currency.
      `starCount` - The alternative Telegram Star amount to pay; 0 if payment in Telegram Stars is not possible.
      `discountPercentage` - The discount associated with this option, as a percentage.
      `monthCount` - Number of months the Telegram Premium subscription will be active.
      `storeProductId` - Identifier of the store product associated with the option.
      `sticker` - A sticker to be shown along with the option; may be null if unknown.

- ## Method Details

  - ### getConstructor

    public int getConstructor()
    Description copied from class: `TdApi.Object`
    Returns an identifier uniquely determining type of the object.
    Specified by:
      `getConstructor` in class `TdApi.Object`
    Returns:
      this.CONSTRUCTOR