![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/app/code/Zendesk/Zendesk/ZendeskApi/Core/ |
<?php namespace Zendesk\Zendesk\ZendeskApi\Core; class Apps extends \Zendesk\API\Resources\Core\Apps { /** * {@inheritdoc} */ protected function setUpRoutes() { parent::setUpRoutes(); $this->setRoutes([ 'getInstalledApps' => "{$this->resourceName}/installations.json", 'remove' => "{$this->resourceName}/installations/{id}.json", 'updateInstallation' => "{$this->resourceName}/installations/{id}.json" ]); } /** * Get all apps installed on zendesk support account * * @return \stdClass|null * @throws \Zendesk\API\Exceptions\ApiResponseException * @throws \Zendesk\API\Exceptions\AuthException */ public function getInstalledApps() { return $this->client->get($this->getRoute(__FUNCTION__)); } /** * Remove app from zendesk support * * @param $id * @return |null * @throws \Zendesk\API\Exceptions\ApiResponseException * @throws \Zendesk\API\Exceptions\AuthException */ public function remove($id) { return $this->client->delete($this->getRoute(__FUNCTION__, ['id' => $id])); } /** * Update settings of an installed app * * @param int $id * @param array $params * @return \stdClass|null * @throws \Zendesk\API\Exceptions\ApiResponseException * @throws \Zendesk\API\Exceptions\AuthException */ public function updateInstallation($id, array $params) { return $this->client->put($this->getRoute(__FUNCTION__, ['id' => $id]), $params); } }