bandwidth-sdk 17.1.1 → 17.2.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.
@@ -43,6 +43,9 @@ module Bandwidth
43
43
  # The reason why the Toll-Free Verification is blocked. This attribute will only be defined when the number is blocked.
44
44
  attr_accessor :blocked_reason
45
45
 
46
+ # The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected.
47
+ attr_accessor :cv_token
48
+
46
49
  class EnumAttributeValidator
47
50
  attr_reader :datatype
48
51
  attr_reader :allowable_values
@@ -77,7 +80,8 @@ module Bandwidth
77
80
  :'modified_date_time' => :'modifiedDateTime',
78
81
  :'submission' => :'submission',
79
82
  :'blocked' => :'blocked',
80
- :'blocked_reason' => :'blockedReason'
83
+ :'blocked_reason' => :'blockedReason',
84
+ :'cv_token' => :'cvToken'
81
85
  }
82
86
  end
83
87
 
@@ -103,13 +107,15 @@ module Bandwidth
103
107
  :'modified_date_time' => :'Time',
104
108
  :'submission' => :'TfvSubmissionInfo',
105
109
  :'blocked' => :'Boolean',
106
- :'blocked_reason' => :'String'
110
+ :'blocked_reason' => :'String',
111
+ :'cv_token' => :'String'
107
112
  }
108
113
  end
109
114
 
110
115
  # List of attributes with nullable: true
111
116
  def self.openapi_nullable
112
117
  Set.new([
118
+ :'cv_token'
113
119
  ])
114
120
  end
115
121
 
@@ -168,6 +174,10 @@ module Bandwidth
168
174
  if attributes.key?(:'blocked_reason')
169
175
  self.blocked_reason = attributes[:'blocked_reason']
170
176
  end
177
+
178
+ if attributes.key?(:'cv_token')
179
+ self.cv_token = attributes[:'cv_token']
180
+ end
171
181
  end
172
182
 
173
183
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -188,6 +198,14 @@ module Bandwidth
188
198
  invalid_properties.push("invalid value for \"phone_number\", must conform to the pattern #{pattern}.")
189
199
  end
190
200
 
201
+ if !@cv_token.nil? && @cv_token.to_s.length > 500
202
+ invalid_properties.push('invalid value for "cv_token", the character length must be smaller than or equal to 500.')
203
+ end
204
+
205
+ if !@cv_token.nil? && @cv_token.to_s.length < 0
206
+ invalid_properties.push('invalid value for "cv_token", the character length must be greater than or equal to 0.')
207
+ end
208
+
191
209
  invalid_properties
192
210
  end
193
211
 
@@ -198,6 +216,8 @@ module Bandwidth
198
216
  return false if !@phone_number.nil? && @phone_number.to_s.length > 12
199
217
  return false if !@phone_number.nil? && @phone_number.to_s.length < 12
200
218
  return false if !@phone_number.nil? && @phone_number !~ Regexp.new(/^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$/)
219
+ return false if !@cv_token.nil? && @cv_token.to_s.length > 500
220
+ return false if !@cv_token.nil? && @cv_token.to_s.length < 0
201
221
  true
202
222
  end
203
223
 
@@ -224,6 +244,20 @@ module Bandwidth
224
244
  @phone_number = phone_number
225
245
  end
226
246
 
247
+ # Custom attribute writer method with validation
248
+ # @param [Object] cv_token Value to be assigned
249
+ def cv_token=(cv_token)
250
+ if !cv_token.nil? && cv_token.to_s.length > 500
251
+ fail ArgumentError, 'invalid value for "cv_token", the character length must be smaller than or equal to 500.'
252
+ end
253
+
254
+ if !cv_token.nil? && cv_token.to_s.length < 0
255
+ fail ArgumentError, 'invalid value for "cv_token", the character length must be greater than or equal to 0.'
256
+ end
257
+
258
+ @cv_token = cv_token
259
+ end
260
+
227
261
  # Checks equality by comparing each attribute.
228
262
  # @param [Object] Object to be compared
229
263
  def ==(o)
@@ -238,7 +272,8 @@ module Bandwidth
238
272
  modified_date_time == o.modified_date_time &&
239
273
  submission == o.submission &&
240
274
  blocked == o.blocked &&
241
- blocked_reason == o.blocked_reason
275
+ blocked_reason == o.blocked_reason &&
276
+ cv_token == o.cv_token
242
277
  end
243
278
 
244
279
  # @see the `==` method
@@ -250,7 +285,7 @@ module Bandwidth
250
285
  # Calculates hash code according to all attributes.
251
286
  # @return [Integer] Hash code
252
287
  def hash
