Level3.fromJson constructor
Level3.fromJson(
- Object? json
Implementation
factory Level3.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return Level3(
customerReference: map['customer_reference'] == null
? null
: (map['customer_reference'] as String),
lineItems: (map['line_items'] as List<Object?>)
.map((el) => Level3LineItems.fromJson(el))
.toList(),
merchantReference: (map['merchant_reference'] as String),
shippingAddressZip: map['shipping_address_zip'] == null
? null
: (map['shipping_address_zip'] as String),
shippingAmount: map['shipping_amount'] == null
? null
: (map['shipping_amount'] as num).toInt(),
shippingFromZip: map['shipping_from_zip'] == null
? null
: (map['shipping_from_zip'] as String),
);
}