Package org.drinkless.tdlib

# Class TdApi.MessageGiftedPremium

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.MessageContent
org.drinkless.tdlib.TdApi.MessageGiftedPremium

Enclosing class:
  `TdApi`

public static class TdApi.MessageGiftedPremium extends TdApi.MessageContent
Telegram Premium was gifted to a user.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class org.drinkless.tdlib.TdApi.MessageContent

  `TdApi.MessageContent.Constructors`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `long`
  `amount`
  The paid amount, in the smallest units of the currency.
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `String`
  `cryptocurrency`
  Cryptocurrency used to pay for the gift; may be empty if none.
  `long`
  `cryptocurrencyAmount`
  The paid amount, in the smallest units of the cryptocurrency; 0 if none.
  `String`
  `currency`
  Currency for the paid amount.
  `int`
  `dayCount`
  Number of days the Telegram Premium subscription will be active.
  `long`
  `gifterUserId`
  The identifier of a user who gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.
  `int`
  `monthCount`
  Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
  `long`
  `receiverUserId`
  The identifier of a user who received Telegram Premium; 0 if the gift is incoming.
  `TdApi.Sticker`
  `sticker`
  A sticker to be shown in the message; may be null if unknown.
  `TdApi.FormattedText`
  `text`
  Message added to the gifted Telegram Premium by the sender.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MessageGiftedPremium()`
  Telegram Premium was gifted to a user.
  `MessageGiftedPremium(long gifterUserId, long receiverUserId, TdApi.FormattedText text, String currency, long amount, String cryptocurrency, long cryptocurrencyAmount, int monthCount, int dayCount, TdApi.Sticker sticker)`
  Telegram Premium was gifted 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

  - ### gifterUserId

    public long gifterUserId
    The identifier of a user who gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.

  - ### receiverUserId

    public long receiverUserId
    The identifier of a user who received Telegram Premium; 0 if the gift is incoming.

  - ### text

    public TdApi.FormattedText text
    Message added to the gifted Telegram Premium by the sender.

  - ### currency

    public String currency
    Currency for the paid amount.

  - ### amount

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

  - ### cryptocurrency

    public String cryptocurrency
    Cryptocurrency used to pay for the gift; may be empty if none.

  - ### cryptocurrencyAmount

    public long cryptocurrencyAmount
    The paid amount, in the smallest units of the cryptocurrency; 0 if none.

  - ### monthCount

    public int monthCount
    Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.

  - ### dayCount

    public int dayCount
    Number of days the Telegram Premium subscription will be active.

  - ### sticker

    @Nullable public TdApi.Sticker sticker
    A sticker to be shown in the message; 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

  - ### MessageGiftedPremium

    public MessageGiftedPremium()
    Telegram Premium was gifted to a user.

  - ### MessageGiftedPremium

    public MessageGiftedPremium(long gifterUserId, long receiverUserId, TdApi.FormattedText text, String currency, long amount, String cryptocurrency, long cryptocurrencyAmount, int monthCount, int dayCount, TdApi.Sticker sticker)
    Telegram Premium was gifted to a user.
    Parameters:
      `gifterUserId` - The identifier of a user who gifted Telegram Premium; 0 if the gift was anonymous or is outgoing.
      `receiverUserId` - The identifier of a user who received Telegram Premium; 0 if the gift is incoming.
      `text` - Message added to the gifted Telegram Premium by the sender.
      `currency` - Currency for the paid amount.
      `amount` - The paid amount, in the smallest units of the currency.
      `cryptocurrency` - Cryptocurrency used to pay for the gift; may be empty if none.
      `cryptocurrencyAmount` - The paid amount, in the smallest units of the cryptocurrency; 0 if none.
      `monthCount` - Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer.
      `dayCount` - Number of days the Telegram Premium subscription will be active.
      `sticker` - A sticker to be shown in the message; 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.MessageContent`
    Returns:
      this.CONSTRUCTOR