GiftInfo constructor
const
GiftInfo({
- @JsonKey(name: 'gift') required Gift gift,
- @JsonKey(name: 'owned_gift_id') String? ownedGiftId,
- @JsonKey(name: 'convert_star_count') int? convertStarCount,
- @JsonKey(name: 'prepaid_upgrade_star_count') int? prepaidUpgradeStarCount,
- @JsonKey(name: 'can_be_upgraded') bool? canBeUpgraded,
- @JsonKey(name: 'text') String? text,
- @JsonKey(name: 'entities') List<
MessageEntity> ? entities, - @JsonKey(name: 'is_private') bool? isPrivate,
Creates a new GiftInfo object.
Implementation
const factory GiftInfo({
/// Information about the gift
@JsonKey(name: 'gift') required Gift gift,
/// 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 can be claimed by the receiver by
/// converting the gift; omitted if conversion to Telegram Stars is impossible
@JsonKey(name: 'convert_star_count') int? convertStarCount,
/// Optional. Number of Telegram Stars that were prepaid by the sender for
/// the ability to upgrade the gift
@JsonKey(name: 'prepaid_upgrade_star_count') int? prepaidUpgradeStarCount,
/// Optional. True, if the gift can be upgraded to a unique gift
@JsonKey(name: 'can_be_upgraded') bool? canBeUpgraded,
/// Optional. Text of the message that was added to the gift
@JsonKey(name: 'text') String? text,
/// Optional. Special entities that appear in the text
@JsonKey(name: 'entities') List<MessageEntity>? entities,
/// Optional. True, if the sender and gift text are shown only to the gift
/// receiver; otherwise, everyone will be able to see them
@JsonKey(name: 'is_private') bool? isPrivate,
}) = _GiftInfo;