Class TdApi.Gift

java.lang.Object
org.drinkless.tdlib.TdApi.Object
org.drinkless.tdlib.TdApi.Gift
Enclosing class:
TdApi

public static class TdApi.Gift extends TdApi.Object
Describes a gift that can be sent to another user or channel chat.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Identifier uniquely determining type of the object.
    long
    Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default.
    int
    Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
    long
    Unique identifier of the gift.
    boolean
    True, if the gift is a birthday gift.
    int
    Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
    int
    Number of remaining times the gift can be purchased; 0 if not limited or the gift was sold out.
    long
    Number of Telegram Stars that must be paid for the gift.
    The sticker representing the gift.
    int
    Number of total times the gift can be purchased; 0 if not limited.
    long
    Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Describes a gift that can be sent to another user or channel chat.
    Gift(long id, TdApi.Sticker sticker, long starCount, long defaultSellStarCount, long upgradeStarCount, boolean isForBirthday, int remainingCount, int totalCount, int firstSendDate, int lastSendDate)
    Describes a gift that can be sent to another user or channel chat.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    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

    • id

      public long id
      Unique identifier of the gift.
    • sticker

      public TdApi.Sticker sticker
      The sticker representing the gift.
    • starCount

      public long starCount
      Number of Telegram Stars that must be paid for the gift.
    • defaultSellStarCount

      public long defaultSellStarCount
      Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.
    • upgradeStarCount

      public long upgradeStarCount
      Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
    • isForBirthday

      public boolean isForBirthday
      True, if the gift is a birthday gift.
    • remainingCount

      public int remainingCount
      Number of remaining times the gift can be purchased; 0 if not limited or the gift was sold out.
    • totalCount

      public int totalCount
      Number of total times the gift can be purchased; 0 if not limited.
    • firstSendDate

      public int firstSendDate
      Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
    • lastSendDate

      public int lastSendDate
      Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
    • CONSTRUCTOR

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

    • Gift

      public Gift()
      Describes a gift that can be sent to another user or channel chat.
    • Gift

      public Gift(long id, TdApi.Sticker sticker, long starCount, long defaultSellStarCount, long upgradeStarCount, boolean isForBirthday, int remainingCount, int totalCount, int firstSendDate, int lastSendDate)
      Describes a gift that can be sent to another user or channel chat.
      Parameters:
      id - Unique identifier of the gift.
      sticker - The sticker representing the gift.
      starCount - Number of Telegram Stars that must be paid for the gift.
      defaultSellStarCount - Number of Telegram Stars that can be claimed by the receiver instead of the regular gift by default. If the gift was paid with just bought Telegram Stars, then full value can be claimed.
      upgradeStarCount - Number of Telegram Stars that must be paid to upgrade the gift; 0 if upgrade isn't possible.
      isForBirthday - True, if the gift is a birthday gift.
      remainingCount - Number of remaining times the gift can be purchased; 0 if not limited or the gift was sold out.
      totalCount - Number of total times the gift can be purchased; 0 if not limited.
      firstSendDate - Point in time (Unix timestamp) when the gift was send for the first time; for sold out gifts only.
      lastSendDate - Point in time (Unix timestamp) when the gift was send for the last time; for sold out gifts only.
  • 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