AgeVerificationStatus.fromJson constructor
AgeVerificationStatus.fromJson( - Map<String, dynamic> json
)
Implementation
factory AgeVerificationStatus.fromJson(Map<String, dynamic> json) {
return switch (json['status']) {
'PENDING' => AgeVerificationPending.fromJson(json),
'COMPLETED' => AgeVerificationCompleted.fromJson(json),
'FAILED' => AgeVerificationFailed.fromJson(json),
final String status => AgeVerificationUnknown(status: status),
_ => throw IdentisureException(
0, 'Invalid age verification status: ${json['status']}'),
};
}