PaymentPagesCheckoutSessionTotalDetails.fromJson constructor
PaymentPagesCheckoutSessionTotalDetails.fromJson(
- Object? json
Implementation
factory PaymentPagesCheckoutSessionTotalDetails.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PaymentPagesCheckoutSessionTotalDetails(
amountDiscount: (map['amount_discount'] as num).toInt(),
amountShipping: map['amount_shipping'] == null
? null
: (map['amount_shipping'] as num).toInt(),
amountTax: (map['amount_tax'] as num).toInt(),
breakdown: map['breakdown'] == null
? null
: PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown.fromJson(
map['breakdown']),
);
}