UniqueGiftInfo constructor

const UniqueGiftInfo({
  1. @JsonKey(name: 'gift') required UniqueGift gift,
  2. @JsonKey(name: 'origin') required UniqueGiftOrigin origin,
  3. @JsonKey(name: 'last_resale_star_count') int? lastResaleStarCount,
  4. @JsonKey(name: 'owned_gift_id') String? ownedGiftId,
  5. @JsonKey(name: 'transfer_star_count') int? transferStarCount,
  6. @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;