toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
data['createdByUserName'] = this.createdByUserName;
data['updatedByUserName'] = this.updatedByUserName;
data['createdBy'] = this.createdBy;
data['createdDate'] = this.createdDate;
data['updatedBy'] = this.updatedBy;
data['updatedDate'] = this.updatedDate;
data['id'] = this.id;
data['orderId'] = this.orderId;
data['organizationId'] = this.organizationId;
if (this.store != null) {
data['store'] = this.store!.toJson();
}
data['customerName'] = this.customerName;
if (this.customerDetails != null) {
data['customerDetails'] = this.customerDetails!.toJson();
}
data['status'] = this.status;
data['dueDate'] = this.dueDate;
data['archived'] = this.archived;
data['type'] = this.type;
data['parentInvoiceId'] = this.parentInvoiceId;
data['mainOrderId'] = this.mainOrderId;
data['refundableAmount'] = this.refundableAmount;
if (this.credit != null) {
data['credit'] = this.credit!.toJson();
}
if (this.debit != null) {
data['debit'] = this.debit!.toJson();
}
if (this.balance != null) {
data['balance'] = this.balance!.toJson();
}
data['paymentDueDate'] = this.paymentDueDate;
if (this.saleDetail != null) {
data['saleDetail'] = this.saleDetail!.toJson();
}
data['paymentOrderId'] = this.paymentOrderId;
if (this.orderApprovalMapping != null) {
data['orderApprovalMapping'] =
this.orderApprovalMapping!.map((v) => v.toJson()).toList();
}
data['transactionType'] = this.transactionType;
if (this.saleExtendedDetails != null) {
data['saleExtendedDetails'] = this.saleExtendedDetails!.toJson();
}
if (this.soldToParty != null) {
data['soldToParty'] = this.soldToParty!.toJson();
}
if (this.billToParty != null) {
data['billToParty'] = this.billToParty!.toJson();
}
if (this.payerParty != null) {
data['payerParty'] = this.payerParty!.toJson();
}
if (this.soldByParty != null) {
data['soldByParty'] = this.soldByParty!.toJson();
}
if (this.attachments != null) {
data['attachments'] = this.attachments!.map((v) => v.toJson()).toList();
}
data['paymentTransactionId'] = this.paymentTransactionId;
if (this.actionList != null) {
data['actionList'] = this.actionList!.map((v) => v.toJson()).toList();
}
data['paymentDate'] = this.paymentDate;
if (this.details != null) {
data['details'] = this.details!.map((v) => v.toJson()).toList();
}
if (this.headerTags != null) {
data['headerTags'] = this.headerTags!.map((v) => v.toJson()).toList();
}
if (this.totalPaymentCollected != null) {
data['totalPaymentCollected'] = this.totalPaymentCollected!.toJson();
}
data['overdue'] = this.overdue;
data['canceled'] = this.canceled;
data['creditInvoice'] = this.creditInvoice;
data['closed'] = this.closed;
data['open'] = this.open;
data['paymentStatus'] = this.paymentStatus;
data['allowModifyPayment'] = this.allowModifyPayment;
data['invoiceNumber'] = this.invoiceNumber;
data['ageing'] = this.ageing;
data['refundable'] = this.refundable;
return data;
}