FinancialConnectionsSessionCreateOptions.fromJson constructor

FinancialConnectionsSessionCreateOptions.fromJson(
  1. Object? json
)

Implementation

factory FinancialConnectionsSessionCreateOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return FinancialConnectionsSessionCreateOptions(
    accountHolder: SessionAccountHolder.fromJson(map['account_holder']),
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    filters: map['filters'] == null
        ? null
        : SessionFilters.fromJson(map['filters']),
    permissions: (map['permissions'] as List<Object?>)
        .map((el) => FinancialConnectionsAccountPermissionsItem.fromJson(el))
        .toList(),
    prefetch: map['prefetch'] == null
        ? null
        : (map['prefetch'] as List<Object?>)
            .map((el) => FinancialConnectionsSessionPrefetchItem.fromJson(el))
            .toList(),
    returnUrl:
        map['return_url'] == null ? null : (map['return_url'] as String),
  );
}