BankAccountFutureRequirements.fromJson constructor

BankAccountFutureRequirements.fromJson(
  1. Object? json
)

Implementation

factory BankAccountFutureRequirements.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return BankAccountFutureRequirements(
    currentlyDue: map['currently_due'] == null
        ? null
        : (map['currently_due'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    errors: map['errors'] == null
        ? null
        : (map['errors'] as List<Object?>)
            .map((el) => AccountRequirementsError.fromJson(el))
            .toList(),
    pastDue: map['past_due'] == null
        ? null
        : (map['past_due'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    pendingVerification: map['pending_verification'] == null
        ? null
        : (map['pending_verification'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
  );
}