Skip to content

Commit

Permalink
Update Amazon SP API models to the latest version (#558)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jasonhebert authored Jan 24, 2024
1 parent 0079736 commit a0dd449
Show file tree
Hide file tree
Showing 154 changed files with 1,397 additions and 5,828 deletions.
72 changes: 36 additions & 36 deletions bin/generate.sh

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions rector-php.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

return static function (RectorConfig $config): void {

$config->parallel(seconds: 1200);

$config->autoloadPaths([
__DIR__ ,
]);
Expand Down
458 changes: 0 additions & 458 deletions src/AmazonPHP/SellingPartner/Api/ApprovalsApi/OrdersSDK.php

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,17 @@ public function getDefinitionsProductTypeRequest(AccessToken $accessToken, strin
* Operation searchDefinitionsProductTypes.
*
* @param string[] $marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. (required)
* @param null|string[] $keywords A comma-delimited list of keywords to search product types by. (optional)
* @param null|string[] $keywords A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`. (optional)
* @param null|string $item_name The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`. (optional)
* @param null|string $locale The locale for the display names in the response. Defaults to the primary locale of the marketplace. (optional)
* @param null|string $search_locale The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace. (optional)
*
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException
*/
public function searchDefinitionsProductTypes(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null) : \AmazonPHP\SellingPartner\Model\ProductTypesDefinitions\ProductTypeList
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
{
$request = $this->searchDefinitionsProductTypesRequest($accessToken, $region, $marketplace_ids, $keywords);
$request = $this->searchDefinitionsProductTypesRequest($accessToken, $region, $marketplace_ids, $keywords, $item_name, $locale, $search_locale);

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

Expand Down Expand Up @@ -387,11 +390,14 @@ public function searchDefinitionsProductTypes(AccessToken $accessToken, string $
* Create request for operation 'searchDefinitionsProductTypes'.
*
* @param string[] $marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. (required)
* @param null|string[] $keywords A comma-delimited list of keywords to search product types by. (optional)
* @param null|string[] $keywords A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`. (optional)
* @param null|string $item_name The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`. (optional)
* @param null|string $locale The locale for the display names in the response. Defaults to the primary locale of the marketplace. (optional)
* @param null|string $search_locale The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace. (optional)
*
* @throws \AmazonPHP\SellingPartner\Exception\InvalidArgumentException
*/
public function searchDefinitionsProductTypesRequest(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null) : RequestInterface
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
{
// verify the required parameter 'marketplace_ids' is set
if ($marketplace_ids === null || (\is_array($marketplace_ids) && \count($marketplace_ids) === 0)) {
Expand Down Expand Up @@ -423,6 +429,30 @@ public function searchDefinitionsProductTypesRequest(AccessToken $accessToken, s
if ($marketplace_ids !== null) {
$queryParams['marketplaceIds'] = ObjectSerializer::toString($marketplace_ids);
}
// query params
if (\is_array($item_name)) {
$item_name = ObjectSerializer::serializeCollection($item_name, '', true);
}

if ($item_name !== null) {
$queryParams['itemName'] = ObjectSerializer::toString($item_name);
}
// query params
if (\is_array($locale)) {
$locale = ObjectSerializer::serializeCollection($locale, '', true);
}

if ($locale !== null) {
$queryParams['locale'] = ObjectSerializer::toString($locale);
}
// query params
if (\is_array($search_locale)) {
$search_locale = ObjectSerializer::serializeCollection($search_locale, '', true);
}

if ($search_locale !== null) {
$queryParams['searchLocale'] = ObjectSerializer::toString($search_locale);
}

if (\count($queryParams)) {
$query = \http_build_query($queryParams);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,13 @@ public function getDefinitionsProductType(AccessToken $accessToken, string $regi
* Operation searchDefinitionsProductTypes.
*
* @param string[] $marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. (required)
* @param null|string[] $keywords A comma-delimited list of keywords to search product types by. (optional)
* @param null|string[] $keywords A comma-delimited list of keywords to search product types. **Note:** Cannot be used with `itemName`. (optional)
* @param null|string $item_name The title of the ASIN to get the product type recommendation. **Note:** Cannot be used with `keywords`. (optional)
* @param null|string $locale The locale for the display names in the response. Defaults to the primary locale of the marketplace. (optional)
* @param null|string $search_locale The locale used for the `keywords` and `itemName` parameters. Defaults to the primary locale of the marketplace. (optional)
*
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException
*/
public function searchDefinitionsProductTypes(AccessToken $accessToken, string $region, array $marketplace_ids, ?array $keywords = null) : \AmazonPHP\SellingPartner\Model\ProductTypesDefinitions\ProductTypeList;
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;
}
Loading

0 comments on commit a0dd449

Please sign in to comment.