1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | /* |
||
6 | * This file is part of the timechimp bundle package. |
||
7 | * (c) Connect Holland. |
||
8 | */ |
||
9 | |||
10 | namespace ConnectHolland\TimechimpBundle\Api\Endpoint; |
||
11 | |||
12 | class GetExpenses extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint |
||
13 | { |
||
14 | use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait; |
||
15 | |||
16 | public function getMethod(): string |
||
17 | { |
||
18 | return 'GET'; |
||
19 | } |
||
20 | |||
21 | public function getUri(): string |
||
22 | { |
||
23 | return '/v1/expenses'; |
||
24 | } |
||
25 | |||
26 | public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array |
||
27 | { |
||
28 | return [[], null]; |
||
29 | } |
||
30 | |||
31 | public function getExtraHeaders(): array |
||
32 | { |
||
33 | return ['Accept' => ['application/json']]; |
||
34 | } |
||
35 | |||
36 | /** |
||
37 | * {@inheritdoc} |
||
38 | * |
||
39 | * @return \ConnectHolland\TimechimpBundle\Api\Model\Expense[]|null |
||
40 | */ |
||
41 | protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType) |
||
42 | { |
||
43 | if (200 === $status) { |
||
44 | return $serializer->deserialize($body, 'ConnectHolland\\TimechimpBundle\\Api\\Model\\Expense[]', 'json'); |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
45 | } |
||
46 | } |
||
47 | } |
||
48 |