Skip to content

Commit

Permalink
Merge pull request jlevers#700 from jthistlethwaite/v5.0
Browse files Browse the repository at this point in the history
Fix incorrect parameter checks inside searchCatalogItemsRequest
  • Loading branch information
jlevers authored Jun 9, 2024
2 parents 5b985df + a767bd1 commit fae1acb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Api/CatalogItemsV20220401Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -853,15 +853,15 @@ public function searchCatalogItemsRequest($marketplace_ids, $identifiers = null,
'Missing the required parameter $marketplace_ids when calling searchCatalogItems'
);
}
if (count($marketplace_ids) > 1) {
if (count( explode(",", $marketplace_ids) ) > 1) {
throw new \InvalidArgumentException('invalid value for "$marketplace_ids" when calling CatalogItemsV20220401Api.searchCatalogItems, number of items must be less than or equal to 1.');
}

if ($identifiers !== null && count($identifiers) > 20) {
if ($identifiers !== null && count( explode(",", $identifiers) ) > 20) {
throw new \InvalidArgumentException('invalid value for "$identifiers" when calling CatalogItemsV20220401Api.searchCatalogItems, number of items must be less than or equal to 20.');
}

if ($keywords !== null && count($keywords) > 20) {
if ($keywords !== null && count( explode(",", $keywords) ) > 20) {
throw new \InvalidArgumentException('invalid value for "$keywords" when calling CatalogItemsV20220401Api.searchCatalogItems, number of items must be less than or equal to 20.');
}

Expand Down

0 comments on commit fae1acb

Please sign in to comment.