TaxProductResourceCustomerDetails.fromJson constructor

TaxProductResourceCustomerDetails.fromJson(
  1. Object? json
)

Implementation

factory TaxProductResourceCustomerDetails.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TaxProductResourceCustomerDetails(
    address: map['address'] == null
        ? null
        : TaxProductResourceCustomerDetailsAddress.fromJson(map['address']),
    addressSource: map['address_source'] == null
        ? null
        : TaxProductResourceCustomerDetailsAddressSource.fromJson(
            map['address_source']),
    ipAddress:
        map['ip_address'] == null ? null : (map['ip_address'] as String),
    taxIds: (map['tax_ids'] as List<Object?>)
        .map((el) =>
            TaxProductResourceCustomerDetailsResourceTaxId.fromJson(el))
        .toList(),
    taxabilityOverride:
        TaxProductResourceCustomerDetailsTaxabilityOverride.fromJson(
            map['taxability_override']),
  );
}