@@ 9-24 (lines=16) @@ | ||
6 | ||
7 | class GenericApi extends BaseApi |
|
8 | { |
|
9 | public function create(array $body, array $uriParameters = [], array $files = []) |
|
10 | { |
|
11 | $response = $this |
|
12 | ->getClient() |
|
13 | ->put( |
|
14 | $this->getUri( |
|
15 | $uriParameters, |
|
16 | $body, |
|
17 | $files |
|
18 | ), |
|
19 | $body |
|
20 | ) |
|
21 | ; |
|
22 | ||
23 | return $response->getStatusCode() === 204; |
|
24 | } |
|
25 | ||
26 | public function update($id, array $body, array $uriParameters = [], array $files = []) |
|
27 | { |
|
@@ 26-39 (lines=14) @@ | ||
23 | return $response->getStatusCode() === 204; |
|
24 | } |
|
25 | ||
26 | public function update($id, array $body, array $uriParameters = [], array $files = []) |
|
27 | { |
|
28 | $uri = sprintf('%s%s', $this->getUri($uriParameters), $id); |
|
29 | ||
30 | $response = $this |
|
31 | ->getClient() |
|
32 | ->put( |
|
33 | $uri, |
|
34 | $body |
|
35 | ) |
|
36 | ; |
|
37 | ||
38 | return $response->getStatusCode() === 204; |
|
39 | } |
|
40 | } |
|
41 |