Skip to content

Commit 85367c9

Browse files
author
Yury Gargay
committed
Deprecate CallFlow Title usage
This field is deprecated now although users still can send and receive it.
1 parent c2aa9e2 commit 85367c9

File tree

6 files changed

+8
-6
lines changed

6 files changed

+8
-6
lines changed

examples/voice-call-flows-create.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY'); // Set your own API access key here.
66
$callFlow = new \MessageBird\Objects\Voice\CallFlow();
7-
$callFlow->title = 'Foobar';
87
$step = new \MessageBird\Objects\Voice\Step();
98
$step->action = 'say';
109
$step->options = [

examples/voice-call-flows-update.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
$messageBird = new \MessageBird\Client('YOUR_ACCESS_KEY'); // Set your own API access key here.
66
$callFlow = new \MessageBird\Objects\Voice\CallFlow();
7-
$callFlow->title = 'Foobar updated';
87

98
try {
109
$result = $messageBird->voiceCallFlows->update($callFlow, '21e5fc51-3285-4f41-97fd-cd1785ab54f8');

examples/voice-calls-create.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
$call->source = '31971234567';
88
$call->destination = '31612345678';
99
$callFlow = new \MessageBird\Objects\Voice\CallFlow();
10-
$callFlow->title = 'Say message';
1110
$step = new \MessageBird\Objects\Voice\Step();
1211
$step->action = 'say';
1312
$step->options = [

src/MessageBird/Objects/Voice/CallFlow.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ class CallFlow extends Base
4141
*/
4242
protected $updatedAt;
4343

44+
function __construct() {
45+
if ($this->title == null) {
46+
unset($this->title);
47+
}
48+
}
49+
4450
/**
4551
* @inheritdoc
4652
*/

src/MessageBird/Resources/Voice/CallFlows.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class CallFlows extends Base
1515
public function __construct(Common\HttpClient $httpClient)
1616
{
1717
$this->object = new Objects\Voice\CallFlow();
18+
unset($this->object->title);
1819
$this->setResourceName('call-flows');
1920

2021
parent::__construct($httpClient);

tests/Integration/Voice/VoiceTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ public function testReadVoiceCallFlow(): void
348348
public function testCreateVoiceCallFlow(): void
349349
{
350350
$callFlow = new CallFlow();
351-
$callFlow->title = 'Foobar';
352351
$callFlow->steps = [
353352
[
354353
'action' => 'transfer',
@@ -365,7 +364,6 @@ public function testCreateVoiceCallFlow(): void
365364
"data": [
366365
{
367366
"id": "de3ed163-d5fc-45f4-b8c4-7eea7458c635",
368-
"title": "Forward call to 31612345678",
369367
"steps": [
370368
{
371369
"id": "3538a6b8-5a2e-4537-8745-f72def6bd393",
@@ -397,7 +395,7 @@ public function testCreateVoiceCallFlow(): void
397395
"POST",
398396
'call-flows',
399397
null,
400-
'{"title":"Foobar","steps":[{"action":"transfer","options":{"destination":"31612345678"}}]}'
398+
'{"steps":[{"action":"transfer","options":{"destination":"31612345678"}}]}'
401399
);
402400
$this->client->voiceCallFlows->create($callFlow);
403401
}

0 commit comments

Comments
 (0)