pub struct ReceivedGift {Show 23 fields
pub received_gift_id: String,
pub sender_id: Option<MessageSender>,
pub text: FormattedText,
pub unique_gift_number: i32,
pub is_private: bool,
pub is_saved: bool,
pub is_pinned: bool,
pub can_be_upgraded: bool,
pub can_be_transferred: bool,
pub was_refunded: bool,
pub date: i32,
pub gift: SentGift,
pub collection_ids: Vec<i32>,
pub sell_star_count: i64,
pub prepaid_upgrade_star_count: i64,
pub is_upgrade_separate: bool,
pub transfer_star_count: i64,
pub drop_original_details_star_count: i64,
pub next_transfer_date: i32,
pub next_resale_date: i32,
pub export_date: i32,
pub prepaid_upgrade_hash: String,
pub craft_date: i32,
}Expand description
Represents a gift received by a user or a chat
Fields§
§received_gift_id: StringUnique identifier of the received gift for the current user; only for the receiver of the gift
sender_id: Option<MessageSender>Identifier of a user or a chat that sent the gift; may be null if unknown
text: FormattedTextMessage added to the gift
unique_gift_number: i32Unique number of the gift among gifts upgraded from the same gift after upgrade; 0 if yet unassigned
is_private: boolTrue, if the sender and gift text are shown only to the gift receiver; otherwise, everyone are able to see them
is_saved: boolTrue, if the gift is displayed on the chat’s profile page; only for the receiver of the gift
is_pinned: boolTrue, if the gift is pinned to the top of the chat’s profile page
can_be_upgraded: boolTrue, if the gift is a regular gift that can be upgraded to a unique gift; only for the receiver of the gift
can_be_transferred: boolTrue, if the gift is an upgraded gift that can be transferred to another owner; only for the receiver of the gift
was_refunded: boolTrue, if the gift was refunded and isn’t available anymore
date: i32Point in time (Unix timestamp) when the gift was sent
gift: SentGiftThe gift
collection_ids: Vec<i32>Identifiers of collections to which the gift is added; only for the receiver of the gift
sell_star_count: i64Number of Telegram Stars that can be claimed by the receiver instead of the regular gift; 0 if the gift can’t be sold by the current user
prepaid_upgrade_star_count: i64Number of Telegram Stars that were paid by the sender for the ability to upgrade the gift
is_upgrade_separate: boolTrue, if the upgrade was bought after the gift was sent. In this case, prepaid upgrade cost must not be added to the gift cost
transfer_star_count: i64Number of Telegram Stars that must be paid to transfer the upgraded gift; only for the receiver of the gift
drop_original_details_star_count: i64Number of Telegram Stars that must be paid to drop original details of the upgraded gift; 0 if not available; only for the receiver of the gift
next_transfer_date: i32Point in time (Unix timestamp) when the gift can be transferred to another owner; can be in the past; 0 if the gift can be transferred immediately or transfer isn’t possible; only for the receiver of the gift
next_resale_date: i32Point in time (Unix timestamp) when the gift can be resold to another user; can be in the past; 0 if the gift can’t be resold; only for the receiver of the gift
export_date: i32Point in time (Unix timestamp) when the upgraded gift can be transferred to the TON blockchain as an NFT; can be in the past; 0 if NFT export isn’t possible; only for the receiver of the gift
prepaid_upgrade_hash: StringIf non-empty, then the user can pay for an upgrade of the gift using buyGiftUpgrade
craft_date: i32Point in time (Unix timestamp) when the gift can be used to craft another gift can be in the past; only for the receiver of the gift
Trait Implementations§
Source§impl Clone for ReceivedGift
impl Clone for ReceivedGift
Source§fn clone(&self) -> ReceivedGift
fn clone(&self) -> ReceivedGift
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more