getApplicant method
Loads a single applicant by id (includes SdkApplicantResponse.kycWebUrl when configured).
Implementation
Future<SdkApplicantResponse> getApplicant(String applicantId) async {
try {
final response = await _apiClient.get(
'/sdk/kyc-verification/applicants/$applicantId',
);
final jsonData = json.decode(response.body) as Map<String, dynamic>;
return SdkApplicantResponse.fromJson(jsonData);
} catch (e) {
if (e is ApexKycException) {
rethrow;
}
throw ApexKycException(
'Failed to get applicant: ${e.toString()}',
originalError: e,
);
}
}