toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'invoiceNumber': invoiceNumber,
    'uuid': uuid,
    'issueDate': issueDate,
    'issueTime': issueTime,
    'currencyCode': currencyCode,
    'taxCurrencyCode': taxCurrencyCode,
    'customer': customer?.toMap(),
    'invoiceLines': invoiceLines.map((item) => item.toMap()).toList(),
    'taxAmount': taxAmount,
    'totalAmount': totalAmount,
    'previousInvoiceHash': previousInvoiceHash,
    'invoiceType': invoiceType,
  };
}