@@ -5,48 +5,48 @@ |
||
5 | 5 | trait CrudEndpoint |
6 | 6 | { |
7 | 7 | |
8 | - /** |
|
9 | - * @param array $attributes |
|
10 | - * @return array |
|
11 | - */ |
|
12 | - public function create(array $attributes) |
|
13 | - { |
|
14 | - return $this |
|
15 | - ->getHttp() |
|
16 | - ->post( |
|
17 | - $this->makeRequestUrl(), |
|
18 | - $attributes, |
|
19 | - ['organizationId' => $this->organizationId] |
|
20 | - ); |
|
21 | - } |
|
8 | + /** |
|
9 | + * @param array $attributes |
|
10 | + * @return array |
|
11 | + */ |
|
12 | + public function create(array $attributes) |
|
13 | + { |
|
14 | + return $this |
|
15 | + ->getHttp() |
|
16 | + ->post( |
|
17 | + $this->makeRequestUrl(), |
|
18 | + $attributes, |
|
19 | + ['organizationId' => $this->organizationId] |
|
20 | + ); |
|
21 | + } |
|
22 | 22 | |
23 | - /** |
|
24 | - * @param string $itemId |
|
25 | - * @param array $attributes |
|
26 | - * @return mixed |
|
27 | - */ |
|
28 | - public function update($itemId, array $attributes) |
|
29 | - { |
|
30 | - return $this |
|
31 | - ->getHttp() |
|
32 | - ->put( |
|
33 | - $this->makeRequestUrl($itemId), |
|
34 | - $attributes, |
|
35 | - ['organizationId' => $this->organizationId] |
|
36 | - ); |
|
37 | - } |
|
23 | + /** |
|
24 | + * @param string $itemId |
|
25 | + * @param array $attributes |
|
26 | + * @return mixed |
|
27 | + */ |
|
28 | + public function update($itemId, array $attributes) |
|
29 | + { |
|
30 | + return $this |
|
31 | + ->getHttp() |
|
32 | + ->put( |
|
33 | + $this->makeRequestUrl($itemId), |
|
34 | + $attributes, |
|
35 | + ['organizationId' => $this->organizationId] |
|
36 | + ); |
|
37 | + } |
|
38 | 38 | |
39 | - /** |
|
40 | - * @param string $itemId |
|
41 | - * @return mixed |
|
42 | - */ |
|
43 | - public function delete($itemId) |
|
44 | - { |
|
45 | - return $this |
|
46 | - ->getHttp() |
|
47 | - ->delete( |
|
48 | - $this->makeRequestUrl($itemId), |
|
49 | - ['organizationId' => $this->organizationId] |
|
50 | - ); |
|
51 | - } |
|
39 | + /** |
|
40 | + * @param string $itemId |
|
41 | + * @return mixed |
|
42 | + */ |
|
43 | + public function delete($itemId) |
|
44 | + { |
|
45 | + return $this |
|
46 | + ->getHttp() |
|
47 | + ->delete( |
|
48 | + $this->makeRequestUrl($itemId), |
|
49 | + ['organizationId' => $this->organizationId] |
|
50 | + ); |
|
51 | + } |
|
52 | 52 | } |