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 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.
constfactory
-
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
- lastResaleStarCount → int?
-
Optional. For gifts bought from other users, the price paid for the gift
no setterinherited
- nextTransferDate → int?
-
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
no setterinherited
- origin → UniqueGiftOrigin
-
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
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