bandwidth-sdk 18.2.0 → 18.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +20 -20
  3. data/bandwidth.yml +2 -2
  4. data/coverage/.last_run.json +1 -1
  5. data/coverage/.resultset.json +208 -27
  6. data/coverage/index.html +4402 -2424
  7. data/custom_templates/gem.mustache +1 -0
  8. data/docs/MediaApi.md +6 -6
  9. data/lib/bandwidth-sdk/api/media_api.rb +6 -6
  10. data/lib/bandwidth-sdk/models/bxml/verbs/connect.rb +23 -0
  11. data/lib/bandwidth-sdk/models/bxml/verbs/endpoint.rb +11 -0
  12. data/lib/bandwidth-sdk/models/bxml/verbs/forward.rb +2 -0
  13. data/lib/bandwidth-sdk/models/bxml/verbs/gather.rb +22 -14
  14. data/lib/bandwidth-sdk/models/bxml/verbs/record.rb +2 -0
  15. data/lib/bandwidth-sdk/models/bxml/verbs/start_recording.rb +2 -0
  16. data/lib/bandwidth-sdk/models/bxml/verbs/start_stream.rb +2 -2
  17. data/lib/bandwidth-sdk/models/bxml/verbs/start_transcription.rb +2 -0
  18. data/lib/bandwidth-sdk/models/bxml/verbs/transfer.rb +1 -0
  19. data/lib/bandwidth-sdk/version.rb +1 -1
  20. data/lib/bandwidth-sdk.rb +2 -0
  21. data/spec/smoke/media_api_spec.rb +2 -2
  22. data/spec/smoke/messages_api_spec.rb +2 -2
  23. data/spec/unit/models/bxml/verbs/connect_spec.rb +62 -0
  24. data/spec/unit/models/bxml/verbs/endpoint_spec.rb +16 -0
  25. data/spec/unit/models/bxml/verbs/forward_spec.rb +6 -2
  26. data/spec/unit/models/bxml/verbs/gather_spec.rb +23 -7
  27. data/spec/unit/models/bxml/verbs/record_spec.rb +8 -4
  28. data/spec/unit/models/bxml/verbs/start_recording_spec.rb +8 -4
  29. data/spec/unit/models/bxml/verbs/start_stream_spec.rb +5 -5
  30. data/spec/unit/models/bxml/verbs/start_transcription_spec.rb +11 -7
  31. data/spec/unit/models/bxml/verbs/transfer_spec.rb +7 -5
  32. metadata +8 -2
@@ -53,6 +53,7 @@ require 'bandwidth-sdk/models/bxml/verbs/phone_number'
53
53
  require 'bandwidth-sdk/models/bxml/verbs/play_audio'
54
54
  require 'bandwidth-sdk/models/bxml/verbs/record'
55
55
  require 'bandwidth-sdk/models/bxml/verbs/redirect'
56
+ require 'bandwidth-sdk/models/bxml/verbs/refer'
56
57
  require 'bandwidth-sdk/models/bxml/verbs/resume_recording'
57
58
  require 'bandwidth-sdk/models/bxml/verbs/ring'
58
59
  require 'bandwidth-sdk/models/bxml/verbs/send_dtmf'
data/docs/MediaApi.md CHANGED
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  api_instance = Bandwidth::MediaApi.new
37
37
  account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
38
- media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve.
38
+ media_id = 'bw.png' # String | The ID of the media file.
39
39
 
40
40
  begin
41
41
  # Delete Media
@@ -68,7 +68,7 @@ end
68
68
  | Name | Type | Description | Notes |
69
69
  | ---- | ---- | ----------- | ----- |
70
70
  | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | |
71
- | **media_id** | **String** | Media ID to retrieve. | |
71
+ | **media_id** | **String** | The ID of the media file. | |
72
72
 
73
73
  ### Return type
74
74
 
@@ -109,7 +109,7 @@ end
109
109
 
110
110
  api_instance = Bandwidth::MediaApi.new
111
111
  account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
112
- media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve.
112
+ media_id = 'bw.png' # String | The ID of the media file.
113
113
 
114
114
  begin
115
115
  # Get Media
@@ -143,7 +143,7 @@ end
143
143
  | Name | Type | Description | Notes |
144
144
  | ---- | ---- | ----------- | ----- |
145
145
  | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | |
146
- | **media_id** | **String** | Media ID to retrieve. | |
146
+ | **media_id** | **String** | The ID of the media file. | |
147
147
 
148
148
  ### Return type
149
149
 
@@ -261,7 +261,7 @@ end
261
261
 
262
262
  api_instance = Bandwidth::MediaApi.new
263
263
  account_id = '9900000' # String | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
264
- media_id = '14762070468292kw2fuqty55yp2b2/0/bw.png' # String | Media ID to retrieve.
264
+ media_id = 'bw.png' # String | The ID of the media file.
265
265
  body = File.new('/path/to/some/file') # File |