253
- [phone_number, status, internal_ticket_number, decline_reason_description, resubmit_allowed, created_date_time, modified_date_time, submission, blocked, blocked_reason].hash
288
+ [phone_number, status, internal_ticket_number, decline_reason_description, resubmit_allowed, created_date_time, modified_date_time, submission, blocked, blocked_reason, cv_token].hash
254
289
  end
255
290
 
256
291
  # Builds the object from hash
@@ -63,6 +63,9 @@ module Bandwidth
63
63
  # Indicates whether the content is age-gated.
64
64
  attr_accessor :age_gated_content
65
65
 
66
+ # The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected.
67
+ attr_accessor :cv_token
68
+
66
69
  class EnumAttributeValidator
67
70
  attr_reader :datatype
68
71
  attr_reader :allowable_values
@@ -105,7 +108,8 @@ module Bandwidth
105
108
  :'business_registration_type' => :'businessRegistrationType',
106
109
  :'business_entity_type' => :'businessEntityType',
107
110
  :'help_message_response' => :'helpMessageResponse',
108
- :'age_gated_content' => :'ageGatedContent'
111
+ :'age_gated_content' => :'ageGatedContent',
112
+ :'cv_token' => :'cvToken'
109
113
  }
110
114
  end
111
115
 
@@ -139,7 +143,8 @@ module Bandwidth
139
143
  :'business_registration_type' => :'BusinessRegistrationTypeEnum',
140
144
  :'business_entity_type' => :'BusinessEntityTypeEnum',
141
145
  :'help_message_response' => :'String',
142
- :'age_gated_content' => :'Boolean'
146
+ :'age_gated_content' => :'Boolean',
147
+ :'cv_token' => :'String'
143
148
  }
144
149
  end
145
150
 
@@ -152,6 +157,7 @@ module Bandwidth
152
157
  :'business_registration_type',
153
158
  :'business_entity_type',
154
159
  :'help_message_response',
160
+ :'cv_token'
155
161
  ])
156
162
  end
157
163
 
@@ -260,6 +266,10 @@ module Bandwidth
260
266
  if attributes.key?(:'age_gated_content')
261
267
  self.age_gated_content = attributes[:'age_gated_content']
262
268
  end
269
+
270
+ if attributes.key?(:'cv_token')
271
+ self.cv_token = attributes[:'cv_token']
272
+ end
263
273
  end
264
274
 
265
275
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -363,6 +373,14 @@ module Bandwidth
363
373
  invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.')
364
374
  end
365
375
 
376
+ if !@cv_token.nil? && @cv_token.to_s.length > 500
377
+ invalid_properties.push('invalid value for "cv_token", the character length must be smaller than or equal to 500.')
378
+ end
379
+
380
+ if !@cv_token.nil? && @cv_token.to_s.length < 0
381
+ invalid_properties.push('invalid value for "cv_token", the character length must be greater than or equal to 0.')
382
+ end
383
+
366
384
  invalid_properties
367
385
  end
368
386
 
@@ -394,6 +412,8 @@ module Bandwidth
394
412
  return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
395
413
  return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
396
414
  return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500
415
+ return false if !@cv_token.nil? && @cv_token.to_s.length > 500
416
+ return false if !@cv_token.nil? && @cv_token.to_s.length < 0
397
417
  true
398
418
  end
399
419
 
@@ -565,6 +585,20 @@ module Bandwidth
565
585
  @help_message_response = help_message_response
566
586
  end
567
587
 
588
+ # Custom attribute writer method with validation
589
+ # @param [Object] cv_token Value to be assigned
590
+ def cv_token=(cv_token)
591
+ if !cv_token.nil? && cv_token.to_s.length > 500
592
+ fail ArgumentError, 'invalid value for "cv_token", the character length must be smaller than or equal to 500.'
593
+ end
594
+
595
+ if !cv_token.nil? && cv_token.to_s.length < 0
596
+ fail ArgumentError, 'invalid value for "cv_token", the character length must be greater than or equal to 0.'
597
+ end
598
+
599
+ @cv_token = cv_token
600
+ end
601
+
568
602
  # Checks equality by comparing each attribute.
569
603
  # @param [Object] Object to be compared
570
604
  def ==(o)
@@ -587,7 +621,8 @@ module Bandwidth
587
621
  business_registration_type == o.business_registration_type &&
588
622
  business_entity_type == o.business_entity_type &&
589
623
  help_message_response == o.help_message_response &&
590
- age_gated_content == o.age_gated_content
624
+ age_gated_content == o.age_gated_content &&
625
+ cv_token == o.cv_token
591
626
  end
592
627
 
593
628
  # @see the `==` method
