Total Complexity | 4 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class Locations extends ApiService { |
||
15 | |||
16 | /** |
||
17 | * @param int $id |
||
18 | * @return Location|null |
||
19 | * @throws ApiException |
||
20 | * @throws OAuthException |
||
21 | */ |
||
22 | public function fetch(int $id): ?Location |
||
23 | { |
||
24 | /** @var Location|null $fetch */ |
||
25 | $fetch = $this->_get('api/locations/location/' . $id); |
||
26 | return $fetch; |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param array $data |
||
31 | * @return Location|null |
||
32 | * @throws ApiException |
||
33 | * @throws OAuthException |
||
34 | */ |
||
35 | public function create(array $data): ?Location |
||
36 | { |
||
37 | /** @var Location|null $create */ |
||
38 | $create = $this->_post('api/locations/location', $data); |
||
39 | return $create; |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * @param int $id |
||
44 | * @param array $data |
||
45 | * @return Location|null |
||
46 | * @throws ApiException |
||
47 | * @throws OAuthException |
||
48 | */ |
||
49 | public function update(int $id, array $data): ?Location |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * @return ListResource |
||
58 | */ |
||
59 | public function all(): ListResource { |
||
61 | } |
||
62 | } |
||
63 |