CustomRoles.php
842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Zendesk\API;
/**
* The CustomRoles class exposes access to custom roles
* @package Zendesk\API
*/
class CustomRoles extends ClientAbstract
{
const OBJ_NAME = 'custom_role';
const OBJ_NAME_PLURAL = 'custom_roles';
/**
* List all custom roles
*
* @param array $params
*
* @throws ResponseException
* @throws \Exception
*
* @return mixed
*/
public function findAll(array $params = array())
{
$endPoint = Http::prepare('custom_roles.json', null, $params);
$response = Http::send($this->client, $endPoint);
if ((!is_object($response)) || ($this->client->getDebug()->lastResponseCode != 200)) {
throw new ResponseException(__METHOD__);
}
$this->client->setSideload(null);
return $response;
}
}