toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['totalDiscount'] = this.totalDiscount;
  data['totalDiscountPercentage'] = this.totalDiscountPercentage;
  data['totalSellingPrice'] = this.totalSellingPrice;
  data['totalNetPrice'] = this.totalNetPrice;
  data['totalPriceWithoutWHT'] = this.totalPriceWithoutWHT;
  data['totalPriceWithoutTax'] = this.totalPriceWithoutTax;
  data['totalWHT'] = this.totalWHT;
  data['overallTax'] = this.overallTax;
  data['overallSaleTax'] = this.overallSaleTax;
  data['overallTaxPercentage'] = this.overallTaxPercentage;
  data['overallSaleTaxPercentage'] = this.overallSaleTaxPercentage;
  data['totalPriceWithoutTaxAndDiscount'] =
      this.totalPriceWithoutTaxAndDiscount;
  data['totalPriceWithOutTaxAndWithDiscount'] =
      this.totalPriceWithOutTaxAndWithDiscount;
  data['totalRetailPrice'] = this.totalRetailPrice;
  data['grandTotal'] = this.grandTotal;
  if (this.grandTotalInLocalCurrency != null) {
    data['grandTotalInLocalCurrency'] =
        this.grandTotalInLocalCurrency!.toJson();
  }
  data['cartId'] = this.cartId;
  if (this.contextParameters != null) {
    data['contextParameters'] = this.contextParameters!.toJson();
  }
  if (this.selectedCartoffers != null) {
    data['selectedCartoffers'] =
        this.selectedCartoffers!.map((v) => v.toJson()).toList();
  }
  if (this.products != null) {
    data['products'] = this.products!.map((v) => v.toJson()).toList();
  }
  if (this.creditLimitDetails != null) {
    data['creditLimitDetails'] = this.creditLimitDetails!.toJson();
  }
  data['rechargeInfo'] = this.rechargeInfo;
  data['evcInfo'] = this.evcInfo;
  if (this.taxes != null) {
    data['taxes'] = this.taxes!.map((v) => v.toJson()).toList();
  }
  if (this.saleTaxes != null) {
    data['saleTaxes'] = this.saleTaxes!.map((v) => v.toJson()).toList();
  }
  data['resellerDiscount'] = this.resellerDiscount;
  data['billingOrShippingAddressId'] = this.billingOrShippingAddressId;
  data['category'] = this.category;
  if (this.relatedParty != null) {
    data['relatedParty'] = this.relatedParty!.map((v) => v.toJson()).toList();
  }
  if (this.payment != null) {
    data['payment'] = this.payment!.map((v) => v.toJson()).toList();
  }
  data['aggregatedDiscountsList'] = this.aggregatedDiscountsList;
  if (this.adhocTax != null) {
    data['adhocTax'] = this.adhocTax!.map((v) => v.toJson()).toList();
  }
  if (this.cartDiscountsList != null) {
    data['cartDiscountsList'] =
        this.cartDiscountsList!.map((v) => v.toJson()).toList();
  }
  data['adhocDiscountsList'] = this.adhocDiscountsList;
  data['cartOverviewList'] = this.cartOverviewList;
  data['withHeldTaxPercentage'] = this.withHeldTaxPercentage;
  data['cartDiscountId'] = this.cartDiscountId;
  data['cartDiscountValue'] = this.cartDiscountValue;
  data['paymentCollect'] = this.paymentCollect;
  data['currency'] = this.currency;
  data['paymentCollected'] = this.paymentCollected;
  data['netPriceWithOutTaxAndDiscountWithOutTax'] =
      this.netPriceWithOutTaxAndDiscountWithOutTax;
  data['invoiceAttachmentNumber'] = this.invoiceAttachmentNumber;
  if (this.validationDetails != null) {
    data['validationDetails'] = this.validationDetails!.toJson();
  }
  data['parentOrderId'] = this.parentOrderId;
  data['externalParentTransactionId'] = this.externalParentTransactionId;
  data['taxClassificationKey'] = this.taxClassificationKey;
  data['taxClassificationName'] = this.taxClassificationName;
  return data;
}