CreateOrderResponse.fromJson constructor
CreateOrderResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
CreateOrderResponse.fromJson(Map<String, dynamic> json) {
sId = json['_id'];
shippingFees = json['shippingFees']?.toDouble();
totalAmount = json['totalAmount']?.toDouble();
orderDate = json['orderDate'];
orderId = json['orderId'];
orderType = json['orderType'];
bookingId = json['bookingId'];
if (json['history'] != null) {
history = [];
json['history'].forEach((v) {
history.add(v);
});
}
paymentStatus = json['paymentStatus'];
billingAddress = json['billingAddress'] != null
? new BillingAddress.fromJson(json['billingAddress'])
: null;
shippingAddress = json['shippingAddress'] != null
? new BillingAddress.fromJson(json['shippingAddress'])
: null;
user = json['user'] != null ? new User.fromJson(json['user']) : null;
subTotal = json['subTotal']?.toDouble();
totalGst = json['totalGst']?.toDouble();
orderStatus = json['orderStatus'];
if (json['orderItem'] != null) {
orderItem = [];
json['orderItem'].forEach((v) {
orderItem!.add(new OrderItem.fromJson(v));
});
}
price =
json['price'] != null ? new PriceDetails.fromJson(json['price']) : null;
sTypename = json['__typename'];
}