Class TdApi.UpgradedGift

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

public static class TdApi.UpgradedGift extends TdApi.Object
Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
  • Field Details

    • id

      public long id
      Unique identifier of the gift.
    • regularGiftId

      public long regularGiftId
      Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database.
    • publisherChatId

      public long publisherChatId
      Identifier of the chat that published the gift; 0 if none.
    • title

      public String title
      The title of the upgraded gift.
    • name

      public String name
      Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift.
    • number

      public int number
      Unique number of the upgraded gift among gifts upgraded from the same gift.
    • totalUpgradedCount

      public int totalUpgradedCount
      Total number of gifts that were upgraded from the same gift.
    • maxUpgradedCount

      public int maxUpgradedCount
      The maximum number of gifts that can be upgraded from the same gift.
    • isPremium

      public boolean isPremium
      True, if the original gift could have been bought only by Telegram Premium subscribers.
    • isThemeAvailable

      public boolean isThemeAvailable
      True, if the gift can be used to set a theme in a chat.
    • usedThemeChatId

      public long usedThemeChatId
      Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user.
    • hostId

      public TdApi.MessageSender hostId
      Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown.
    • ownerId

      public TdApi.MessageSender ownerId
      Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown.
    • ownerAddress

      public String ownerAddress
      Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.
    • ownerName

      public String ownerName
      Name of the owner for the case when owner identifier and address aren't known.
    • giftAddress

      public String giftAddress
      Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.
    • model

      Model of the upgraded gift.
    • symbol

      public TdApi.UpgradedGiftSymbol symbol
      Symbol of the upgraded gift.
    • backdrop

      public TdApi.UpgradedGiftBackdrop backdrop
      Backdrop of the upgraded gift.
    • originalDetails

      public TdApi.UpgradedGiftOriginalDetails originalDetails
      Information about the originally sent gift; may be null if unknown.
    • colors

      public TdApi.UpgradedGiftColors colors
      Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none.
    • resaleParameters

      public TdApi.GiftResaleParameters resaleParameters
      Resale parameters of the gift; may be null if resale isn't possible.
    • canSendPurchaseOffer

      public boolean canSendPurchaseOffer
      True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer.
    • valueCurrency

      public String valueCurrency
      ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable.
    • valueAmount

      public long valueAmount
      Estimated value of the gift; in the smallest units of the currency; 0 if unavailable.
    • valueUsdAmount

      public long valueUsdAmount
      Estimated value of the gift in USD; in USD cents; 0 if unavailable.
    • CONSTRUCTOR

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

    • UpgradedGift

      public UpgradedGift()
      Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
    • UpgradedGift

      public UpgradedGift(long id, long regularGiftId, long publisherChatId, String title, String name, int number, int totalUpgradedCount, int maxUpgradedCount, boolean isPremium, boolean isThemeAvailable, long usedThemeChatId, TdApi.MessageSender hostId, TdApi.MessageSender ownerId, String ownerAddress, String ownerName, String giftAddress, TdApi.UpgradedGiftModel model, TdApi.UpgradedGiftSymbol symbol, TdApi.UpgradedGiftBackdrop backdrop, TdApi.UpgradedGiftOriginalDetails originalDetails, TdApi.UpgradedGiftColors colors, TdApi.GiftResaleParameters resaleParameters, boolean canSendPurchaseOffer, String valueCurrency, long valueAmount, long valueUsdAmount)
      Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT.
      Parameters:
      id - Unique identifier of the gift.
      regularGiftId - Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database.
      publisherChatId - Identifier of the chat that published the gift; 0 if none.
      title - The title of the upgraded gift.
      name - Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift.
      number - Unique number of the upgraded gift among gifts upgraded from the same gift.
      totalUpgradedCount - Total number of gifts that were upgraded from the same gift.
      maxUpgradedCount - The maximum number of gifts that can be upgraded from the same gift.
      isPremium - True, if the original gift could have been bought only by Telegram Premium subscribers.
      isThemeAvailable - True, if the gift can be used to set a theme in a chat.
      usedThemeChatId - Identifier of the chat for which the gift is used to set a theme; 0 if none or the gift isn't owned by the current user.
      hostId - Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown.
      ownerId - Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown.
      ownerAddress - Address of the gift NFT owner in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.
      ownerName - Name of the owner for the case when owner identifier and address aren't known.
      giftAddress - Address of the gift NFT in TON blockchain; may be empty if none. Append the address to getOption("ton_blockchain_explorer_url") to get a link with information about the address.
      model - Model of the upgraded gift.
      symbol - Symbol of the upgraded gift.
      backdrop - Backdrop of the upgraded gift.
      originalDetails - Information about the originally sent gift; may be null if unknown.
      colors - Colors that can be set for user's name, background of empty chat photo, replies to messages and link previews; may be null if none.
      resaleParameters - Resale parameters of the gift; may be null if resale isn't possible.
      canSendPurchaseOffer - True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer.
      valueCurrency - ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable.
      valueAmount - Estimated value of the gift; in the smallest units of the currency; 0 if unavailable.
      valueUsdAmount - Estimated value of the gift in USD; in USD cents; 0 if unavailable.
  • 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