Skip to content

Commit dc8abb4

Browse files
authored
Update create-label.php
1 parent 783b45f commit dc8abb4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: demo/create-label.php

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use RahulGodiyal\PhpUpsApiWrapper\Entity\ShipmentCharge;
1919
use RahulGodiyal\PhpUpsApiWrapper\Entity\ShipmentRequest;
2020
use RahulGodiyal\PhpUpsApiWrapper\Entity\Shipper;
21+
use RahulGodiyal\PhpUpsApiWrapper\Entity\ShipQuery;
2122
use RahulGodiyal\PhpUpsApiWrapper\Entity\ShipTo;
2223
use RahulGodiyal\PhpUpsApiWrapper\Entity\UnitOfMeasurement;
2324
use RahulGodiyal\PhpUpsApiWrapper\Ship;
@@ -174,8 +175,14 @@
174175
$shipmentRequest->setLabelSpecification($labelSpecification);
175176
/************ End Shipment Request **********/
176177

178+
/************ Query **********/
179+
$query = new ShipQuery(); // optional
180+
$query->setAdditionalAddressValidation("city"); // optional
181+
/************ End Query **********/
182+
177183
/************ Create Ship **********/
178184
$ship = new Ship();
185+
$ship->setQuery($query); // optional
179186
$ship->setShipmentRequest($shipmentRequest);
180187
$ship->setOnlyLabel(true); // optional
181188
// $ship->setMode('PROD'); // Optional | only used for prod

0 commit comments

Comments
 (0)