toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['_id'] = this.sId;
data['shippingFees'] = this.shippingFees;
data['totalAmount'] = this.totalAmount;
data['orderDate'] = this.orderDate;
data['orderId'] = this.orderId;
data['bookingId'] = this.bookingId;
data['orderType'] = this.orderType;
if (this.history != null) {
data['history'] = this.history.map((v) => v.toJson()).toList();
}
data['paymentStatus'] = this.paymentStatus;
if (this.billingAddress != null) {
data['billingAddress'] = this.billingAddress!.toJson();
}
if (this.shippingAddress != null) {
data['shippingAddress'] = this.shippingAddress!.toJson();
}
if (this.user != null) {
data['user'] = this.user!.toJson();
}
data['subTotal'] = this.subTotal;
data['totalGst'] = this.totalGst;
data['orderStatus'] = this.orderStatus;
if (this.orderItem != null) {
data['orderItem'] = this.orderItem!.map((v) => v.toJson()).toList();
}
if (this.price != null) {
data['price'] = this.price!.toJson();
}
data['__typename'] = this.sTypename;
return data;
}