PremiumGiftCodeInfo class final

Contains information about a Telegram Premium gift code

Inheritance

Constructors

PremiumGiftCodeInfo({MessageSender? creatorId, required int creationDate, required bool isFromGiveaway, required int giveawayMessageId, required int monthCount, required int userId, required int useDate, dynamic extra, int? clientId})
Contains information about a Telegram Premium gift code
const
PremiumGiftCodeInfo.fromJson(Map<String, dynamic> json)
Parses a PremiumGiftCodeInfo from TDLib JSON.
factory

Properties

clientId → int?
Identifier of the TDLib client that sent this object.
final
creationDate → int
Point in time (Unix timestamp) when the code was created
final
creatorId → MessageSender?
Identifier of a chat or a user that 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
extra → dynamic
"@extra" of the request this object answers.
final
giveawayMessageId → int
Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message
final
hashCode → int
The hash code for this object.
no setterinherited
isFromGiveaway → bool
True, if the gift code was created for a giveaway
final
monthCount → int
Number of months the Telegram Premium subscription will be active after code activation
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useDate → int
Point in time (Unix timestamp) when the code was activated; 0 if none
final
userId → int
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? userId, int? useDate, dynamic extra, int? clientId}) → PremiumGiftCodeInfo
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.