UniqueGiftInfo class abstract

Describes a service message about a unique gift that was sent or received.

Annotations
  • @freezed

Constructors

UniqueGiftInfo.new({@JsonKey(name: 'gift') required UniqueGift gift, @JsonKey(name: 'origin') required String origin, @JsonKey(name: 'owned_gift_id') String? ownedGiftId, @JsonKey(name: 'transfer_star_count') int? transferStarCount})
Creates a new UniqueGiftInfo object.
const
factory
UniqueGiftInfo.fromJson(Map<String, dynamic> json)
Creates a new UniqueGiftInfo object from a JSON Map.
factory

Properties

copyWith → $UniqueGiftInfoCopyWith<UniqueGiftInfo>
Create a copy of UniqueGiftInfo with the given fields replaced by the non-null parameter values.
no setterinherited
gift UniqueGift
Information about the gift
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
origin String
Origin of the gift. Currently, either "upgrade" or "transfer"
no setterinherited
ownedGiftId String?
Optional. Unique identifier of the received gift for the bot; only present for gifts received on behalf of business accounts
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
transferStarCount int?
Optional. Number of Telegram Stars that must be paid to transfer the gift; omitted if the bot cannot transfer the gift
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this UniqueGiftInfo to a JSON map.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited