InvoiceLineItemPriceData.fromJson constructor
InvoiceLineItemPriceData.fromJson(
- Object? json
Implementation
factory InvoiceLineItemPriceData.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return InvoiceLineItemPriceData(
currency: (map['currency'] as String),
product: map['product'] == null ? null : (map['product'] as String),
productData: map['product_data'] == null
? null
: SessionProductData.fromJson(map['product_data']),
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),
);
}