Skip to content

Commit

Permalink
LIMS-817: Add param to dispatch function
Browse files Browse the repository at this point in the history
  • Loading branch information
MattPrit committed Jul 10, 2023
1 parent 56e9c6f commit 7280f06
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/src/Page/Shipment.php
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ function _dispatch_dewar_in_shipping_service($dispatch_info, $dewar)
$response = $this->shipping_service->get_shipment($dispatch_info['DEWARID'], "FROM_FACILITY");
}
$shipment_id = $response['shipmentId'];
$this->shipping_service->dispatch_shipment($shipment_id);
$this->shipping_service->dispatch_shipment($shipment_id, false);
} catch (Exception $e) {
throw new Exception("Error returned from shipping service: " . $e . "\nShipment data: " . $shipment_data);
}
Expand Down
5 changes: 3 additions & 2 deletions api/src/Shipment/ShippingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ function update_shipment($external_id, $shipment_data, $journey_type)
}


function dispatch_shipment($shipment_id)
function dispatch_shipment($shipment_id, $pickup_requested)
{
$pickup_requested_str = ($pickup_requested) ? "true" : "false";
return $this->_send_request(
$this->shipping_api_url . '/shipments/' . $shipment_id . '/dispatch?pickup_requested=false',
$this->shipping_api_url . '/shipments/' . $shipment_id . '/dispatch?pickup_requested=' . $pickup_requested_str,
"POST",
null,
201
Expand Down

0 comments on commit 7280f06

Please sign in to comment.