Module tdlight.api

Class TdApi.PremiumPaymentOption

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.PremiumPaymentOption
Enclosing class:
TdApi

public static final class TdApi.PremiumPaymentOption extends TdApi.Object
Describes an option for buying Telegram Premium to a user.
  • 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.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • 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.
    • PremiumPaymentOption

      public PremiumPaymentOption(DataInput input) throws IOException
      Describes an option for buying Telegram Premium to a user.
      Parameters:
      input - Serialized input
      Throws:
      IOException - the deserialization failed
  • 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
    • serialize

      public void serialize(DataOutput output) throws IOException
      Serialize the TDLib class
      Specified by:
      serialize in class TdApi.Object
      Parameters:
      output - output data stream
      Throws:
      IOException - the serialization failed
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object