Skip to content

Commit a11897d

Browse files
author
Mplus Software
committed
Client v1.1.2
- getProducts now supports the onlyWebshop and onlyActive parameter
1 parent 5bb97df commit a11897d

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Mplusqapiclient.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class MplusQAPIclient
44
{
5-
const CLIENT_VERSION = '1.1.1';
5+
const CLIENT_VERSION = '1.1.2';
66

77
var $MIN_API_VERSION_MAJOR = 0;
88
var $MIN_API_VERSION_MINOR = 9;
@@ -575,10 +575,10 @@ public function getDeliveryMethods()
575575

576576
//----------------------------------------------------------------------------
577577

578-
public function getProducts($articleNumbers = array(), $groupNumbers = array(), $pluNumbers = array(), $changedSinceTimestamp = null, $changedSinceBranchNumber = null, $syncMarker = null)
578+
public function getProducts($articleNumbers = array(), $groupNumbers = array(), $pluNumbers = array(), $changedSinceTimestamp = null, $changedSinceBranchNumber = null, $syncMarker = null, $onlyWebshop = null, $onlyActive = null)
579579
{
580580
try {
581-
$result = $this->client->getProducts($this->parser->convertGetProductsRequest($articleNumbers, $groupNumbers, $pluNumbers, $changedSinceTimestamp, $changedSinceBranchNumber, $syncMarker));
581+
$result = $this->client->getProducts($this->parser->convertGetProductsRequest($articleNumbers, $groupNumbers, $pluNumbers, $changedSinceTimestamp, $changedSinceBranchNumber, $syncMarker, $onlyWebshop, $onlyActive));
582582
return $this->parser->parseProducts($result);
583583
} catch (SoapFault $e) {
584584
throw new MplusQAPIException('SoapFault occurred: '.$e->getMessage(), 0, $e);
@@ -2680,7 +2680,7 @@ public function parseUpdateProductResult($soapUpdateProductResult) {
26802680

26812681
//----------------------------------------------------------------------------
26822682

2683-
public function convertGetProductsRequest($articleNumbers, $groupNumbers, $pluNumbers, $changedSinceTimestamp, $changedSinceBranchNumber, $syncMarker)
2683+
public function convertGetProductsRequest($articleNumbers, $groupNumbers, $pluNumbers, $changedSinceTimestamp, $changedSinceBranchNumber, $syncMarker, $onlyWebshop, $onlyActive)
26842684
{
26852685
if ( ! is_array($articleNumbers)) {
26862686
if (is_null($articleNumbers)) {
@@ -2715,6 +2715,12 @@ public function convertGetProductsRequest($articleNumbers, $groupNumbers, $pluNu
27152715
if ( ! is_null($syncMarker)) {
27162716
$array['request']['syncMarker'] = (int)$syncMarker;
27172717
}
2718+
if ( ! is_null($onlyWebshop) and is_bool($onlyWebshop)) {
2719+
$array['request']['onlyWebshop'] = $onlyWebshop;
2720+
}
2721+
if ( ! is_null($onlyActive) and is_bool($onlyActive)) {
2722+
$array['request']['onlyActive'] = $onlyActive;
2723+
}
27182724
$object = arrayToObject($array);
27192725
return $object;
27202726
} // END convertGetProductsRequest()

0 commit comments

Comments
 (0)