diff --git a/src/Client.php b/src/Client.php index bb2236c..e09cc66 100644 --- a/src/Client.php +++ b/src/Client.php @@ -769,10 +769,26 @@ public function getPurchaseorderComments($idpurchaseorder) return $this->sendRequest('/purchaseorders/' . $idpurchaseorder . '/comments'); } - /** - * New receipt endpoints have not added yet, so added it below purchase orders for now - */ + public function getReceipt($idreceipt) + { + return $this->sendRequest('/receipts/' . $idreceipt); + } + + public function getReceipts($filters = []) + { + return $this->sendRequest('/receipts', null, null, $filters); + } + + public function getAllReceipts($filters = []) + { + return $this->getAllResults('receipt', $filters); + } + public function deleteReceipt($idreceipt) + { + return $this->sendRequest('/receipts/' . $idreceipt, [], self::METHOD_DELETE); + } + public function addReceiptComment($idreceipt, $params) { return $this->sendRequest('/receipts/' . $idreceipt . '/comments', $params, self::METHOD_POST); @@ -973,6 +989,11 @@ public function getBackorder($idbackorder) return $this->sendRequest('/backorders/' . $idbackorder); } + public function getAllBackorders($filters = []) + { + return $this->getAllResults('backorder', $filters); + } + public function processBackorders() { return $this->sendRequest('/backorders/process', null, self::METHOD_POST);