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); }