@@ -599,7 +634,7 @@ module Bandwidth
599
634
  # Calculates hash code according to all attributes.
600
635
  # @return [Integer] Hash code
601
636
  def hash
602
- [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, business_registration_number, business_registration_type, business_entity_type, help_message_response, age_gated_content].hash
637
+ [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, business_registration_number, business_registration_type, business_entity_type, help_message_response, age_gated_content, cv_token].hash
603
638
  end
604
639
 
605
640
  # Builds the object from hash
@@ -61,6 +61,9 @@ module Bandwidth
61
61
  # Indicates whether the content is age-gated.
62
62
  attr_accessor :age_gated_content
63
63
 
64
+ # The token provided by Campaign Verify to validate your political use case. Only required for 527 political organizations. If you are not a 527 political organization, this field should be omitted. If you pass an empty string, it will be passed along and potentially rejected.
65
+ attr_accessor :cv_token
66
+
64
67
  class EnumAttributeValidator
65
68
  attr_reader :datatype
66
69
  attr_reader :allowable_values
@@ -102,7 +105,8 @@ module Bandwidth
102
105
  :'business_registration_type' => :'businessRegistrationType',
103
106
  :'business_entity_type' => :'businessEntityType',
104
107
  :'help_message_response' => :'helpMessageResponse',
105
- :'age_gated_content' => :'ageGatedContent'
108
+ :'age_gated_content' => :'ageGatedContent',
109
+ :'cv_token' => :'cvToken'
106
110
  }
107
111
  end
108
112
 
@@ -135,7 +139,8 @@ module Bandwidth
135
139
  :'business_registration_type' => :'BusinessRegistrationTypeEnum',
136
140
  :'business_entity_type' => :'BusinessEntityTypeEnum',
137
141
  :'help_message_response' => :'String',
138
- :'age_gated_content' => :'Boolean'
142
+ :'age_gated_content' => :'Boolean',
143
+ :'cv_token' => :'String'
139
144
  }
140
145
  end
141
146
 
@@ -148,6 +153,7 @@ module Bandwidth
148
153
  :'business_registration_type',
149
154
  :'business_entity_type',
150
155
  :'help_message_response',
156
+ :'cv_token'
151
157
  ])
152
158
  end
153
159
 
@@ -248,6 +254,10 @@ module Bandwidth
248
254
  if attributes.key?(:'age_gated_content')
249
255
  self.age_gated_content = attributes[:'age_gated_content']
250
256
  end
257
+
258
+ if attributes.key?(:'cv_token')
259
+ self.cv_token = attributes[:'cv_token']
260
+ end
251
261
  end
252
262
 
253
263
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -339,6 +349,14 @@ module Bandwidth
339
349
  invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.')
340
350
  end
341
351
 
352
+ if !@cv_token.nil? && @cv_token.to_s.length > 500
353
+ invalid_properties.push('invalid value for "cv_token", the character length must be smaller than or equal to 500.')
354
+ end
355
+
356
+ if !@cv_token.nil? && @cv_token.to_s.length < 0
357
+ invalid_properties.push('invalid value for "cv_token", the character length must be greater than or equal to 0.')
358
+ end
359
+
342
360
  invalid_properties
343
361
  end
344
362
 
@@ -367,6 +385,8 @@ module Bandwidth
367
385
  return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
368
386
  return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
369
387
  return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500
388
+ return false if !@cv_token.nil? && @cv_token.to_s.length > 500
389
+ return false if !@cv_token.nil? && @cv_token.to_s.length < 0
370
390
  true
371
391
  end
372
392
 
@@ -520,6 +540,20 @@ module Bandwidth
520
540
  @help_message_response = help_message_response
521
541
  end
522
542
 
543
+ # Custom attribute writer method with validation
544
+ # @param [Object] cv_token Value to be assigned
545
+ def cv_token=(cv_token)
546
+ if !cv_token.nil? && cv_token.to_s.length > 500
547
+ fail ArgumentError, 'invalid value for "cv_token", the character length must be smaller than or equal to 500.'
548
+ end
549
+
550
+ if !cv_token.nil? && cv_token.to_s.length < 0
551
+ fail ArgumentError, 'invalid value for "cv_token", the character length must be greater than or equal to 0.'
552
+ end
553
+
554
+ @cv_token = cv_token
555
+ end
556
+
523
557
  # Checks equality by comparing each attribute.
524
558
  # @param [Object] Object to be compared
525
559
  def ==(o)
@@ -541,7 +575,8 @@ module Bandwidth
541
575
  business_registration_type == o.business_registration_type &&
542
576
  business_entity_type == o.business_entity_type &&
543
577
  help_message_response == o.help_message_response &&
