Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
vendor
composer.lock
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.2 || ^7.0",
"guzzlehttp/psr7": "^1.8.2"
"guzzlehttp/psr7": "^1.8.2 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8",
Expand Down
48 changes: 24 additions & 24 deletions src/com/amazon/paapi5/v1/api/DefaultApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function getBrowseNodesWithHttpInfo($getBrowseNodesRequest)
/**
* Operation getBrowseNodesAsync
*
*
*
*
* @param \Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetBrowseNodesRequest $getBrowseNodesRequest GetBrowseNodesRequest (required)
*
Expand All @@ -227,7 +227,7 @@ function ($response) {
/**
* Operation getBrowseNodesAsyncWithHttpInfo
*
*
*
*
* @param \Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetBrowseNodesRequest $getBrowseNodesRequest GetBrowseNodesRequest (required)
*
Expand Down Expand Up @@ -341,7 +341,7 @@ protected function getBrowseNodesRequest($getBrowseNodesRequest)
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
Expand All @@ -356,11 +356,11 @@ protected function getBrowseNodesRequest($getBrowseNodesRequest)
$httpBody = new MultipartStream($multipartContents);

} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -378,7 +378,7 @@ protected function getBrowseNodesRequest($getBrowseNodesRequest)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -519,7 +519,7 @@ public function getItemsWithHttpInfo($getItemsRequest)
/**
* Operation getItemsAsync
*
*
*
*
* @param \Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsRequest $getItemsRequest GetItemsRequest (required)
*
Expand All @@ -539,7 +539,7 @@ function ($response) {
/**
* Operation getItemsAsyncWithHttpInfo
*
*
*
*
* @param \Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetItemsRequest $getItemsRequest GetItemsRequest (required)
*
Expand Down Expand Up @@ -653,7 +653,7 @@ protected function getItemsRequest($getItemsRequest)
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
Expand All @@ -668,11 +668,11 @@ protected function getItemsRequest($getItemsRequest)
$httpBody = new MultipartStream($multipartContents);

} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -690,7 +690,7 @@ protected function getItemsRequest($getItemsRequest)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -831,7 +831,7 @@ public function getVariationsWithHttpInfo($getVariationsRequest)
/**
* Operation getVariationsAsync
*
*
*
*
* @param \Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetVariationsRequest $getVariationsRequest GetVariationsRequest (required)
*
Expand All @@ -851,7 +851,7 @@ function ($response) {
/**
* Operation getVariationsAsyncWithHttpInfo
*
*
*
*
* @param \Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\GetVariationsRequest $getVariationsRequest GetVariationsRequest (required)
*
Expand Down Expand Up @@ -965,7 +965,7 @@ protected function getVariationsRequest($getVariationsRequest)
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
Expand All @@ -980,11 +980,11 @@ protected function getVariationsRequest($getVariationsRequest)
$httpBody = new MultipartStream($multipartContents);

} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -1002,7 +1002,7 @@ protected function getVariationsRequest($getVariationsRequest)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down Expand Up @@ -1143,7 +1143,7 @@ public function searchItemsWithHttpInfo($searchItemsRequest)
/**
* Operation searchItemsAsync
*
*
*
*
* @param \Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsRequest $searchItemsRequest SearchItemsRequest (required)
*
Expand All @@ -1163,7 +1163,7 @@ function ($response) {
/**
* Operation searchItemsAsyncWithHttpInfo
*
*
*
*
* @param \Amazon\ProductAdvertisingAPI\v1\com\amazon\paapi5\v1\SearchItemsRequest $searchItemsRequest SearchItemsRequest (required)
*
Expand Down Expand Up @@ -1277,7 +1277,7 @@ protected function searchItemsRequest($searchItemsRequest)
$httpBody = $_tempBody;
// \stdClass has no __toString(), so we should encode it manually
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($httpBody);
$httpBody = \GuzzleHttp\Utils::jsonEncode($httpBody);
}
} elseif (count($formParams) > 0) {
if ($multipart) {
Expand All @@ -1292,11 +1292,11 @@ protected function searchItemsRequest($searchItemsRequest)
$httpBody = new MultipartStream($multipartContents);

} elseif ($headers['Content-Type'] === 'application/json') {
$httpBody = \GuzzleHttp\json_encode($formParams);
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);

} else {
// for HTTP post (form)
$httpBody = \GuzzleHttp\Psr7\build_query($formParams);
$httpBody = \GuzzleHttp\Psr7\Query::build($formParams);
}
}

Expand All @@ -1314,7 +1314,7 @@ protected function searchItemsRequest($searchItemsRequest)
$headers
);

$query = \GuzzleHttp\Psr7\build_query($queryParams);
$query = \GuzzleHttp\Psr7\Query::build($queryParams);
return new Request(
'POST',
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
Expand Down