UpgradedGift class final
Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT
Constructors
- UpgradedGift({required int id, required int regularGiftId, required int publisherChatId, required String title, required String name, required int number, required int totalUpgradedCount, required int maxUpgradedCount, required bool isBurned, required bool isCrafted, required bool isPremium, required bool isThemeAvailable, required int usedThemeChatId, MessageSender? hostId, MessageSender? ownerId, required String ownerAddress, required String ownerName, required String giftAddress, required bool canBeTonWalletCardBackground, required UpgradedGiftModel model, required UpgradedGiftSymbol symbol, required UpgradedGiftBackdrop backdrop, UpgradedGiftOriginalDetails? originalDetails, UpgradedGiftColors? colors, GiftResaleParameters? resaleParameters, required bool canSendPurchaseOffer, required int craftProbabilityPerMille, required String valueCurrency, required int valueAmount, required int valueUsdAmount, dynamic extra, int? clientId})
-
Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT
const
-
UpgradedGift.fromJson(Map<
String, dynamic> json) -
Parses a UpgradedGift from TDLib JSON.
factory
Properties
- backdrop → UpgradedGiftBackdrop
-
Backdrop of the upgraded gift
final
- canBeTonWalletCardBackground → bool
-
True, if the gift NFT can be used as background_nft_address in setTonWalletCardStickers
final
- canSendPurchaseOffer → bool
-
True, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer
final
- clientId → int?
-
Identifier of the TDLib client that sent this object.
final
- colors → UpgradedGiftColors?
-
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 or unknown
final
- craftProbabilityPerMille → int
-
Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can't be used for crafting
final
- extra → dynamic
-
"@extra" of the request this object answers.
final
- giftAddress → String
-
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
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hostId → MessageSender?
-
Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown
final
- id → int
-
Unique identifier of the gift
final
- isBurned → bool
-
True, if the gift was used to craft another gift
final
- isCrafted → bool
-
True, if the gift was crafted from other gifts
final
- isPremium → bool
-
True, if the original gift could have been bought only by Telegram Premium subscribers
final
- isThemeAvailable → bool
-
True, if the gift can be used to set a theme in a chat
final
- maxUpgradedCount → int
-
The maximum number of gifts that can be upgraded from the same gift
final
- model → UpgradedGiftModel
-
Model of the upgraded gift
final
- name → String
-
Unique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift
final
- number → int
-
Unique number of the upgraded gift among gifts upgraded from the same gift
final
- originalDetails → UpgradedGiftOriginalDetails?
-
Information about the originally sent gift; may be null if unknown
final
- ownerAddress → String
-
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
final
- ownerId → MessageSender?
-
Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown
final
- ownerName → String
-
Name of the owner for the case when owner identifier and address aren't known
final
- publisherChatId → int
-
Identifier of the chat that published the gift; 0 if none
final
- regularGiftId → int
-
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
final
- resaleParameters → GiftResaleParameters?
-
Resale parameters of the gift; may be null if resale isn't possible
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- symbol → UpgradedGiftSymbol
-
Symbol of the upgraded gift
final
- title → String
-
The title of the upgraded gift
final
- totalUpgradedCount → int
-
Total number of gifts that were upgraded from the same gift
final
- usedThemeChatId → int
-
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
final
- valueAmount → int
-
Estimated value of the gift; in the smallest units of the currency; 0 if unavailable
final
- valueCurrency → String
-
ISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable
final
- valueUsdAmount → int
-
Estimated value of the gift in USD; in USD cents; 0 if unavailable
final
Methods
-
copyWith(
{int? id, int? regularGiftId, int? publisherChatId, String? title, String? name, int? number, int? totalUpgradedCount, int? maxUpgradedCount, bool? isBurned, bool? isCrafted, bool? isPremium, bool? isThemeAvailable, int? usedThemeChatId, MessageSender? hostId()?, MessageSender? ownerId()?, String? ownerAddress, String? ownerName, String? giftAddress, bool? canBeTonWalletCardBackground, UpgradedGiftModel? model, UpgradedGiftSymbol? symbol, UpgradedGiftBackdrop? backdrop, UpgradedGiftOriginalDetails? originalDetails()?, UpgradedGiftColors? colors()?, GiftResaleParameters? resaleParameters()?, bool? canSendPurchaseOffer, int? craftProbabilityPerMille, String? valueCurrency, int? valueAmount, int? valueUsdAmount, dynamic extra, int? clientId}) → UpgradedGift -
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g.
field: () => nullto clear it. -
getConstructor(
) → String -
TDLib type name, e.g.
updateNewMessage.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this object to TDLib JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- CONSTRUCTOR → const String
- TDLib type name.