Skip to content

Commit dfb1f78

Browse files
authored
Upgrade client
1 parent baa95d7 commit dfb1f78

18 files changed

Lines changed: 246 additions & 334 deletions

.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ src/Model/CommonResponse.php
1010
src/Model/CountryStatus.php
1111
src/Model/ErrorWrapper.php
1212
src/Model/ModelInterface.php
13+
src/Model/OneOfInterface.php
1314
src/Model/Status.php
1415
src/Model/StatusInformationResponse.php
1516
src/Model/StatusInformationResponseVow.php

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.20.0
1+
7.24.0

src/Api/PublicApi.php

Lines changed: 7 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The version of the OpenAPI document: 1.0.0
1818
* @generated Generated by: https://openapi-generator.tech
19-
* Generator version: 7.20.0
19+
* Generator version: 7.24.0
2020
*/
2121

2222
/**
@@ -32,7 +32,6 @@
3232
use GuzzleHttp\ClientInterface;
3333
use GuzzleHttp\Exception\ConnectException;
3434
use GuzzleHttp\Exception\RequestException;
35-
use GuzzleHttp\Psr7\MultipartStream;
3635
use GuzzleHttp\Psr7\Request;
3736
use GuzzleHttp\RequestOptions;
3837
use GuzzleHttp\Promise\PromiseInterface;
@@ -41,7 +40,6 @@
4140
use Cone\Vies\ApiException;
4241
use Cone\Vies\Configuration;
4342
use Cone\Vies\HeaderSelector;
44-
use Cone\Vies\FormDataProcessor;
4543
use Cone\Vies\ObjectSerializer;
4644

4745
/**
@@ -72,7 +70,7 @@ class PublicApi
7270
*/
7371
protected int $hostIndex;
7472

