pub struct UpgradedGift {Show 29 fields
pub id: i64,
pub regular_gift_id: i64,
pub publisher_chat_id: i64,
pub title: String,
pub name: String,
pub number: i32,
pub total_upgraded_count: i32,
pub max_upgraded_count: i32,
pub is_burned: bool,
pub is_crafted: bool,
pub is_premium: bool,
pub is_theme_available: bool,
pub used_theme_chat_id: i64,
pub host_id: Option<MessageSender>,
pub owner_id: Option<MessageSender>,
pub owner_address: String,
pub owner_name: String,
pub gift_address: String,
pub model: UpgradedGiftModel,
pub symbol: UpgradedGiftSymbol,
pub backdrop: UpgradedGiftBackdrop,
pub original_details: Option<UpgradedGiftOriginalDetails>,
pub colors: Option<UpgradedGiftColors>,
pub resale_parameters: Option<GiftResaleParameters>,
pub can_send_purchase_offer: bool,
pub craft_probability_per_mille: i32,
pub value_currency: String,
pub value_amount: i64,
pub value_usd_amount: i64,
}Expand description
Describes an upgraded gift that can be transferred to another owner or transferred to the TON blockchain as an NFT
Fields§
§id: i64Unique identifier of the gift
regular_gift_id: i64Unique identifier of the regular gift from which the gift was upgraded; may be 0 for short period of time for old gifts from database
publisher_chat_id: i64Identifier of the chat that published the gift; 0 if none
title: StringThe title of the upgraded gift
name: StringUnique name of the upgraded gift that can be used with internalLinkTypeUpgradedGift or sendResoldGift
number: i32Unique number of the upgraded gift among gifts upgraded from the same gift
total_upgraded_count: i32Total number of gifts that were upgraded from the same gift
max_upgraded_count: i32The maximum number of gifts that can be upgraded from the same gift
is_burned: boolTrue, if the gift was used to craft another gift
is_crafted: boolTrue, if the gift was craft from another gifts
True, if the original gift could have been bought only by Telegram Premium subscribers
is_theme_available: boolTrue, if the gift can be used to set a theme in a chat
used_theme_chat_id: i64Identifier 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
host_id: Option<MessageSender>Identifier of the user or the chat to which the upgraded gift was assigned from blockchain; may be null if none or unknown
owner_id: Option<MessageSender>Identifier of the user or the chat that owns the upgraded gift; may be null if none or unknown
owner_address: StringAddress 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
owner_name: StringName of the owner for the case when owner identifier and address aren’t known
gift_address: StringAddress 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: UpgradedGiftModelModel of the upgraded gift
symbol: UpgradedGiftSymbolSymbol of the upgraded gift
backdrop: UpgradedGiftBackdropBackdrop of the upgraded gift
original_details: Option<UpgradedGiftOriginalDetails>Information about the originally sent gift; may be null if unknown
colors: Option<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
resale_parameters: Option<GiftResaleParameters>Resale parameters of the gift; may be null if resale isn’t possible
can_send_purchase_offer: boolTrue, if an offer to purchase the gift can be sent using sendGiftPurchaseOffer
craft_probability_per_mille: i32Probability that the gift adds to the chance of successful crafting of a new gift; 0 if the gift can’t be used for crafting
value_currency: StringISO 4217 currency code of the currency in which value of the gift is represented; may be empty if unavailable
value_amount: i64Estimated value of the gift; in the smallest units of the currency; 0 if unavailable
value_usd_amount: i64Estimated value of the gift in USD; in USD cents; 0 if unavailable
Trait Implementations§
Source§impl Clone for UpgradedGift
impl Clone for UpgradedGift
Source§fn clone(&self) -> UpgradedGift
fn clone(&self) -> UpgradedGift
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more