Skip to content

Commit 0dc5520

Browse files
committed
Correct getAnItem return type from ItemResponseJson to ItemResponses
1 parent 682eb6d commit 0dc5520

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/Apis/MP/US/ItemsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ See the [Authorization](../../../../README.md#authorization) section of the READ
8787
## `getAnItem()`
8888

8989
```php
90-
getAnItem($id, $productIdType): \Walmart\Models\MP\US\Items\ItemResponseJson
90+
getAnItem($id, $productIdType): \Walmart\Models\MP\US\Items\ItemResponses
9191
```
9292
An item
9393

@@ -128,7 +128,7 @@ try {
128128

129129
### Return type
130130

131-
[**\Walmart\Models\MP\US\Items\ItemResponseJson**](../../../Models/MP/US/Items/ItemResponseJson.md)
131+
[**\Walmart\Models\MP\US\Items\ItemResponses**](../../../Models/MP/US/Items/ItemResponses.md)
132132

133133
### Authorization
134134

resources/schemas/us/mp/items.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@
16601660
"content": {
16611661
"application\/json": {
16621662
"schema": {
1663-
"$ref": "#\/components\/schemas\/ItemResponse_json"
1663+
"$ref": "#\/components\/schemas\/ItemResponses"
16641664
},
16651665
"example": {
16661666
"ItemResponse": [

resources/templates/ObjectSerializer.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ class ObjectSerializer
389389
* @param string $class class name is passed as a string
390390
* @param string[] $httpHeaders HTTP headers
391391
*
392-
* @return object|array|null a single or an array of $class instances
392+
* @return mixed an instance of $class (which may actually be a scalar)
393393
*/
394394
public static function deserialize($data, $class, $httpHeaders = null)
395395
{

src/Apis/MP/US/ItemsApi.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -461,12 +461,12 @@ protected function getAllItemsRequest(
461461
*
462462
* @throws \Walmart\ApiException on non-2xx response
463463
* @throws \InvalidArgumentException
464-
* @return \Walmart\Models\MP\US\Items\ItemResponseJson
464+
* @return \Walmart\Models\MP\US\Items\ItemResponses
465465
*/
466466
public function getAnItem(
467467
string $id,
468468
string $productIdType
469-
): \Walmart\Models\MP\US\Items\ItemResponseJson {
469+
): \Walmart\Models\MP\US\Items\ItemResponses {
470470
return $this->getAnItemWithHttpInfo($id, $productIdType);
471471
}
472472

@@ -480,12 +480,12 @@ public function getAnItem(
480480
*
481481
* @throws \Walmart\ApiException on non-2xx response
482482
* @throws \InvalidArgumentException
483-
* @return \Walmart\Models\MP\US\Items\ItemResponseJson
483+
* @return \Walmart\Models\MP\US\Items\ItemResponses
484484
*/
485485
protected function getAnItemWithHttpInfo(
486486
string $id,
487487
string $productIdType,
488-
): \Walmart\Models\MP\US\Items\ItemResponseJson {
488+
): \Walmart\Models\MP\US\Items\ItemResponses {
489489
$request = $this->getAnItemRequest($id, $productIdType);
490490
$this->writeDebug($request);
491491
$this->writeDebug((string) $request->getBody());
@@ -535,19 +535,19 @@ protected function getAnItemWithHttpInfo(
535535
}
536536
switch ($statusCode) {
537537
case 200:
538-
if ('\Walmart\Models\MP\US\Items\ItemResponseJson' === '\SplFileObject') {
538+
if ('\Walmart\Models\MP\US\Items\ItemResponses' === '\SplFileObject') {
539539
$content = $response->getBody(); //stream goes to serializer
540540
} else {
541541
$content = (string) $response->getBody();
542-
if ('\Walmart\Models\MP\US\Items\ItemResponseJson' !== 'string') {
542+
if ('\Walmart\Models\MP\US\Items\ItemResponses' !== 'string') {
543543
$content = json_decode($content);
544544
}
545545
}
546546

547-
return ObjectSerializer::deserialize($content, '\Walmart\Models\MP\US\Items\ItemResponseJson', $response->getHeaders());
547+
return ObjectSerializer::deserialize($content, '\Walmart\Models\MP\US\Items\ItemResponses', $response->getHeaders());
548548
}
549549

550-
$returnType = '\Walmart\Models\MP\US\Items\ItemResponseJson';
550+
$returnType = '\Walmart\Models\MP\US\Items\ItemResponses';
551551
if ($returnType === '\SplFileObject') {
552552
$content = $response->getBody(); //stream goes to serializer
553553
} else {
@@ -563,7 +563,7 @@ protected function getAnItemWithHttpInfo(
563563
case 200:
564564
$data = ObjectSerializer::deserialize(
565565
$e->getResponseBody(),
566-
'\Walmart\Models\MP\US\Items\ItemResponseJson',
566+
'\Walmart\Models\MP\US\Items\ItemResponses',
567567
$e->getResponseHeaders()
568568
);
569569
$e->setResponseObject($data);
@@ -613,7 +613,7 @@ protected function getAnItemAsyncWithHttpInfo(
613613
string $id,
614614
string $productIdType,
615615
): PromiseInterface {
616-
$returnType = '\Walmart\Models\MP\US\Items\ItemResponseJson';
616+
$returnType = '\Walmart\Models\MP\US\Items\ItemResponses';
617617
$request = $this->getAnItemRequest($id, $productIdType);
618618
$this->writeDebug($request);
619619
$this->writeDebug((string) $request->getBody());

src/ObjectSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public static function serializeCollection(array $collection, $style, $allowColl
394394
* @param string $class class name is passed as a string
395395
* @param string[] $httpHeaders HTTP headers
396396
*
397-
* @return object|array|null a single or an array of $class instances
397+
* @return mixed an instance of $class (which may actually be a scalar)
398398
*/
399399
public static function deserialize($data, $class, $httpHeaders = null)
400400
{

0 commit comments

Comments
 (0)