1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | /* |
||
6 | * This file is part of the timechimp bundle package. |
||
7 | * (c) Connect Holland. |
||
8 | */ |
||
9 | |||
10 | namespace ConnectHolland\TimechimpBundle\Api; |
||
11 | |||
12 | class Client extends \Jane\OpenApiRuntime\Client\Psr7HttplugClient |
||
0 ignored issues
–
show
Deprecated Code
introduced
by
Loading history...
|
|||
13 | { |
||
14 | /** |
||
15 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
16 | * |
||
17 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Customer[]|\Psr\Http\Message\ResponseInterface|null |
||
18 | */ |
||
19 | public function getCustomers(string $fetch = self::FETCH_OBJECT) |
||
20 | { |
||
21 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetCustomers(), $fetch); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
26 | * |
||
27 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Customer|\Psr\Http\Message\ResponseInterface|null |
||
28 | */ |
||
29 | public function createCustomer(\ConnectHolland\TimechimpBundle\Api\Model\Customer $customer, string $fetch = self::FETCH_OBJECT) |
||
30 | { |
||
31 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\CreateCustomer($customer), $fetch); |
||
32 | } |
||
33 | |||
34 | /** |
||
35 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
36 | * |
||
37 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Customer|\Psr\Http\Message\ResponseInterface|null |
||
38 | */ |
||
39 | public function updateCustomer(\ConnectHolland\TimechimpBundle\Api\Model\Customer $customer, string $fetch = self::FETCH_OBJECT) |
||
40 | { |
||
41 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\UpdateCustomer($customer), $fetch); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
46 | * |
||
47 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Customer[]|\Psr\Http\Message\ResponseInterface|null |
||
48 | */ |
||
49 | public function getCustomersByRelationId(string $relationId, string $fetch = self::FETCH_OBJECT) |
||
50 | { |
||
51 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetCustomersByRelationId($relationId), $fetch); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
56 | * |
||
57 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Customer|\Psr\Http\Message\ResponseInterface|null |
||
58 | */ |
||
59 | public function getCustomerByName(string $name, string $fetch = self::FETCH_OBJECT) |
||
60 | { |
||
61 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetCustomerByName($name), $fetch); |
||
62 | } |
||
63 | |||
64 | /** |
||
65 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
66 | * |
||
67 | * @return \Psr\Http\Message\ResponseInterface|null |
||
68 | */ |
||
69 | public function deleteCustomer(int $id, string $fetch = self::FETCH_OBJECT) |
||
70 | { |
||
71 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\DeleteCustomer($id), $fetch); |
||
72 | } |
||
73 | |||
74 | /** |
||
75 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
76 | * |
||
77 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Customer|\Psr\Http\Message\ResponseInterface|null |
||
78 | */ |
||
79 | public function getCustomer(int $id, string $fetch = self::FETCH_OBJECT) |
||
80 | { |
||
81 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetCustomer($id), $fetch); |
||
82 | } |
||
83 | |||
84 | /** |
||
85 | * @param string $startDate Start date as string in format: YYYY-MM-DD |
||
86 | * @param string $endDate End date as string in format: YYYY-MM-DD |
||
87 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
88 | * |
||
89 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Expense[]|\Psr\Http\Message\ResponseInterface|null |
||
90 | */ |
||
91 | public function getExpensesByDateRange(string $startDate, string $endDate, string $fetch = self::FETCH_OBJECT) |
||
92 | { |
||
93 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetExpensesByDateRange($startDate, $endDate), $fetch); |
||
94 | } |
||
95 | |||
96 | /** |
||
97 | * @param int $projectId Id of the project |
||
98 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
99 | * |
||
100 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Expense[]|\Psr\Http\Message\ResponseInterface|null |
||
101 | */ |
||
102 | public function getExpensesByProject(int $projectId, string $fetch = self::FETCH_OBJECT) |
||
103 | { |
||
104 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetExpensesByProject($projectId), $fetch); |
||
105 | } |
||
106 | |||
107 | /** |
||
108 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
109 | * |
||
110 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Expense|\Psr\Http\Message\ResponseInterface|null |
||
111 | */ |
||
112 | public function getExpense(int $id, string $fetch = self::FETCH_OBJECT) |
||
113 | { |
||
114 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetExpense($id), $fetch); |
||
115 | } |
||
116 | |||
117 | /** |
||
118 | * @param array $queryParameters { |
||
119 | * |
||
120 | * @var int $id |
||
121 | * } |
||
122 | * |
||
123 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
124 | * |
||
125 | * @return \Psr\Http\Message\ResponseInterface|null |
||
126 | */ |
||
127 | public function deleteExpense(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) |
||
128 | { |
||
129 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\DeleteExpense($queryParameters), $fetch); |
||
130 | } |
||
131 | |||
132 | /** |
||
133 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
134 | * |
||
135 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Expense[]|\Psr\Http\Message\ResponseInterface|null |
||
136 | */ |
||
137 | public function getExpenses(string $fetch = self::FETCH_OBJECT) |
||
138 | { |
||
139 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetExpenses(), $fetch); |
||
140 | } |
||
141 | |||
142 | /** |
||
143 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
144 | * |
||
145 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Expense|\Psr\Http\Message\ResponseInterface|null |
||
146 | */ |
||
147 | public function createExpense(\ConnectHolland\TimechimpBundle\Api\Model\Expense $expense, string $fetch = self::FETCH_OBJECT) |
||
148 | { |
||
149 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\CreateExpense($expense), $fetch); |
||
150 | } |
||
151 | |||
152 | /** |
||
153 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
154 | * |
||
155 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Expense|\Psr\Http\Message\ResponseInterface|null |
||
156 | */ |
||
157 | public function updateExpense(\ConnectHolland\TimechimpBundle\Api\Model\Expense $expense, string $fetch = self::FETCH_OBJECT) |
||
158 | { |
||
159 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\UpdateExpense($expense), $fetch); |
||
160 | } |
||
161 | |||
162 | /** |
||
163 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
164 | * |
||
165 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Invoice[]|\Psr\Http\Message\ResponseInterface|null |
||
166 | */ |
||
167 | public function getInvoices(string $fetch = self::FETCH_OBJECT) |
||
168 | { |
||
169 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetInvoices(), $fetch); |
||
170 | } |
||
171 | |||
172 | /** |
||
173 | * @param string $startDate Start date as string in format: YYYY-MM-DD |
||
174 | * @param string $endDate End date as string in format: YYYY-MM-DD |
||
175 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
176 | * |
||
177 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Mileage[]|\Psr\Http\Message\ResponseInterface|null |
||
178 | */ |
||
179 | public function getMileageByDateRange(string $startDate, string $endDate, string $fetch = self::FETCH_OBJECT) |
||
180 | { |
||
181 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetMileageByDateRange($startDate, $endDate), $fetch); |
||
182 | } |
||
183 | |||
184 | /** |
||
185 | * @param int $projectId Id of the project |
||
186 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
187 | * |
||
188 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Mileage[]|\Psr\Http\Message\ResponseInterface|null |
||
189 | */ |
||
190 | public function getMileageByProject(int $projectId, string $fetch = self::FETCH_OBJECT) |
||
191 | { |
||
192 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetMileageByProject($projectId), $fetch); |
||
193 | } |
||
194 | |||
195 | /** |
||
196 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
197 | * |
||
198 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Mileage|\Psr\Http\Message\ResponseInterface|null |
||
199 | */ |
||
200 | public function getMileage(int $id, string $fetch = self::FETCH_OBJECT) |
||
201 | { |
||
202 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetMileage($id), $fetch); |
||
203 | } |
||
204 | |||
205 | /** |
||
206 | * @param array $queryParameters { |
||
207 | * |
||
208 | * @var int $id |
||
209 | * } |
||
210 | * |
||
211 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
212 | * |
||
213 | * @return \Psr\Http\Message\ResponseInterface|null |
||
214 | */ |
||
215 | public function deleteMileage(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) |
||
216 | { |
||
217 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\DeleteMileage($queryParameters), $fetch); |
||
218 | } |
||
219 | |||
220 | /** |
||
221 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
222 | * |
||
223 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Mileage[]|\Psr\Http\Message\ResponseInterface|null |
||
224 | */ |
||
225 | public function getMileages(string $fetch = self::FETCH_OBJECT) |
||
226 | { |
||
227 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetMileages(), $fetch); |
||
228 | } |
||
229 | |||
230 | /** |
||
231 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
232 | * |
||
233 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Mileage|\Psr\Http\Message\ResponseInterface|null |
||
234 | */ |
||
235 | public function createMileage(\ConnectHolland\TimechimpBundle\Api\Model\Mileage $mileage, string $fetch = self::FETCH_OBJECT) |
||
236 | { |
||
237 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\CreateMileage($mileage), $fetch); |
||
238 | } |
||
239 | |||
240 | /** |
||
241 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
242 | * |
||
243 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Mileage|\Psr\Http\Message\ResponseInterface|null |
||
244 | */ |
||
245 | public function updateMileage(\ConnectHolland\TimechimpBundle\Api\Model\Mileage $mileage, string $fetch = self::FETCH_OBJECT) |
||
246 | { |
||
247 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\UpdateMileage($mileage), $fetch); |
||
248 | } |
||
249 | |||
250 | /** |
||
251 | * @param array $queryParameters { |
||
252 | * |
||
253 | * @var int $id |
||
254 | * } |
||
255 | * |
||
256 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
257 | * |
||
258 | * @return \Psr\Http\Message\ResponseInterface|null |
||
259 | */ |
||
260 | public function deleteProjectNote(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) |
||
261 | { |
||
262 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\DeleteProjectNote($queryParameters), $fetch); |
||
263 | } |
||
264 | |||
265 | /** |
||
266 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
267 | * |
||
268 | * @return \ConnectHolland\TimechimpBundle\Api\Model\ProjectNote[]|\Psr\Http\Message\ResponseInterface|null |
||
269 | */ |
||
270 | public function getProjectNotes(string $fetch = self::FETCH_OBJECT) |
||
271 | { |
||
272 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetProjectNotes(), $fetch); |
||
273 | } |
||
274 | |||
275 | /** |
||
276 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
277 | * |
||
278 | * @return \ConnectHolland\TimechimpBundle\Api\Model\ProjectNote|\Psr\Http\Message\ResponseInterface|null |
||
279 | */ |
||
280 | public function createProjectNote(\ConnectHolland\TimechimpBundle\Api\Model\ProjectNote $projectNote, string $fetch = self::FETCH_OBJECT) |
||
281 | { |
||
282 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\CreateProjectNote($projectNote), $fetch); |
||
283 | } |
||
284 | |||
285 | /** |
||
286 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
287 | * |
||
288 | * @return \ConnectHolland\TimechimpBundle\Api\Model\ProjectNote|\Psr\Http\Message\ResponseInterface|null |
||
289 | */ |
||
290 | public function updateProjectNote(\ConnectHolland\TimechimpBundle\Api\Model\ProjectNote $projectNote, string $fetch = self::FETCH_OBJECT) |
||
291 | { |
||
292 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\UpdateProjectNote($projectNote), $fetch); |
||
293 | } |
||
294 | |||
295 | /** |
||
296 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
297 | * |
||
298 | * @return \ConnectHolland\TimechimpBundle\Api\Model\ProjectNote|\Psr\Http\Message\ResponseInterface|null |
||
299 | */ |
||
300 | public function getProjectNote(int $id, string $fetch = self::FETCH_OBJECT) |
||
301 | { |
||
302 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetProjectNote($id), $fetch); |
||
303 | } |
||
304 | |||
305 | /** |
||
306 | * @param int $projectId Id of the project |
||
307 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
308 | * |
||
309 | * @return \ConnectHolland\TimechimpBundle\Api\Model\ProjectNote[]|\Psr\Http\Message\ResponseInterface|null |
||
310 | */ |
||
311 | public function getProjectNotesByProject(int $projectId, string $fetch = self::FETCH_OBJECT) |
||
312 | { |
||
313 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetProjectNotesByProject($projectId), $fetch); |
||
314 | } |
||
315 | |||
316 | /** |
||
317 | * @param array $queryParameters { |
||
318 | * |
||
319 | * @var int $id |
||
320 | * } |
||
321 | * |
||
322 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
323 | * |
||
324 | * @return \Psr\Http\Message\ResponseInterface|null |
||
325 | */ |
||
326 | public function deleteProject(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) |
||
327 | { |
||
328 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\DeleteProject($queryParameters), $fetch); |
||
329 | } |
||
330 | |||
331 | /** |
||
332 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
333 | * |
||
334 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Project[]|\Psr\Http\Message\ResponseInterface|null |
||
335 | */ |
||
336 | public function getProjects(string $fetch = self::FETCH_OBJECT) |
||
337 | { |
||
338 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetProjects(), $fetch); |
||
339 | } |
||
340 | |||
341 | /** |
||
342 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
343 | * |
||
344 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Project|\Psr\Http\Message\ResponseInterface|null |
||
345 | */ |
||
346 | public function createProject(\ConnectHolland\TimechimpBundle\Api\Model\Project $project, string $fetch = self::FETCH_OBJECT) |
||
347 | { |
||
348 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\CreateProject($project), $fetch); |
||
349 | } |
||
350 | |||
351 | /** |
||
352 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
353 | * |
||
354 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Project|\Psr\Http\Message\ResponseInterface|null |
||
355 | */ |
||
356 | public function updateProject(\ConnectHolland\TimechimpBundle\Api\Model\Project $project, string $fetch = self::FETCH_OBJECT) |
||
357 | { |
||
358 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\UpdateProject($project), $fetch); |
||
359 | } |
||
360 | |||
361 | /** |
||
362 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
363 | * |
||
364 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Project|\Psr\Http\Message\ResponseInterface|null |
||
365 | */ |
||
366 | public function getProject(int $id, string $fetch = self::FETCH_OBJECT) |
||
367 | { |
||
368 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetProject($id), $fetch); |
||
369 | } |
||
370 | |||
371 | /** |
||
372 | * @param int $customerId Id of the customer |
||
373 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
374 | * |
||
375 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Project[]|\Psr\Http\Message\ResponseInterface|null |
||
376 | */ |
||
377 | public function getProjectsByCustomer(int $customerId, string $fetch = self::FETCH_OBJECT) |
||
378 | { |
||
379 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetProjectsByCustomer($customerId), $fetch); |
||
380 | } |
||
381 | |||
382 | /** |
||
383 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
384 | * |
||
385 | * @return \ConnectHolland\TimechimpBundle\Api\Model\ProjectInsights|\Psr\Http\Message\ResponseInterface|null |
||
386 | */ |
||
387 | public function getProjectInsights(int $id, string $fetch = self::FETCH_OBJECT) |
||
388 | { |
||
389 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetProjectInsights($id), $fetch); |
||
390 | } |
||
391 | |||
392 | /** |
||
393 | * @param array $queryParameters { |
||
394 | * |
||
395 | * @var int $id |
||
396 | * } |
||
397 | * |
||
398 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
399 | * |
||
400 | * @return \Psr\Http\Message\ResponseInterface|null |
||
401 | */ |
||
402 | public function deleteTag(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) |
||
403 | { |
||
404 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\DeleteTag($queryParameters), $fetch); |
||
405 | } |
||
406 | |||
407 | /** |
||
408 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
409 | * |
||
410 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Tag[]|\Psr\Http\Message\ResponseInterface|null |
||
411 | */ |
||
412 | public function getTags(string $fetch = self::FETCH_OBJECT) |
||
413 | { |
||
414 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetTags(), $fetch); |
||
415 | } |
||
416 | |||
417 | /** |
||
418 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
419 | * |
||
420 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Tag|\Psr\Http\Message\ResponseInterface|null |
||
421 | */ |
||
422 | public function createTag(\ConnectHolland\TimechimpBundle\Api\Model\Tag $tag, string $fetch = self::FETCH_OBJECT) |
||
423 | { |
||
424 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\CreateTag($tag), $fetch); |
||
425 | } |
||
426 | |||
427 | /** |
||
428 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
429 | * |
||
430 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Tag|\Psr\Http\Message\ResponseInterface|null |
||
431 | */ |
||
432 | public function updateTag(\ConnectHolland\TimechimpBundle\Api\Model\Tag $tag, string $fetch = self::FETCH_OBJECT) |
||
433 | { |
||
434 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\UpdateTag($tag), $fetch); |
||
435 | } |
||
436 | |||
437 | /** |
||
438 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
439 | * |
||
440 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Tag|\Psr\Http\Message\ResponseInterface|null |
||
441 | */ |
||
442 | public function getTag(int $id, string $fetch = self::FETCH_OBJECT) |
||
443 | { |
||
444 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetTag($id), $fetch); |
||
445 | } |
||
446 | |||
447 | /** |
||
448 | * @param array $queryParameters { |
||
449 | * |
||
450 | * @var int $id |
||
451 | * } |
||
452 | * |
||
453 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
454 | * |
||
455 | * @return \Psr\Http\Message\ResponseInterface|null |
||
456 | */ |
||
457 | public function deleteTask(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) |
||
458 | { |
||
459 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\DeleteTask($queryParameters), $fetch); |
||
460 | } |
||
461 | |||
462 | /** |
||
463 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
464 | * |
||
465 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Task[]|\Psr\Http\Message\ResponseInterface|null |
||
466 | */ |
||
467 | public function getTasks(string $fetch = self::FETCH_OBJECT) |
||
468 | { |
||
469 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetTasks(), $fetch); |
||
470 | } |
||
471 | |||
472 | /** |
||
473 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
474 | * |
||
475 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Task|\Psr\Http\Message\ResponseInterface|null |
||
476 | */ |
||
477 | public function createTask(\ConnectHolland\TimechimpBundle\Api\Model\Task $task, string $fetch = self::FETCH_OBJECT) |
||
478 | { |
||
479 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\CreateTask($task), $fetch); |
||
480 | } |
||
481 | |||
482 | /** |
||
483 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
484 | * |
||
485 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Task|\Psr\Http\Message\ResponseInterface|null |
||
486 | */ |
||
487 | public function updateTask(\ConnectHolland\TimechimpBundle\Api\Model\Task $task, string $fetch = self::FETCH_OBJECT) |
||
488 | { |
||
489 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\UpdateTask($task), $fetch); |
||
490 | } |
||
491 | |||
492 | /** |
||
493 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
494 | * |
||
495 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Task|\Psr\Http\Message\ResponseInterface|null |
||
496 | */ |
||
497 | public function getTask(int $id, string $fetch = self::FETCH_OBJECT) |
||
498 | { |
||
499 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetTask($id), $fetch); |
||
500 | } |
||
501 | |||
502 | /** |
||
503 | * @param string $startDate Start date as string in format: YYYY-MM-DD |
||
504 | * @param string $endDate End date as string in format: YYYY-MM-DD |
||
505 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
506 | * |
||
507 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Time[]|\Psr\Http\Message\ResponseInterface|null |
||
508 | */ |
||
509 | public function getTimeByDateRange(string $startDate, string $endDate, string $fetch = self::FETCH_OBJECT) |
||
510 | { |
||
511 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetTimeByDateRange($startDate, $endDate), $fetch); |
||
512 | } |
||
513 | |||
514 | /** |
||
515 | * @param int $projectId Id of the project |
||
516 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
517 | * |
||
518 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Time[]|\Psr\Http\Message\ResponseInterface|null |
||
519 | */ |
||
520 | public function getTimeByProject(int $projectId, string $fetch = self::FETCH_OBJECT) |
||
521 | { |
||
522 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetTimeByProject($projectId), $fetch); |
||
523 | } |
||
524 | |||
525 | /** |
||
526 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
527 | * |
||
528 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Time|\Psr\Http\Message\ResponseInterface|null |
||
529 | */ |
||
530 | public function getTime(int $id, string $fetch = self::FETCH_OBJECT) |
||
531 | { |
||
532 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetTime($id), $fetch); |
||
533 | } |
||
534 | |||
535 | /** |
||
536 | * @param array $queryParameters { |
||
537 | * |
||
538 | * @var int $id |
||
539 | * } |
||
540 | * |
||
541 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
542 | * |
||
543 | * @return \Psr\Http\Message\ResponseInterface|null |
||
544 | */ |
||
545 | public function deleteTime(array $queryParameters = [], string $fetch = self::FETCH_OBJECT) |
||
546 | { |
||
547 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\DeleteTime($queryParameters), $fetch); |
||
548 | } |
||
549 | |||
550 | /** |
||
551 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
552 | * |
||
553 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Time[]|\Psr\Http\Message\ResponseInterface|null |
||
554 | */ |
||
555 | public function getTimes(string $fetch = self::FETCH_OBJECT) |
||
556 | { |
||
557 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetTimes(), $fetch); |
||
558 | } |
||
559 | |||
560 | /** |
||
561 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
562 | * |
||
563 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Time|\Psr\Http\Message\ResponseInterface|null |
||
564 | */ |
||
565 | public function createTime(\ConnectHolland\TimechimpBundle\Api\Model\Time $time, string $fetch = self::FETCH_OBJECT) |
||
566 | { |
||
567 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\CreateTime($time), $fetch); |
||
568 | } |
||
569 | |||
570 | /** |
||
571 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
572 | * |
||
573 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Time|\Psr\Http\Message\ResponseInterface|null |
||
574 | */ |
||
575 | public function updateTime(\ConnectHolland\TimechimpBundle\Api\Model\Time $time, string $fetch = self::FETCH_OBJECT) |
||
576 | { |
||
577 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\UpdateTime($time), $fetch); |
||
578 | } |
||
579 | |||
580 | /** |
||
581 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
582 | * |
||
583 | * @return \Psr\Http\Message\ResponseInterface|null |
||
584 | */ |
||
585 | public function startTimer(int $id, string $fetch = self::FETCH_OBJECT) |
||
586 | { |
||
587 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\StartTimer($id), $fetch); |
||
588 | } |
||
589 | |||
590 | /** |
||
591 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
592 | * |
||
593 | * @return \Psr\Http\Message\ResponseInterface|null |
||
594 | */ |
||
595 | public function stopTimer(int $id, string $fetch = self::FETCH_OBJECT) |
||
596 | { |
||
597 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\StopTimer($id), $fetch); |
||
598 | } |
||
599 | |||
600 | /** |
||
601 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
602 | * |
||
603 | * @return \ConnectHolland\TimechimpBundle\Api\Model\User[]|\Psr\Http\Message\ResponseInterface|null |
||
604 | */ |
||
605 | public function getUsers(string $fetch = self::FETCH_OBJECT) |
||
606 | { |
||
607 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\GetUsers(), $fetch); |
||
608 | } |
||
609 | |||
610 | /** |
||
611 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
612 | * |
||
613 | * @return \ConnectHolland\TimechimpBundle\Api\Model\User[]|\Psr\Http\Message\ResponseInterface|null |
||
614 | */ |
||
615 | public function putUsers(string $fetch = self::FETCH_OBJECT) |
||
616 | { |
||
617 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\PutUsers(), $fetch); |
||
618 | } |
||
619 | |||
620 | /** |
||
621 | * @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE) |
||
622 | * |
||
623 | * @return \ConnectHolland\TimechimpBundle\Api\Model\User|\Psr\Http\Message\ResponseInterface|null |
||
624 | */ |
||
625 | public function me(string $fetch = self::FETCH_OBJECT) |
||
626 | { |
||
627 | return $this->executePsr7Endpoint(new \ConnectHolland\TimechimpBundle\Api\Endpoint\Me(), $fetch); |
||
628 | } |
||
629 | |||
630 | public static function create($httpClient = null, \Jane\OpenApiRuntime\Client\Authentication $authentication = null) |
||
631 | { |
||
632 | if (null === $httpClient) { |
||
633 | $httpClient = \Http\Discovery\HttpClientDiscovery::find(); |
||
634 | $plugins = []; |
||
635 | $uri = \Http\Discovery\UriFactoryDiscovery::find()->createUri('https://api.timechimp.com'); |
||
636 | $plugins[] = new \Http\Client\Common\Plugin\AddHostPlugin($uri); |
||
637 | if (null !== $authentication) { |
||
638 | $plugins[] = $authentication->getPlugin(); |
||
639 | } |
||
640 | $httpClient = new \Http\Client\Common\PluginClient($httpClient, $plugins); |
||
641 | } |
||
642 | $messageFactory = \Http\Discovery\MessageFactoryDiscovery::find(); |
||
643 | $streamFactory = \Http\Discovery\StreamFactoryDiscovery::find(); |
||
644 | $serializer = new \Symfony\Component\Serializer\Serializer([new \Symfony\Component\Serializer\Normalizer\ArrayDenormalizer(), new \ConnectHolland\TimechimpBundle\Api\Normalizer\JaneObjectNormalizer()], [new \Symfony\Component\Serializer\Encoder\JsonEncoder(new \Symfony\Component\Serializer\Encoder\JsonEncode(), new \Symfony\Component\Serializer\Encoder\JsonDecode())]); |
||
645 | |||
646 | return new static($httpClient, $messageFactory, $serializer, $streamFactory); |
||
647 | } |
||
648 | } |
||
649 |