266
266
  opts = {
267
267
  content_type: 'audio/wav', # String | The media type of the entity-body.
@@ -299,7 +299,7 @@ end
299
299
  | Name | Type | Description | Notes |
300
300
  | ---- | ---- | ----------- | ----- |
301
301
  | **account_id** | **String** | This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.** | |
302
- | **media_id** | **String** | Media ID to retrieve. | |
302
+ | **media_id** | **String** | The ID of the media file. | |
303
303
  | **body** | **File** | | |
304
304
  | **content_type** | **String** | The media type of the entity-body. | [optional] |
305
305
  | **cache_control** | **String** | General-header field is used to specify directives that MUST be obeyed by all caching mechanisms along the request/response chain. | [optional] |
@@ -22,7 +22,7 @@ module Bandwidth
22
22
  # Delete Media
23
23
  # Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
24
24
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
25
- # @param media_id [String] Media ID to retrieve.
25
+ # @param media_id [String] The ID of the media file.
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [nil]
28
28
  def delete_media(account_id, media_id, opts = {})
@@ -33,7 +33,7 @@ module Bandwidth
33
33
  # Delete Media
34
34
  # Deletes a media file from Bandwidth API server. Make sure you don't have any application scripts still using the media before you delete. If you accidentally delete a media file you can immediately upload a new file with the same name.
35
35
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (`u-be8dvafwrs63rwpm7pfil4b`) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
36
- # @param media_id [String] Media ID to retrieve.
36
+ # @param media_id [String] The ID of the media file.
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
39
39
  def delete_media_with_http_info(account_id, media_id, opts = {})
@@ -91,7 +91,7 @@ module Bandwidth
91
91
  # Get Media
92
92
  # Downloads a media file you previously uploaded.
93
93
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
94
- # @param media_id [String] Media ID to retrieve.
94
+ # @param media_id [String] The ID of the media file.
95
95
  # @param [Hash] opts the optional parameters
96
96
  # @return [File]
97
97
  def get_media(account_id, media_id, opts = {})
@@ -102,7 +102,7 @@ module Bandwidth
102
102
  # Get Media
103
103
  # Downloads a media file you previously uploaded.
104
104
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
105
- # @param media_id [String] Media ID to retrieve.
105
+ # @param media_id [String] The ID of the media file.
106
106
  # @param [Hash] opts the optional parameters
107
107
  # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
108
108
  def get_media_with_http_info(account_id, media_id, opts = {})
@@ -226,7 +226,7 @@ module Bandwidth
226
226
  # Upload Media
227
227
  # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
228
228
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
229
- # @param media_id [String] Media ID to retrieve.
229
+ # @param media_id [String] The ID of the media file.
230
230
  # @param body [File]
231
231
  # @param [Hash] opts the optional parameters
232
232
  # @option opts [String] :content_type The media type of the entity-body.
@@ -240,7 +240,7 @@ module Bandwidth
240
240
  # Upload Media
241
241
  # Upload a file. You may add headers to the request in order to provide some control to your media file. If a file is uploaded with the same name as a file that already exists under this account, the previous file will be overwritten. A list of supported media types can be found at [Bandwidth Support](https://www.bandwidth.com/support/en/articles/12823220-what-mms-file-types-are-supported).
242
242
  # @param account_id [String] This is your 7-digit Bandwidth Account ID, as shown in the Bandwidth App. The older ID format (&#x60;u-be8dvafwrs63rwpm7pfil4b&#x60;) is deprecated. **When migrating to OAuth authentication, you must use the 7-digit Account ID.**
243
- # @param media_id [String] Media ID to retrieve.
243
+ # @param media_id [String] The ID of the media file.
244
244
  # @param body [File]
245
245
  # @param [Hash] opts the optional parameters
246
246
  # @option opts [String] :content_type The media type of the entity-body.
@@ -0,0 +1,23 @@
1
+ module Bandwidth
2
+ module Bxml
3
+ class Connect < Bandwidth::Bxml::NestableVerb
4
+ # Initializer
5
+ # @param endpoints [Verb] or [Array<Verb>] XML element children. Defaults to an empty array. Valid nested connect verbs are: Endpoint.
6
+ # @param attributes [Hash] The attributes to add to the element. Defaults to an empty hash.
7
+ def initialize(endpoints = [], attributes = {})
8
+ super('Connect', nil, endpoints, attributes)
9
+
10
+ @attribute_map = {
11
+ event_callback_url: 'eventCallbackUrl', # Optional [String]: URL to send events to during the connection lifecycle. May be a relative URL. Defaults to None.
12
+ event_fallback_url: 'eventFallbackUrl', # Optional [String]: Fallback URL used by Bandwidth when delivery to event_callback_url fails. May be a relative URL.
13
+ }
14
+ end
15
+
16
+ # Add endpoint or endpoints to the nested verbs array
17
+ # @param endpoints [Endpoint] or [Array<Endpoint>] Verb or verbs to add to the array.
18
+ def add_endpoints(endpoints)
19
+ @nested_verbs.push(*endpoints)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,11 @@
1
+ module Bandwidth
2
+ module Bxml
3
+ class Endpoint < Bandwidth::Bxml::Verb
4
+ # Initializer
5
+ # @param endpoint_id [String] The ID of the endpoint to connect to.
6
+ def initialize(endpoint_id)
7
+ super('Endpoint', endpoint_id, {})
8
+ end
9
+ end
10
+ end
11
+ end
@@ -9,6 +9,8 @@ module Bandwidth
9
9
  @attribute_map = {
10
10
  to: 'to', # [String]: The phone number destination of the call.
11
11
  from: 'from', # Optional [String]: The phone number that the recipient will receive the call from.
12
+ privacy: 'privacy', # Optional [Boolean]: Hide the calling number. The caller_display_name field can be used to customize the displayed name.
13
+ caller_display_name: 'callerDisplayName', # Optional [String]: The caller display name to use when the call is created. May not exceed 256 characters nor contain control characters such as new lines. If privacy is true, only the following values are valid: Restricted, Anonymous, Private, or Unavailable.
12
14
  call_timeout: 'callTimeout', # Optional [Number]: The number of seconds to wait before timing out the call.
13
15
  diversion_treatment: 'diversionTreatment', # Optional [String]: Can be any of the following: - none: No diversion headers are sent on the outbound leg of the transferred call. - propagate: Copy the Diversion header from the inbound leg to the outbound leg. Ignored if there is no Diversion header present on the inbound leg. - stack: After propagating any Diversion header from the inbound leg to the outbound leg, stack on top another Diversion header based on the Request-URI of the inbound call. If diversionTreatment is not specified, no diversion header will be included for the transfer even if one came with the inbound call. Defaults to None.
14
16
  diversion_reason: 'diversionReason', # Optional [String]: Can be any of the following values: unknown, user-busy, no-answer, unavailable, unconditional, time-of-day, do-not-disturb, deflection, follow-me, out-of-service, away. This parameter is considered only when diversionTreatment is set to stack. Defaults to None.
@@ -8,20 +8,28 @@ module Bandwidth
8
8
  super('Gather', nil, audio_verbs, attributes)
9
9
 
10
10
  @attribute_map = {
11
- gather_url: 'gatherUrl', # Optional [String]: URL to send Gather event to and request new BXML. May be a relative URL.
12
- gather_method: 'gatherMethod', # Optional [String]: The HTTP method to use for the request to gather_url. GET or POST. Default value is POST.
13
- gather_fallback_url: 'gatherFallbackUrl', # Optional [String]: A fallback url which, if provided, will be used to retry the Gather event callback delivery in case gather_url fails to respond.
14
- gather_fallback_method: 'gatherFallbackMethod', # Optional [String]: The HTTP method to use to deliver the Gather event callback to gather_fallback_url. GET or POST. Default value is POST.
15
- username: 'username', # Optional [String]: The username to send in the HTTP request to gather_url.
16
- password: 'password', # Optional [String]: The password to send in the HTTP request to gather_url.
17
- fallback_username: 'fallbackUsername', # Optional [String]: The username to send in the HTTP request to gather_fallback_url.
18
- fallback_password: 'fallbackPassword', # Optional [String]: The password to send in the HTTP request to gather_fallback_url.
19
- tag: 'tag', # Optional [String]: A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or <Tag> verb, or cleared. May be cleared by setting tag="". Max length 256 characters.
20
- terminating_digits: 'terminatingDigits', # Optional [String]: When any of these digits are pressed, it will terminate the Gather. Default value is "", which disables this feature.
21
- max_digits: 'maxDigits', # Optional [Number]: Max number of digits to collect. Default value is 50. Range: decimal values between 1 - 50.
22
- 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.
23
- first_digit_timeout: 'firstDigitTimeout', # Optional [Number]: Time (in seconds) to pause after any audio from nested <SpeakSentence> or <PlayAudio> verb is played (in seconds) before terminating the Gather. Default value is 5. Range: decimal values between 0 - 60.
24
- 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.
11
+ gather_url: 'gatherUrl', # Optional [String]: URL to send Gather event to and request new BXML. May be a relative URL.
12
+ gather_method: 'gatherMethod', # Optional [String]: The HTTP method to use for the request to gather_url. GET or POST. Default value is POST.
13
+ gather_fallback_url: 'gatherFallbackUrl', # Optional [String]: A fallback url which, if provided, will be used to retry the Gather event callback delivery in case gather_url fails to respond.
14
+ gather_fallback_method: 'gatherFallbackMethod', # Optional [String]: The HTTP method to use to deliver the Gather event callback to gather_fallback_url. GET or POST. Default value is POST.
15
+ username: 'username', # Optional [String]: The username to send in the HTTP request to gather_url.
16
+ password: 'password', # Optional [String]: The password to send in the HTTP request to gather_url.
17
+ fallback_username: 'fallbackUsername', # Optional [String]: The username to send in the HTTP request to gather_fallback_url.
18
+ fallback_password: 'fallbackPassword', # Optional [String]: The password to send in the HTTP request to gather_fallback_url.
19
+ tag: 'tag', # Optional [String]: A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or <Tag> verb, or cleared. May be cleared by setting tag="". Max length 256 characters.
20
+ terminating_digits: 'terminatingDigits', # Optional [String]: When any of these digits are pressed, it will terminate the Gather. Default value is "", which disables this feature.
21
+ max_digits: 'maxDigits', # Optional [Number]: Max number of digits to collect. Default value is 50. Range: decimal values between 1 - 50.
22
+ 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.
23
+ first_digit_timeout: 'firstDigitTimeout', # Optional [Number]: Time (in seconds) to pause after any audio from nested <SpeakSentence> or <PlayAudio> verb is played (in seconds) before terminating the Gather. Default value is 5. Range: decimal values between 0 - 60.
24
+ 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.
25
+ input: 'input', # Optional [String]: Specifies the input mode for the Gather verb. Accepted values are dtmf, speech, or dtmf_speech. Default value is dtmf.
26
+ hints: 'hints', # Optional [String]: Words or phrases that help improve speech recognition, useful for phrases with many words. Possible and effective only if input is speech or dtmf_speech.
27
+ language: 'language', # Optional [String]: Language code for speech recognition. See the BXML documentation for the list of supported locales. Possible and effective only if input is speech or dtmf_speech.
28
+ partial_result_callback: 'partialResultCallback', # Optional [String]: URL to send Partial Result event to. May be a relative URL. Possible and effective only if input is speech or dtmf_speech.
29
+ partial_result_callback_method: 'partialResultCallbackMethod', # Optional [String]: The HTTP method to use for the request to partial_result_callback. GET or POST. Default value is POST.
30
+ profanity_filter: 'profanityFilter', # Optional [Boolean]: Enables or disables filtering of profane words. Default value is true. Possible and effective only if input is speech or dtmf_speech.
31
+ speech_model: 'speechModel', # Optional [String]: Specifies the speech recognition model to use: default, numbers_and_commands, phone_call, experimental_conversations, experimental_utterances, googlev2_long, googlev2_short, googlev2_telephony, or googlev2_telephony_short.
32
+ speech_timeout: 'speechTimeout', # Optional [Number]: Time (in seconds) to wait for speech input before timing out. Accepted values are any positive integer. Default value is 5.
25
33
  }
26
34
  end
27
35
 
@@ -14,6 +14,7 @@ module Bandwidth
14
14
  recording_available_url: 'recordingAvailableUrl', # Optional [String]: URL to send the Recording Available event to once it has been processed. Does not accept BXML. May be a relative URL. Defaults to None.
15
15
  recording_available_method: 'recordingAvailableMethod', # Optional [String]: The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default value is POST. Defaults to None.
16
16
  transcribe: 'transcribe', # Optional [Boolean]: A boolean value to indicate that recording should be transcribed. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. Default is false. Defaults to None.
17
+ detect_language: 'detectLanguage', # Optional [Boolean]: A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. Ignored if transcribe is not set to true. Default is false.
17
18
  transcription_available_url: 'transcriptionAvailableUrl', # Optional [String]: URL to send the Transcription Available event to once it has been processed. Does not accept BXML. May be a relative URL. Defaults to None.
18
19
  transcription_available_method: 'transcriptionAvailableMethod', # Optional [String]: The HTTP method to use for the request to transcriptionAvailableUrl. GET or POST. Default value is POST. Defaults to None.
19
20
  username: 'username', # Optional [String]: The username to send in the HTTP request to recordCompleteUrl, recordingAvailableUrl or transcriptionAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https). Defaults to None.
@@ -25,6 +26,7 @@ module Bandwidth
25
26
  max_duration: 'maxDuration', # Optional [Number]: Maximum length of recording (in seconds). Max 10800 (3 hours). Default value is 60. Defaults to None.
26
27
  silence_timeout: 'silenceTimeout', # Optional [Number]: Length of silence after which to end the recording (in seconds). Max is equivalent to the maximum maxDuration value. Default value is 0, which means no timeout. Defaults to None.
27
28
  file_format: 'fileFormat', # Optional [String]: The audio format that the recording will be saved as: mp3 or wav. Default value is wav. Defaults to None.
29
+ recording_name: 'recordingName', # Optional [String]: A name to identify this recording. It will be returned in the Recording Available or Conference Recording Available event if specified.
28
30
  }
29
31
  end
30
32
  end
@@ -10,6 +10,7 @@ module Bandwidth
10
10
  recording_available_url: 'recordingAvailableUrl', # Optional [String]: URL to send the Recording Available event to once it has been processed. Does not accept BXML. May be a relative URL. Defaults to None.
11
11
  recording_available_method: 'recordingAvailableMethod', # Optional [String]: The HTTP method to use for the request to recordingAvailableUrl. GET or POST. Default value is POST.
12
12
  transcribe: 'transcribe', # Optional [Boolean]: A boolean value to indicate that recording should be transcribed. Transcription can succeed only for recordings of length greater than 500 milliseconds and less than 4 hours. Default is false. Defaults to None.
13
+ detect_language: 'detectLanguage', # Optional [Boolean]: A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. Current supported languages are English, French, and Spanish. Ignored if transcribe is not set to true. Default is false.
13
14
  transcription_available_url: 'transcriptionAvailableUrl', # Optional [String]: URL to send the Transcription Available event to once it has been processed. Does not accept BXML. May be a relative URL. Defaults to None.
14
15
  transcription_available_method: 'transcriptionAvailableMethod', # Optional [String]: The HTTP method to use for the request to transcriptionAvailableUrl. GET or POST. Default value is POST. Defaults to None.
15
16
  username: 'username', # Optional [String]: The username to send in the HTTP request to recordingAvailableUrl or transcriptionAvailableUrl. If specified, the URLs must be TLS-encrypted (i.e., https). Defaults to None.
@@ -17,6 +18,7 @@ module Bandwidth
17
18
  tag: 'tag', # Optional [String]: A custom string that will be sent with this and all future callbacks unless overwritten by a future tag attribute or <Tag> verb, or cleared. May be cleared by setting tag="". Max length 256 characters. Defaults to None.
18
19
  file_format: 'fileFormat', # Optional [String]: The audio format that the recording will be saved as: mp3 or wav. Default value is wav.
19
20
  multi_channel: 'multiChannel', # Optional [Boolean]: A boolean value indicating whether or not the recording file should separate each side of the call into its own audio channel. Default value is false.
21
+ recording_name: 'recordingName', # Optional [String]: A name to identify this recording. It will be returned in the Recording Available or Conference Recording Available event if specified.
20
22
  }
