Skip to content

Commit b2aa356

Browse files
authored
SWI-8574 Add wait to StopStream (#182)
1 parent 4e5a3f9 commit b2aa356

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ def initialize(attributes = {})
77
super('StopStream', nil, attributes)
88

99
@attribute_map = {
10-
name: 'name' # [String]: The name of the stream to stop. This is either the user selected name when sending the <StartStream> verb, or the system generated name returned in the Media Stream Started webhook if <StartStream> was sent with no name attribute.
10+
name: 'name', # [String]: The name of the stream to stop. This is either the user selected name when sending the <StartStream> verb, or the system generated name returned in the Media Stream Started webhook if <StartStream> was sent with no name attribute.
11+
wait: 'wait' # Optional [Boolean]: If true, the BXML interpreter will wait for the stream to stop before processing the next verb.
1112
}
1213
end
1314
end

spec/unit/models/bxml/verbs/stop_stream_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
describe 'Bandwidth::Bxml::StopStream' do
33
let(:initial_attributes) {
44
{
5-
name: 'initial_name'
5+
name: 'initial_name',
6+
wait: true
67
}
78
}
89

910
let(:new_attributes) {
1011
{
11-
name: 'new_name'
12+
name: 'new_name',
13+
wait: false
1214
}
1315
}
1416

@@ -21,13 +23,13 @@
2123
end
2224

2325
it 'tests the to_bxml method of the StopStream instance' do
24-
expected = "\n<StopStream name=\"initial_name\"/>\n"
26+
expected = "\n<StopStream name=\"initial_name\" wait=\"true\"/>\n"
2527
expect(instance.to_bxml).to eq(expected)
2628
end
2729

2830
it 'tests the set_attributes method of the StopStream instance' do
2931
instance.set_attributes(new_attributes)
30-
expected = "\n<StopStream name=\"new_name\"/>\n"
32+
expected = "\n<StopStream name=\"new_name\" wait=\"false\"/>\n"
3133
expect(instance.to_bxml).to eq(expected)
3234
end
3335
end

0 commit comments

Comments
 (0)