1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Starweb\Api\Generated\Endpoint; |
4
|
|
|
|
5
|
|
|
class CreatePricelist extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint |
6
|
|
|
{ |
7
|
|
|
/** |
8
|
|
|
* Create a pricelist. Retrieves the created `Pricelist` object |
9
|
|
|
* |
10
|
|
|
* @param mixed $requestBody |
11
|
|
|
*/ |
12
|
|
|
public function __construct(mixed $requestBody) |
|
|
|
|
13
|
|
|
{ |
14
|
|
|
$this->body = $requestBody; |
15
|
|
|
} |
16
|
|
|
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait; |
17
|
|
|
public function getMethod() : string |
18
|
|
|
{ |
19
|
|
|
return 'POST'; |
20
|
|
|
} |
21
|
|
|
public function getUri() : string |
22
|
|
|
{ |
23
|
|
|
return '/pricelists'; |
24
|
|
|
} |
25
|
|
|
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null) : array |
26
|
|
|
{ |
27
|
|
|
if (isset($this->body)) { |
28
|
|
|
return array(array('Content-Type' => array('application/json')), json_encode($this->body)); |
29
|
|
|
} |
30
|
|
|
return array(array(), null); |
31
|
|
|
} |
32
|
|
|
public function getExtraHeaders() : array |
33
|
|
|
{ |
34
|
|
|
return array('Accept' => array('application/json')); |
35
|
|
|
} |
36
|
|
|
/** |
37
|
|
|
* {@inheritdoc} |
38
|
|
|
* |
39
|
|
|
* @throws \Starweb\Api\Generated\Exception\CreatePricelistBadRequestException |
40
|
|
|
* |
41
|
|
|
* @return null|\Starweb\Api\Generated\Model\PricelistModelItem |
42
|
|
|
*/ |
43
|
|
|
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null) |
44
|
|
|
{ |
45
|
|
|
if (201 === $status && 'application/json' === $contentType) { |
46
|
|
|
return $serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\PricelistModelItem', 'json'); |
47
|
|
|
} |
48
|
|
|
if (400 === $status && 'application/json' === $contentType) { |
49
|
|
|
throw new \Starweb\Api\Generated\Exception\CreatePricelistBadRequestException($serializer->deserialize($body, 'Starweb\\Api\\Generated\\Model\\ErrorModel', 'json')); |
|
|
|
|
50
|
|
|
} |
51
|
|
|
} |
52
|
|
|
} |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths