fromJson static method
Inherited by: StorePaymentPurposeGiftedStars StorePaymentPurposePremiumGift StorePaymentPurposePremiumGiftCodes StorePaymentPurposePremiumGiveaway StorePaymentPurposePremiumSubscription StorePaymentPurposeStarGiveaway StorePaymentPurposeStars
Implementation
static StorePaymentPurposePremiumGift? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return StorePaymentPurposePremiumGift(
currency: (json['currency'] as String?) ?? '',
amount: (json['amount'] as int?) ?? 0,
userId: (json['user_id'] as int?) ?? 0,
text: FormattedText.fromJson(tdMapFromJson(json['text'])),
);
}