GelatoDocumentReport.fromJson constructor
GelatoDocumentReport.fromJson(
- Object? json
Implementation
factory GelatoDocumentReport.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return GelatoDocumentReport(
address: map['address'] == null ? null : Address.fromJson(map['address']),
dob: map['dob'] == null
? null
: GelatoDataVerifiedOutputsDate.fromJson(map['dob']),
error: map['error'] == null
? null
: GelatoDocumentReportError.fromJson(map['error']),
expirationDate: map['expiration_date'] == null
? null
: GelatoDataVerifiedOutputsDate.fromJson(map['expiration_date']),
files: map['files'] == null
? null
: (map['files'] as List<Object?>)
.map((el) => (el as String))
.toList(),
firstName:
map['first_name'] == null ? null : (map['first_name'] as String),
issuedDate: map['issued_date'] == null
? null
: GelatoDataVerifiedOutputsDate.fromJson(map['issued_date']),
issuingCountry: map['issuing_country'] == null
? null
: (map['issuing_country'] as String),
lastName: map['last_name'] == null ? null : (map['last_name'] as String),
number: map['number'] == null ? null : (map['number'] as String),
status: GelatoDocumentReportStatus.fromJson(map['status']),
type: map['type'] == null
? null
: GelatoDocumentReportType.fromJson(map['type']),
);
}