Package org.drinkless.tdlib

# Class TdApi.PremiumGiftCodeInfo

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

Enclosing class:
  TdApi

public static class TdApi.PremiumGiftCodeInfo extends TdApi.Object
Contains information about a Telegram Premium gift code.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `CONSTRUCTOR`
  Identifier uniquely determining type of the object.
  `int`
  `creationDate`
  Point in time (Unix timestamp) when the code was created.
  `TdApi.MessageSender`
  `creatorId`
  Identifier of a chat or a user that created the gift code; may be null if unknown.
  `long`
  `giveawayMessageId`
  Identifier of the corresponding giveaway message in the creatorId chat; can be 0 or an identifier of a deleted message.
  `boolean`
  `isFromGiveaway`
  True, if the gift code was created for a giveaway.
  `int`
  `monthCount`
  Number of months the Telegram Premium subscription will be active after code activation.
  `int`
  `useDate`
  Point in time (Unix timestamp) when the code was activated; 0 if none.
  `long`
  `userId`
  Identifier of a user for which the code was created; 0 if none.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PremiumGiftCodeInfo()`
  Contains information about a Telegram Premium gift code.
  `PremiumGiftCodeInfo(TdApi.MessageSender creatorId, int creationDate, boolean isFromGiveaway, long giveawayMessageId, int monthCount, long userId, int useDate)`
  Contains information about a Telegram Premium gift code.

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

  - ### creatorId

    @Nullable public TdApi.MessageSender creatorId
    Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creatorId from the message can be used.

  - ### creationDate

    public int creationDate
    Point in time (Unix timestamp) when the code was created.

  - ### isFromGiveaway

    public boolean isFromGiveaway
    True, if the gift code was created for a giveaway.

  - ### giveawayMessageId

    public long giveawayMessageId
    Identifier of the corresponding giveaway message in the creatorId chat; can be 0 or an identifier of a deleted message.

  - ### monthCount

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

  - ### userId

    public long userId
    Identifier of a user for which the code was created; 0 if none.

  - ### useDate

    public int useDate
    Point in time (Unix timestamp) when the code was activated; 0 if none.

  - ### CONSTRUCTOR

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

- ## Constructor Details

  - ### PremiumGiftCodeInfo

    public PremiumGiftCodeInfo()
    Contains information about a Telegram Premium gift code.

  - ### PremiumGiftCodeInfo

    public PremiumGiftCodeInfo(TdApi.MessageSender creatorId, int creationDate, boolean isFromGiveaway, long giveawayMessageId, int monthCount, long userId, int useDate)
    Contains information about a Telegram Premium gift code.
    Parameters:
      `creatorId` - Identifier of a chat or a user that created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creatorId from the message can be used.
      `creationDate` - Point in time (Unix timestamp) when the code was created.
      `isFromGiveaway` - True, if the gift code was created for a giveaway.
      `giveawayMessageId` - Identifier of the corresponding giveaway message in the creatorId chat; can be 0 or an identifier of a deleted message.
      `monthCount` - Number of months the Telegram Premium subscription will be active after code activation.
      `userId` - Identifier of a user for which the code was created; 0 if none.
      `useDate` - Point in time (Unix timestamp) when the code was activated; 0 if none.

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