diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java b/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java index 51f36fe2..186bcd02 100644 --- a/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java +++ b/src/main/java/com/bandwidth/sdk/model/bxml/Transfer.java @@ -67,6 +67,8 @@ * This parameter is considered only when diversionTreatment is set to stack. Defaults is unknown. * Defaults to None. * @param privacy (bool, optional): A boolean value to indicate that the calling number should be hidden. Use transferCallerDisplayName to customize the name shown to the recipient. Default is false. + * @param attestationLevel (str, optional): The STIR/SHAKEN attestation level to sign the transferred call with. Can be A, B, or C. Only applies to accounts using the Hosted Signing Service. Cannot be combined with identity. Defaults to None. + * @param identity (str, optional): A SIP Identity header value (PASSporT) signed by you, sent unmodified on the transferred call. Max length 2000 characters. Cannot be combined with attestationLevel. Defaults to None. * */ public class Transfer implements Verb { @@ -132,6 +134,12 @@ public class Transfer implements Verb { @XmlAttribute protected Boolean privacy; + @XmlAttribute + protected String attestationLevel; + + @XmlAttribute + protected String identity; + @Override public String getVerbName() { return TYPE_NAME; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java index 25dad468..13e2d25e 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/TransferVerbTest.java @@ -55,6 +55,14 @@ public class TransferVerbTest { .transferCallerDisplayName("Clark Kent") .tag("test") .build(); + Transfer transferWithAttestationLevel = Transfer.builder() + .destinations(List.of(phonenumber)) + .attestationLevel("A") + .build(); + Transfer transferWithIdentity = Transfer.builder() + .destinations(List.of(phonenumber)) + .identity("eyJhbGciOiJFUzI1NiJ9.eyJhdHRlc3QiOiJBIn0.c2ln;info=;ppt=\"shaken\"") + .build(); @Test public void transferVerbWorks() throws JAXBException { @@ -65,4 +73,20 @@ public void transferVerbWorks() throws JAXBException { assertThat(new Bxml().with(transfer1).toBxml(jaxbContext), is(expectedSipUriBxml)); assertThat(new Bxml().with(transfer2).toBxml(jaxbContext), is(expectedPhoneNumberBxml)); } + + @Test + public void transferVerbAttestationLevelWorks() throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); + String expectedBxml = "+19195551234"; + + assertThat(new Bxml().with(transferWithAttestationLevel).toBxml(jaxbContext), is(expectedBxml)); + } + + @Test + public void transferVerbIdentityWorks() throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); + String expectedBxml = "+19195551234"; + + assertThat(new Bxml().with(transferWithIdentity).toBxml(jaxbContext), is(expectedBxml)); + } };