bandwidth-sdk 14.1.2 → 15.0.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -16
- data/README.md +34 -1
- data/bandwidth.yml +675 -101
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +210 -6
- data/coverage/index.html +14901 -12699
- data/docs/Address.md +1 -1
- data/docs/CallsApi.md +1 -1
- data/docs/CardWidthEnum.md +15 -0
- data/docs/ConferencesApi.md +1 -1
- data/docs/CreateMultiChannelMessageResponse.md +22 -0
- data/docs/ErrorObject.md +20 -0
- data/docs/Link.md +20 -0
- data/docs/Message.md +1 -1
- data/docs/MessageCallback.md +3 -1
- data/docs/MessageRequest.md +1 -1
- data/docs/MmsMessageContent.md +20 -0
- data/docs/MultiChannelAction.md +89 -0
- data/docs/MultiChannelActionCalendarEvent.md +30 -0
- data/docs/MultiChannelApi.md +80 -0
- data/docs/MultiChannelCallbackData.md +26 -0
- data/docs/MultiChannelChannelListObject.md +24 -0
- data/docs/MultiChannelChannelListObjectContent.md +55 -0
- data/docs/MultiChannelMessageCallbackData.md +32 -0
- data/docs/MultiChannelMessageChannelEnum.md +15 -0
- data/docs/MultiChannelMessageData.md +34 -0
- data/docs/MultiChannelMessageDirectionEnum.md +15 -0
- data/docs/MultiChannelMessageRequest.md +26 -0
- data/docs/MultiChannelStatusEnum.md +15 -0
- data/docs/RbmActionBase.md +22 -0
- data/docs/RbmActionDial.md +24 -0
- data/docs/RbmActionOpenUrl.md +24 -0
- data/docs/RbmActionTypeEnum.md +15 -0
- data/docs/RbmActionViewLocation.md +28 -0
- data/docs/RbmCardContent.md +24 -0
- data/docs/RbmCardContentMedia.md +22 -0
- data/docs/RbmMediaHeightEnum.md +15 -0
- data/docs/RbmMessageCarouselCard.md +22 -0
- data/docs/RbmMessageContentFile.md +20 -0
- data/docs/RbmMessageContentRichCard.md +49 -0
- data/docs/RbmMessageContentText.md +20 -0
- data/docs/RbmMessageMedia.md +20 -0
- data/docs/RbmStandaloneCard.md +24 -0
- data/docs/SmsMessageContent.md +18 -0
- data/docs/StandaloneCardOrientationEnum.md +15 -0
- data/docs/TfvBasicAuthentication.md +2 -2
- data/docs/TfvStatus.md +5 -1
- data/docs/TfvSubmissionInfo.md +7 -1
- data/docs/ThumbnailAlignmentEnum.md +15 -0
- data/docs/TollFreeVerificationApi.md +1 -1
- data/docs/VerificationDenialWebhook.md +5 -1
- data/docs/VerificationRequest.md +10 -4
- data/docs/VerificationUpdateRequest.md +10 -4
- data/lib/bandwidth-sdk/api/multi_channel_api.rb +96 -0
- data/lib/bandwidth-sdk/configuration.rb +6 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/phone_number.rb +1 -0
- data/lib/bandwidth-sdk/models/card_width_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +234 -0
- data/lib/bandwidth-sdk/models/error_object.rb +221 -0
- data/lib/bandwidth-sdk/models/link.rb +221 -0
- data/lib/bandwidth-sdk/models/message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_callback.rb +16 -5
- data/lib/bandwidth-sdk/models/message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/mms_message_content.rb +244 -0
- data/lib/bandwidth-sdk/models/multi_channel_action.rb +61 -0
- data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +419 -0
- data/lib/bandwidth-sdk/models/multi_channel_callback_data.rb +272 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_object.rb +291 -0
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_content.rb +108 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_callback_data.rb +302 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb +41 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_data.rb +312 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_direction_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +310 -0
- data/lib/bandwidth-sdk/models/multi_channel_status_enum.rb +42 -0
- data/lib/bandwidth-sdk/models/rbm_action_base.rb +313 -0
- data/lib/bandwidth-sdk/models/rbm_action_dial.rb +337 -0
- data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +356 -0
- data/lib/bandwidth-sdk/models/rbm_action_type_enum.rb +44 -0
- data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +383 -0
- data/lib/bandwidth-sdk/models/rbm_card_content.rb +301 -0
- data/lib/bandwidth-sdk/models/rbm_card_content_media.rb +313 -0
- data/lib/bandwidth-sdk/models/rbm_media_height_enum.rb +41 -0
- data/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +309 -0
- data/lib/bandwidth-sdk/models/rbm_message_content_file.rb +268 -0
- data/lib/bandwidth-sdk/models/rbm_message_content_rich_card.rb +104 -0
- data/lib/bandwidth-sdk/models/rbm_message_content_text.rb +270 -0
- data/lib/bandwidth-sdk/models/rbm_message_media.rb +250 -0
- data/lib/bandwidth-sdk/models/rbm_standalone_card.rb +304 -0
- data/lib/bandwidth-sdk/models/sms_message_content.rb +239 -0
- data/lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/tfv_status.rb +24 -4
- data/lib/bandwidth-sdk/models/tfv_status_enum.rb +1 -3
- data/lib/bandwidth-sdk/models/tfv_submission_info.rb +35 -5
- data/lib/bandwidth-sdk/models/thumbnail_alignment_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +24 -4
- data/lib/bandwidth-sdk/models/verification_request.rb +45 -15
- data/lib/bandwidth-sdk/models/verification_update_request.rb +35 -5
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +34 -1
- data/spec/smoke/conferences_api_spec.rb +4 -4
- data/spec/smoke/multi_channel_api_spec.rb +40 -0
- data/spec/smoke/transcriptions_api_spec.rb +1 -1
- data/spec/unit/api/multi_channel_api_spec.rb +59 -0
- data/spec/unit/models/bxml/verbs/phone_number_spec.rb +6 -4
- metadata +117 -45
@@ -41,6 +41,15 @@ module Bandwidth
|
|
41
41
|
# ISV name.
|
42
42
|
attr_accessor :isv_reseller
|
43
43
|
|
44
|
+
# The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025)
|
45
|
+
attr_accessor :privacy_policy_url
|
46
|
+
|
47
|
+
# The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025)
|
48
|
+
attr_accessor :terms_and_conditions_url
|
49
|
+
|
50
|
+
# The company 'Doing Business As'. (Not Available Until 5/28/2025)
|
51
|
+
attr_accessor :business_dba
|
52
|
+
|
44
53
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
54
|
def self.attribute_map
|
46
55
|
{
|
@@ -53,7 +62,10 @@ module Bandwidth
|
|
53
62
|
:'production_message_content' => :'productionMessageContent',
|
54
63
|
:'opt_in_workflow' => :'optInWorkflow',
|
55
64
|
:'additional_information' => :'additionalInformation',
|
56
|
-
:'isv_reseller' => :'isvReseller'
|
65
|
+
:'isv_reseller' => :'isvReseller',
|
66
|
+
:'privacy_policy_url' => :'privacyPolicyUrl',
|
67
|
+
:'terms_and_conditions_url' => :'termsAndConditionsUrl',
|
68
|
+
:'business_dba' => :'businessDBA'
|
57
69
|
}
|
58
70
|
end
|
59
71
|
|
@@ -74,7 +86,10 @@ module Bandwidth
|
|
74
86
|
:'production_message_content' => :'String',
|
75
87
|
:'opt_in_workflow' => :'OptInWorkflow',
|
76
88
|
:'additional_information' => :'String',
|
77
|
-
:'isv_reseller' => :'String'
|
89
|
+
:'isv_reseller' => :'String',
|
90
|
+
:'privacy_policy_url' => :'String',
|
91
|
+
:'terms_and_conditions_url' => :'String',
|
92
|
+
:'business_dba' => :'String'
|
78
93
|
}
|
79
94
|
end
|
80
95
|
|
@@ -82,7 +97,7 @@ module Bandwidth
|
|
82
97
|
def self.openapi_nullable
|
83
98
|
Set.new([
|
84
99
|
:'additional_information',
|
85
|
-
:'isv_reseller'
|
100
|
+
:'isv_reseller',
|
86
101
|
])
|
87
102
|
end
|
88
103
|
|
@@ -158,6 +173,18 @@ module Bandwidth
|
|
158
173
|
if attributes.key?(:'isv_reseller')
|
159
174
|
self.isv_reseller = attributes[:'isv_reseller']
|
160
175
|
end
|
176
|
+
|
177
|
+
if attributes.key?(:'privacy_policy_url')
|
178
|
+
self.privacy_policy_url = attributes[:'privacy_policy_url']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.key?(:'terms_and_conditions_url')
|
182
|
+
self.terms_and_conditions_url = attributes[:'terms_and_conditions_url']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.key?(:'business_dba')
|
186
|
+
self.business_dba = attributes[:'business_dba']
|
187
|
+
end
|
161
188
|
end
|
162
189
|
|
163
190
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -217,8 +244,8 @@ module Bandwidth
|
|
217
244
|
invalid_properties.push('invalid value for "use_case_summary", the character length must be smaller than or equal to 500.')
|
218
245
|
end
|
219
246
|
|
220
|
-
if @use_case_summary.to_s.length <
|
221
|
-
invalid_properties.push('invalid value for "use_case_summary", the character length must be great than or equal to
|
247
|
+
if @use_case_summary.to_s.length < 0
|
248
|
+
invalid_properties.push('invalid value for "use_case_summary", the character length must be great than or equal to 0.')
|
222
249
|
end
|
223
250
|
|
224
251
|
if @production_message_content.nil?
|
@@ -229,8 +256,8 @@ module Bandwidth
|
|
229
256
|
invalid_properties.push('invalid value for "production_message_content", the character length must be smaller than or equal to 500.')
|
230
257
|
end
|
231
258
|
|
232
|
-
if @production_message_content.to_s.length <
|
233
|
-
invalid_properties.push('invalid value for "production_message_content", the character length must be great than or equal to
|
259
|
+
if @production_message_content.to_s.length < 0
|
260
|
+
invalid_properties.push('invalid value for "production_message_content", the character length must be great than or equal to 0.')
|
234
261
|
end
|
235
262
|
|
236
263
|
if @opt_in_workflow.nil?
|
@@ -273,10 +300,10 @@ module Bandwidth
|
|
273
300
|
return false if @use_case.to_s.length < 0
|
274
301
|
return false if @use_case_summary.nil?
|
275
302
|
return false if @use_case_summary.to_s.length > 500
|
276
|
-
return false if @use_case_summary.to_s.length <
|
303
|
+
return false if @use_case_summary.to_s.length < 0
|
277
304
|
return false if @production_message_content.nil?
|
278
305
|
return false if @production_message_content.to_s.length > 500
|
279
|
-
return false if @production_message_content.to_s.length <
|
306
|
+
return false if @production_message_content.to_s.length < 0
|
280
307
|
return false if @opt_in_workflow.nil?
|
281
308
|
return false if !@additional_information.nil? && @additional_information.to_s.length > 500
|
282
309
|
return false if !@additional_information.nil? && @additional_information.to_s.length < 0
|
@@ -350,8 +377,8 @@ module Bandwidth
|
|
350
377
|
fail ArgumentError, 'invalid value for "use_case_summary", the character length must be smaller than or equal to 500.'
|
351
378
|
end
|
352
379
|
|
353
|
-
if use_case_summary.to_s.length <
|
354
|
-
fail ArgumentError, 'invalid value for "use_case_summary", the character length must be great than or equal to
|
380
|
+
if use_case_summary.to_s.length < 0
|
381
|
+
fail ArgumentError, 'invalid value for "use_case_summary", the character length must be great than or equal to 0.'
|
355
382
|
end
|
356
383
|
|
357
384
|
@use_case_summary = use_case_summary
|
@@ -368,8 +395,8 @@ module Bandwidth
|
|
368
395
|
fail ArgumentError, 'invalid value for "production_message_content", the character length must be smaller than or equal to 500.'
|
369
396
|
end
|
370
397
|
|
371
|
-
if production_message_content.to_s.length <
|
372
|
-
fail ArgumentError, 'invalid value for "production_message_content", the character length must be great than or equal to
|
398
|
+
if production_message_content.to_s.length < 0
|
399
|
+
fail ArgumentError, 'invalid value for "production_message_content", the character length must be great than or equal to 0.'
|
373
400
|
end
|
374
401
|
|
375
402
|
@production_message_content = production_message_content
|
@@ -417,7 +444,10 @@ module Bandwidth
|
|
417
444
|
production_message_content == o.production_message_content &&
|
418
445
|
opt_in_workflow == o.opt_in_workflow &&
|
419
446
|
additional_information == o.additional_information &&
|
420
|
-
isv_reseller == o.isv_reseller
|
447
|
+
isv_reseller == o.isv_reseller &&
|
448
|
+
privacy_policy_url == o.privacy_policy_url &&
|
449
|
+
terms_and_conditions_url == o.terms_and_conditions_url &&
|
450
|
+
business_dba == o.business_dba
|
421
451
|
end
|
422
452
|
|
423
453
|
# @see the `==` method
|
@@ -429,7 +459,7 @@ module Bandwidth
|
|
429
459
|
# Calculates hash code according to all attributes.
|
430
460
|
# @return [Integer] Hash code
|
431
461
|
def hash
|
432
|
-
[business_address, business_contact, message_volume, phone_numbers, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller].hash
|
462
|
+
[business_address, business_contact, message_volume, phone_numbers, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller, privacy_policy_url, terms_and_conditions_url, business_dba].hash
|
433
463
|
end
|
434
464
|
|
435
465
|
# Builds the object from hash
|
@@ -39,6 +39,15 @@ module Bandwidth
|
|
39
39
|
# ISV name.
|
40
40
|
attr_accessor :isv_reseller
|
41
41
|
|
42
|
+
# The Toll-Free Verification request privacy policy URL. (Not Available Until 5/28/2025)
|
43
|
+
attr_accessor :privacy_policy_url
|
44
|
+
|
45
|
+
# The Toll-Free Verification request terms and conditions policy URL. (Not Available Until 5/28/2025)
|
46
|
+
attr_accessor :terms_and_conditions_url
|
47
|
+
|
48
|
+
# The company 'Doing Business As'. (Not Available Until 5/28/2025)
|
49
|
+
attr_accessor :business_dba
|
50
|
+
|
42
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
43
52
|
def self.attribute_map
|
44
53
|
{
|
@@ -50,7 +59,10 @@ module Bandwidth
|
|
50
59
|
:'production_message_content' => :'productionMessageContent',
|
51
60
|
:'opt_in_workflow' => :'optInWorkflow',
|
52
61
|
:'additional_information' => :'additionalInformation',
|
53
|
-
:'isv_reseller' => :'isvReseller'
|
62
|
+
:'isv_reseller' => :'isvReseller',
|
63
|
+
:'privacy_policy_url' => :'privacyPolicyUrl',
|
64
|
+
:'terms_and_conditions_url' => :'termsAndConditionsUrl',
|
65
|
+
:'business_dba' => :'businessDBA'
|
54
66
|
}
|
55
67
|
end
|
56
68
|
|
@@ -70,7 +82,10 @@ module Bandwidth
|
|
70
82
|
:'production_message_content' => :'String',
|
71
83
|
:'opt_in_workflow' => :'OptInWorkflow',
|
72
84
|
:'additional_information' => :'String',
|
73
|
-
:'isv_reseller' => :'String'
|
85
|
+
:'isv_reseller' => :'String',
|
86
|
+
:'privacy_policy_url' => :'String',
|
87
|
+
:'terms_and_conditions_url' => :'String',
|
88
|
+
:'business_dba' => :'String'
|
74
89
|
}
|
75
90
|
end
|
76
91
|
|
@@ -78,7 +93,7 @@ module Bandwidth
|
|
78
93
|
def self.openapi_nullable
|
79
94
|
Set.new([
|
80
95
|
:'additional_information',
|
81
|
-
:'isv_reseller'
|
96
|
+
:'isv_reseller',
|
82
97
|
])
|
83
98
|
end
|
84
99
|
|
@@ -146,6 +161,18 @@ module Bandwidth
|
|
146
161
|
if attributes.key?(:'isv_reseller')
|
147
162
|
self.isv_reseller = attributes[:'isv_reseller']
|
148
163
|
end
|
164
|
+
|
165
|
+
if attributes.key?(:'privacy_policy_url')
|
166
|
+
self.privacy_policy_url = attributes[:'privacy_policy_url']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.key?(:'terms_and_conditions_url')
|
170
|
+
self.terms_and_conditions_url = attributes[:'terms_and_conditions_url']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'business_dba')
|
174
|
+
self.business_dba = attributes[:'business_dba']
|
175
|
+
end
|
149
176
|
end
|
150
177
|
|
151
178
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -371,7 +398,10 @@ module Bandwidth
|
|
371
398
|
production_message_content == o.production_message_content &&
|
372
399
|
opt_in_workflow == o.opt_in_workflow &&
|
373
400
|
additional_information == o.additional_information &&
|
374
|
-
isv_reseller == o.isv_reseller
|
401
|
+
isv_reseller == o.isv_reseller &&
|
402
|
+
privacy_policy_url == o.privacy_policy_url &&
|
403
|
+
terms_and_conditions_url == o.terms_and_conditions_url &&
|
404
|
+
business_dba == o.business_dba
|
375
405
|
end
|
376
406
|
|
377
407
|
# @see the `==` method
|
@@ -383,7 +413,7 @@ module Bandwidth
|
|
383
413
|
# Calculates hash code according to all attributes.
|
384
414
|
# @return [Integer] Hash code
|
385
415
|
def hash
|
386
|
-
[business_address, business_contact, message_volume, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller].hash
|
416
|
+
[business_address, business_contact, message_volume, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller, privacy_policy_url, terms_and_conditions_url, business_dba].hash
|
387
417
|
end
|
388
418
|
|
389
419
|
# Builds the object from hash
|
data/lib/bandwidth-sdk.rb
CHANGED
@@ -34,6 +34,7 @@ require 'bandwidth-sdk/models/call_transcription_response'
|
|
34
34
|
require 'bandwidth-sdk/models/call_transcription_track_enum'
|
35
35
|
require 'bandwidth-sdk/models/callback_method_enum'
|
36
36
|
require 'bandwidth-sdk/models/callback_type_enum'
|
37
|
+
require 'bandwidth-sdk/models/card_width_enum'
|
37
38
|
require 'bandwidth-sdk/models/code_request'
|
38
39
|
require 'bandwidth-sdk/models/conference'
|
39
40
|
require 'bandwidth-sdk/models/conference_completed_callback'
|
@@ -50,16 +51,19 @@ require 'bandwidth-sdk/models/create_call'
|
|
50
51
|
require 'bandwidth-sdk/models/create_call_response'
|
51
52
|
require 'bandwidth-sdk/models/create_lookup_response'
|
52
53
|
require 'bandwidth-sdk/models/create_message_request_error'
|
54
|
+
require 'bandwidth-sdk/models/create_multi_channel_message_response'
|
53
55
|
require 'bandwidth-sdk/models/deferred_result'
|
54
56
|
require 'bandwidth-sdk/models/disconnect_callback'
|
55
57
|
require 'bandwidth-sdk/models/diversion'
|
56
58
|
require 'bandwidth-sdk/models/dtmf_callback'
|
57
59
|
require 'bandwidth-sdk/models/error'
|
60
|
+
require 'bandwidth-sdk/models/error_object'
|
58
61
|
require 'bandwidth-sdk/models/failure_webhook'
|
59
62
|
require 'bandwidth-sdk/models/field_error'
|
60
63
|
require 'bandwidth-sdk/models/file_format_enum'
|
61
64
|
require 'bandwidth-sdk/models/gather_callback'
|
62
65
|
require 'bandwidth-sdk/models/initiate_callback'
|
66
|
+
require 'bandwidth-sdk/models/link'
|
63
67
|
require 'bandwidth-sdk/models/links_object'
|
64
68
|
require 'bandwidth-sdk/models/list_message_direction_enum'
|
65
69
|
require 'bandwidth-sdk/models/list_message_item'
|
@@ -85,9 +89,35 @@ require 'bandwidth-sdk/models/messaging_request_error'
|
|
85
89
|
require 'bandwidth-sdk/models/mfa_forbidden_request_error'
|
86
90
|
require 'bandwidth-sdk/models/mfa_request_error'
|
87
91
|
require 'bandwidth-sdk/models/mfa_unauthorized_request_error'
|
92
|
+
require 'bandwidth-sdk/models/mms_message_content'
|
93
|
+
require 'bandwidth-sdk/models/multi_channel_action'
|
94
|
+
require 'bandwidth-sdk/models/multi_channel_action_calendar_event'
|
95
|
+
require 'bandwidth-sdk/models/multi_channel_callback_data'
|
96
|
+
require 'bandwidth-sdk/models/multi_channel_channel_list_object'
|
97
|
+
require 'bandwidth-sdk/models/multi_channel_channel_list_object_content'
|
98
|
+
require 'bandwidth-sdk/models/multi_channel_message_callback_data'
|
99
|
+
require 'bandwidth-sdk/models/multi_channel_message_channel_enum'
|
100
|
+
require 'bandwidth-sdk/models/multi_channel_message_data'
|
101
|
+
require 'bandwidth-sdk/models/multi_channel_message_direction_enum'
|
102
|
+
require 'bandwidth-sdk/models/multi_channel_message_request'
|
103
|
+
require 'bandwidth-sdk/models/multi_channel_status_enum'
|
88
104
|
require 'bandwidth-sdk/models/opt_in_workflow'
|
89
105
|
require 'bandwidth-sdk/models/page_info'
|
90
106
|
require 'bandwidth-sdk/models/priority_enum'
|
107
|
+
require 'bandwidth-sdk/models/rbm_action_base'
|
108
|
+
require 'bandwidth-sdk/models/rbm_action_dial'
|
109
|
+
require 'bandwidth-sdk/models/rbm_action_open_url'
|
110
|
+
require 'bandwidth-sdk/models/rbm_action_type_enum'
|
111
|
+
require 'bandwidth-sdk/models/rbm_action_view_location'
|
112
|
+
require 'bandwidth-sdk/models/rbm_card_content'
|
113
|
+
require 'bandwidth-sdk/models/rbm_card_content_media'
|
114
|
+
require 'bandwidth-sdk/models/rbm_media_height_enum'
|
115
|
+
require 'bandwidth-sdk/models/rbm_message_carousel_card'
|
116
|
+
require 'bandwidth-sdk/models/rbm_message_content_file'
|
117
|
+
require 'bandwidth-sdk/models/rbm_message_content_rich_card'
|
118
|
+
require 'bandwidth-sdk/models/rbm_message_content_text'
|
119
|
+
require 'bandwidth-sdk/models/rbm_message_media'
|
120
|
+
require 'bandwidth-sdk/models/rbm_standalone_card'
|
91
121
|
require 'bandwidth-sdk/models/recording_available_callback'
|
92
122
|
require 'bandwidth-sdk/models/recording_complete_callback'
|
93
123
|
require 'bandwidth-sdk/models/recording_state_enum'
|
@@ -95,8 +125,9 @@ require 'bandwidth-sdk/models/recording_transcription_metadata'
|
|
95
125
|
require 'bandwidth-sdk/models/recording_transcriptions'
|
96
126
|
require 'bandwidth-sdk/models/redirect_callback'
|
97
127
|
require 'bandwidth-sdk/models/redirect_method_enum'
|
128
|
+
require 'bandwidth-sdk/models/sms_message_content'
|
129
|
+
require 'bandwidth-sdk/models/standalone_card_orientation_enum'
|
98
130
|
require 'bandwidth-sdk/models/stir_shaken'
|
99
|
-
require 'bandwidth-sdk/models/tag'
|
100
131
|
require 'bandwidth-sdk/models/telephone_number'
|
101
132
|
require 'bandwidth-sdk/models/tfv_basic_authentication'
|
102
133
|
require 'bandwidth-sdk/models/tfv_callback_status_enum'
|
@@ -105,6 +136,7 @@ require 'bandwidth-sdk/models/tfv_status'
|
|
105
136
|
require 'bandwidth-sdk/models/tfv_status_enum'
|
106
137
|
require 'bandwidth-sdk/models/tfv_submission_info'
|
107
138
|
require 'bandwidth-sdk/models/tfv_submission_wrapper'
|
139
|
+
require 'bandwidth-sdk/models/thumbnail_alignment_enum'
|
108
140
|
require 'bandwidth-sdk/models/tn_lookup_request_error'
|
109
141
|
require 'bandwidth-sdk/models/transcribe_recording'
|
110
142
|
require 'bandwidth-sdk/models/transcription'
|
@@ -171,6 +203,7 @@ require 'bandwidth-sdk/api/conferences_api'
|
|
171
203
|
require 'bandwidth-sdk/api/mfa_api'
|
172
204
|
require 'bandwidth-sdk/api/media_api'
|
173
205
|
require 'bandwidth-sdk/api/messages_api'
|
206
|
+
require 'bandwidth-sdk/api/multi_channel_api'
|
174
207
|
require 'bandwidth-sdk/api/phone_number_lookup_api'
|
175
208
|
require 'bandwidth-sdk/api/recordings_api'
|
176
209
|
require 'bandwidth-sdk/api/statistics_api'
|
@@ -115,7 +115,7 @@ describe 'ConferencesApi Integration Tests' do
|
|
115
115
|
|
116
116
|
expect(recording_complete).to be true
|
117
117
|
end
|
118
|
-
end
|
118
|
+
end if false # skip due to PV issues
|
119
119
|
|
120
120
|
# Get Conference Recordings
|
121
121
|
describe 'list_conference_recordings' do
|
@@ -134,7 +134,7 @@ describe 'ConferencesApi Integration Tests' do
|
|
134
134
|
|
135
135
|
$recording_id = data[0].recording_id
|
136
136
|
end
|
137
|
-
end
|
137
|
+
end if false # skip due to PV issues
|
138
138
|
|
139
139
|
# Get Conference Recording Information
|
140
140
|
describe 'get_conference_recording' do
|
@@ -150,7 +150,7 @@ describe 'ConferencesApi Integration Tests' do
|
|
150
150
|
expect(data.recording_id).to be_instance_of(String)
|
151
151
|
expect(data.file_format).to eq(Bandwidth::FileFormatEnum::WAV)
|
152
152
|
end
|
153
|
-
end
|
153
|
+
end if false # skip due to PV issues
|
154
154
|
|
155
155
|
# Download Conference Recording
|
156
156
|
describe 'download_conference_recording test' do
|
@@ -160,5 +160,5 @@ describe 'ConferencesApi Integration Tests' do
|
|
160
160
|
expect(status_code).to eq(200)
|
161
161
|
expect(data).to be_instance_of(String)
|
162
162
|
end
|
163
|
-
end
|
163
|
+
end if false # skip due to PV issues
|
164
164
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Unit tests for Bandwidth::MultiChannelApi
|
2
|
+
describe 'MultiChannelApi' do
|
3
|
+
before(:all) do
|
4
|
+
Bandwidth.configure do |config|
|
5
|
+
config.username = BW_USERNAME
|
6
|
+
config.password = BW_PASSWORD
|
7
|
+
end
|
8
|
+
@multi_channel_api_instance = Bandwidth::MultiChannelApi.new
|
9
|
+
|
10
|
+
@expiration_time = (Time.now + 60).round.to_datetime.rfc3339
|
11
|
+
end
|
12
|
+
|
13
|
+
# Create Multi-Channel Message
|
14
|
+
describe 'create_multi_channel_message' do
|
15
|
+
it 'creates a multi channel message' do
|
16
|
+
message_body = Bandwidth::MultiChannelChannelListObject.new(
|
17
|
+
from: BW_NUMBER,
|
18
|
+
application_id: BW_MESSAGING_APPLICATION_ID,
|
19
|
+
channel: Bandwidth::MultiChannelMessageChannelEnum::RBM,
|
20
|
+
content: Bandwidth::RbmMessageContentText.new(
|
21
|
+
text: 'Hello, this is a test message.',
|
22
|
+
)
|
23
|
+
)
|
24
|
+
multi_channel_message_request = Bandwidth::MultiChannelMessageRequest.new(
|
25
|
+
to: USER_NUMBER,
|
26
|
+
channel_list: [message_body],
|
27
|
+
tag: 'tag',
|
28
|
+
priority: 'high',
|
29
|
+
expiration: @expiration_time,
|
30
|
+
)
|
31
|
+
|
32
|
+
data, status_code = @multi_channel_api_instance.create_multi_channel_message_with_http_info(BW_ACCOUNT_ID, multi_channel_message_request)
|
33
|
+
|
34
|
+
expect(status_code).to eq(202)
|
35
|
+
expect(data).to be_instance_of(Bandwidth::CreateMultiChannelMessageResponse)
|
36
|
+
end
|
37
|
+
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# Unit tests for Bandwidth::MultiChannelApi
|
2
|
+
describe 'MultiChannelApi' do
|
3
|
+
before(:all) do
|
4
|
+
Bandwidth.configure do |config|
|
5
|
+
config.debugging = true
|
6
|
+
config.username = BW_USERNAME
|
7
|
+
config.password = BW_PASSWORD
|
8
|
+
config.ignore_operation_servers = true
|
9
|
+
config.host = '127.0.0.1:4010'
|
10
|
+
end
|
11
|
+
@multi_channel_api_instance = Bandwidth::MultiChannelApi.new
|
12
|
+
|
13
|
+
@expiration_time = (Time.now + 60).round.to_datetime.rfc3339
|
14
|
+
end
|
15
|
+
|
16
|
+
describe 'test an instance of MultiChannelApi' do
|
17
|
+
it 'should create an instance of MultiChannelApi' do
|
18
|
+
expect(@multi_channel_api_instance).to be_instance_of(Bandwidth::MultiChannelApi)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# Create Multi-Channel Message
|
23
|
+
describe 'create_multi_channel_message' do
|
24
|
+
it 'creates a multi channel message' do
|
25
|
+
message_body = Bandwidth::MultiChannelChannelListObject.new(
|
26
|
+
from: BW_NUMBER,
|
27
|
+
application_id: BW_MESSAGING_APPLICATION_ID,
|
28
|
+
channel: Bandwidth::MultiChannelMessageChannelEnum::SMS,
|
29
|
+
content: Bandwidth::SmsMessageContent.new(
|
30
|
+
text: 'Hello, this is a test message.',
|
31
|
+
)
|
32
|
+
)
|
33
|
+
multi_channel_message_request = Bandwidth::MultiChannelMessageRequest.new(
|
34
|
+
to: USER_NUMBER,
|
35
|
+
channel_list: [message_body],
|
36
|
+
tag: 'tag',
|
37
|
+
priority: 'high',
|
38
|
+
expiration: @expiration_time,
|
39
|
+
)
|
40
|
+
|
41
|
+
data, status_code = @multi_channel_api_instance.create_multi_channel_message_with_http_info(BW_ACCOUNT_ID, multi_channel_message_request)
|
42
|
+
|
43
|
+
expect(status_code).to eq(202)
|
44
|
+
expect(data).to be_instance_of(Bandwidth::CreateMultiChannelMessageResponse)
|
45
|
+
end if false # skip because prism can't handle a oneOf with differing required fields
|
46
|
+
|
47
|
+
it 'causes an ArgumentError for a missing account_id' do
|
48
|
+
expect {
|
49
|
+
@multi_channel_api_instance.create_multi_channel_message(nil, {})
|
50
|
+
}.to raise_error(ArgumentError)
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'causes an ArgumentError for a missing message_request' do
|
54
|
+
expect {
|
55
|
+
@multi_channel_api_instance.create_multi_channel_message(BW_ACCOUNT_ID, nil)
|
56
|
+
}.to raise_error(ArgumentError)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -12,7 +12,8 @@ describe 'Bandwidth::Bxml::PhoneNumber' do
|
|
12
12
|
password: 'initial_password',
|
13
13
|
fallback_username: 'initial_fallback_username',
|
14
14
|
fallback_password: 'initial_fallback_password',
|
15
|
-
tag: 'initial_tag'
|
15
|
+
tag: 'initial_tag',
|
16
|
+
uui: 'initial_uui'
|
16
17
|
}
|
17
18
|
}
|
18
19
|
|
@@ -28,7 +29,8 @@ describe 'Bandwidth::Bxml::PhoneNumber' do
|
|
28
29
|
password: 'new_password',
|
29
30
|
fallback_username: 'new_fallback_username',
|
30
31
|
fallback_password: 'new_fallback_password',
|
31
|
-
tag: 'new_tag'
|
32
|
+
tag: 'new_tag',
|
33
|
+
uui: 'new_uui'
|
32
34
|
}
|
33
35
|
}
|
34
36
|
|
@@ -41,13 +43,13 @@ describe 'Bandwidth::Bxml::PhoneNumber' do
|
|
41
43
|
end
|
42
44
|
|
43
45
|
it 'tests the to_bxml method of the PhoneNumber instance' do
|
44
|
-
expected = "\n<PhoneNumber transferAnswerUrl=\"https://initial.com\" transferAnswerMethod=\"POST\" transferAnswerFallbackUrl=\"https://initial.com\" transferAnswerFallbackMethod=\"POST\" transferDisconnectUrl=\"https://initial.com\" transferDisconnectMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\">+19195551234</PhoneNumber>\n"
|
46
|
+
expected = "\n<PhoneNumber transferAnswerUrl=\"https://initial.com\" transferAnswerMethod=\"POST\" transferAnswerFallbackUrl=\"https://initial.com\" transferAnswerFallbackMethod=\"POST\" transferDisconnectUrl=\"https://initial.com\" transferDisconnectMethod=\"POST\" username=\"initial_username\" password=\"initial_password\" fallbackUsername=\"initial_fallback_username\" fallbackPassword=\"initial_fallback_password\" tag=\"initial_tag\" uui=\"initial_uui\">+19195551234</PhoneNumber>\n"
|
45
47
|
expect(instance.to_bxml).to eq(expected)
|
46
48
|
end
|
47
49
|
|
48
50
|
it 'tests the set_attributes method of the PhoneNumber instance' do
|
49
51
|
instance.set_attributes(new_attributes)
|
50
|
-
expected = "\n<PhoneNumber transferAnswerUrl=\"https://new.com\" transferAnswerMethod=\"GET\" transferAnswerFallbackUrl=\"https://new.com\" transferAnswerFallbackMethod=\"GET\" transferDisconnectUrl=\"https://new.com\" transferDisconnectMethod=\"GET\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\">+19195551234</PhoneNumber>\n"
|
52
|
+
expected = "\n<PhoneNumber transferAnswerUrl=\"https://new.com\" transferAnswerMethod=\"GET\" transferAnswerFallbackUrl=\"https://new.com\" transferAnswerFallbackMethod=\"GET\" transferDisconnectUrl=\"https://new.com\" transferDisconnectMethod=\"GET\" username=\"new_username\" password=\"new_password\" fallbackUsername=\"new_fallback_username\" fallbackPassword=\"new_fallback_password\" tag=\"new_tag\" uui=\"new_uui\">+19195551234</PhoneNumber>\n"
|
51
53
|
expect(instance.to_bxml).to eq(expected)
|
52
54
|
end
|
53
55
|
end
|