1 | <?php |
||
17 | trait CreateTrait |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @param null $end string |
||
22 | * @return string |
||
23 | * @internal |
||
24 | */ |
||
25 | abstract protected function endpoint($end = null); |
||
26 | |||
27 | /** |
||
28 | * @return \Freshdesk\Api |
||
29 | * @internal |
||
30 | */ |
||
31 | abstract protected function api(); |
||
32 | |||
33 | /** |
||
34 | * Create a resource |
||
35 | * |
||
36 | * Create a resource with the supplied data |
||
37 | * |
||
38 | * @api |
||
39 | * @param array $data The data |
||
40 | * @return array|null |
||
41 | * @throws \Freshdesk\Exceptions\AccessDeniedException |
||
42 | * @throws \Freshdesk\Exceptions\ApiException |
||
43 | * @throws \Freshdesk\Exceptions\AuthenticationException |
||
44 | * @throws \Freshdesk\Exceptions\ConflictingStateException |
||
45 | * @throws \Freshdesk\Exceptions\NotFoundException |
||
46 | * @throws \Freshdesk\Exceptions\RateLimitExceededException |
||
47 | * @throws \Freshdesk\Exceptions\UnsupportedContentTypeException |
||
48 | * @throws \Freshdesk\Exceptions\MethodNotAllowedException |
||
49 | * @throws \Freshdesk\Exceptions\UnsupportedAcceptHeaderException |
||
50 | * @throws \Freshdesk\Exceptions\ValidationException |
||
51 | */ |
||
52 | public function create(array $data) |
||
56 | } |
||
57 |