From 7f60ff5eaa01ab120996dccef8754df175d96719 Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:09:55 -0500 Subject: [PATCH 1/2] SWI-4587 add `transferCallerDisplayName` --- src/Voice/Bxml/Transfer.php | 15 +++++++++++++++ tests/BxmlTest.php | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Voice/Bxml/Transfer.php b/src/Voice/Bxml/Transfer.php index f18a790..caa70a2 100644 --- a/src/Voice/Bxml/Transfer.php +++ b/src/Voice/Bxml/Transfer.php @@ -52,6 +52,10 @@ class Transfer extends Verb { * @var string */ private $transferCallerId; + /** + * @var string + */ + private $transferCallerDisplayName; /** * @var string */ @@ -114,6 +118,13 @@ public function transferCallerId(string $transferCallerId) { $this->transferCallerId = $transferCallerId; } + /** + * Sets the transferCallerDisplayName attribute for Transfer + */ + public function transferCallerDisplayName(string $transferCallerDisplayName) { + $this->transferCallerDisplayName = $transferCallerDisplayName; + } + /** * Sets the callTimeout attribute for Transfer * @@ -231,6 +242,10 @@ public function toBxml(DOMDocument $doc) { $element->setAttribute("transferCallerId", $this->transferCallerId); } + if(isset($this->transferCallerDisplayName)) { + $element->setAttribute("transferCallerDisplayName", $this->transferCallerDisplayName); + } + if(isset($this->callTimeout)) { $element->setAttribute("callTimeout", $this->callTimeout); } diff --git a/tests/BxmlTest.php b/tests/BxmlTest.php index 1eee944..44bdb2f 100644 --- a/tests/BxmlTest.php +++ b/tests/BxmlTest.php @@ -278,6 +278,7 @@ public function testTransfer() { $number2->fallbackPassword("fpass"); $transfer = new BandwidthLib\Voice\Bxml\Transfer(); $transfer->transferCallerId("+18999999999"); + $transfer->transferCallerDisplayName("test"); $transfer->transferCompleteUrl("https://test.com"); $transfer->transferCompleteMethod("GET"); $transfer->username("user"); @@ -293,7 +294,7 @@ public function testTransfer() { $transfer->fallbackPassword("fpassw"); $response = new BandwidthLib\Voice\Bxml\Response(); $response->addVerb($transfer); - $expectedXml = '+17777777777+17777777779'; + $expectedXml = '+17777777777+17777777779'; $responseXml = $response->toBxml(); $this->assertEquals($expectedXml, $responseXml); } From a9366bbdf15724cfea1ca73f4b637cc982db9fbe Mon Sep 17 00:00:00 2001 From: AJ Rice <53190766+ajrice6713@users.noreply.github.com> Date: Wed, 21 Feb 2024 11:13:12 -0500 Subject: [PATCH 2/2] trigger tests