AddressVerificationResponse.fromJson constructor

AddressVerificationResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory AddressVerificationResponse.fromJson(Map<String, dynamic> json) {
  return AddressVerificationResponse(
    status: Status.values.firstWhere(
          (e) => e.toString().split('.').last == json['status'],
      orElse: () => Status.failed,
    ),
    message: json['message'],
    extraData: json['extra_data'] != null
        ? AddressVerificationExtraData.fromJson(json['extra_data'])
        : null,
  );
}