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