toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['InvoiceId'] = invoiceId;
data['InvoiceStatus'] = invoiceStatus;
data['InvoiceReference'] = invoiceReference;
data['CustomerReference'] = customerReference;
data['CreatedDate'] = createdDate;
data['ExpiryDate'] = expiryDate;
data['ExpiryTime'] = expiryTime;
data['InvoiceValue'] = invoiceValue;
data['Comments'] = comments;
data['CustomerName'] = customerName;
data['CustomerMobile'] = customerMobile;
data['CustomerEmail'] = customerEmail;
data['UserDefinedField'] = userDefinedField;
data['InvoiceDisplayValue'] = invoiceDisplayValue;
data['DueDeposit'] = dueDeposit;
data['DepositStatus'] = depositStatus;
data['RecurringId'] = recurringId;
if (invoiceItems != null) {
data['InvoiceItems'] = invoiceItems!.map((v) => v.toJson()).toList();
}
if (invoiceTransactions != null) {
data['InvoiceTransactions'] =
invoiceTransactions!.map((v) => v.toJson()).toList();
}
if (suppliers != null) {
data['Suppliers'] = suppliers!.map((v) => v.toJson()).toList();
}
return data;
}