1 | <?php |
||
10 | trait FilterTrait |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @param null $end string |
||
15 | * @return string |
||
16 | * @internal |
||
17 | */ |
||
18 | abstract protected function endpoint($end = null); |
||
19 | |||
20 | /** |
||
21 | * @return \Freshdesk\Api |
||
22 | * @internal |
||
23 | */ |
||
24 | abstract protected function api(); |
||
25 | |||
26 | /** |
||
27 | * Filter a resource |
||
28 | * |
||
29 | * Filter a resource by $query |
||
30 | * Make sure to pass a valid $query string |
||
31 | * |
||
32 | * @api |
||
33 | * @param string $query |
||
34 | * @return array|null |
||
35 | * @throws \Freshdesk\Exceptions\AccessDeniedException |
||
36 | * @throws \Freshdesk\Exceptions\ApiException |
||
37 | * @throws \Freshdesk\Exceptions\AuthenticationException |
||
38 | * @throws \Freshdesk\Exceptions\ConflictingStateException |
||
39 | * @throws \Freshdesk\Exceptions\NotFoundException |
||
40 | * @throws \Freshdesk\Exceptions\RateLimitExceededException |
||
41 | * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException |
||
42 | * @throws \Freshdesk\Exceptions\MethodNotAllowedException |
||
43 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
||
44 | * @throws \Freshdesk\Exceptions\ValidationException |
||
45 | */ |
||
46 | public function filter(string $query) |
||
54 | } |
||
55 |