public function performAPICall($method, $path, array $options = []): Response
    {
        $options = $this->getDefaultHttpClientOptions($options);
        // Reset JSON errors.
        $this->jsonErrors = [];
        // Reset Link section.
        $this->links = [];

        /* @type Response $response */
        $response = $this->httpClient->{$method}($path, $options);

        if ($response->getStatusCode() === 401) {
            throw UnauthorizedException::invalidToken();
        } elseif ($response->getStatusCode() === 404) {
            throw ResourceNotFoundException::notFound($path, $options);
        }

        return $response;
    }