fromMap static method

SettingsTaxRead? fromMap(
  1. Object? body
)

Implementation

static SettingsTaxRead? fromMap(Object? body) {
  final source = readRecord(body, envelopeKey: 'tax');
  if (source == null) return null;
  return SettingsTaxRead(
    code: readText(source['code']),
    country: SettingsTaxCountry.fromMap(source['country']),
    countryTaxByStates: readList<SettingsTaxCountryTaxByState>(
        source['country_tax_by_states'],
        SettingsTaxCountryTaxByState.fromMap),
    createdBy: readAny(source['created_by']),
    createdOn: readText(source['created_on']),
    href: readText(source['href']),
    id: readText(source['id']),
    lastUpdatedBy: readAny(source['last_updated_by']),
    lastUpdatedOn: readText(source['last_updated_on']),
    name: readText(source['name']),
    object: readText(source['object']),
    rate: readDecimal(source['rate']),
    status: readText(source['status']),
  );
}