/** * @param AbstractClient $client * @param string $itemClassName * @param string $path * @throws RequestException * @throws ResponseException */ public function __construct(AbstractClient $client, $itemClassName, $path) { $this->client = $client; $this->itemClassName = $itemClassName; $this->path = $path; $this->addPage($this->client->request('GET', $this->path), 0); }
/** * @param array $options * @return array */ protected function buildRequestConfiguration(array $options = []) { $options = parent::buildRequestConfiguration($options); $options['headers']['Api-Interface-Id'] = $this->configuration->getApiId(); return $options; }
/** * @param string $identifier * @return object * @throws RequestException * @throws ResponseException */ public function findOneByIdentifier($identifier) { $result = $this->client->request('GET', $this->apiPath . '/' . $identifier); return new $this->modelClassName($result); }