OrderResponse.fromJson constructor
OrderResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
OrderResponse.fromJson(Map<String, dynamic> json) {
processedAt = json['processedAt'];
billingAddress = json['billingAddress'] != null
? BillingAddress.fromJson(json['billingAddress'])
: null;
shippingAddress = json['shippingAddress'] != null
? ShippingAddress.fromJson(json['shippingAddress'])
: null;
displayFulfillmentStatus = json['displayFulfillmentStatus'];
if (json['lineItems'] != null) {
lineItems = <LineItems>[];
json['lineItems'].forEach((v) {
lineItems!.add(LineItems.fromJson(v));
});
}
name = json['name'];
fullyPaid = json['fullyPaid'];
totalPriceSet = json['totalPriceSet'] != null
? OriginalUnitPriceSet.fromJson(json['totalPriceSet'])
: null;
subtotalLineItemsQuantity = json['subtotalLineItemsQuantity'];
subtotalPriceSet = json['subtotalPriceSet'] != null
? OriginalUnitPriceSet.fromJson(json['subtotalPriceSet'])
: null;
}