getAuthenticationStatus method

Future<MastercardAuthResponse> getAuthenticationStatus(
  1. String authId
)

Get authentication status

Implementation

Future<MastercardAuthResponse> getAuthenticationStatus(String authId) async {
  try {
    final response = await _dio.get('/authentication/$authId');
    return MastercardAuthResponse.fromJson(response.data);
  } on DioException catch (e) {
    throw MastercardException(
      'Failed to get authentication status: ${e.message}',
      statusCode: e.response?.statusCode,
      response: e.response?.data,
    );
  } catch (e) {
    throw MastercardException('Failed to get authentication status: $e');
  }
}