From 23f60ebac4746e6509ca30ee1902a46465f39c2a Mon Sep 17 00:00:00 2001 From: Cameron Koegel <53310569+ckoegel@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:31:42 -0400 Subject: [PATCH] SWI-3814 Fix Repeat Count Mapping Issue (#115) * SWI-3814 Fix Repeat Count Mapping Issue * Update lib/bandwidth-sdk/models/bxml/verbs/gather.rb Co-authored-by: Julia Januchowski <55033207+juliajanu@users.noreply.github.com> --------- Co-authored-by: Julia Januchowski <55033207+juliajanu@users.noreply.github.com> --- lib/bandwidth-sdk/models/bxml/verbs/gather.rb | 2 +- spec/models/bxml/verbs/gather_spec.rb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/bandwidth-sdk/models/bxml/verbs/gather.rb b/lib/bandwidth-sdk/models/bxml/verbs/gather.rb index 4fc76458..8f9e14b7 100644 --- a/lib/bandwidth-sdk/models/bxml/verbs/gather.rb +++ b/lib/bandwidth-sdk/models/bxml/verbs/gather.rb @@ -21,7 +21,7 @@ def initialize(audio_verbs = [], attributes = {}) max_digits: 'maxDigits', # Optional [Number]: Max number of digits to collect. Default value is 50. Range: decimal values between 1 - 50. inter_digit_timeout: 'interDigitTimeout', # Optional [Number]: Time (in seconds) allowed between digit presses before automatically terminating the Gather. Default value is 5. Range: decimal values between 1 - 60. first_digit_timeout: 'firstDigitTimeout', # Optional [Number]: Time (in seconds) to pause after any audio from nested or verb is played (in seconds) before terminating the Gather. Default value is 5. Range: decimal values between 0 - 60. - repeat_count: 'repeat_count', # Optional [Number]: The number of times the audio prompt should be played if no digits are pressed. For example, if this value is 3, the nested audio clip will be played a maximum of three times. The delay between repetitions will be equal to first_digit_timeout. Default value is 1. repeat_count * number of verbs must not be greater than 20. + repeat_count: 'repeatCount', # Optional [Number]: The number of times the audio prompt should be played if no digits are pressed. For example, if this value is 3, the nested audio clip will be played a maximum of three times. The delay between repetitions will be equal to first_digit_timeout. Default value is 1. repeatCount * number of verbs must not be greater than 20. } end diff --git a/spec/models/bxml/verbs/gather_spec.rb b/spec/models/bxml/verbs/gather_spec.rb index 9144ccbf..39b7e2a8 100644 --- a/spec/models/bxml/verbs/gather_spec.rb +++ b/spec/models/bxml/verbs/gather_spec.rb @@ -51,13 +51,13 @@ end it 'tests the to_bxml method of the Gather instance' do - expected = "\n\n" + expected = "\n\n" expect(instance.to_bxml).to eq(expected) end it 'tests the set_attributes method of the Gather instance' do instance.set_attributes(new_attributes) - expected = "\n\n" + expected = "\n\n" expect(instance.to_bxml).to eq(expected) end end @@ -69,16 +69,16 @@ end it 'tests the to_bxml method of the nested Gather instance' do - expected = "\n\n https://audio.url/audio1.wav\n\n" + expected = "\n\n https://audio.url/audio1.wav\n\n" expect(instance_nested.to_bxml).to eq(expected) end it 'tests the add_verb method of the nested Gather instance' do - expected_single = "\n\n https://audio.url/audio1.wav\n Holaruby speak sentence SSML test\n\n" + expected_single = "\n\n https://audio.url/audio1.wav\n Holaruby speak sentence SSML test\n\n" instance_nested.add_audio_verb(speak_sentence) expect(instance_nested.to_bxml).to eq(expected_single) - expected_multiple = "\n\n https://audio.url/audio1.wav\n Holaruby speak sentence SSML test\n Holaruby speak sentence SSML test\n https://audio.url/audio1.wav\n\n" + expected_multiple = "\n\n https://audio.url/audio1.wav\n Holaruby speak sentence SSML test\n Holaruby speak sentence SSML test\n https://audio.url/audio1.wav\n\n" instance_nested.add_audio_verb([speak_sentence, play_audio]) expect(instance_nested.to_bxml).to eq(expected_multiple) end