1 | <?php |
||
27 | class Company extends AbstractResource |
||
28 | { |
||
29 | /** |
||
30 | * The resource endpoint |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $endpoint = '/companies'; |
||
35 | |||
36 | /** |
||
37 | * |
||
38 | * Create a company |
||
39 | * |
||
40 | * @param array|null $data |
||
41 | * @return mixed|null |
||
42 | * @throws ApiException |
||
43 | * @throws ConflictingStateException |
||
44 | * @throws RateLimitExceededException |
||
45 | * @throws UnsupportedContentTypeException |
||
46 | */ |
||
47 | public function create(array $data) |
||
51 | |||
52 | /** |
||
53 | * |
||
54 | * Get a list of companies |
||
55 | * |
||
56 | * @param array|null $query |
||
57 | * @return mixed|null |
||
58 | * @throws ApiException |
||
59 | * @throws ConflictingStateException |
||
60 | * @throws RateLimitExceededException |
||
61 | * @throws UnsupportedContentTypeException |
||
62 | */ |
||
63 | public function all(array $query = null) |
||
67 | |||
68 | /** |
||
69 | * |
||
70 | * Get a company by id |
||
71 | * |
||
72 | * @param int $id |
||
73 | * @param array|null $query |
||
74 | * @return array|null |
||
75 | * @throws AccessDeniedException |
||
76 | * @throws ApiException |
||
77 | * @throws ConflictingStateException |
||
78 | * @throws MethodNotAllowedException |
||
79 | * @throws NotFoundException |
||
80 | * @throws RateLimitExceededException |
||
81 | * @throws UnsupportedAcceptHeaderException |
||
82 | * @throws UnsupportedContentTypeException |
||
83 | * @throws ValidationException |
||
84 | */ |
||
85 | public function view($id, array $query = null) |
||
89 | |||
90 | /** |
||
91 | * Update a company |
||
92 | * |
||
93 | * @param $id |
||
94 | * @param array|null $data |
||
95 | * @return mixed|null |
||
96 | * @throws ApiException |
||
97 | * @throws ConflictingStateException |
||
98 | * @throws RateLimitExceededException |
||
99 | * @throws UnsupportedContentTypeException |
||
100 | */ |
||
101 | public function update($id, array $data = null) |
||
105 | |||
106 | /** |
||
107 | * Delete a company |
||
108 | * |
||
109 | * @param $id |
||
110 | * @return mixed|null |
||
111 | * @throws ApiException |
||
112 | * @throws ConflictingStateException |
||
113 | * @throws RateLimitExceededException |
||
114 | * @throws UnsupportedContentTypeException |
||
115 | */ |
||
116 | public function delete($id) |
||
120 | |||
121 | /** |
||
122 | * List company fields |
||
123 | * |
||
124 | * @param array|null $query |
||
125 | * @return mixed|null |
||
126 | * @throws AccessDeniedException |
||
127 | * @throws ApiException |
||
128 | * @throws ConflictingStateException |
||
129 | * @throws NotFoundException |
||
130 | * @throws \Freshdesk\Exceptions\AuthenticationException |
||
131 | */ |
||
132 | public function fields(array $query = null) |
||
136 | |||
137 | } |