toJson method

Map<String, dynamic> toJson()
override

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> jsonMap = {
    "vatAmounts": vatAmounts?.map((element) => element.toJson()).toList(),
    "fullAmountInclVat": fullAmountInclVat,
    "item": item.toJson(),
    "deliveryPeriodStart": deliveryPeriodStart,
    "deliveryPeriodEnd": deliveryPeriodEnd,
    "fullAmountInclVatBeforeDiscounts": fullAmountInclVatBeforeDiscounts,
    "discounts": discounts?.map((element) => element.toJson()).toList(),
    "categoryId": categoryId,
    "returnBarcodeReference": returnBarcodeReference,
    "equivalentValue": equivalentValue,
    "isReturn": isReturn,
    "type": LineTypeEnumMap[type],
    "id": id,
    "text": text,
    "additionalText": additionalText,
    "sequenceNumber": sequenceNumber,
  };
  return jsonMap;
}