21
23
  end
22
24
  end
@@ -12,8 +12,8 @@ module Bandwidth
12
12
  mode: 'mode', # Optional [String]: The mode to use for the stream. unidirectional or bidirectional. Specifies whether the audio being streamed over the WebSocket is bidirectional (the service can both read and write audio over the WebSocket) or unidirectional (one-way, read-only). Default is unidirectional.
13
13
  tracks: 'tracks', # Optional [String]: The part of the call to send a stream from. inbound, outbound or both. Default is inbound.
14
14
  destination: 'destination', # Optional [String]: A websocket URI to send the stream to. The audio from the specified tracks will be sent via websocket to this URL as base64-encoded PCMU/G711 audio.
15
- destination_username: 'destination_username', # Optional [String]: The username to send in the `Authorization` header of the initial websocket connection to the `destination` URL.
16
- destination_password: 'destination_password', # Optional [String]: The password to send in the `Authorization` header of the initial websocket connection to the `destination` URL.
15
+ destination_username: 'destinationUsername', # Optional [String]: The username to send in the `Authorization` header of the initial websocket connection to the `destination` URL.
16
+ destination_password: 'destinationPassword', # Optional [String]: The password to send in the `Authorization` header of the initial websocket connection to the `destination` URL.
17
17
  stream_event_url: 'streamEventUrl', # Optional [String]: URL to send the associated Webhook events to during this stream's lifetime. Does not accept BXML. May be a relative URL.
