UniqueGiftInfo constructor

const UniqueGiftInfo({
  1. @JsonKey(name: 'gift') required UniqueGift gift,
  2. @JsonKey(name: 'origin') required String origin,
  3. @JsonKey(name: 'owned_gift_id') String? ownedGiftId,
  4. @JsonKey(name: 'transfer_star_count') int? transferStarCount,
})

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" or "transfer"
  @JsonKey(name: 'origin') required String origin,

  /// 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,
}) = _UniqueGiftInfo;