Skip to content

Commit

Permalink
Merge pull request #3 from shotstack/webhook-callback
Browse files Browse the repository at this point in the history
Add webhook callback parameter
  • Loading branch information
jeffski authored Feb 23, 2020
2 parents a6de88a + 50b01d0 commit 772af69
Showing 1 changed file with 35 additions and 5 deletions.
40 changes: 35 additions & 5 deletions src/Model/Edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ class Edit implements ModelInterface, ArrayAccess
*/
protected static $openAPITypes = [
'timeline' => '\Shotstack\Client\Model\Timeline',
'output' => '\Shotstack\Client\Model\Output'
'output' => '\Shotstack\Client\Model\Output',
'callback' => 'string'
];

/**
Expand All @@ -69,7 +70,8 @@ class Edit implements ModelInterface, ArrayAccess
*/
protected static $openAPIFormats = [
'timeline' => null,
'output' => null
'output' => null,
'callback' => null
];

/**
Expand Down Expand Up @@ -100,7 +102,8 @@ public static function openAPIFormats()
*/
protected static $attributeMap = [
'timeline' => 'timeline',
'output' => 'output'
'output' => 'output',
'callback' => 'callback'
];

/**
Expand All @@ -110,7 +113,8 @@ public static function openAPIFormats()
*/
protected static $setters = [
'timeline' => 'setTimeline',
'output' => 'setOutput'
'output' => 'setOutput',
'callback' => 'setCallback'
];

/**
Expand All @@ -120,7 +124,8 @@ public static function openAPIFormats()
*/
protected static $getters = [
'timeline' => 'getTimeline',
'output' => 'getOutput'
'output' => 'getOutput',
'callback' => 'getCallback'
];

/**
Expand Down Expand Up @@ -185,6 +190,7 @@ public function __construct(array $data = null)
{
$this->container['timeline'] = isset($data['timeline']) ? $data['timeline'] : null;
$this->container['output'] = isset($data['output']) ? $data['output'] : null;
$this->container['callback'] = isset($data['callback']) ? $data['callback'] : null;
}

/**
Expand Down Expand Up @@ -264,6 +270,30 @@ public function setOutput($output)

return $this;
}

/**
* Gets callback
*
* @return string|null
*/
public function getCallback()
{
return $this->container['callback'];
}

/**
* Sets callback
*
* @param string|null $callback An optional webhook callback URL used to receive status notifications when a render completes or fails.
*
* @return $this
*/
public function setCallback($callback)
{
$this->container['callback'] = $callback;

return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
Expand Down

0 comments on commit 772af69

Please sign in to comment.