UpcomingCustomerDetails.fromJson constructor

UpcomingCustomerDetails.fromJson(
  1. Object? json
)

Implementation

factory UpcomingCustomerDetails.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return UpcomingCustomerDetails(
    address: map['address'] == null
        ? null
        : AccountSupportAddress.fromJson(map['address']),
    shipping: map['shipping'] == null
        ? null
        : CustomerShipping.fromJson(map['shipping']),
    tax: map['tax'] == null
        ? null
        : UpcomingCustomerDetailsTax.fromJson(map['tax']),
    taxExempt: map['tax_exempt'] == null
        ? null
        : CustomerTaxExempt.fromJson(map['tax_exempt']),
    taxIds: map['tax_ids'] == null
        ? null
        : (map['tax_ids'] as List<Object?>)
            .map((el) => CustomerTaxIdDataItem.fromJson(el))
            .toList(),
  );
}