Skip to content

Commit 3d0c1f3

Browse files
authored
Incorrect key when updating the voice number callback (#315)
* Incorrect key when updating the voice number callback * Fix all references and responses regarding the voiceCallback key value * Updating the company logo, we've not been Nexmo for a while now
1 parent 4ac4a0c commit 3d0c1f3

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Client Library for PHP
66
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
77
[![codecov](https://codecov.io/gh/Vonage/vonage-php-sdk-core/branch/master/graph/badge.svg)](https://codecov.io/gh/vonage/vonage-php-sdk-core)
88

9-
<img src="https://developer.nexmo.com/assets/images/Vonage_Nexmo.svg" height="48px" alt="Nexmo is now known as Vonage" />
9+
![The Vonage logo](./vonage_logo.png)
1010

1111
*This library requires a minimum PHP version of 7.4*
1212

src/Numbers/Number.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Number implements EntityInterface, JsonSerializableInterface, JsonUnserial
5151
public const FEATURE_ALL = 'SMS,MMS,VOICE';
5252

5353
public const WEBHOOK_MESSAGE = 'moHttpUrl';
54-
public const WEBHOOK_VOICE_STATUS = 'voiceStatusCallbackUrl';
54+
public const WEBHOOK_VOICE_STATUS = 'voiceStatusCallback';
5555

5656
public const ENDPOINT_SIP = 'sip';
5757
public const ENDPOINT_TEL = 'tel';

test/Numbers/ClientTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function testUpdateNumber($payload, $id, $expectedId, $lookup): void
9898
$this->assertRequestFormBodyContains('moHttpUrl', 'https://example.com/new_message', $request);
9999
$this->assertRequestFormBodyContains('voiceCallbackType', 'vxml', $request);
100100
$this->assertRequestFormBodyContains('voiceCallbackValue', 'https://example.com/new_voice', $request);
101-
$this->assertRequestFormBodyContains('voiceStatusCallbackUrl', 'https://example.com/new_status', $request);
101+
$this->assertRequestFormBodyContains('voiceStatusCallback', 'https://example.com/new_status', $request);
102102

103103
return true;
104104
}))->willReturn($first, $second, $third);
@@ -125,7 +125,7 @@ public function updateNumber(): array
125125
'moHttpUrl' => 'https://example.com/new_message',
126126
'voiceCallbackType' => 'vxml',
127127
'voiceCallbackValue' => 'https://example.com/new_voice',
128-
'voiceStatusCallbackUrl' => 'https://example.com/new_status'
128+
'voiceStatusCallback' => 'https://example.com/new_status'
129129
];
130130

131131
$rawId['country'] = 'US';

test/Numbers/NumberTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public function testStatusWebhook(): void
162162
{
163163
$this->assertSame($this->number, $this->number->setWebhook(Number::WEBHOOK_VOICE_STATUS, 'http://example.com'));
164164
$this->assertEquals('http://example.com', $this->number->getWebhook(Number::WEBHOOK_VOICE_STATUS));
165-
$this->assertArrayHas('voiceStatusCallbackUrl', 'http://example.com', $this->number->getRequestData());
165+
$this->assertArrayHas('voiceStatusCallback', 'http://example.com', $this->number->getRequestData());
166166
}
167167

168168
/**

test/Numbers/responses/list.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"voiceCallbackType": "vxml",
1414
"voiceCallbackValue": "https://example.com/voice",
15-
"voiceStatusCallbackUrl": "https://example.com/status"
15+
"voiceStatusCallback": "https://example.com/status"
1616
},
1717
{
1818
"country": "US",
@@ -24,7 +24,7 @@
2424
],
2525
"voiceCallbackType": "vxml",
2626
"voiceCallbackValue": "https://example.com/second_voice",
27-
"voiceStatusCallbackUrl": "https://example.com/second_status"
27+
"voiceStatusCallback": "https://example.com/second_status"
2828
}
2929
]
3030
}

test/Numbers/responses/single-update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"voiceCallbackType": "vxml",
1414
"voiceCallbackValue": "http://example.com/voice",
15-
"voiceStatusCallbackUrl": "http://example.com/status"
15+
"voiceStatusCallback": "http://example.com/status"
1616
}
1717
]
1818
}

test/Numbers/responses/single.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"voiceCallbackType": "vxml",
1414
"voiceCallbackValue": "http://example.com/voice",
15-
"voiceStatusCallbackUrl": "http://example.com/status"
15+
"voiceStatusCallback": "http://example.com/status"
1616
}
1717
]
1818
}

vonage_logo.png

17.4 KB
Loading

0 commit comments

Comments
 (0)