ExternalAccountCreateOptions.fromJson constructor
ExternalAccountCreateOptions.fromJson(
- Object? json
Implementation
factory ExternalAccountCreateOptions.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return ExternalAccountCreateOptions(
defaultForCurrency: map['default_for_currency'] == null
? null
: (map['default_for_currency'] as bool),
expand: map['expand'] == null
? null
: (map['expand'] as List<Object?>)
.map((el) => (el as String))
.toList(),
externalAccount: (map['external_account'] as String),
metadata: map['metadata'] == null
? null
: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
);
}