Class TdApi.TelegramPaymentPurposePremiumGift

Enclosing class:
TdApi

public static class TdApi.TelegramPaymentPurposePremiumGift extends TdApi.TelegramPaymentPurpose
The user gifting Telegram Premium to another user.
  • Field Details

    • currency

      public String currency
      ISO 4217 currency code of the payment currency, or "XTR" for payments in Telegram Stars.
    • amount

      public long amount
      Paid amount, in the smallest units of the currency.
    • userId

      public long userId
      Identifier of the user which will receive Telegram Premium.
    • monthCount

      public int monthCount
      Number of months the Telegram Premium subscription will be active for the user.
    • text

      public TdApi.FormattedText text
      Text to show to the user receiving Telegram Premium; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.
    • CONSTRUCTOR

      public static final int CONSTRUCTOR
      Identifier uniquely determining type of the object.
      See Also:
  • Constructor Details

    • TelegramPaymentPurposePremiumGift

      public TelegramPaymentPurposePremiumGift()
      The user gifting Telegram Premium to another user.
    • TelegramPaymentPurposePremiumGift

      public TelegramPaymentPurposePremiumGift(String currency, long amount, long userId, int monthCount, TdApi.FormattedText text)
      The user gifting Telegram Premium to another user.
      Parameters:
      currency - ISO 4217 currency code of the payment currency, or "XTR" for payments in Telegram Stars.
      amount - Paid amount, in the smallest units of the currency.
      userId - Identifier of the user which will receive Telegram Premium.
      monthCount - Number of months the Telegram Premium subscription will be active for the user.
      text - Text to show to the user receiving Telegram Premium; 0-getOption("gift_text_length_max") characters. Only Bold, Italic, Underline, Strikethrough, Spoiler, and CustomEmoji entities are allowed.
  • 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