Skip to content

Commit

Permalink
Merge pull request #22 from ingrammicro/v15-development
Browse files Browse the repository at this point in the history
Fixed issue when configuration file contains an array of products
  • Loading branch information
marcserrat authored Mar 14, 2019
2 parents d35b0d9 + c77f3e6 commit 2637a02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/FulfillmentAutomation.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,17 @@ public function listRequests(array $filters = null)
$query = '';

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

if ($filters) {
$query = http_build_query($filters);

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

$query = urldecode($query);
}
$body = $this->sendRequest('GET', '/requests' . $query);

/** @var Request[] $models */
Expand Down

0 comments on commit 2637a02

Please sign in to comment.