18
18
  stream_event_method: 'streamEventMethod', # Optional [String]: The HTTP method to use for the request to streamEventUrl. GET or POST. Default value is POST.
19
19
  username: 'username', # Optional [String]: The username to send in the HTTP request to streamEventUrl. If specified, the URLs must be TLS-encrypted (i.e., https).
@@ -16,6 +16,8 @@ module Bandwidth
16
16
  password: 'password', # Optional [String]: The password to send in the HTTP request to transcriptionEventUrl. If specified, the transcriptionEventUrl must be TLS-encrypted (i.e., https).
17
17
  destination: 'destination', # Optional [String]: A websocket URI to send the transcription to. A transcription of the specified tracks will be sent via websocket to this URL as a series of JSON messages. See below for more details on the websocket packet format.
18
18
  stabilized: 'stabilized', # Optional [Boolean]: Whether to send transcription update events to the specified destination only after they have become stable. Requires destination. Defaults to true.
19
+ detect_language: 'detectLanguage', # Optional [Boolean]: A boolean value to indicate that the recording may not be in English, and the transcription service will need to detect the dominant language the recording is in and transcribe accordingly. See the BXML documentation for the list of supported locales. Default is false.
20
+ preferred_languages: 'preferredLanguages', # Optional [String]: A comma-separated list of language locales in which the transcription should be performed. Requires detect_language to be false. See the BXML documentation for the list of supported locales. Defaults to en-US.
19
21
  }
