-
Notifications
You must be signed in to change notification settings - Fork 4
PickupList Create
Brad Ploeger edited this page Apr 3, 2019
·
3 revisions
Services \ PickupList \ Create
Creates a new pickup list
$rezdyApi->pickupList->create($request);- Rezdy\Requests\PickupList: $request
- none
use Rezdy\RezdyAPI;
use Rezdy\Requests\PickupList;
use Rezdy\Requests\Objects\PickupLocation;
// Initialize the API
$rezdyAPI = new RezdyAPI('your api key');
$pickupParams = [
'name' => 'Local Hotels',
'otherLocationInstructions' => 'Honk horn in front of each location' ];
$locationParams = [
'locationName' => 'The Plaza',
'pickupInstructions' => 'Meet in lobby of the hotel',
'minutesPrior' => 30,
'address' => '768 5th Ave, New York, NY 10019'
// Create a PickupList request
$pickupList = new PickupList($pickupParams);
// Create a PickupLocation request
$pickupLocation = new PickupLocation($locationParams);
// Attach the PickupLocation request to the PickupList request
$pickupList->attach($pickuplocation);
// Send the PickupList request to the API
$response = $rezdyAPI->pickupList->create($pickupList);
// View the response
echo $response;Rezdy API V1 PHP Wrapper