toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['payment_method'] = this.paymentMethod;
data['payment_method_title'] = this.paymentMethodTitle;
data['set_paid'] = this.setPaid;
data['status'] = this.status;
data['currency'] = this.currency;
data['customer_id'] = this.customerId;
data['customer_note'] = this.customerNote;
data['parent_id'] = this.parentId;
if (this.metaData != null) {
data['meta_data'] = this.metaData!.map((v) => v.toJson()).toList();
}
if (this.feeLines != null) {
data['fee_lines'] = this.feeLines!.map((v) => v.toJson()).toList();
}
if (this.couponLines != null) {
data['coupon_lines'] = this.couponLines!.map((v) => v.toJson()).toList();
}
if (this.billing != null) {
data['billing'] = this.billing!.toJson();
}
if (this.shipping != null) {
data['shipping'] = this.shipping!.toJson();
}
if (this.lineItems != null) {
data['line_items'] = this.lineItems!.map((v) => v.toJson()).toList();
}
if (this.shippingLines != null) {
data['shipping_lines'] =
this.shippingLines!.map((v) => v.toJson()).toList();
}
return data;
}