diff --git a/src/Models/Lot.php b/src/Models/Lot.php index a136e92..ded2a96 100644 --- a/src/Models/Lot.php +++ b/src/Models/Lot.php @@ -23,9 +23,7 @@ public function variations( $variation_id = 1001 ) $response = $this->request->client->get("variations/{$this->url_friendly_id}/variation-matrix"); - $html = (string) $response->getBody(); - - return $html; + return (string)$response->getBody(); } ); } diff --git a/src/Models/OrderShipment.php b/src/Models/OrderShipment.php index 8b51fac..7456f3b 100644 --- a/src/Models/OrderShipment.php +++ b/src/Models/OrderShipment.php @@ -13,18 +13,26 @@ class OrderShipment extends Model { - protected $entity = 'order-shipments'; + protected $entity = 'order-shipments'; protected $primaryKey = 'id'; - public function markShipped() + /** + * Mark shipment as shipped + * + * @param bool $pick Mark all shipment lines as picked + * @return mixed + * @throws \Rackbeat\Exceptions\RackbeatClientException + * @throws \Rackbeat\Exceptions\RackbeatRequestException + */ + public function markShipped($pick = true) { - return $this->request->handleWithExceptions(function () { + return $this->request->handleWithExceptions(function () use ($pick) { return $this->request->client->post("orders/shipments/{$this->url_friendly_id}/mark-shipped", [ 'json' => [ - 'pick' => true, + 'pick' => $pick, ], ]) ->getBody() diff --git a/src/Models/Product.php b/src/Models/Product.php index c366c87..6c104c9 100644 --- a/src/Models/Product.php +++ b/src/Models/Product.php @@ -47,9 +47,7 @@ public function inventoryMatrix( $location_id = null, array $filter = null ) $response = $this->request->client->get("{$this->entity}/{$this->url_friendly_id}/variation-matrix" . $query); - $html = (string) $response->getBody(); - - return $html; + return (string)$response->getBody(); } ); } @@ -60,9 +58,7 @@ public function variations( $variation_id = 1001 ) $response = $this->request->client->get("variations/{$this->url_friendly_id}/variation-matrix"); - $html = (string) $response->getBody(); - - return $html; + return (string)$response->getBody(); } ); }