1 | <?php |
||
28 | class Ticket extends AbstractResource |
||
29 | { |
||
30 | |||
31 | /** |
||
32 | * The resource endpoint |
||
33 | * |
||
34 | * @var string |
||
35 | */ |
||
36 | protected $endpoint = '/tickets'; |
||
37 | |||
38 | /** |
||
39 | * |
||
40 | * Create a ticket |
||
41 | * |
||
42 | * @param array|null $data |
||
43 | * @return mixed|null |
||
44 | * @throws ApiException |
||
45 | * @throws ConflictingStateException |
||
46 | * @throws RateLimitExceededException |
||
47 | * @throws UnsupportedContentTypeException |
||
48 | */ |
||
49 | public function create(array $data) |
||
53 | |||
54 | /** |
||
55 | * |
||
56 | * Get a list of tickets |
||
57 | * |
||
58 | * @param array|null $query |
||
59 | * @return mixed|null |
||
60 | * @throws ApiException |
||
61 | * @throws ConflictingStateException |
||
62 | * @throws RateLimitExceededException |
||
63 | * @throws UnsupportedContentTypeException |
||
64 | */ |
||
65 | public function all(array $query = null) |
||
69 | |||
70 | /** |
||
71 | * |
||
72 | * Get a ticket by id |
||
73 | * |
||
74 | * @param int $id |
||
75 | * @param array|null $query |
||
76 | * @return array|null |
||
77 | * @throws AccessDeniedException |
||
78 | * @throws ApiException |
||
79 | * @throws ConflictingStateException |
||
80 | * @throws MethodNotAllowedException |
||
81 | * @throws NotFoundException |
||
82 | * @throws RateLimitExceededException |
||
83 | * @throws UnsupportedAcceptHeaderException |
||
84 | * @throws UnsupportedContentTypeException |
||
85 | * @throws ValidationException |
||
86 | */ |
||
87 | public function view($id, array $query = null) |
||
91 | |||
92 | /** |
||
93 | * Update a ticket |
||
94 | * |
||
95 | * @param $id |
||
96 | * @param array|null $data |
||
97 | * @return mixed|null |
||
98 | * @throws ApiException |
||
99 | * @throws ConflictingStateException |
||
100 | * @throws RateLimitExceededException |
||
101 | * @throws UnsupportedContentTypeException |
||
102 | */ |
||
103 | public function update($id, array $data = null) |
||
107 | |||
108 | /** |
||
109 | * Delete a ticket |
||
110 | * |
||
111 | * @param $id |
||
112 | * @return mixed|null |
||
113 | * @throws ApiException |
||
114 | * @throws ConflictingStateException |
||
115 | * @throws RateLimitExceededException |
||
116 | * @throws UnsupportedContentTypeException |
||
117 | */ |
||
118 | public function delete($id) |
||
122 | |||
123 | /** |
||
124 | * Restore a ticket |
||
125 | * |
||
126 | * @param $id |
||
127 | * @return mixed|null |
||
128 | * @throws ApiException |
||
129 | * @throws ConflictingStateException |
||
130 | * @throws RateLimitExceededException |
||
131 | * @throws UnsupportedContentTypeException |
||
132 | */ |
||
133 | public function restore($id) |
||
139 | |||
140 | /** |
||
141 | * List ticket fields |
||
142 | * |
||
143 | * @param array|null $query |
||
144 | * @return mixed|null |
||
145 | * @throws AccessDeniedException |
||
146 | * @throws ApiException |
||
147 | * @throws ConflictingStateException |
||
148 | * @throws Exceptions\AuthenticationException |
||
149 | * @throws NotFoundException |
||
150 | */ |
||
151 | public function fields(array $query = null) |
||
155 | |||
156 | /** |
||
157 | * List conversations associated with a ticket |
||
158 | * |
||
159 | * @param array|null $query |
||
160 | * @return mixed|null |
||
161 | * @throws AccessDeniedException |
||
162 | * @throws ApiException |
||
163 | * @throws ConflictingStateException |
||
164 | * @throws AuthenticationException |
||
165 | * @throws NotFoundException |
||
166 | */ |
||
167 | public function conversations($id, array $query = null) |
||
173 | |||
174 | /** |
||
175 | * List time entries associated with a ticket |
||
176 | * |
||
177 | * @param array|null $query |
||
178 | * @return mixed|null |
||
179 | * @throws AccessDeniedException |
||
180 | * @throws ApiException |
||
181 | * @throws ConflictingStateException |
||
182 | * @throws AuthenticationException |
||
183 | * @throws NotFoundException |
||
184 | */ |
||
185 | public function timeEntries($id, array $query = null) |
||
191 | |||
192 | } |