private function validateAPIResponseCode(RequestInterface $request, ResponseInterface $response)
    {
        $responseParser = new ResponseParser($response);
        switch ($responseParser->getResponseCode()) {
            case ResponseCodes::SUCCESS:
                break;
            case ResponseCodes::NOT_AUTHORIZED:
                throw new NotAuthorizedException($responseParser->getErrorMessage(), $request, $response);
            case ResponseCodes::UNKNOWN_SERVICE:
                throw new UnknownServiceException($responseParser->getErrorMessage(), $request, $response);
            case ResponseCodes::PARAMETERS_REQUIRED:
                throw new ParametersRequiredException($responseParser->getErrorMessage(), $request, $response);
            case ResponseCodes::NON_EXISTING_OBJECT:
                throw new NonExistingObjectException($responseParser->getErrorMessage(), $request, $response);
            case ResponseCodes::UNKNOWN_ERROR:
            default:
                throw new UnknownErrorException($responseParser->getErrorMessage(), $request, $response);
        }
    }