QuotePriceData.fromJson constructor
QuotePriceData.fromJson(
- Object? json
Implementation
factory QuotePriceData.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return QuotePriceData(
currency: (map['currency'] as String),
product: (map['product'] as String),
recurring: map['recurring'] == null
? null
: SessionRecurring.fromJson(map['recurring']),
taxBehavior: map['tax_behavior'] == null
? null
: ShippingRateCurrencyOptionTaxBehavior.fromJson(map['tax_behavior']),
unitAmount: map['unit_amount'] == null
? null
: (map['unit_amount'] as num).toInt(),
unitAmountDecimal: map['unit_amount_decimal'] == null
? null
: (map['unit_amount_decimal'] as String),
);
}