toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['PaymentMethodId'] = paymentMethodId;
data['SessionId'] = sessionId;
if (recurringModel != null) {
data['RecurringModel'] = recurringModel!.toJson();
}
data['CustomerName'] = customerName;
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();
}
data['ProcessingDetails'] = processingDetails;
return data;
}