diff --git a/src/main/java/com/bandwidth/sdk/model/bxml/StopStream.java b/src/main/java/com/bandwidth/sdk/model/bxml/StopStream.java index 55730aa6..43cde3a2 100644 --- a/src/main/java/com/bandwidth/sdk/model/bxml/StopStream.java +++ b/src/main/java/com/bandwidth/sdk/model/bxml/StopStream.java @@ -25,6 +25,7 @@ * * @param name (str, optional): The name of the stream to stop. * This is either the user selected name when sending the verb, or the system generated name returned in the Media Stream Started webhook if was sent with no name attribute. + * @param wait (bool, optional): If true, the BXML interpreter will wait for the stream to stop before processing the next verb. */ public class StopStream implements Verb { @@ -33,6 +34,14 @@ public class StopStream implements Verb { @XmlAttribute protected String name; + @XmlAttribute + protected Boolean wait; + + // Original constructor for backwards compatibility + public StopStream(String name) { + this.name = name; + } + @Override public String getVerbName() { return TYPE_NAME; diff --git a/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java b/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java index 1b7fff31..be1d6f11 100644 --- a/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java +++ b/src/test/java/com/bandwidth/sdk/unit/models/bxml/StopStreamVerbTest.java @@ -27,4 +27,12 @@ public void stopStreamVerbWorks() throws JAXBException { assertThat(new Bxml().with(new StopStream("name")).toBxml(jaxbContext), is(expectedBxml)); }; + + @Test + public void stopStreamVerbWithWaitWorks() throws JAXBException { + JAXBContext jaxbContext = JAXBContext.newInstance(Bxml.class); + String expectedBxml = ""; + + assertThat(new Bxml().with(new StopStream("name", true)).toBxml(jaxbContext), is(expectedBxml)); + }; };