Skip to content

Extra Update

Brad Ploeger edited this page Apr 3, 2019 · 1 revision

Services \ Extra \ Update

Purpose

Updates an extra.

NOTE: The extra ID can change when updating it, since there are business rules to protect the Order and Product consistency.

Basic Usage:

$rezdyApi->extra->create($request);

Required Parameters

Optional Parameters

  • none

Returns

Throws (with errors)

Code Example

use Rezdy\RezdyAPI;
use Rezdy\Requests\Extra;

// Initialize the API
$rezdyAPI = new RezdyAPI('your api key');

$extraId = 123456;

$extraParams = [ 
   'description'=> 'Extra Description',
   'extraPriceType' => 'ANY', 
   'name' => 'Extra',
   'price' => 1.00 ];

// Create an Extra request
$extra = new Extra($extraParams); 

// Send the Extra request to the API
$response = $rezdyAPI->extra->update($extraId, $extra);

// View the response
echo $response;

Clone this wiki locally