AccountUpdateOptions.fromJson constructor
AccountUpdateOptions.fromJson(
- Object? json
Implementation
factory AccountUpdateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return AccountUpdateOptions(
accountToken: map['account_token'] == null
? null
: (map['account_token'] as String),
businessProfile: map['business_profile'] == null
? null
: AccountCreateOptionsBusinessProfile.fromJson(
map['business_profile']),
businessType: map['business_type'] == null
? null
: AccountCreateOptionsBusinessType.fromJson(map['business_type']),
capabilities: map['capabilities'] == null
? null
: AccountCapabilities.fromJson(map['capabilities']),
company: map['company'] == null
? null
: AccountCompany.fromJson(map['company']),
defaultCurrency: map['default_currency'] == null
? null
: (map['default_currency'] as String),
documents: map['documents'] == null
? null
: AccountDocuments.fromJson(map['documents']),
email: map['email'] == null ? null : (map['email'] as String),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
externalAccount: map['external_account'] == null
? null
: (map['external_account'] as String),
individual: map['individual'] == null
? null
: AccountIndividual.fromJson(map['individual']),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
settings: map['settings'] == null
? null
: AccountUpdateOptionsSettings.fromJson(map['settings']),
tosAcceptance: map['tos_acceptance'] == null
? null
: AccountCreateOptionsTosAcceptance.fromJson(map['tos_acceptance']),
);
}