Skip to content

Commit 7635db3

Browse files
committed
Update examples to use VbcConfig
1 parent 610e205 commit 7635db3

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

examples/create-application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
$a->getMessagesConfig()->setWebhook('status_url', 'https://example.com/status', 'POST');
1313
$a->getMessagesConfig()->setWebhook('inbound_url', 'https://example.com/inbound', 'POST');
1414
$a->getRtcConfig()->setWebhook('event_url', 'https://example.com/event', 'POST');
15-
$a->disableVbc();
15+
$a->getVbcConfig()->enable();
1616

1717
$r = $client->applications()->create($a);
1818

examples/get-application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@
2121
echo $a->getRtcConfig()->getWebhook('event_url').PHP_EOL;
2222

2323
echo "\nVBC\n-----\n";
24-
echo $a->isVbcEnabled() ? 'Enabled' : 'Disabled';
24+
echo $a->getVbcConfig()->isEnabled() ? 'Enabled' : 'Disabled';
2525
echo "\n\n";

examples/update-application.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
require_once '../vendor/autoload.php';
44

5-
$client = new Nexmo\Client(new Nexmo\Client\Credentials\Basic(API_KEY, API_SECRET));
5+
$client = new Nexmo\Client(new Nexmo\Client\Credentials\Basic('7c9738e6', 'n3w-Api-key!'));
66

7-
$a = $client->applications()->get(APPLICATION_ID);
7+
$a = $client->applications()->get('a8f93ca3-2a6f-4722-a53e-b7cccabc0bb9');
88

99
$a->getVoiceConfig()->setWebhook('answer_url', 'https://example.com/answer', 'GET');
1010
$a->getVoiceConfig()->setWebhook('event_url', 'https://example.com/event', 'POST');
1111
$a->getMessagesConfig()->setWebhook('status_url', 'https://example.com/status', 'POST');
1212
$a->getMessagesConfig()->setWebhook('inbound_url', 'https://example.com/inbound', 'POST');
1313
$a->getRtcConfig()->setWebhook('event_url', 'https://example.com/event', 'POST');
14-
$a->disableVbc();
14+
$a->getVbcConfig()->disable();
1515

1616
$client->applications()->update($a);

0 commit comments

Comments
 (0)