PremiumGiftCodeInfo class final

Contains information about a Telegram Premium gift code

Inheritance
Available extensions
Annotations
  • @immutable

Constructors

PremiumGiftCodeInfo({MessageSender? creatorId, required int creationDate, required bool isFromGiveaway, required int giveawayMessageId, required int monthCount, required int dayCount, required int userId, required int useDate})

Properties

creationDate → int
creationDate Point in time (Unix timestamp) when the code was created
final
creatorId → MessageSender?
creatorId Identifier of a chat or a user who created the gift code; may be null if unknown. If null and the code is from messagePremiumGiftCode message, then creator_id from the message can be used
final
dayCount → int
dayCount Number of days the Telegram Premium subscription will be active after code activation
final
giveawayMessageId → int
giveawayMessageId Identifier of the corresponding giveaway message in the creator_id chat; may be 0 or an identifier of a deleted message
final
hashCode → int
The hash code for this object.
no setteroverride
isFromGiveaway → bool
isFromGiveaway True, if the gift code was created for a giveaway
final
monthCount → int
monthCount Number of months the Telegram Premium subscription will be active after code activation; 0 if the number of months isn't integer
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useDate → int
useDate Point in time (Unix timestamp) when the code was activated; 0 if none
final
userId → int
userId Identifier of a user for which the code was created; 0 if none
final

Methods

copyWith({MessageSender? creatorId, int? creationDate, bool? isFromGiveaway, int? giveawayMessageId, int? monthCount, int? dayCount, int? userId, int? useDate}) → PremiumGiftCodeInfo

Available on PremiumGiftCodeInfo, provided by the PremiumGiftCodeInfoExtensions extension

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

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

fromJson(Map<String, dynamic>? json) → PremiumGiftCodeInfo?

Constants

constructor → const String