public function getWebhookConfiguration() { $url = $this->getUrl() . WebhookConfiguration::$WEBHOOK_LINK; $request = $this->setHeadersGet($url, $this->_oauthToken); $result = $this->doGet($request); if (array_key_exists('errors', $result)) { $errors_tmp = new Errors(); foreach ($result as $errorData) { $errors_tmp = Errors::fromArray($errorData); } $errors[] = $errors_tmp; return $errors; } else { $response_tmp = WebhookConfiguration::fromArray($result['webhookConfiguration']); return $response_tmp; } }