20
22
  end
21
23
 
@@ -9,6 +9,7 @@ module Bandwidth
9
9
 
10
10
  @attribute_map = {
11
11
  transfer_caller_id: 'transferCallerId', # Optional [String]: The caller ID to use when the call is transferred, if different. Must be in E.164 format (e.g. +15555555555) or be one of the following strings Restricted, Anonymous, Private, or Unavailable. Leave as default to pass along the number of the remote party. Defaults to None.
12
+ privacy: 'privacy', # Optional [Boolean]: Hide the calling number. The transfer_caller_display_name field can be used to customize the displayed name.
12
13
  transfer_caller_display_name: 'transferCallerDisplayName', # Optional [String]: The caller display name to use when the call is transferred. May not exceed 256 characters nor contain control characters such as new lines. Defaults to None.
13
14
  call_timeout: 'callTimeout', # Optional [Number]: The timeout (in seconds) for the callee to answer the call after it starts ringing. If the call does not start ringing within 30s, the call will be cancelled regardless of this value. Range: decimal values between 1 - 300. Default value is 30 seconds. Defaults to None.
14
15
  transfer_complete_url: 'transferCompleteUrl', # Optional [String]: URL to send the Transfer Complete event to and request new BXML. Optional but recommended. See below for further details. May be a relative URL. Defaults to None.
@@ -11,5 +11,5 @@ Generator version: 7.24.0
11
11
  =end
12
12
 
13
13
  module Bandwidth
14
- VERSION = '18.2.0'
14
+ VERSION = '18.3.0'
15
15
  end
data/lib/bandwidth-sdk.rb CHANGED
@@ -228,7 +228,9 @@ require 'bandwidth-sdk/models/bxml/verb'
228
228
  require 'bandwidth-sdk/models/bxml/nestable_verb'
229
229
  require 'bandwidth-sdk/models/bxml/verbs/bridge'
230
230
  require 'bandwidth-sdk/models/bxml/verbs/conference'
231
+ require 'bandwidth-sdk/models/bxml/verbs/connect'
231
232
  require 'bandwidth-sdk/models/bxml/verbs/custom_param'
233
+ require 'bandwidth-sdk/models/bxml/verbs/endpoint'
232
234
  require 'bandwidth-sdk/models/bxml/verbs/forward'
233
235
  require 'bandwidth-sdk/models/bxml/verbs/gather'
234
236
  require 'bandwidth-sdk/models/bxml/verbs/hangup'
@@ -8,8 +8,8 @@ describe 'MediaApi Integration Tests' do
8
8
  before(:all) do
9
9
  config = Bandwidth::Configuration.new
10
10
  config.configure do |config|
11
- config.username = BW_USERNAME
12
- config.password = BW_PASSWORD
11
+ config.client_id = BW_CLIENT_ID
12
+ config.client_secret = BW_CLIENT_SECRET
13
13
  config.return_binary_data = true
14
14
  end
15
15
  client = Bandwidth::ApiClient.new(config)
@@ -12,8 +12,8 @@ describe 'MessagesApi Integration Tests' do
12
12
  before(:all) do
13
13
  config = Bandwidth::Configuration.new
14
14
  config.configure do |config|
15
- config.username = BW_USERNAME
16
- config.password = BW_PASSWORD
15
+ config.client_id = BW_CLIENT_ID
16
+ config.client_secret = BW_CLIENT_SECRET
17
17
  end
18
18
  client = Bandwidth::ApiClient.new(config)
19
19
  @messaging_api_instance = Bandwidth::MessagesApi.new(client)
@@ -0,0 +1,62 @@
1
+ # Unit tests for Bandwidth::Bxml::Connect
2
+ describe 'Bandwidth::Bxml::Connect' do
3
+ let(:initial_attributes) {
4
+ {
5
+ event_callback_url: 'https://initial.com',
6
+ event_fallback_url: 'https://initial.com'
7
+ }
8
+ }
9
+
10
+ let(:new_attributes) {
11
+ {
12
+ event_callback_url: 'https://new.com',
13
+ event_fallback_url: 'https://new.com'
14
+ }
15
+ }
16
+
17
+ let(:endpoint_1) { Bandwidth::Bxml::Endpoint.new('endpoint_id_1') }
18
+ let(:endpoint_2) { Bandwidth::Bxml::Endpoint.new('endpoint_id_2') }
19
+
20
+ let(:instance) { Bandwidth::Bxml::Connect.new([], initial_attributes) }
21
+ let(:instance_nested) { Bandwidth::Bxml::Connect.new(endpoint_1, initial_attributes) }
22
+
23
+ describe 'test an instance of Connect' do
24
+ it 'validates instance of Connect' do
25
+ expect(instance).to be_instance_of(Bandwidth::Bxml::Connect)
26
+ expect(instance).to be_a(Bandwidth::Bxml::Verb)
27
+ end
28
+
29
+ it 'tests the to_bxml method of the Connect instance' do
30
+ expected = "\n<Connect eventCallbackUrl=\"https://initial.com\" eventFallbackUrl=\"https://initial.com\"/>\n"
31
+ expect(instance.to_bxml).to eq(expected)
32
+ end
33
+
34
+ it 'tests the set_attributes method of the Connect instance' do
35
+ instance.set_attributes(new_attributes)
36
+ expected = "\n<Connect eventCallbackUrl=\"https://new.com\" eventFallbackUrl=\"https://new.com\"/>\n"
37
+ expect(instance.to_bxml).to eq(expected)
38
+ end
39
+ end
40
+
41
+ describe 'test an instance of Connect with nested verbs' do
42
+ it 'validates instance of Connect' do
43
+ expect(instance_nested).to be_instance_of(Bandwidth::Bxml::Connect)
44
+ expect(instance_nested).to be_a(Bandwidth::Bxml::Verb)
45
+ end
46
+
47
+ it 'tests the to_bxml method of the nested Connect instance' do
48
+ expected = "\n<Connect eventCallbackUrl=\"https://initial.com\" eventFallbackUrl=\"https://initial.com\">\n <Endpoint>endpoint_id_1</Endpoint>\n</Connect>\n"
49
+ expect(instance_nested.to_bxml).to eq(expected)
50
+ end
51
+
52
+ it 'tests the add_endpoints method of the nested Connect instance' do
53
+ expected_single = "\n<Connect eventCallbackUrl=\"https://initial.com\" eventFallbackUrl=\"https://initial.com\">\n <Endpoint>endpoint_id_1</Endpoint>\n <Endpoint>endpoint_id_2</Endpoint>\n</Connect>\n"
54
+ instance_nested.add_endpoints(endpoint_2)
55
+ expect(instance_nested.to_bxml).to eq(expected_single)
56
+
57
+ expected_multiple = "\n<Connect eventCallbackUrl=\"https://initial.com\" eventFallbackUrl=\"https://initial.com\">\n <Endpoint>endpoint_id_1</Endpoint>\n <Endpoint>endpoint_id_2</Endpoint>\n <Endpoint>endpoint_id_2</Endpoint>\n <Endpoint>endpoint_id_1</Endpoint>\n</Connect>\n"
58
+ instance_nested.add_endpoints([endpoint_2, endpoint_1])
59
+ expect(instance_nested.to_bxml).to eq(expected_multiple)
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,16 @@
1
+ # Unit tests for Bandwidth::Bxml::Endpoint
2
+ describe 'Bandwidth::Bxml::Endpoint' do
3
+ let(:instance) { Bandwidth::Bxml::Endpoint.new('test_endpoint_id') }
4
+
5
+ describe 'test an instance of Endpoint' do
6
+ it 'validates instance of Endpoint' do
7
+ expect(instance).to be_instance_of(Bandwidth::Bxml::Endpoint)
8
+ expect(instance).to be_a(Bandwidth::Bxml::Verb)
9
+ end
10
+
11
+ it 'tests the to_bxml method of the Endpoint instance' do
12
+ expected = "\n<Endpoint>test_endpoint_id</Endpoint>\n"
13
+ expect(instance.to_bxml).to eq(expected)
14
+ end
15
+ end
16
+ end
@@ -4,6 +4,8 @@ describe 'Bandwidth::Bxml::Forward' do
4
4
  {
5
5
  to: '+19195551234',
6
6
  from: '+19195554321',
7
+ privacy: true,
8
+ caller_display_name: 'Restricted',
7
9
  call_timeout: 5,
8
10
  diversion_treatment: 'propagate',
9
11
  diversion_reason: 'user-busy',
@@ -15,6 +17,8 @@ describe 'Bandwidth::Bxml::Forward' do
15
17
  {
16
18
  to: '+19195554321',
17
19
  from: '+19195551234',
20
+ privacy: false,
21
+ caller_display_name: 'new_display_name',
18
22
  call_timeout: 10,
19
23
  diversion_treatment: 'stack',
20
24
  diversion_reason: 'no-answer',
@@ -31,13 +35,13 @@ describe 'Bandwidth::Bxml::Forward' do
31
35
  end
32
36
 
33
37
  it 'tests the to_bxml method of the Forward instance' do
34
- expected = "\n<Forward to=\"+19195551234\" from=\"+19195554321\" callTimeout=\"5\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\" uui=\"93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt\"/>\n"
38
+ expected = "\n<Forward to=\"+19195551234\" from=\"+19195554321\" privacy=\"true\" callerDisplayName=\"Restricted\" callTimeout=\"5\" diversionTreatment=\"propagate\" diversionReason=\"user-busy\" uui=\"93d6f3c0be5845960b744fa28015d8ede84bd1a4;encoding=base64,asdf;encoding=jwt\"/>\n"
35
39
  expect(instance.to_bxml).to eq(expected)
36
40
  end
37
41
 
38
42
  it 'tests the set_attributes method of the Forward instance' do
39
43
  instance.set_attributes(new_attributes)
40
- expected = "\n<Forward to=\"+19195554321\" from=\"+19195551234\" callTimeout=\"10\" diversionTreatment=\"stack\" diversionReason=\"no-answer\" uui=\"4fa28015d8ede84bd1a493d6f3c0be5845960b74;encoding=base64,fdsa;encoding=jwt\"/>\n"
44
+ expected = "\n<Forward to=\"+19195554321\" from=\"+19195551234\" privacy=\"false\" callerDisplayName=\"new_display_name\" callTimeout=\"10\" diversionTreatment=\"stack\" diversionReason=\"no-answer\" uui=\"4fa28015d8ede84bd1a493d6f3c0be5845960b74;encoding=base64,fdsa;encoding=jwt\"/>\n"
41
45
  expect(instance.to_bxml).to eq(expected)
42
46
  end
43
47
  end
@@ -15,7 +15,15 @@ describe 'Bandwidth::Bxml::Gather' do
15
15
  max_digits: 5,
16
16
  inter_digit_timeout: 5,
17
17
  first_digit_timeout: 5,
18
- repeat_count: 5
18
+ repeat_count: 5,
19
+ input: 'dtmf',
20
+ hints: 'initial_hints',
21
+ language: 'en-US',
22
+ partial_result_callback: 'https://initial.com',
23
+ partial_result_callback_method: 'POST',
24
+ profanity_filter: true,
25
+ speech_model: 'default',
26
+ speech_timeout: 5
19
27
  }
20
28
  }
21
29
 
@@ -34,7 +42,15 @@ describe 'Bandwidth::Bxml::Gather' do
34
42
  max_digits: 10,
35
43
  inter_digit_timeout: 10,
36
44
  first_digit_timeout: 10,
37
- repeat_count: 10
45
+ repeat_count: 10,
46
+ input: 'speech',
47
+ hints: 'new_hints',
48
+ language: 'es-US',
49
+ partial_result_callback: 'https://new.com',
50
+ partial_result_callback_method: 'GET',
51
+ profanity_filter: false,
52
+ speech_model: 'phone_call',
53
+ speech_timeout: 10
38
54
  }
