/**
  * @param $id
  * @return array
  */
 public function find($id)
 {
     $url = $this->getResource() . "/{$id}";
     $requestManager = new RequestManager($url, [], 'GET', $this->getHeader());
     $requestManager->send();
     return json_decode($requestManager->getHttpResponse(), true);
 }
 private function fetchToken()
 {
     $requestManager = new RequestManager($this->loginUrl, ['client_id' => $this->keys['client_id'], 'client_secret' => $this->keys['client_secret'], 'grant_type' => $this->keys['grant_type'], 'resource' => $this->keys['resource']], 'POST', []);
     $requestManager->send();
     $response = json_decode($requestManager->getHttpResponse());
     if (isset($response->error)) {
         return null;
     }
     return $response;
 }