IdentityVerificationSessionCreateOptions.fromJson constructor

IdentityVerificationSessionCreateOptions.fromJson(
  1. Object? json
)

Implementation

factory IdentityVerificationSessionCreateOptions.fromJson(Object? json) {
  final map = (json as Map).cast<String, Object?>();
  return IdentityVerificationSessionCreateOptions(
    clientReferenceId: map['client_reference_id'] == null
        ? null
        : (map['client_reference_id'] as String),
    expand: map['expand'] == null
        ? null
        : (map['expand'] as List<Object?>)
            .map((el) => (el as String))
            .toList(),
    metadata: map['metadata'] == null
        ? null
        : (map['metadata'] as Map).cast<String, Object?>().map((
              key,
              value,
            ) =>
                MapEntry(
                  key,
                  (value as String),
                )),
    options: map['options'] == null
        ? null
        : VerificationSessionOptions.fromJson(map['options']),
    returnUrl:
        map['return_url'] == null ? null : (map['return_url'] as String),
    type: IdentityVerificationReportType.fromJson(map['type']),
  );
}