fromJson static method
Implementation
static PremiumGiftCodeInfo? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return PremiumGiftCodeInfo(
creatorId: MessageSender.fromJson(tdMapFromJson(json['creator_id'])),
creationDate: (json['creation_date'] as int?) ?? 0,
isFromGiveaway: (json['is_from_giveaway'] as bool?) ?? false,
giveawayMessageId: (json['giveaway_message_id'] as int?) ?? 0,
monthCount: (json['month_count'] as int?) ?? 0,
dayCount: (json['day_count'] as int?) ?? 0,
userId: (json['user_id'] as int?) ?? 0,
useDate: (json['use_date'] as int?) ?? 0,
);
}