39
55
  }
40
56
 
@@ -51,13 +67,13 @@ describe 'Bandwidth::Bxml::Gather' do
51
67
  end
52
68
 
53
69
  it 'tests the to_bxml method of the Gather instance' do
54
- expected = "\n<Gather gatherUrl=\"https://initial.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://initial.com\" gatherFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDigits=\"5\" interDigitTimeout=\"5\" firstDigitTimeout=\"5\" repeatCount=\"5\"/>\n"
70
+ expected = "\n<Gather gatherUrl=\"https://initial.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://initial.com\" gatherFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDigits=\"5\" interDigitTimeout=\"5\" firstDigitTimeout=\"5\" repeatCount=\"5\" input=\"dtmf\" hints=\"initial_hints\" language=\"en-US\" partialResultCallback=\"https://initial.com\" partialResultCallbackMethod=\"POST\" profanityFilter=\"true\" speechModel=\"default\" speechTimeout=\"5\"/>\n"
55
71
  expect(instance.to_bxml).to eq(expected)
56
72
  end
57
73
 
58
74
  it 'tests the set_attributes method of the Gather instance' do
59
75
  instance.set_attributes(new_attributes)
60
- expected = "\n<Gather gatherUrl=\"https://new.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://new.com\" gatherFallbackMethod=\"GET\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\" terminatingDigits=\"10\" maxDigits=\"10\" interDigitTimeout=\"10\" firstDigitTimeout=\"10\" repeatCount=\"10\"/>\n"
76
+ expected = "\n<Gather gatherUrl=\"https://new.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://new.com\" gatherFallbackMethod=\"GET\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\" terminatingDigits=\"10\" maxDigits=\"10\" interDigitTimeout=\"10\" firstDigitTimeout=\"10\" repeatCount=\"10\" input=\"speech\" hints=\"new_hints\" language=\"es-US\" partialResultCallback=\"https://new.com\" partialResultCallbackMethod=\"GET\" profanityFilter=\"false\" speechModel=\"phone_call\" speechTimeout=\"10\"/>\n"
61
77
  expect(instance.to_bxml).to eq(expected)
