toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.profile != null) {
    data['profile'] = this.profile!.toJson();
  }
  if (this.shippingAddress != null) {
    data['shippingAddress'] =
        this.shippingAddress!.map((v) => v.toJson()).toList();
  }
  if (this.billingAddress != null) {
    data['billingAddress'] =
        this.billingAddress!.map((v) => v.toJson()).toList();
  }
  if (this.companyAddress != null) {
    data['companyAddress'] = this.companyAddress!.toJson();
  }
  data['currencyCode'] = this.currencyCode;
  if (this.creditLimit != null) {
    data['creditLimit'] = this.creditLimit!.toJson();
  }
  data['customerCode'] = this.customerCode;
  data['regionName'] = this.regionName;
  data['customerTin'] = this.customerTin;
  if (this.billToPartyDetails != null) {
    data['billToPartyDetails'] = this.billToPartyDetails!.toJson();
  }
  if (this.soldToPartyDetails != null) {
    data['soldToPartyDetails'] = this.soldToPartyDetails!.toJson();
  }
  if (this.payToPartyDetails != null) {
    data['payToPartyDetails'] = this.payToPartyDetails!.toJson();
  }
  if (this.addressDetails != null) {
    data['addressDetails'] = this.addressDetails!.toJson();
  }
  if (this.soldByPartyDetails != null) {
    data['soldByPartyDetails'] = this.soldByPartyDetails!.toJson();
  }
  if (this.sellerPartyDetails != null) {
    data['sellerPartyDetails'] = this.sellerPartyDetails!.toJson();
  }
  data['withHeldTaxRequired'] = this.withHeldTaxRequired;
  return data;
}