Skip to content

Commit c77f3e6

Browse files
Marc SerratMarc Serrat
authored andcommitted
Fixed issue when configuration file contains an array of products
1 parent f359fb3 commit c77f3e6

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "apsconnect/connect-sdk",
33
"type": "library",
44
"description": "APS Connect QuickStart SDK",
5-
"license": "proprietary",
5+
"license": "Apache-2.0",
66
"require": {
77
"php": ">=5.6.0",
88
"ext-curl": "*",

src/FulfillmentAutomation.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,17 @@ public function listRequests(array $filters = null)
240240
$query = '';
241241

242242
if ($this->config->products) {
243-
$filters['product_id'] = $this->config->products;
243+
$filters['asset.product.id__in'] = implode(",", $this->config->products);
244244
}
245245

246246
if ($filters) {
247247
$query = http_build_query($filters);
248248

249249
// process case when value for filter is array
250250
$query = '?' . preg_replace('/%5B[0-9]+%5D/simU', '', $query);
251-
}
252251

252+
$query = urldecode($query);
253+
}
253254
$body = $this->sendRequest('GET', '/requests' . $query);
254255

255256
/** @var Request[] $models */

0 commit comments

Comments
 (0)