BuyerDetailInfo.fromJson constructor

BuyerDetailInfo.fromJson(
  1. Map<String, dynamic> json
)

Implementation

BuyerDetailInfo.fromJson(Map<String, dynamic> json) {
  profile =
      json['profile'] != null ? new Profile.fromJson(json['profile']) : null;
  if (json['shippingAddress'] != null) {
    shippingAddress = <ShippingAddress>[];
    json['shippingAddress'].forEach((v) {
      shippingAddress!.add(new ShippingAddress.fromJson(v));
    });
  }
  if (json['billingAddress'] != null) {
    billingAddress = <BillingAddress>[];
    json['billingAddress'].forEach((v) {
      billingAddress!.add(new BillingAddress.fromJson(v));
    });
  }
  companyAddress = json['companyAddress'] != null
      ? new CompanyAddress.fromJson(json['companyAddress'])
      : null;
  currencyCode = json['currencyCode'];
  creditLimit = json['creditLimit'] != null
      ? new CreditLimit.fromJson(json['creditLimit'])
      : null;
  customerCode = json['customerCode'];
  regionName = json['regionName'];
  customerTin = json['customerTin'];
  billToPartyDetails = json['billToPartyDetails'] != null
      ? new Profile.fromJson(json['billToPartyDetails'])
      : null;
  soldToPartyDetails = json['soldToPartyDetails'] != null
      ? new Profile.fromJson(json['soldToPartyDetails'])
      : null;
  payToPartyDetails = json['payToPartyDetails'] != null
      ? new Profile.fromJson(json['payToPartyDetails'])
      : null;
  addressDetails = json['addressDetails'] != null
      ? new AddressDetails.fromJson(json['addressDetails'])
      : null;
  soldByPartyDetails = json['soldByPartyDetails'] != null
      ? new Profile.fromJson(json['soldByPartyDetails'])
      : null;
  sellerPartyDetails = json['sellerPartyDetails'] != null
      ? new Profile.fromJson(json['sellerPartyDetails'])
      : null;
  withHeldTaxRequired = json['withHeldTaxRequired'];
}