CalculationLineItemsItem.fromJson constructor
CalculationLineItemsItem.fromJson(
- Object? json
Implementation
factory CalculationLineItemsItem.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return CalculationLineItemsItem(
amount: (map['amount'] as num).toInt(),
product: map['product'] == null ? null : (map['product'] as String),
quantity:
map['quantity'] == null ? null : (map['quantity'] as num).toInt(),
reference: map['reference'] == null ? null : (map['reference'] as String),
taxBehavior: map['tax_behavior'] == null
? null
: TaxCalculationShippingCostTaxBehavior.fromJson(map['tax_behavior']),
taxCode: map['tax_code'] == null ? null : (map['tax_code'] as String),
);
}