TaxRegistrationCreateOptions.fromJson constructor
TaxRegistrationCreateOptions.fromJson(
- Object? json
Implementation
factory TaxRegistrationCreateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return TaxRegistrationCreateOptions(
activeFrom: RegistrationActiveFrom.fromJson(map['active_from']),
country: (map['country'] as String),
countryOptions:
RegistrationCountryOptions.fromJson(map['country_options']),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
expiresAt: map['expires_at'] == null
? null
: DateTime.fromMillisecondsSinceEpoch(
(map['expires_at'] as int).toInt()),
);
}