/**
  * @param string      $method
  * @param string      $path
  * @param string|null $body
  *
  * @throws UnauthorisedRequestException
  *
  * @return array
  */
 public function send($method, $path, $body = null)
 {
     $headers = ['x-api-key' => $this->config->getApiKey(), 'content-type' => 'application/json'];
     $url = $this->config->getDomain() . $path;
     $body = $body ? json_encode($body) : null;
     $response = $this->client->send(new Request($method, $url, $headers, $body));
     $body = json_decode($response->getBody(), true);
     $status = $response->getStatusCode();
     if ($status < 400) {
         return $body;
     } else {
         throw $this->makeException($this->getExceptionName($status), $body);
     }
 }