Skip to content

Commit a0dd449

Browse files
authored
Update Amazon SP API models to the latest version (#558)
* Update Amazon SP API models to the latest version Remove Order Approvals API from SDK as it has been removed from the library. Add Jetbrains .idea directory to .gitignore. Add user flag to Docker run commands in bin/generate.sh so files created are owned by the user/group running the operation. Increase rector parallel processing timeout from 2 minutes to 10 minutes. * Remove .gitignore entry for JetBrains IDE's
1 parent 0079736 commit a0dd449

File tree

154 files changed

+1397
-5828
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+1397
-5828
lines changed

bin/generate.sh

Lines changed: 36 additions & 36 deletions
Large diffs are not rendered by default.

rector-php.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
return static function (RectorConfig $config): void {
4242

43+
$config->parallel(seconds: 1200);
44+
4345
$config->autoloadPaths([
4446
__DIR__ ,
4547
]);

src/AmazonPHP/SellingPartner/Api/ApprovalsApi/OrdersSDK.php

Lines changed: 0 additions & 458 deletions
This file was deleted.

src/AmazonPHP/SellingPartner/Api/ApprovalsApi/OrdersSDKInterface.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/AmazonPHP/SellingPartner/Api/DefinitionsApi/ProductTypesDefinitionsSDK.php

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,14 +290,17 @@ public function getDefinitionsProductTypeRequest(AccessToken $accessToken, strin
290290
* Operation searchDefinitionsProductTypes.
291291
*
292292
* @param string[] $marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. (required)
293-
* @param null|string[] $keywords A comma-delimited list of keywords to search product types by. (optional)
293+
* @param null|string[] $keywords A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`. (optional)
294+
* @param null|string $item_name The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`. (optional)
295+
* @param null|string $locale The locale for the display names in the response. Defaults to the primary locale of the marketplace. (optional)
296+
* @param null|string $search_locale The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace. (optional)
294297
*
295298
* @throws ApiException on non-2xx response
296299
* @throws InvalidArgumentException
297300
*/
298-
public function searchDefinitionsProductTypes(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null) : \AmazonPHP\SellingPartner\Model\ProductTypesDefinitions\ProductTypeList
301+
public function searchDefinitionsProductTypes(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null, ?string $item_name = null, ?string $locale = null, ?string $search_locale = null) : \AmazonPHP\SellingPartner\Model\ProductTypesDefinitions\ProductTypeList
299302
{
300-
$request = $this->searchDefinitionsProductTypesRequest($accessToken, $region, $marketplace_ids, $keywords);
303+
$request = $this->searchDefinitionsProductTypesRequest($accessToken, $region, $marketplace_ids, $keywords, $item_name, $locale, $search_locale);
301304

302305
$this->configuration->extensions()->preRequest('ProductTypesDefinitions', 'searchDefinitionsProductTypes', $request);
303306

@@ -387,11 +390,14 @@ public function searchDefinitionsProductTypes(AccessToken $accessToken, string $
387390
* Create request for operation 'searchDefinitionsProductTypes'.
388391
*
389392
* @param string[] $marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. (required)
390-
* @param null|string[] $keywords A comma-delimited list of keywords to search product types by. (optional)
393+
* @param null|string[] $keywords A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`. (optional)
394+
* @param null|string $item_name The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`. (optional)
395+
* @param null|string $locale The locale for the display names in the response. Defaults to the primary locale of the marketplace. (optional)
396+
* @param null|string $search_locale The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace. (optional)
391397
*
392398
* @throws \AmazonPHP\SellingPartner\Exception\InvalidArgumentException
393399
*/
394-
public function searchDefinitionsProductTypesRequest(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null) : RequestInterface
400+
public function searchDefinitionsProductTypesRequest(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null, ?string $item_name = null, ?string $locale = null, ?string $search_locale = null) : RequestInterface
395401
{
396402
// verify the required parameter 'marketplace_ids' is set
397403
if ($marketplace_ids === null || (\is_array($marketplace_ids) && \count($marketplace_ids) === 0)) {
@@ -423,6 +429,30 @@ public function searchDefinitionsProductTypesRequest(AccessToken $accessToken, s
423429
if ($marketplace_ids !== null) {
424430
$queryParams['marketplaceIds'] = ObjectSerializer::toString($marketplace_ids);
425431
}
432+
// query params
433+
if (\is_array($item_name)) {
434+
$item_name = ObjectSerializer::serializeCollection($item_name, '', true);
435+
}
436+
437+
if ($item_name !== null) {
438+
$queryParams['itemName'] = ObjectSerializer::toString($item_name);
439+
}
440+
// query params
441+
if (\is_array($locale)) {
442+
$locale = ObjectSerializer::serializeCollection($locale, '', true);
443+
}
444+
445+
if ($locale !== null) {
446+
$queryParams['locale'] = ObjectSerializer::toString($locale);
447+
}
448+
// query params
449+
if (\is_array($search_locale)) {
450+
$search_locale = ObjectSerializer::serializeCollection($search_locale, '', true);
451+
}
452+
453+
if ($search_locale !== null) {
454+
$queryParams['searchLocale'] = ObjectSerializer::toString($search_locale);
455+
}
426456

427457
if (\count($queryParams)) {
428458
$query = \http_build_query($queryParams);

src/AmazonPHP/SellingPartner/Api/DefinitionsApi/ProductTypesDefinitionsSDKInterface.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@ public function getDefinitionsProductType(AccessToken $accessToken, string $regi
4848
* Operation searchDefinitionsProductTypes.
4949
*
5050
* @param string[] $marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. (required)
51-
* @param null|string[] $keywords A comma-delimited list of keywords to search product types by. (optional)
51+
* @param null|string[] $keywords A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`. (optional)
52+
* @param null|string $item_name The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`. (optional)
53+
* @param null|string $locale The locale for the display names in the response. Defaults to the primary locale of the marketplace. (optional)
54+
* @param null|string $search_locale The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace. (optional)
5255
*
5356
* @throws ApiException on non-2xx response
5457
* @throws InvalidArgumentException
5558
*/
56-
public function searchDefinitionsProductTypes(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null) : \AmazonPHP\SellingPartner\Model\ProductTypesDefinitions\ProductTypeList;
59+
public function searchDefinitionsProductTypes(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null, ?string $item_name = null, ?string $locale = null, ?string $search_locale = null) : \AmazonPHP\SellingPartner\Model\ProductTypesDefinitions\ProductTypeList;
5760
}

0 commit comments

Comments
 (0)