Skip to content

Commit

Permalink
Update create-label.php
Browse files Browse the repository at this point in the history
  • Loading branch information
rgodiyal authored May 13, 2024
1 parent 783b45f commit dc8abb4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions demo/create-label.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use RahulGodiyal\PhpUpsApiWrapper\Entity\ShipmentCharge;
use RahulGodiyal\PhpUpsApiWrapper\Entity\ShipmentRequest;
use RahulGodiyal\PhpUpsApiWrapper\Entity\Shipper;
use RahulGodiyal\PhpUpsApiWrapper\Entity\ShipQuery;
use RahulGodiyal\PhpUpsApiWrapper\Entity\ShipTo;
use RahulGodiyal\PhpUpsApiWrapper\Entity\UnitOfMeasurement;
use RahulGodiyal\PhpUpsApiWrapper\Ship;
Expand Down Expand Up @@ -174,8 +175,14 @@
$shipmentRequest->setLabelSpecification($labelSpecification);
/************ End Shipment Request **********/

/************ Query **********/
$query = new ShipQuery(); // optional
$query->setAdditionalAddressValidation("city"); // optional
/************ End Query **********/

/************ Create Ship **********/
$ship = new Ship();
$ship->setQuery($query); // optional
$ship->setShipmentRequest($shipmentRequest);
$ship->setOnlyLabel(true); // optional
// $ship->setMode('PROD'); // Optional | only used for prod
Expand Down

0 comments on commit dc8abb4

Please sign in to comment.