544
- age_gated_content == o.age_gated_content
578
+ age_gated_content == o.age_gated_content &&
579
+ cv_token == o.cv_token
545
580
  end
546
581
 
547
582
  # @see the `==` method
@@ -553,7 +588,7 @@ module Bandwidth
553
588
  # Calculates hash code according to all attributes.
554
589
  # @return [Integer] Hash code
555
590
  def hash
556
- [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, business_registration_number, business_registration_type, business_entity_type, help_message_response, age_gated_content].hash
591
+ [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, business_registration_number, business_registration_type, business_entity_type, help_message_response, age_gated_content, cv_token].hash
557
592
  end
558
593
 
559
594
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.17.0
11
11
  =end
12
12
 
13
13
  module Bandwidth
14
- VERSION = '17.1.1'
14
+ VERSION = '17.2.0'
15
15
  end
@@ -34,7 +34,6 @@ describe 'MultiChannelApi' do
34
34
  data, status_code = @multi_channel_api_instance.create_multi_channel_message_with_http_info(BW_ACCOUNT_ID, multi_channel_message_request)
35
35
 
36
36
  expect(status_code).to eq(202)
37
- p data.data
38
37
  expect(data).to be_instance_of(Bandwidth::CreateMultiChannelMessageResponse)
39
38
  expect(data.links).to be_instance_of(Array)
40
39
  expect(data.data).to be_instance_of(Bandwidth::MultiChannelMessageResponseData)
@@ -46,7 +45,12 @@ describe 'MultiChannelApi' do
46
45
  expect(data.data.priority).to be_one_of(Bandwidth::PriorityEnum.all_vars)
47
46
  expect(data.data.expiration).to be_instance_of(Time)
48
47
  expect(data.data.channel_list).to be_instance_of(Array)
49
- # add more assertions once SDK supports discriminators
48
+ expect(data.data.channel_list.first).to be_instance_of(Bandwidth::MultiChannelChannelListSMSResponseObject)
49
+ expect(data.data.channel_list.first.from).to be_instance_of(String)
50
+ expect(data.data.channel_list.first.application_id).to be_instance_of(String)
51
+ expect(data.data.channel_list.first.channel).to eq(Bandwidth::MultiChannelMessageChannelEnum::SMS)
52
+ expect(data.data.channel_list.first.content).to be_instance_of(Bandwidth::SmsMessageContent)
53
+ expect(data.data.channel_list.first.content.text).to be_instance_of(String)
50
54
  end
51
55
  end
52
56
 
@@ -77,7 +81,6 @@ describe 'MultiChannelApi' do
77
81
  data, status_code = @multi_channel_api_instance.create_multi_channel_message_with_http_info(BW_ACCOUNT_ID, multi_channel_message_request)
78
82
 
79
83
  expect(status_code).to eq(202)
80
- p data.data
81
84
  expect(data).to be_instance_of(Bandwidth::CreateMultiChannelMessageResponse)
82
85
  expect(data.links).to be_instance_of(Array)
83
86
  expect(data.data).to be_instance_of(Bandwidth::MultiChannelMessageResponseData)
@@ -89,13 +92,21 @@ describe 'MultiChannelApi' do
89
92
  expect(data.data.priority).to be_one_of(Bandwidth::PriorityEnum.all_vars)
90
93
  expect(data.data.expiration).to be_instance_of(Time)
91
94
  expect(data.data.channel_list).to be_instance_of(Array)
92
- # add more assertions once SDK supports discriminators
95
+ expect(data.data.channel_list.first).to be_instance_of(Bandwidth::MultiChannelChannelListMMSResponseObject)
96
+ expect(data.data.channel_list.first.from).to be_instance_of(String)
97
+ expect(data.data.channel_list.first.application_id).to be_instance_of(String)
98
+ expect(data.data.channel_list.first.channel).to eq(Bandwidth::MultiChannelMessageChannelEnum::MMS)
99
+ expect(data.data.channel_list.first.content).to be_instance_of(Bandwidth::MmsMessageContent)
100
+ expect(data.data.channel_list.first.content.text).to be_instance_of(String)
101
+ expect(data.data.channel_list.first.content.media).to be_instance_of(Array)
102
+ expect(data.data.channel_list.first.content.media.first).to be_instance_of(Bandwidth::MmsMessageContentFile)
103
+ expect(data.data.channel_list.first.content.media.first.file_url).to be_instance_of(String)
93
104
  end
94
105
  end
95
106
 
96
107
  # Create Multi-Channel RBM Message
97
108
  describe 'create_multi_channel_rbm_message' do
