toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> jsonMap = {
    "receiptLanguage": receiptLanguage,
    "logo": logo?.toJson(),
    "footerText": footerText,
    "additionalReceipts":
        additionalReceipts?.map((element) => element.toJson()).toList(),
    "isExample": isExample,
    "categories": categories?.map((element) => element.toJson()).toList(),
    "afterSalesCoupons":
        afterSalesCoupons?.map((element) => element.toJson()).toList(),
    "returnBarcode": returnBarcode,
    "returnBarcodeType": returnBarcodeType == null
        ? null
        : ReturnBarcodeTypeEnumMap[returnBarcodeType],
    "cashierName": cashierName,
    "isHospitalityBill": isHospitalityBill,
    "hospitalityBillInformation": hospitalityBillInformation?.toJson(),
    "customSections":
        customSections?.map((element) => element.toJson()).toList(),
    "contentAreaId": contentAreaId,
    "countrySpecificAttributes": countrySpecificAttributes?.toJson(),
    "receiptTransactionType": receiptTransactionType?.toJson(),
    "linkedBills": linkedBills?.map((element) => element.toJson()).toList(),
  };
  return jsonMap;
}