Skip to content

Commit 772af69

Browse files
authored
Merge pull request #3 from shotstack/webhook-callback
Add webhook callback parameter
2 parents a6de88a + 50b01d0 commit 772af69

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

src/Model/Edit.php

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ class Edit implements ModelInterface, ArrayAccess
5959
*/
6060
protected static $openAPITypes = [
6161
'timeline' => '\Shotstack\Client\Model\Timeline',
62-
'output' => '\Shotstack\Client\Model\Output'
62+
'output' => '\Shotstack\Client\Model\Output',
63+
'callback' => 'string'
6364
];
6465

6566
/**
@@ -69,7 +70,8 @@ class Edit implements ModelInterface, ArrayAccess
6970
*/
7071
protected static $openAPIFormats = [
7172
'timeline' => null,
72-
'output' => null
73+
'output' => null,
74+
'callback' => null
7375
];
7476

7577
/**
@@ -100,7 +102,8 @@ public static function openAPIFormats()
100102
*/
101103
protected static $attributeMap = [
102104
'timeline' => 'timeline',
103-
'output' => 'output'
105+
'output' => 'output',
106+
'callback' => 'callback'
104107
];
105108

106109
/**
@@ -110,7 +113,8 @@ public static function openAPIFormats()
110113
*/
111114
protected static $setters = [
112115
'timeline' => 'setTimeline',
113-
'output' => 'setOutput'
116+
'output' => 'setOutput',
117+
'callback' => 'setCallback'
114118
];
115119

116120
/**
@@ -120,7 +124,8 @@ public static function openAPIFormats()
120124
*/
121125
protected static $getters = [
122126
'timeline' => 'getTimeline',
123-
'output' => 'getOutput'
127+
'output' => 'getOutput',
128+
'callback' => 'getCallback'
124129
];
125130

126131
/**
@@ -185,6 +190,7 @@ public function __construct(array $data = null)
185190
{
186191
$this->container['timeline'] = isset($data['timeline']) ? $data['timeline'] : null;
187192
$this->container['output'] = isset($data['output']) ? $data['output'] : null;
193+
$this->container['callback'] = isset($data['callback']) ? $data['callback'] : null;
188194
}
189195

190196
/**
@@ -264,6 +270,30 @@ public function setOutput($output)
264270

265271
return $this;
266272
}
273+
274+
/**
275+
* Gets callback
276+
*
277+
* @return string|null
278+
*/
279+
public function getCallback()
280+
{
281+
return $this->container['callback'];
282+
}
283+
284+
/**
285+
* Sets callback
286+
*
287+
* @param string|null $callback An optional webhook callback URL used to receive status notifications when a render completes or fails.
288+
*
289+
* @return $this
290+
*/
291+
public function setCallback($callback)
292+
{
293+
$this->container['callback'] = $callback;
294+
295+
return $this;
296+
}
267297
/**
268298
* Returns true if offset exists. False otherwise.
269299
*

0 commit comments

Comments
 (0)