98
- it 'creates a multi channel rbm message' do
109
+ it 'creates a multi channel rbm text message' do
99
110
  message_body = Bandwidth::MultiChannelChannelListRBMObject.new(
100
111
  from: BW_NUMBER,
101
112
  application_id: BW_MESSAGING_APPLICATION_ID,
@@ -123,7 +134,6 @@ describe 'MultiChannelApi' do
123
134
  data, status_code = @multi_channel_api_instance.create_multi_channel_message_with_http_info(BW_ACCOUNT_ID, multi_channel_message_request)
124
135
 
125
136
  expect(status_code).to eq(202)
126
- p data.data
127
137
  expect(data).to be_instance_of(Bandwidth::CreateMultiChannelMessageResponse)
128
138
  expect(data.links).to be_instance_of(Array)
129
139
  expect(data.data).to be_instance_of(Bandwidth::MultiChannelMessageResponseData)
@@ -135,7 +145,226 @@ describe 'MultiChannelApi' do
135
145
  expect(data.data.priority).to be_one_of(Bandwidth::PriorityEnum.all_vars)
136
146
  expect(data.data.expiration).to be_instance_of(Time)
137
147
  expect(data.data.channel_list).to be_instance_of(Array)
138
- # add more assertions once SDK supports discriminators
148
+ expect(data.data.channel_list.first).to be_instance_of(Bandwidth::MultiChannelChannelListRBMResponseObject)
149
+ expect(data.data.channel_list.first.from).to be_instance_of(String)
150
+ expect(data.data.channel_list.first.application_id).to be_instance_of(String)
151
+ expect(data.data.channel_list.first.channel).to eq(Bandwidth::MultiChannelMessageChannelEnum::RBM)
152
+ expect(data.data.channel_list.first.content).to be_instance_of(Bandwidth::RbmMessageContentText)
153
+ expect(data.data.channel_list.first.content.text).to be_instance_of(String)
154
+ expect(data.data.channel_list.first.content.suggestions).to be_instance_of(Array)
155
+ expect(data.data.channel_list.first.content.suggestions.first).to be_instance_of(Bandwidth::RbmActionDial)
156
+ expect(data.data.channel_list.first.content.suggestions.first.type).to eq(Bandwidth::RbmActionTypeEnum::DIAL_PHONE)
157
+ expect(data.data.channel_list.first.content.suggestions.first.text).to be_instance_of(String)
158
+ expect(data.data.channel_list.first.content.suggestions.first.postback_data).to be_instance_of(String)
159
+ expect(data.data.channel_list.first.content.suggestions.first.phone_number).to be_instance_of(String)
160
+ end
161
+
162
+ it 'creates a multi channel rbm media message' do
163
+ message_body = Bandwidth::MultiChannelChannelListRBMObject.new(
164
+ from: BW_NUMBER,
165
+ application_id: BW_MESSAGING_APPLICATION_ID,
166
+ channel: Bandwidth::MultiChannelMessageChannelEnum::RBM,
167
+ content: Bandwidth::RbmMessageMedia.new(
168
+ media: [
169
+ Bandwidth::RbmMessageContentFile.new(
170
+ file_url: 'https://example.com/image.jpg',
171
+ thumbnail_url: 'https://example.com/thumbnail.jpg'
172
+ )],
173
+ suggestions: [
174
+ Bandwidth::RbmActionDial.new(
175
+ type: Bandwidth::RbmActionTypeEnum::DIAL_PHONE,
176
+ text: 'Call Us',
177
+ postback_data: 'abcdefg12345678',
178
+ phone_number: BW_NUMBER
179
+ )
180
+ ]
181
+ )
182
+ )
183
+ multi_channel_message_request = Bandwidth::MultiChannelMessageRequest.new(
184
+ to: USER_NUMBER,
185
+ channel_list: [message_body],
186
+ tag: 'tag',
187
+ priority: 'high',
188
+ expiration: @expiration_time,
189
+ )
190
+
191
+ data, status_code = @multi_channel_api_instance.create_multi_channel_message_with_http_info(BW_ACCOUNT_ID, multi_channel_message_request)
192
+
193
+ expect(status_code).to eq(202)
194
+ expect(data).to be_instance_of(Bandwidth::CreateMultiChannelMessageResponse)
195
+ expect(data.links).to be_instance_of(Array)
196
+ expect(data.data).to be_instance_of(Bandwidth::MultiChannelMessageResponseData)
197
+ expect(data.data.id).to be_instance_of(String)
198
+ expect(data.data.time).to be_instance_of(Time)
199
+ expect(data.data.direction).to be_one_of(Bandwidth::MessageDirectionEnum.all_vars)
200
+ expect(data.data.to).to be_instance_of(Array)
201
+ expect(data.data.tag).to be_instance_of(String)
202
+ expect(data.data.priority).to be_one_of(Bandwidth::PriorityEnum.all_vars)
203
+ expect(data.data.expiration).to be_instance_of(Time)
204
+ expect(data.data.channel_list).to be_instance_of(Array)
205
+ expect(data.data.channel_list.first).to be_instance_of(Bandwidth::MultiChannelChannelListRBMResponseObject)
206
+ expect(data.data.channel_list.first.from).to be_instance_of(String)
207
+ expect(data.data.channel_list.first.application_id).to be_instance_of(String)
208
+ expect(data.data.channel_list.first.channel).to eq(Bandwidth::MultiChannelMessageChannelEnum::RBM)
209
+ expect(data.data.channel_list.first.content).to be_instance_of(Bandwidth::RbmMessageMedia)
210
+ expect(data.data.channel_list.first.content.media).to be_instance_of(Array)
211
+ expect(data.data.channel_list.first.content.media.first).to be_instance_of(Bandwidth::RbmMessageContentFile)
212
+ expect(data.data.channel_list.first.content.media.first.file_url).to be_instance_of(String)
213
+ expect(data.data.channel_list.first.content.media.first.thumbnail_url).to be_instance_of(String)
214
+ expect(data.data.channel_list.first.content.suggestions).to be_instance_of(Array)
215
+ expect(data.data.channel_list.first.content.suggestions.first).to be_instance_of(Bandwidth::RbmActionDial)
216
+ expect(data.data.channel_list.first.content.suggestions.first.type).to eq(Bandwidth::RbmActionTypeEnum::DIAL_PHONE)
217
+ expect(data.data.channel_list.first.content.suggestions.first.text).to be_instance_of(String)
218
+ expect(data.data.channel_list.first.content.suggestions.first.postback_data).to be_instance_of(String)
219
+ expect(data.data.channel_list.first.content.suggestions.first.phone_number).to be_instance_of(String)
220
+ end
221
+
222
+ it 'creates a multi channel rbm standalone rich card message' do
223
+ message_body = Bandwidth::MultiChannelChannelListRBMObject.new(
224
+ from: BW_NUMBER,
225
+ application_id: BW_MESSAGING_APPLICATION_ID,
226
+ channel: Bandwidth::MultiChannelMessageChannelEnum::RBM,
227
+ content: Bandwidth::RbmStandaloneCard.new(
228
+ orientation: Bandwidth::StandaloneCardOrientationEnum::HORIZONTAL,
229
+ thumbnail_image_alignment: Bandwidth::ThumbnailAlignmentEnum::LEFT,
230
+ card_content: Bandwidth::RbmCardContent.new(
231
+ title: 'Welcome to our service',
232
+ description: 'We are glad to have you here.',
233
+ media: Bandwidth::RbmCardContentMedia.new(
234
+ file_url: 'https://image.com/image.png',
235
+ thumbnail_url: 'https://image.com/thumbnail.png',
236
+ height: Bandwidth::RbmMediaHeightEnum::TALL
237
+ ),
238
+ suggestions: [
239
+ Bandwidth::RbmActionDial.new(
240
+ type: Bandwidth::RbmActionTypeEnum::DIAL_PHONE,
241
+ text: 'Call Us',
242
+ postback_data: 'abcdefg12345678',
243
+ phone_number: BW_NUMBER
244
+ )
245
+ ]
246
+ )
247
+ )
248
+ )
249
+ multi_channel_message_request = Bandwidth::MultiChannelMessageRequest.new(
250
+ to: USER_NUMBER,
251
+ channel_list: [message_body],
252
+ tag: 'tag',
253
+ priority: 'high',
254
+ expiration: @expiration_time,
255
+ )
256
+
257
+ data, status_code = @multi_channel_api_instance.create_multi_channel_message_with_http_info(BW_ACCOUNT_ID, multi_channel_message_request)
258
+
259
+ expect(status_code).to eq(202)
260
+ expect(data).to be_instance_of(Bandwidth::CreateMultiChannelMessageResponse)
261
+ expect(data.links).to be_instance_of(Array)
262
+ expect(data.data).to be_instance_of(Bandwidth::MultiChannelMessageResponseData)
263
+ expect(data.data.id).to be_instance_of(String)
264
+ expect(data.data.time).to be_instance_of(Time)
265
+ expect(data.data.direction).to be_one_of(Bandwidth::MessageDirectionEnum.all_vars)
266
+ expect(data.data.to).to be_instance_of(Array)
267
+ expect(data.data.tag).to be_instance_of(String)
268
+ expect(data.data.priority).to be_one_of(Bandwidth::PriorityEnum.all_vars)
269
+ expect(data.data.expiration).to be_instance_of(Time)
270
+ expect(data.data.channel_list).to be_instance_of(Array)
271
+ expect(data.data.channel_list.first).to be_instance_of(Bandwidth::MultiChannelChannelListRBMResponseObject)
272
+ expect(data.data.channel_list.first.from).to be_instance_of(String)
273
+ expect(data.data.channel_list.first.application_id).to be_instance_of(String)
274
+ expect(data.data.channel_list.first.channel).to eq(Bandwidth::MultiChannelMessageChannelEnum::RBM)
275
+ expect(data.data.channel_list.first.content).to be_instance_of(Bandwidth::RbmStandaloneCard)
276
+ expect(data.data.channel_list.first.content.orientation).to eq(Bandwidth::StandaloneCardOrientationEnum::HORIZONTAL)
277
+ expect(data.data.channel_list.first.content.thumbnail_image_alignment).to eq(Bandwidth::ThumbnailAlignmentEnum::LEFT)
278
+ expect(data.data.channel_list.first.content.card_content).to be_instance_of(Bandwidth::RbmCardContent)
279
+ expect(data.data.channel_list.first.content.card_content.title).to be_instance_of(String)
280
+ expect(data.data.channel_list.first.content.card_content.description).to be_instance_of(String)
281
+ expect(data.data.channel_list.first.content.card_content.media).to be_instance_of(Bandwidth::RbmCardContentMedia)
282
+ expect(data.data.channel_list.first.content.card_content.media.file_url).to be_instance_of(String)
283
+ expect(data.data.channel_list.first.content.card_content.media.thumbnail_url).to be_instance_of(String)
284
+ expect(data.data.channel_list.first.content.card_content.media.height).to eq(Bandwidth::RbmMediaHeightEnum::TALL)
285
+ expect(data.data.channel_list.first.content.card_content.suggestions).to be_instance_of(Array)
286
+ expect(data.data.channel_list.first.content.card_content.suggestions.first).to be_instance_of(Bandwidth::RbmActionDial)
287
+ expect(data.data.channel_list.first.content.card_content.suggestions.first.type).to eq(Bandwidth::RbmActionTypeEnum::DIAL_PHONE)
288
+ expect(data.data.channel_list.first.content.card_content.suggestions.first.text).to be_instance_of(String)
289
+ expect(data.data.channel_list.first.content.card_content.suggestions.first.postback_data).to be_instance_of(String)
290
+ expect(data.data.channel_list.first.content.card_content.suggestions.first.phone_number).to be_instance_of(String)
291
+ end
292
+
293
+ it 'creates a multi channel rbm carousel rich card message' do
294
+ message_body = Bandwidth::MultiChannelChannelListRBMObject.new(
295
+ from: BW_NUMBER,
296
+ application_id: BW_MESSAGING_APPLICATION_ID,
297
+ channel: Bandwidth::MultiChannelMessageChannelEnum::RBM,
298
+ content: Bandwidth::RbmMessageCarouselCard.new(
299
+ card_width: Bandwidth::CardWidthEnum::MEDIUM,
300
+ card_contents: [
301
+ Bandwidth::RbmCardContent.new(
302
+ title: 'Welcome to our service',
303
+ description: 'We are glad to have you here.',
304
+ media: Bandwidth::RbmCardContentMedia.new(
305
+ file_url: 'https://image.com/image.png',
306
+ thumbnail_url: 'https://image.com/thumbnail.png',
307
+ height: Bandwidth::RbmMediaHeightEnum::TALL
308
+ ),
309
+ suggestions: [
310
+ Bandwidth::RbmActionDial.new(
311
+ type: Bandwidth::RbmActionTypeEnum::DIAL_PHONE,
312
+ text: 'Call Us',
313
+ postback_data: 'abcdefg12345678',
314
+ phone_number: BW_NUMBER
315
+ )
316
+ ]
317
+ ),
318
+ Bandwidth::RbmCardContent.new(
319
+ title: 'Welcome to our service'
320
+ )
321
+ ]
322
+ )
323
+ )
324
+ multi_channel_message_request = Bandwidth::MultiChannelMessageRequest.new(
325
+ to: USER_NUMBER,
326
+ channel_list: [message_body],
327
+ tag: 'tag',
328
+ priority: 'high',
329
+ expiration: @expiration_time,
330
+ )
331
+
332
+ data, status_code = @multi_channel_api_instance.create_multi_channel_message_with_http_info(BW_ACCOUNT_ID, multi_channel_message_request)
333
+
334
+ expect(status_code).to eq(202)
335
+ expect(data).to be_instance_of(Bandwidth::CreateMultiChannelMessageResponse)
336
+ expect(data.links).to be_instance_of(Array)
337
+ expect(data.data).to be_instance_of(Bandwidth::MultiChannelMessageResponseData)
338
+ expect(data.data.id).to be_instance_of(String)
339
+ expect(data.data.time).to be_instance_of(Time)
340
+ expect(data.data.direction).to be_one_of(Bandwidth::MessageDirectionEnum.all_vars)
341
+ expect(data.data.to).to be_instance_of(Array)
342
+ expect(data.data.tag).to be_instance_of(String)
343
+ expect(data.data.priority).to be_one_of(Bandwidth::PriorityEnum.all_vars)
344
+ expect(data.data.expiration).to be_instance_of(Time)
345
+ expect(data.data.channel_list).to be_instance_of(Array)
346
+ expect(data.data.channel_list.first).to be_instance_of(Bandwidth::MultiChannelChannelListRBMResponseObject)
347
+ expect(data.data.channel_list.first.from).to be_instance_of(String)
348
+ expect(data.data.channel_list.first.application_id).to be_instance_of(String)
349
+ expect(data.data.channel_list.first.channel).to eq(Bandwidth::MultiChannelMessageChannelEnum::RBM)
350
+ expect(data.data.channel_list.first.content).to be_instance_of(Bandwidth::RbmMessageCarouselCard)
351
+ expect(data.data.channel_list.first.content.card_width).to eq(Bandwidth::CardWidthEnum::MEDIUM)
352
+ expect(data.data.channel_list.first.content.card_contents).to be_instance_of(Array)
353
+ expect(data.data.channel_list.first.content.card_contents.first).to be_instance_of(Bandwidth::RbmCardContent)
354
+ expect(data.data.channel_list.first.content.card_contents.first.title).to be_instance_of(String)
355
+ expect(data.data.channel_list.first.content.card_contents.first.description).to be_instance_of(String)
356
+ expect(data.data.channel_list.first.content.card_contents.first.media).to be_instance_of(Bandwidth::RbmCardContentMedia)
357
+ expect(data.data.channel_list.first.content.card_contents.first.media.file_url).to be_instance_of(String)
358
+ expect(data.data.channel_list.first.content.card_contents.first.media.thumbnail_url).to be_instance_of(String)
359
+ expect(data.data.channel_list.first.content.card_contents.first.media.height).to eq(Bandwidth::RbmMediaHeightEnum::TALL)
360
+ expect(data.data.channel_list.first.content.card_contents.first.suggestions).to be_instance_of(Array)
361
+ expect(data.data.channel_list.first.content.card_contents.first.suggestions.first).to be_instance_of(Bandwidth::RbmActionDial)
362
+ expect(data.data.channel_list.first.content.card_contents.first.suggestions.first.type).to eq(Bandwidth::RbmActionTypeEnum::DIAL_PHONE)
363
+ expect(data.data.channel_list.first.content.card_contents.first.suggestions.first.text).to be_instance_of(String)
364
+ expect(data.data.channel_list.first.content.card_contents.first.suggestions.first.postback_data).to be_instance_of(String)
365
+ expect(data.data.channel_list.first.content.card_contents.first.suggestions.first.phone_number).to be_instance_of(String)
366
+ expect(data.data.channel_list.first.content.card_contents[1]).to be_instance_of(Bandwidth::RbmCardContent)
367
+ expect(data.data.channel_list.first.content.card_contents[1].title).to be_instance_of(String)
139
368
  end
140
369
  end
141
370
  end
@@ -121,6 +121,10 @@ describe 'TollFreeVerificationApi' do
121
121
  expect(data.resubmit_allowed).to be_one_of([true, false])
122
122
  expect(data.created_date_time).to be_instance_of(Time)
123
123
  expect(data.modified_date_time).to be_instance_of(Time)
124
+ expect(data.submission).to be_instance_of(Bandwidth::TfvSubmissionInfo)
125
+ expect(data.blocked).to be_one_of([true, false])
126
+ expect(data.blocked_reason).to be_instance_of(String)
127
+ expect(data.cv_token).to be_instance_of(String)
124
128
  end
125
129
 
126
130
  it 'causes an ArgumentError for a missing account_id' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bandwidth-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 17.1.1
4
+ version: 17.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bandwidth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-27 00:00:00.000000000 Z
11
+ date: 2026-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -145,6 +145,7 @@ files:
145
145
  - custom_templates/configuration.mustache
146
146
  - custom_templates/gem.mustache
147
147
  - custom_templates/gemspec.mustache
148
+ - custom_templates/partial_anyof_module.mustache
148
149
  - docs/AccountStatistics.md
149
150
  - docs/AdditionalDenialReason.md
150
151
  - docs/Address.md