/**
  * Adds an API resource to the client.
  *
  * @param   AbstractResource    $resource
  * @return  self
  */
 protected function addResource(AbstractResource $resource)
 {
     $this->resources[$resource->getKey()] = $resource;
     return $this;
 }