PremiumGiftCodeInfo constructor

const PremiumGiftCodeInfo({
  1. MessageSender? creatorId,
  2. required int creationDate,
  3. required bool isFromGiveaway,
  4. required int giveawayMessageId,
  5. required int monthCount,
  6. required int userId,
  7. required int useDate,
  8. dynamic extra,
  9. int? clientId,
})

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.

Implementation

const PremiumGiftCodeInfo({
  this.creatorId,
  required this.creationDate,
  required this.isFromGiveaway,
  required this.giveawayMessageId,
  required this.monthCount,
  required this.userId,
  required this.useDate,
  this.extra,
  this.clientId,
});