IdentityVerificationSession.fromJson constructor
IdentityVerificationSession.fromJson(
- Object? json
Implementation
factory IdentityVerificationSession.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return IdentityVerificationSession(
clientReferenceId: map['client_reference_id'] == null
? null
: (map['client_reference_id'] as String),
clientSecret: map['client_secret'] == null
? null
: (map['client_secret'] as String),
created:
DateTime.fromMillisecondsSinceEpoch((map['created'] as int).toInt()),
id: (map['id'] as String),
lastError: map['last_error'] == null
? null
: GelatoSessionLastError.fromJson(map['last_error']),
lastVerificationReport: map['last_verification_report'] == null
? null
: IdentityVerificationReportOrId.fromJson(
map['last_verification_report']),
livemode: (map['livemode'] as bool),
metadata: (map['metadata'] as Map).cast<String, Object?>().map((
key,
value,
) =>
MapEntry(
key,
(value as String),
)),
options: map['options'] == null
? null
: GelatoVerificationSessionOptions.fromJson(map['options']),
redaction: map['redaction'] == null
? null
: IdentityVerificationSessionRedaction.fromJson(map['redaction']),
status: IdentityVerificationSessionStatus.fromJson(map['status']),
type: IdentityVerificationReportType.fromJson(map['type']),
url: map['url'] == null ? null : (map['url'] as String),
verifiedOutputs: map['verified_outputs'] == null
? null
: GelatoVerifiedOutputs.fromJson(map['verified_outputs']),
);
}