diff --git a/src/Model/Bxml/AttestationLevel.php b/src/Model/Bxml/AttestationLevel.php new file mode 100644 index 00000000..1c665b3f --- /dev/null +++ b/src/Model/Bxml/AttestationLevel.php @@ -0,0 +1,10 @@ + $this->tag, 'diversionTreatment' => $this->diversionTreatment, 'diversionReason' => $this->diversionReason, + 'requestedAttestationLevel' => $this->requestedAttestationLevel, + 'identity' => $this->identity, ]; } } diff --git a/tests/Unit/Model/Bxml/EnumTest.php b/tests/Unit/Model/Bxml/EnumTest.php index 4deda508..6e98bb23 100644 --- a/tests/Unit/Model/Bxml/EnumTest.php +++ b/tests/Unit/Model/Bxml/EnumTest.php @@ -2,6 +2,7 @@ namespace Bandwidth\Test\Unit\Model\Bxml; +use Bandwidth\Model\Bxml\AttestationLevel; use Bandwidth\Model\Bxml\DiversionReason; use Bandwidth\Model\Bxml\DiversionTreatment; use Bandwidth\Model\Bxml\FileFormat; @@ -13,6 +14,13 @@ class EnumTest extends TestCase { + public function testAttestationLevelValues(): void + { + $this->assertSame('A', AttestationLevel::A->value); + $this->assertSame('B', AttestationLevel::B->value); + $this->assertSame('C', AttestationLevel::C->value); + } + public function testHttpMethodValues(): void { $this->assertSame('GET', HttpMethod::GET->value); diff --git a/tests/Unit/Model/Bxml/TransferTest.php b/tests/Unit/Model/Bxml/TransferTest.php index eb6cc17e..6fafbf2e 100644 --- a/tests/Unit/Model/Bxml/TransferTest.php +++ b/tests/Unit/Model/Bxml/TransferTest.php @@ -2,6 +2,7 @@ namespace Bandwidth\Test\Unit\Model\Bxml; +use Bandwidth\Model\Bxml\AttestationLevel; use Bandwidth\Model\Bxml\DiversionReason; use Bandwidth\Model\Bxml\DiversionTreatment; use Bandwidth\Model\Bxml\Hangup; @@ -37,7 +38,9 @@ public function testAllAttributes(): void fallbackPassword: 'fallbackPass', tag: 'my-tag', diversionTreatment: DiversionTreatment::PROPAGATE, - diversionReason: DiversionReason::NO_ANSWER + diversionReason: DiversionReason::NO_ANSWER, + requestedAttestationLevel: AttestationLevel::B, + identity: 'eyJhbGciOiJFUzI1NiJ9.sig;info=;ppt="shaken"' ); $this->assertSame( @@ -47,7 +50,10 @@ public function testAllAttributes(): void . ' transferCompleteFallbackUrl="/completeFallback"' . ' transferCompleteFallbackMethod="GET" username="user" password="pass"' . ' fallbackUsername="fallbackUser" fallbackPassword="fallbackPass" tag="my-tag"' - . ' diversionTreatment="propagate" diversionReason="no-answer"/>', + . ' diversionTreatment="propagate" diversionReason="no-answer"' + . ' requestedAttestationLevel="B"' + . ' identity="eyJhbGciOiJFUzI1NiJ9.sig;info=<https://example.com/c.pem>' + . ';ppt="shaken""/>', $transfer->toBxml() ); }