Package org.drinkless.tdlib

# Class TdApi.PremiumPaymentOption

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

Enclosing class:
  TdApi

public static class TdApi.PremiumPaymentOption extends TdApi.Object
Describes an option for buying Telegram Premium to a user.

- ## 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 Telegram Premium subscription payment.
  `int`
  `discountPercentage`
  The discount associated with this option, as a percentage.
  `int`
  `monthCount`
  Number of months the Telegram Premium subscription will be active.
  `TdApi.InternalLinkType`
  `paymentLink`
  An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available.
  `String`
  `storeProductId`
  Identifier of the store product associated with the option.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PremiumPaymentOption()`
  Describes an option for buying Telegram Premium to a user.
  `PremiumPaymentOption(String currency, long amount, int discountPercentage, int monthCount, String storeProductId, TdApi.InternalLinkType paymentLink)`
  Describes an option for buying 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 Telegram Premium subscription payment.

  - ### amount

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

  - ### 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.

  - ### paymentLink

    @Nullable public TdApi.InternalLinkType paymentLink
    An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### PremiumPaymentOption

    public PremiumPaymentOption()
    Describes an option for buying Telegram Premium to a user.

  - ### PremiumPaymentOption

    public PremiumPaymentOption(String currency, long amount, int discountPercentage, int monthCount, String storeProductId, TdApi.InternalLinkType paymentLink)
    Describes an option for buying Telegram Premium to a user.
    Parameters:
      `currency` - ISO 4217 currency code for Telegram Premium subscription payment.
      `amount` - The amount to pay, in the smallest units of the currency.
      `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.
      `paymentLink` - An internal link to be opened for buying Telegram Premium to the user if store payment isn't possible; may be null if direct payment isn't available.

- ## 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