Total Complexity | 5 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
13 | class OrderApi implements OrderApiResourceInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var CommonResourceClientInterface |
||
17 | */ |
||
18 | private $resourceClient; |
||
19 | |||
20 | /** |
||
21 | * @param CommonResourceClientInterface $resourceClient |
||
22 | */ |
||
23 | public function __construct(CommonResourceClientInterface $resourceClient) |
||
24 | { |
||
25 | $this->resourceClient = $resourceClient; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @inheritDoc |
||
30 | */ |
||
31 | public function create(array $data): array |
||
32 | { |
||
33 | return $this->resourceClient->createResource('api/3/ecomOrders', [], $data); |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * @inheritDoc |
||
38 | */ |
||
39 | public function delete(int $id): bool |
||
40 | { |
||
41 | return $this->resourceClient->deleteResource('api/3/ecomOrders/%s', [$id]); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @inheritDoc |
||
46 | */ |
||
47 | public function get(int $id): array |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @inheritDoc |
||
54 | */ |
||
55 | public function update(int $id, array $data = []): array |
||
58 | } |
||
59 | } |
||
60 |