TreasuryFinancialAccountUpdateOptions.fromJson constructor

TreasuryFinancialAccountUpdateOptions.fromJson(
  1. Object? json
)

Implementation

factory TreasuryFinancialAccountUpdateOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return TreasuryFinancialAccountUpdateOptions(
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    features: map['features'] == null
        ? null
        : FinancialAccountFeatures.fromJson(map['features']),
    metadata: map['metadata'] == null
        ? null
        : (map['metadata'] as Map).cast<String, Object?>().map((
              key,
              value,
            ) =>
                MapEntry(
                  key,
                  (value as String),
                )),
    platformRestrictions: map['platform_restrictions'] == null
        ? null
        : FinancialAccountPlatformRestrictions.fromJson(
            map['platform_restrictions']),
  );
}