Total Complexity | 4 |
Total Lines | 53 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class ChargeEndpoint extends Endpoint |
||
15 | { |
||
16 | protected string $location = '/service/resources/charges'; |
||
17 | |||
18 | /** |
||
19 | * Endpoint para criar um novo recurso `Charge` |
||
20 | * |
||
21 | * @param Charge $charge |
||
22 | * @return Response |
||
23 | */ |
||
24 | public function create(Charge $charge): Response |
||
27 | } |
||
28 | |||
29 | /** |
||
30 | * Endpoint para atualizar um recurso `Charge` |
||
31 | * |
||
32 | * @param Charge $charge |
||
33 | * @param integer $id |
||
34 | * @return Response |
||
35 | * |
||
36 | * @codeCoverageIgnore |
||
37 | */ |
||
38 | public function update(Charge $charge, int $id): Response |
||
39 | { |
||
40 | return $this->_PUT($charge, ['id' => $id]); |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Endpoint para obter um recurso `Charge` |
||
45 | * |
||
46 | * @param integer $id |
||
47 | * @return Response |
||
48 | * |
||
49 | * @codeCoverageIgnore |
||
50 | */ |
||
51 | public function get(int $id): Response |
||
52 | { |
||
53 | return $this->_GET(['id' => $id]); |
||
54 | } |
||
55 | |||
56 | /** |
||
57 | * Endpoint para listar recursos `Charge` |
||
58 | * |
||
59 | * @param array|null $filters |
||
60 | * @return Response |
||
61 | * |
||
62 | * @codeCoverageIgnore |
||
63 | */ |
||
64 | public function list(?array $filters = []): Response |
||
67 | } |
||
68 | } |