PremiumGiftCodeInfo class final

PremiumGiftCodeInfo (premiumGiftCodeInfo) - basic class

Contains information about a Telegram Premium gift code.

  • creatorId: 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 (optional).
  • creationDate: Point in time (Unix timestamp) when the code was created.
  • isFromGiveaway: True, if the gift code was created for a giveaway.
  • giveawayMessageId: Identifier of the corresponding giveaway message in the creator_id chat; can be 0 or an identifier of a deleted message.
  • monthCount: Number of months the Telegram Premium subscription will be active after code activation.
  • userId: Identifier of a user for which the code was created; 0 if none.
  • useDate: Point in time (Unix timestamp) when the code was activated; 0 if none.
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})
PremiumGiftCodeInfo (premiumGiftCodeInfo) - basic class
const
PremiumGiftCodeInfo.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

clientId → int?
clientId client identifier
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
currentObjectId → String
TDLib object type for current class instance
no setteroverride
extra → dynamic
extra callback sign
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
Copy model with modified properties.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Convert model to TDLib JSON format
override
toString() → String
Convert model to TDLib JSON format, encoded into String.
override

Operators

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

Constants

defaultObjectId → const String
TDLib object type