UniqueGiftInfo constructor
const
UniqueGiftInfo({
- @JsonKey(name: 'gift') required UniqueGift gift,
- @JsonKey(name: 'origin') required UniqueGiftOrigin origin,
- @JsonKey(name: 'last_resale_star_count') int? lastResaleStarCount,
- @JsonKey(name: 'owned_gift_id') String? ownedGiftId,
- @JsonKey(name: 'transfer_star_count') int? transferStarCount,
- @JsonKey(name: 'next_transfer_date') int? nextTransferDate,
Creates a new UniqueGiftInfo object.
Implementation
const factory UniqueGiftInfo({
/// Information about the gift
@JsonKey(name: 'gift') required UniqueGift gift,
/// Origin of the gift. Currently, either "upgrade" for gifts upgraded
/// from regular gifts, "transfer" for gifts transferred from other users
/// or channels, or "resale" for gifts bought from other users
@JsonKey(name: 'origin') required UniqueGiftOrigin origin,
/// Optional. For gifts bought from other users, the price paid for the gift
@JsonKey(name: 'last_resale_star_count') int? lastResaleStarCount,
/// Optional. Unique identifier of the received gift for the bot;
/// only present for gifts received on behalf of business accounts
@JsonKey(name: 'owned_gift_id') String? ownedGiftId,
/// Optional. Number of Telegram Stars that must be paid to transfer the gift;
/// omitted if the bot cannot transfer the gift
@JsonKey(name: 'transfer_star_count') int? transferStarCount,
/// Optional. Point in time (Unix timestamp) when the gift can be transferred.
/// If it is in the past, then the gift can be transferred now
@JsonKey(name: 'next_transfer_date') int? nextTransferDate,
}) = _UniqueGiftInfo;