62
78
  end
63
79
  end
@@ -69,16 +85,16 @@ describe 'Bandwidth::Bxml::Gather' do
69
85
  end
70
86
 
71
87
  it 'tests the to_bxml method of the nested Gather instance' do
72
- expected = "\n<Gather gatherUrl=\"https://initial.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://initial.com\" gatherFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDigits=\"5\" interDigitTimeout=\"5\" firstDigitTimeout=\"5\" repeatCount=\"5\">\n <PlayAudio>https://audio.url/audio1.wav</PlayAudio>\n</Gather>\n"
88
+ expected = "\n<Gather gatherUrl=\"https://initial.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://initial.com\" gatherFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDigits=\"5\" interDigitTimeout=\"5\" firstDigitTimeout=\"5\" repeatCount=\"5\" input=\"dtmf\" hints=\"initial_hints\" language=\"en-US\" partialResultCallback=\"https://initial.com\" partialResultCallbackMethod=\"POST\" profanityFilter=\"true\" speechModel=\"default\" speechTimeout=\"5\">\n <PlayAudio>https://audio.url/audio1.wav</PlayAudio>\n</Gather>\n"
73
89
  expect(instance_nested.to_bxml).to eq(expected)
74
90
  end
75
91
 
76
92
  it 'tests the add_verb method of the nested Gather instance' do
77
- expected_single = "\n<Gather gatherUrl=\"https://initial.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://initial.com\" gatherFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDigits=\"5\" interDigitTimeout=\"5\" firstDigitTimeout=\"5\" repeatCount=\"5\">\n <PlayAudio>https://audio.url/audio1.wav</PlayAudio>\n <SpeakSentence><lang xml:lang=\"es-MX\">Hola</lang>ruby speak sentence <emphasis>SSML test</emphasis></SpeakSentence>\n</Gather>\n"
93
+ expected_single = "\n<Gather gatherUrl=\"https://initial.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://initial.com\" gatherFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDigits=\"5\" interDigitTimeout=\"5\" firstDigitTimeout=\"5\" repeatCount=\"5\" input=\"dtmf\" hints=\"initial_hints\" language=\"en-US\" partialResultCallback=\"https://initial.com\" partialResultCallbackMethod=\"POST\" profanityFilter=\"true\" speechModel=\"default\" speechTimeout=\"5\">\n <PlayAudio>https://audio.url/audio1.wav</PlayAudio>\n <SpeakSentence><lang xml:lang=\"es-MX\">Hola</lang>ruby speak sentence <emphasis>SSML test</emphasis></SpeakSentence>\n</Gather>\n"
78
94
  instance_nested.add_audio_verbs(speak_sentence)
79
95
  expect(instance_nested.to_bxml).to eq(expected_single)
80
96
 
