toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['CustomerName'] = customerName;
data['NotificationOption'] = notificationOption;
data['DisplayCurrencyIso'] = displayCurrencyIso;
data['MobileCountryCode'] = mobileCountryCode;
data['CustomerMobile'] = customerMobile;
data['CustomerEmail'] = customerEmail;
data['InvoiceValue'] = invoiceValue;
data['Language'] = language;
data['CustomerReference'] = customerReference;
data['CustomerCivilId'] = customerCivilId;
data['UserDefinedField'] = userDefinedField;
if (customerAddress != null) {
data['CustomerAddress'] = customerAddress!.toJson();
}
data['ExpiryDate'] = expiryDate;
if (invoiceItems != null) {
data['InvoiceItems'] = invoiceItems!.map((v) => v.toJson()).toList();
}
// data['ShippingMethod'] = shippingMethod;
// if (shippingConsignee != null) {
// data['ShippingConsignee'] = shippingConsignee!.toJson();
// }
// if (suppliers != null) {
// data['Suppliers'] = suppliers!.map((v) => v.toJson()).toList();
// }
return data;
}