getVerification method

Future<SdkVerificationResponse> getVerification(
  1. String verificationId
)

Get verification by ID

verificationId - The verification ID

Returns SdkVerificationResponse

Implementation

Future<SdkVerificationResponse> getVerification(String verificationId) async {
  try {
    final response = await _apiClient.get(
      '/sdk/kyc-verification/verifications/$verificationId',
    );

    final jsonData = json.decode(response.body) as Map<String, dynamic>;
    return SdkVerificationResponse.fromJson(jsonData);
  } catch (e) {
    if (e is ApexKycException) {
      rethrow;
    }
    throw ApexKycException(
      'Failed to get verification: ${e.toString()}',
      originalError: e,
    );
  }
}