81
- expected_multiple = "\n<Gather gatherUrl=\"https://initial.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://initial.com\" gatherFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDigits=\"5\" interDigitTimeout=\"5\" firstDigitTimeout=\"5\" repeatCount=\"5\">\n <PlayAudio>https://audio.url/audio1.wav</PlayAudio>\n <SpeakSentence><lang xml:lang=\"es-MX\">Hola</lang>ruby speak sentence <emphasis>SSML test</emphasis></SpeakSentence>\n <SpeakSentence><lang xml:lang=\"es-MX\">Hola</lang>ruby speak sentence <emphasis>SSML test</emphasis></SpeakSentence>\n <PlayAudio>https://audio.url/audio1.wav</PlayAudio>\n</Gather>\n"
97
+ expected_multiple = "\n<Gather gatherUrl=\"https://initial.com\" gatherMethod=\"POST\" gatherFallbackUrl=\"https://initial.com\" gatherFallbackMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDigits=\"5\" interDigitTimeout=\"5\" firstDigitTimeout=\"5\" repeatCount=\"5\" input=\"dtmf\" hints=\"initial_hints\" language=\"en-US\" partialResultCallback=\"https://initial.com\" partialResultCallbackMethod=\"POST\" profanityFilter=\"true\" speechModel=\"default\" speechTimeout=\"5\">\n <PlayAudio>https://audio.url/audio1.wav</PlayAudio>\n <SpeakSentence><lang xml:lang=\"es-MX\">Hola</lang>ruby speak sentence <emphasis>SSML test</emphasis></SpeakSentence>\n <SpeakSentence><lang xml:lang=\"es-MX\">Hola</lang>ruby speak sentence <emphasis>SSML test</emphasis></SpeakSentence>\n <PlayAudio>https://audio.url/audio1.wav</PlayAudio>\n</Gather>\n"
82
98
  instance_nested.add_audio_verbs([speak_sentence, play_audio])
83
99
  expect(instance_nested.to_bxml).to eq(expected_multiple)
84
100
  end
@@ -9,6 +9,7 @@ describe 'Bandwidth::Bxml::Record' do
9
9
  recording_available_url: 'https://initial.com',
10
10
  recording_available_method: 'POST',
11
11
  transcribe: true,
12
+ detect_language: true,
12
13
  transcription_available_url: 'https://initial.com',
13
14
  transcription_available_method: 'POST',
14
15
  username: 'initial_username',
@@ -19,7 +20,8 @@ describe 'Bandwidth::Bxml::Record' do
19
20
  terminating_digits: '5',
20
21
  max_duration: 5,
21
22
  silence_timeout: 5,
22
- file_format: 'wav'
23
+ file_format: 'wav',
24
+ recording_name: 'initial_recording_name'
23
25
  }
24
26
  }
25
27
 
@@ -32,6 +34,7 @@ describe 'Bandwidth::Bxml::Record' do
32
34
  recording_available_url: 'https://new.com',
33
35
  recording_available_method: 'GET',
34
36
  transcribe: true,
37
+ detect_language: false,
35
38
  transcription_available_url: 'https://new.com',
36
39
  transcription_available_method: 'GET',
37
40
  username: 'new_username',
@@ -42,7 +45,8 @@ describe 'Bandwidth::Bxml::Record' do
42
45
  terminating_digits: '0',
43
46
  max_duration: 10,
44
47
  silence_timeout: 10,
45
- file_format: 'mp3'
48
+ file_format: 'mp3',
49
+ recording_name: 'new_recording_name'
46
50
  }
47
51
  }
48
52
 
@@ -55,13 +59,13 @@ describe 'Bandwidth::Bxml::Record' do
55
59
  end
56
60
 
57
61
  it 'tests the to_bxml method of the Record instance' do
58
- expected = "\n<Record recordCompleteUrl=\"https://initial.com\" recordCompleteMethod=\"POST\" recordCompleteFallbackUrl=\"https://initial.com\" recordCompleteFallbackMethod=\"POST\" recordingAvailableUrl=\"https://initial.com\" recordingAvailableMethod=\"POST\" transcribe=\"true\" transcriptionAvailableUrl=\"https://initial.com\" transcriptionAvailableMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDuration=\"5\" silenceTimeout=\"5\" fileFormat=\"wav\"/>\n"
62
+ expected = "\n<Record recordCompleteUrl=\"https://initial.com\" recordCompleteMethod=\"POST\" recordCompleteFallbackUrl=\"https://initial.com\" recordCompleteFallbackMethod=\"POST\" recordingAvailableUrl=\"https://initial.com\" recordingAvailableMethod=\"POST\" transcribe=\"true\" detectLanguage=\"true\" transcriptionAvailableUrl=\"https://initial.com\" transcriptionAvailableMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" terminatingDigits=\"5\" maxDuration=\"5\" silenceTimeout=\"5\" fileFormat=\"wav\" recordingName=\"initial_recording_name\"/>\n"
59
63
  expect(instance.to_bxml).to eq(expected)
60
64
  end
61
65
 
62
66
  it 'tests the set_attributes method of the Record instance' do
63
67
  instance.set_attributes(new_attributes)
64
- expected = "\n<Record recordCompleteUrl=\"https://new.com\" recordCompleteMethod=\"GET\" recordCompleteFallbackUrl=\"https://new.com\" recordCompleteFallbackMethod=\"GET\" recordingAvailableUrl=\"https://new.com\" recordingAvailableMethod=\"GET\" transcribe=\"true\" transcriptionAvailableUrl=\"https://new.com\" transcriptionAvailableMethod=\"GET\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\" terminatingDigits=\"0\" maxDuration=\"10\" silenceTimeout=\"10\" fileFormat=\"mp3\"/>\n"
68
+ expected = "\n<Record recordCompleteUrl=\"https://new.com\" recordCompleteMethod=\"GET\" recordCompleteFallbackUrl=\"https://new.com\" recordCompleteFallbackMethod=\"GET\" recordingAvailableUrl=\"https://new.com\" recordingAvailableMethod=\"GET\" transcribe=\"true\" detectLanguage=\"false\" transcriptionAvailableUrl=\"https://new.com\" transcriptionAvailableMethod=\"GET\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\" terminatingDigits=\"0\" maxDuration=\"10\" silenceTimeout=\"10\" fileFormat=\"mp3\" recordingName=\"new_recording_name\"/>\n"
65
69
  expect(instance.to_bxml).to eq(expected)
66
70
  end
67
71
  end