Skip to content

Commit

Permalink
Fixed stock histroy for product and warehouse
Browse files Browse the repository at this point in the history
  • Loading branch information
casperbakker committed Aug 18, 2017
1 parent ab1477d commit b743f14
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Client
protected $apiversion = 'v1';
protected $useragent = 'Picqer PHP API Client (picqer.com)';

protected $clientversion = '0.13.1';
protected $clientversion = '0.13.2';

protected $debug = false;
protected $skipverification = false;
Expand Down Expand Up @@ -195,7 +195,7 @@ public function getProductTags($idproduct)

public function addProductTag($idproduct, $idtag)
{
return $this->sendRequest('/products/' . $idproduct . '/tags', array("idtag" => $idtag), self::METHOD_POST);
return $this->sendRequest('/products/' . $idproduct . '/tags', array('idtag' => $idtag), self::METHOD_POST);
}

public function deleteProductTag($idproduct, $idtag)
Expand All @@ -216,14 +216,14 @@ public function getStockHistory($idproduct_stock_history)
return $this->sendRequest('/stockhistory/' . $idproduct_stock_history);
}

public function getStockHistoryForProduct($idproduct)
public function getStockHistoryForProduct($idproduct, $offset = 0)
{
return $this->getStockHistories(array('idproduct', $idproduct));
return $this->getStockHistories(array('idproduct' => $idproduct, 'offset' => $offset));
}

public function getStockHistoryForWarehouse($idwarehouse)
public function getStockHistoryForWarehouse($idwarehouse, $offset = 0)
{
return $this->getStockHistories(array('idwarehouse', $idwarehouse));
return $this->getStockHistories(array('idwarehouse' => $idwarehouse, 'offset' => $offset));
}

/*
Expand Down Expand Up @@ -283,7 +283,7 @@ public function processOrder($idorder)

public function addOrderNote($idorder, $note)
{
return $this->sendRequest('/orders/' . $idorder . '/notes', array("note" => $note), self::METHOD_POST);
return $this->sendRequest('/orders/' . $idorder . '/notes', array('note' => $note), self::METHOD_POST);
}

public function getOrderTags($idorder)
Expand Down

0 comments on commit b743f14

Please sign in to comment.