protected function callApi(string $method, string $uri, array $options = []): array
    {
        $request = $this->requestBuilder->build($method, $uri, $options);

        $message = $this->requester->sendRequest($request);
        $this->messages[] = $message;

        $this->logMessage($message);

        $exception = $message->getException();
        if (null !== $exception) {
            throw $exception;
        }

        return $this->parseResponse($message->getResponse());
    }