TransactionPartnerUser.fromJson constructor
Creates a TransactionPartnerUser object from JSON.
Implementation
factory TransactionPartnerUser.fromJson(Map<String, dynamic> json) {
return TransactionPartnerUser(
user: User.fromJson(json['user']),
invoicePayload: json['invoice_payload'],
paidMedia: json['paid_media'] != null
? List<PaidMedia>.from(
(json['paid_media'] as List).map(
(e) => PaidMedia.fromJson(e),
),
)
: null,
paidMediaPayload: json['paid_media_payload'],
subscriptionPeriod: json['subscription_period'],
gift: json['gift'] != null ? Gift.fromJson(json['gift']) : null,
affiliate: json['affiliate'] != null
? AffiliateInfo.fromJson(json['affiliate'])
: null,
);
}