58 nl::json
json = nl::json::object();
#define OBJECT_SERIALIZE_FIELD_PTR(json, json_field, field)
#define OBJECT_DESERIALIZE_FIELD_PTR(json, json_field, field, optional)
#define OBJECT_SERIALIZE_FIELD(json, json_field, field)
Serialize.
#define OBJECT_DESERIALIZE_FIELD(json, json_field, field, default_value, optional)
Deserialize.
This object describes a unique gift that was upgraded from a regular gift. https://core....
void fromJson(const nl::json &json)
Deserializes this object from JSON.
bool isPremium
Optional. True, if the original regular gift was exclusively purchaseable by Telegram Premium subscri...
nl::json toJson() const
Serializes this object to JSON.
bool isFromBlockchain
Optional. True, if the gift is assigned from the TON blockchain and can't be resold or transferred in...
bool isBurned
Optional. True, if the gift was used to craft another gift and isn't available anymore.
std::string name
Unique name of the gift. This name can be used in https://t.me/nft/... links and story areas.
Ptr< UniqueGiftModel > model
Model of the gift.
std::string giftId
Identifier of the regular gift from which the gift was upgraded.
Ptr< UniqueGiftSymbol > symbol
Symbol of the gift.
std::string baseName
Human-readable name of the regular gift from which this unique gift was upgraded.
Ptr< Chat > publisherChat
Optional. Information about the chat that published the gift.
Ptr< UniqueGiftColors > colors
Optional. The color scheme that can be used by the gift's owner for the chat's name,...
Ptr< UniqueGiftBackdrop > backdrop
Backdrop of the gift.
UniqueGift(const nl::json &json)
std::int32_t number
Unique number of the upgraded gift among gifts upgraded from the same regular gift.