75-
/** @var string[] $contentTypes **/
73+
/** @var array<string,string[]> $contentTypes **/
7674
public const contentTypes = [
7775
'checkStatus' => [
7876
'application/json',
@@ -158,7 +156,7 @@ public function checkStatus(
158156
*
159157
* @throws ApiException on non-2xx response or if the response body is not in the expected format
160158
* @throws InvalidArgumentException
161-
* @return array of \Cone\Vies\Model\StatusInformationResponse|\Cone\Vies\Model\CommonResponse|\Cone\Vies\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings)
159+
* @return array{0: \Cone\Vies\Model\StatusInformationResponse|\Cone\Vies\Model\CommonResponse, 1: int, 2: array<string, string[]>} [response data, HTTP status code, HTTP response headers]
162160
*/
163161
public function checkStatusWithHttpInfo(
164162
string $contentType = self::contentTypes['checkStatus'][0]
@@ -208,7 +206,6 @@ public function checkStatusWithHttpInfo(
208206
);
209207
}
210208

211-
212209
if ($statusCode < 200 || $statusCode > 299) {
213210
throw new ApiException(
214211
sprintf(
@@ -344,9 +341,7 @@ public function checkStatusRequest(
344341
string $contentType = self::contentTypes['checkStatus'][0]
345342
): Request {
346343

347-
348344
$resourcePath = '/check-status';
349-
$formParams = [];
350345
$queryParams = [];
351346
$headerParams = [];
352347
$httpBody = '';
@@ -362,30 +357,6 @@ public function checkStatusRequest(
362357
$multipart
363358
);
364359

365-
// for model (json/xml)
366-
if (count($formParams) > 0) {
367-
if ($multipart) {
368-
$multipartContents = [];
369-
foreach ($formParams as $formParamName => $formParamValue) {
370-
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
371-
foreach ($formParamValueItems as $formParamValueItem) {
372-
$multipartContents[] = [
373-
'name' => $formParamName,
374-
'contents' => $formParamValueItem,
375-
];
376-
}
377-
}
378-
// for HTTP post (form)
379-
$httpBody = new MultipartStream($multipartContents);
380-
381-
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
382-
// if Content-Type contains "application/json", json_encode the form parameters
383-
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
384-
} else {
385-
// for HTTP post (form)
386-
$httpBody = ObjectSerializer::buildQuery($formParams);
387-
}
388-
}
389360

390361
$defaultHeaders = [];
391362
if ($this->config->getUserAgent()) {
@@ -438,7 +409,7 @@ public function checkVatNumber(
438409
*
439410
* @throws ApiException on non-2xx response or if the response body is not in the expected format
440411
* @throws InvalidArgumentException
441-
* @return array of \Cone\Vies\Model\CheckVatResponse|\Cone\Vies\Model\CommonResponse|\Cone\Vies\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings)
412+
* @return array{0: \Cone\Vies\Model\CheckVatResponse|\Cone\Vies\Model\CommonResponse, 1: int, 2: array<string, string[]>} [response data, HTTP status code, HTTP response headers]
442413
*/
443414
public function checkVatNumberWithHttpInfo(
444415
\Cone\Vies\Model\CheckVatRequest $body,
@@ -489,7 +460,6 @@ public function checkVatNumberWithHttpInfo(
489460
);
490461
}
491462

492-
493463
if ($statusCode < 200 || $statusCode > 299) {
494464
throw new ApiException(
495465
sprintf(
@@ -630,15 +600,13 @@ public function checkVatNumberRequest(
630600
\Cone\Vies\Model\CheckVatRequest $body,
631601
string $contentType = self::contentTypes['checkVatNumber'][0]
632602
): Request {
633-
634603
// verify the required parameter 'body' is set
635604
if ($body === null || (is_array($body) && count($body) === 0)) {
636605
throw new InvalidArgumentException(
637606
'Missing the required parameter $body when calling checkVatNumber'
638607
);
639608
}
640609

641-
642610
$resourcePath = '/check-vat-number';
643611
$formParams = [];
644612
$queryParams = [];
@@ -677,7 +645,7 @@ public function checkVatNumberRequest(
677645
}
678646
}
679647
// for HTTP post (form)
680-
$httpBody = new MultipartStream($multipartContents);
648+
$httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents);
681649

682650
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
683651
// if Content-Type contains "application/json", json_encode the form parameters
@@ -739,7 +707,7 @@ public function checkVatTestService(
739707
*
740708
* @throws ApiException on non-2xx response or if the response body is not in the expected format
741709
* @throws InvalidArgumentException
742-
* @return array of \Cone\Vies\Model\CheckVatResponse|\Cone\Vies\Model\CommonResponse|\Cone\Vies\Model\CommonResponse, HTTP status code, HTTP response headers (array of strings)
710+
* @return array{0: \Cone\Vies\Model\CheckVatResponse|\Cone\Vies\Model\CommonResponse, 1: int, 2: array<string, string[]>} [response data, HTTP status code, HTTP response headers]
743711
*/
744712
public function checkVatTestServiceWithHttpInfo(
745713
\Cone\Vies\Model\CheckVatRequest $body,
@@ -790,7 +758,6 @@ public function checkVatTestServiceWithHttpInfo(
790758
);
791759
}
792760

793-
794761
if ($statusCode < 200 || $statusCode > 299) {
795762
throw new ApiException(
796763
sprintf(
@@ -931,15 +898,13 @@ public function checkVatTestServiceRequest(
931898
\Cone\Vies\Model\CheckVatRequest $body,
932899
string $contentType = self::contentTypes['checkVatTestService'][0]
933900
): Request {
934-
935901
// verify the required parameter 'body' is set
936902
if ($body === null || (is_array($body) && count($body) === 0)) {
937903
throw new InvalidArgumentException(
938904
'Missing the required parameter $body when calling checkVatTestService'
939905
);
940906
}
941907

942-
943908
$resourcePath = '/check-vat-test-service';
944909
$formParams = [];
945910
$queryParams = [];
@@ -978,7 +943,7 @@ public function checkVatTestServiceRequest(
978943
}
979944
}
980945
// for HTTP post (form)
981-
$httpBody = new MultipartStream($multipartContents);
946+
$httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents);
982947

983948
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
984949
// if Content-Type contains "application/json", json_encode the form parameters

src/ApiException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The version of the OpenAPI document: 1.0.0
1818
* @generated Generated by: https://openapi-generator.tech
19-
* Generator version: 7.20.0
19+
* Generator version: 7.24.0
2020
*/
2121

2222
/**

src/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The version of the OpenAPI document: 1.0.0
1818
* @generated Generated by: https://openapi-generator.tech
19-
* Generator version: 7.20.0
19+
* Generator version: 7.24.0
2020
*/
2121

2222
/**

src/FormDataProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* The version of the OpenAPI document: 1.0.0
1919
* @generated Generated by: https://openapi-generator.tech
20-
* Generator version: 7.20.0
20+
* Generator version: 7.24.0
2121
*/
2222

2323
/**

src/HeaderSelector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* The version of the OpenAPI document: 1.0.0
1818
* @generated Generated by: https://openapi-generator.tech
19-
* Generator version: 7.20.0
19+
* Generator version: 7.24.0
2020
*/
2121

2222
/**

src/Model/CheckVatRequest.php

Lines changed: 15 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
* The version of the OpenAPI document: 1.0.0
1919
* @generated Generated by: https://openapi-generator.tech
20-
* Generator version: 7.20.0
20+
* Generator version: 7.24.0
2121
*/
2222

2323
/**
@@ -111,19 +111,15 @@ class CheckVatRequest implements ModelInterface, ArrayAccess, JsonSerializable
111111
protected array $openAPINullablesSetToNull = [];
112112

113113
/**
114-
* Array of property to type mappings. Used for (de)serialization
115-
*
116-
* @return array<string, string>
114+
* {@inheritdoc}
117115
*/
118116
public static function openAPITypes(): array
119117
{
120118
return self::$openAPITypes;
121119
}
122120

123121
/**
124-
* Array of property to format mappings. Used for (de)serialization
125-
*
126-
* @return array<string, string>
122+
* {@inheritdoc}
127123
*/
128124
public static function openAPIFormats(): array
129125
{
@@ -161,21 +157,15 @@ private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull):
161157
}
162158

163159
/**
164-
* Checks if a property is nullable
165-
*
166-
* @param string $property
167-
* @return bool
160+
* {@inheritdoc}
168161
*/
169162
public static function isNullable(string $property): bool
170163
{
171164
return self::openAPINullables()[$property] ?? false;
172165
}
173166

174167
/**
175-
* Checks if a nullable property is set to null.
176-
*
177-
* @param string $property
178-
* @return bool
168+
* {@inheritdoc}
179169
*/
180170
public function isNullableSetToNull(string $property): bool
181171
{
@@ -235,40 +225,31 @@ public function isNullableSetToNull(string $property): bool
235225
];
236226

237227
/**
238-
* Array of attributes where the key is the local name,
239-
* and the value is the original name
240-
*
241-
* @return array<string, string>
228+
* {@inheritdoc}
242229
*/
243230
public static function attributeMap(): array
244231
{
245232
return self::$attributeMap;
246233
}
247234

248235
/**
249-
* Array of attributes to setter functions (for deserialization of responses)
250-
*
251-
* @return array<string, string>
236+
* {@inheritdoc}
252237
*/
253238
public static function setters(): array
254239
{
255240
return self::$setters;
256241
}
257242

258243
/**
259-
* Array of attributes to getter functions (for serialization of requests)
260-
*
261-
* @return array<string, string>
244+
* {@inheritdoc}
262245
*/
263246
public static function getters(): array
264247
{
265248
return self::$getters;
266249
}
267250

268251
/**
269-
* The original name of the model.
270-
*
271-
* @return string
252+
* {@inheritdoc}
272253
*/
273254
public function getModelName(): string
274255
{
@@ -320,9 +301,7 @@ private function setIfExists(string $variableName, array $fields, mixed $default
320301
}
321302

322303
/**
323-
* Show all the invalid properties with reasons.
324-
*
325-
* @return string[] invalid properties with reasons
304+
* {@inheritdoc}
326305
*/
327306
public function listInvalidProperties(): array
328307
{
@@ -332,10 +311,7 @@ public function listInvalidProperties(): array
332311
}
333312

334313
/**
335-
* Validate all the properties in the model
336-
* return true if all passed
337-
*
338-
* @return bool True if all properties are valid
314+
* {@inheritdoc}
339315
*/
340316
public function valid(): bool
341317
{
@@ -588,7 +564,7 @@ public function setTraderCompanyType(?string $traderCompanyType): static
588564
/**
589565
* Returns true if offset exists. False otherwise.
590566
*
591-
* @param int $offset Offset
567+
* @param int|string $offset Offset
592568
*
593569
* @return bool
594570
*/
@@ -600,7 +576,7 @@ public function offsetExists(mixed $offset): bool
600576
/**
601577
* Gets offset.
602578
*
603-
* @param int $offset Offset
579+
* @param int|string $offset Offset
604580
*
605581
* @return mixed|null
606582
*/
@@ -613,7 +589,7 @@ public function offsetGet(mixed $offset): mixed
613589
/**
614590
* Sets value based on offset.
615591
*
616-
* @param int|null $offset Offset
592+
* @param int|string|null $offset Offset
617593
* @param mixed $value Value to be set
618594
*
619595
* @return void
@@ -630,7 +606,7 @@ public function offsetSet(mixed $offset, mixed $value): void
630606
/**
631607
* Unsets offset.
632608
*
633-
* @param int $offset Offset
609+
* @param int|string $offset Offset
634610
*
635611
* @return void
636612
*/

0 commit comments

Comments
 (0)