bandwidth-sdk 16.1.0 → 16.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.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/README.md +3 -0
- data/bandwidth.yml +254 -0
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +501 -1
- data/coverage/index.html +6288 -962
- data/docs/BusinessEntityTypeEnum.md +15 -0
- data/docs/BusinessRegistrationTypeEnum.md +15 -0
- data/docs/ListMessageItem.md +13 -1
- data/docs/MessagesApi.md +24 -0
- data/docs/OptInWorkflow.md +3 -1
- data/docs/ProductTypeEnum.md +15 -0
- data/docs/RbmActionBase.md +1 -1
- data/docs/RbmSuggestionResponse.md +1 -1
- data/docs/TfvSubmissionInfo.md +7 -1
- data/docs/VerificationRequest.md +11 -1
- data/docs/VerificationUpdateRequest.md +11 -1
- data/lib/bandwidth-sdk/api/messages_api.rb +36 -0
- data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +43 -0
- data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb +2 -1
- data/lib/bandwidth-sdk/models/list_message_item.rb +71 -5
- data/lib/bandwidth-sdk/models/message_type_enum.rb +2 -1
- data/lib/bandwidth-sdk/models/opt_in_workflow.rb +38 -4
- data/lib/bandwidth-sdk/models/product_type_enum.rb +47 -0
- data/lib/bandwidth-sdk/models/tfv_submission_info.rb +72 -4
- data/lib/bandwidth-sdk/models/verification_request.rb +108 -4
- data/lib/bandwidth-sdk/models/verification_update_request.rb +108 -4
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +3 -0
- data/spec/smoke/messages_api_spec.rb +2 -1
- data/spec/spec_helper.rb +3 -2
- data/spec/unit/api/messages_api_spec.rb +6 -0
- data/spec/unit/models/bxml/verbs/stop_stream_spec.rb +6 -4
- metadata +44 -38
@@ -0,0 +1,47 @@
|
|
1
|
+
=begin
|
2
|
+
#Bandwidth
|
3
|
+
|
4
|
+
#Bandwidth's Communication APIs
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
7
|
+
Contact: letstalk@bandwidth.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.8.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module Bandwidth
|
17
|
+
class ProductTypeEnum
|
18
|
+
LOCAL_A2_P = 'LOCAL_A2P'.freeze
|
19
|
+
P2_P = 'P2P'.freeze
|
20
|
+
SHORT_CODE_REACH = 'SHORT_CODE_REACH'.freeze
|
21
|
+
TOLL_FREE = 'TOLL_FREE'.freeze
|
22
|
+
HOSTED_SHORT_CODE = 'HOSTED_SHORT_CODE'.freeze
|
23
|
+
ALPHA_NUMERIC = 'ALPHA_NUMERIC'.freeze
|
24
|
+
RBM_MEDIA = 'RBM_MEDIA'.freeze
|
25
|
+
RBM_RICH = 'RBM_RICH'.freeze
|
26
|
+
RBM_CONVERSATIONAL = 'RBM_CONVERSATIONAL'.freeze
|
27
|
+
|
28
|
+
def self.all_vars
|
29
|
+
@all_vars ||= [LOCAL_A2_P, P2_P, SHORT_CODE_REACH, TOLL_FREE, HOSTED_SHORT_CODE, ALPHA_NUMERIC, RBM_MEDIA, RBM_RICH, RBM_CONVERSATIONAL].freeze
|
30
|
+
end
|
31
|
+
|
32
|
+
# Builds the enum from string
|
33
|
+
# @param [String] The enum value in the form of the string
|
34
|
+
# @return [String] The enum value
|
35
|
+
def self.build_from_hash(value)
|
36
|
+
new.build_from_hash(value)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Builds the enum from string
|
40
|
+
# @param [String] The enum value in the form of the string
|
41
|
+
# @return [String] The enum value
|
42
|
+
def build_from_hash(value)
|
43
|
+
return value if ProductTypeEnum.all_vars.include?(value)
|
44
|
+
raise "Invalid ENUM value #{value} for class #ProductTypeEnum"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -48,6 +48,35 @@ module Bandwidth
|
|
48
48
|
# The company 'Doing Business As'.
|
49
49
|
attr_accessor :business_dba
|
50
50
|
|
51
|
+
# US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025.
|
52
|
+
attr_accessor :business_registration_number
|
53
|
+
|
54
|
+
attr_accessor :business_registration_type
|
55
|
+
|
56
|
+
attr_accessor :business_entity_type
|
57
|
+
|
58
|
+
class EnumAttributeValidator
|
59
|
+
attr_reader :datatype
|
60
|
+
attr_reader :allowable_values
|
61
|
+
|
62
|
+
def initialize(datatype, allowable_values)
|
63
|
+
@allowable_values = allowable_values.map do |value|
|
64
|
+
case datatype.to_s
|
65
|
+
when /Integer/i
|
66
|
+
value.to_i
|
67
|
+
when /Float/i
|
68
|
+
value.to_f
|
69
|
+
else
|
70
|
+
value
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def valid?(value)
|
76
|
+
!value || allowable_values.include?(value)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
51
80
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
81
|
def self.attribute_map
|
53
82
|
{
|
@@ -62,7 +91,10 @@ module Bandwidth
|
|
62
91
|
:'isv_reseller' => :'isvReseller',
|
63
92
|
:'privacy_policy_url' => :'privacyPolicyUrl',
|
64
93
|
:'terms_and_conditions_url' => :'termsAndConditionsUrl',
|
65
|
-
:'business_dba' => :'businessDba'
|
94
|
+
:'business_dba' => :'businessDba',
|
95
|
+
:'business_registration_number' => :'businessRegistrationNumber',
|
96
|
+
:'business_registration_type' => :'businessRegistrationType',
|
97
|
+
:'business_entity_type' => :'businessEntityType'
|
66
98
|
}
|
67
99
|
end
|
68
100
|
|
@@ -85,7 +117,10 @@ module Bandwidth
|
|
85
117
|
:'isv_reseller' => :'String',
|
86
118
|
:'privacy_policy_url' => :'String',
|
87
119
|
:'terms_and_conditions_url' => :'String',
|
88
|
-
:'business_dba' => :'String'
|
120
|
+
:'business_dba' => :'String',
|
121
|
+
:'business_registration_number' => :'String',
|
122
|
+
:'business_registration_type' => :'BusinessRegistrationTypeEnum',
|
123
|
+
:'business_entity_type' => :'BusinessEntityTypeEnum'
|
89
124
|
}
|
90
125
|
end
|
91
126
|
|
@@ -94,6 +129,9 @@ module Bandwidth
|
|
94
129
|
Set.new([
|
95
130
|
:'additional_information',
|
96
131
|
:'isv_reseller',
|
132
|
+
:'business_registration_number',
|
133
|
+
:'business_registration_type',
|
134
|
+
:'business_entity_type'
|
97
135
|
])
|
98
136
|
end
|
99
137
|
|
@@ -159,6 +197,18 @@ module Bandwidth
|
|
159
197
|
if attributes.key?(:'business_dba')
|
160
198
|
self.business_dba = attributes[:'business_dba']
|
161
199
|
end
|
200
|
+
|
201
|
+
if attributes.key?(:'business_registration_number')
|
202
|
+
self.business_registration_number = attributes[:'business_registration_number']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.key?(:'business_registration_type')
|
206
|
+
self.business_registration_type = attributes[:'business_registration_type']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.key?(:'business_entity_type')
|
210
|
+
self.business_entity_type = attributes[:'business_entity_type']
|
211
|
+
end
|
162
212
|
end
|
163
213
|
|
164
214
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -214,6 +264,10 @@ module Bandwidth
|
|
214
264
|
invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.')
|
215
265
|
end
|
216
266
|
|
267
|
+
if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
268
|
+
invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.')
|
269
|
+
end
|
270
|
+
|
217
271
|
invalid_properties
|
218
272
|
end
|
219
273
|
|
@@ -233,6 +287,7 @@ module Bandwidth
|
|
233
287
|
return false if !@additional_information.nil? && @additional_information.to_s.length < 0
|
234
288
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
|
235
289
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
|
290
|
+
return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
236
291
|
true
|
237
292
|
end
|
238
293
|
|
@@ -336,6 +391,16 @@ module Bandwidth
|
|
336
391
|
@isv_reseller = isv_reseller
|
337
392
|
end
|
338
393
|
|
394
|
+
# Custom attribute writer method with validation
|
395
|
+
# @param [Object] business_registration_number Value to be assigned
|
396
|
+
def business_registration_number=(business_registration_number)
|
397
|
+
if !business_registration_number.nil? && business_registration_number.to_s.length > 500
|
398
|
+
fail ArgumentError, 'invalid value for "business_registration_number", the character length must be smaller than or equal to 500.'
|
399
|
+
end
|
400
|
+
|
401
|
+
@business_registration_number = business_registration_number
|
402
|
+
end
|
403
|
+
|
339
404
|
# Checks equality by comparing each attribute.
|
340
405
|
# @param [Object] Object to be compared
|
341
406
|
def ==(o)
|
@@ -352,7 +417,10 @@ module Bandwidth
|
|
352
417
|
isv_reseller == o.isv_reseller &&
|
353
418
|
privacy_policy_url == o.privacy_policy_url &&
|
354
419
|
terms_and_conditions_url == o.terms_and_conditions_url &&
|
355
|
-
business_dba == o.business_dba
|
420
|
+
business_dba == o.business_dba &&
|
421
|
+
business_registration_number == o.business_registration_number &&
|
422
|
+
business_registration_type == o.business_registration_type &&
|
423
|
+
business_entity_type == o.business_entity_type
|
356
424
|
end
|
357
425
|
|
358
426
|
# @see the `==` method
|
@@ -364,7 +432,7 @@ module Bandwidth
|
|
364
432
|
# Calculates hash code according to all attributes.
|
365
433
|
# @return [Integer] Hash code
|
366
434
|
def hash
|
367
|
-
[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
|
435
|
+
[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].hash
|
368
436
|
end
|
369
437
|
|
370
438
|
# Builds the object from hash
|
@@ -50,6 +50,41 @@ module Bandwidth
|
|
50
50
|
# The company 'Doing Business As'.
|
51
51
|
attr_accessor :business_dba
|
52
52
|
|
53
|
+
# US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025.
|
54
|
+
attr_accessor :business_registration_number
|
55
|
+
|
56
|
+
attr_accessor :business_registration_type
|
57
|
+
|
58
|
+
attr_accessor :business_entity_type
|
59
|
+
|
60
|
+
# A message that gets sent to users requesting help.
|
61
|
+
attr_accessor :help_message_response
|
62
|
+
|
63
|
+
# Indicates whether the content is age-gated.
|
64
|
+
attr_accessor :age_gated_content
|
65
|
+
|
66
|
+
class EnumAttributeValidator
|
67
|
+
attr_reader :datatype
|
68
|
+
attr_reader :allowable_values
|
69
|
+
|
70
|
+
def initialize(datatype, allowable_values)
|
71
|
+
@allowable_values = allowable_values.map do |value|
|
72
|
+
case datatype.to_s
|
73
|
+
when /Integer/i
|
74
|
+
value.to_i
|
75
|
+
when /Float/i
|
76
|
+
value.to_f
|
77
|
+
else
|
78
|
+
value
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def valid?(value)
|
84
|
+
!value || allowable_values.include?(value)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
53
88
|
# Attribute mapping from ruby-style variable name to JSON key.
|
54
89
|
def self.attribute_map
|
55
90
|
{
|
@@ -65,7 +100,12 @@ module Bandwidth
|
|
65
100
|
:'isv_reseller' => :'isvReseller',
|
66
101
|
:'privacy_policy_url' => :'privacyPolicyUrl',
|
67
102
|
:'terms_and_conditions_url' => :'termsAndConditionsUrl',
|
68
|
-
:'business_dba' => :'businessDba'
|
103
|
+
:'business_dba' => :'businessDba',
|
104
|
+
:'business_registration_number' => :'businessRegistrationNumber',
|
105
|
+
:'business_registration_type' => :'businessRegistrationType',
|
106
|
+
:'business_entity_type' => :'businessEntityType',
|
107
|
+
:'help_message_response' => :'helpMessageResponse',
|
108
|
+
:'age_gated_content' => :'ageGatedContent'
|
69
109
|
}
|
70
110
|
end
|
71
111
|
|
@@ -89,7 +129,12 @@ module Bandwidth
|
|
89
129
|
:'isv_reseller' => :'String',
|
90
130
|
:'privacy_policy_url' => :'String',
|
91
131
|
:'terms_and_conditions_url' => :'String',
|
92
|
-
:'business_dba' => :'String'
|
132
|
+
:'business_dba' => :'String',
|
133
|
+
:'business_registration_number' => :'String',
|
134
|
+
:'business_registration_type' => :'BusinessRegistrationTypeEnum',
|
135
|
+
:'business_entity_type' => :'BusinessEntityTypeEnum',
|
136
|
+
:'help_message_response' => :'String',
|
137
|
+
:'age_gated_content' => :'Boolean'
|
93
138
|
}
|
94
139
|
end
|
95
140
|
|
@@ -98,6 +143,10 @@ module Bandwidth
|
|
98
143
|
Set.new([
|
99
144
|
:'additional_information',
|
100
145
|
:'isv_reseller',
|
146
|
+
:'business_registration_number',
|
147
|
+
:'business_registration_type',
|
148
|
+
:'business_entity_type',
|
149
|
+
:'help_message_response',
|
101
150
|
])
|
102
151
|
end
|
103
152
|
|
@@ -185,6 +234,26 @@ module Bandwidth
|
|
185
234
|
if attributes.key?(:'business_dba')
|
186
235
|
self.business_dba = attributes[:'business_dba']
|
187
236
|
end
|
237
|
+
|
238
|
+
if attributes.key?(:'business_registration_number')
|
239
|
+
self.business_registration_number = attributes[:'business_registration_number']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.key?(:'business_registration_type')
|
243
|
+
self.business_registration_type = attributes[:'business_registration_type']
|
244
|
+
end
|
245
|
+
|
246
|
+
if attributes.key?(:'business_entity_type')
|
247
|
+
self.business_entity_type = attributes[:'business_entity_type']
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.key?(:'help_message_response')
|
251
|
+
self.help_message_response = attributes[:'help_message_response']
|
252
|
+
end
|
253
|
+
|
254
|
+
if attributes.key?(:'age_gated_content')
|
255
|
+
self.age_gated_content = attributes[:'age_gated_content']
|
256
|
+
end
|
188
257
|
end
|
189
258
|
|
190
259
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -280,6 +349,14 @@ module Bandwidth
|
|
280
349
|
invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.')
|
281
350
|
end
|
282
351
|
|
352
|
+
if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
353
|
+
invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.')
|
354
|
+
end
|
355
|
+
|
356
|
+
if !@help_message_response.nil? && @help_message_response.to_s.length > 500
|
357
|
+
invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.')
|
358
|
+
end
|
359
|
+
|
283
360
|
invalid_properties
|
284
361
|
end
|
285
362
|
|
@@ -309,6 +386,8 @@ module Bandwidth
|
|
309
386
|
return false if !@additional_information.nil? && @additional_information.to_s.length < 0
|
310
387
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
|
311
388
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
|
389
|
+
return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
390
|
+
return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500
|
312
391
|
true
|
313
392
|
end
|
314
393
|
|
@@ -430,6 +509,26 @@ module Bandwidth
|
|
430
509
|
@isv_reseller = isv_reseller
|
431
510
|
end
|
432
511
|
|
512
|
+
# Custom attribute writer method with validation
|
513
|
+
# @param [Object] business_registration_number Value to be assigned
|
514
|
+
def business_registration_number=(business_registration_number)
|
515
|
+
if !business_registration_number.nil? && business_registration_number.to_s.length > 500
|
516
|
+
fail ArgumentError, 'invalid value for "business_registration_number", the character length must be smaller than or equal to 500.'
|
517
|
+
end
|
518
|
+
|
519
|
+
@business_registration_number = business_registration_number
|
520
|
+
end
|
521
|
+
|
522
|
+
# Custom attribute writer method with validation
|
523
|
+
# @param [Object] help_message_response Value to be assigned
|
524
|
+
def help_message_response=(help_message_response)
|
525
|
+
if !help_message_response.nil? && help_message_response.to_s.length > 500
|
526
|
+
fail ArgumentError, 'invalid value for "help_message_response", the character length must be smaller than or equal to 500.'
|
527
|
+
end
|
528
|
+
|
529
|
+
@help_message_response = help_message_response
|
530
|
+
end
|
531
|
+
|
433
532
|
# Checks equality by comparing each attribute.
|
434
533
|
# @param [Object] Object to be compared
|
435
534
|
def ==(o)
|
@@ -447,7 +546,12 @@ module Bandwidth
|
|
447
546
|
isv_reseller == o.isv_reseller &&
|
448
547
|
privacy_policy_url == o.privacy_policy_url &&
|
449
548
|
terms_and_conditions_url == o.terms_and_conditions_url &&
|
450
|
-
business_dba == o.business_dba
|
549
|
+
business_dba == o.business_dba &&
|
550
|
+
business_registration_number == o.business_registration_number &&
|
551
|
+
business_registration_type == o.business_registration_type &&
|
552
|
+
business_entity_type == o.business_entity_type &&
|
553
|
+
help_message_response == o.help_message_response &&
|
554
|
+
age_gated_content == o.age_gated_content
|
451
555
|
end
|
452
556
|
|
453
557
|
# @see the `==` method
|
@@ -459,7 +563,7 @@ module Bandwidth
|
|
459
563
|
# Calculates hash code according to all attributes.
|
460
564
|
# @return [Integer] Hash code
|
461
565
|
def 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
|
566
|
+
[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
|
463
567
|
end
|
464
568
|
|
465
569
|
# Builds the object from hash
|
@@ -48,6 +48,41 @@ module Bandwidth
|
|
48
48
|
# The company 'Doing Business As'.
|
49
49
|
attr_accessor :business_dba
|
50
50
|
|
51
|
+
# US Federal Tax ID Number (EIN) or Canada Business Number (CBN). Optional until early 2026. If a value is provided for this field, a value must be provided for `businessRegistrationType` and `businessEntityType`. Available starting October 1st, 2025.
|
52
|
+
attr_accessor :business_registration_number
|
53
|
+
|
54
|
+
attr_accessor :business_registration_type
|
55
|
+
|
56
|
+
attr_accessor :business_entity_type
|
57
|
+
|
58
|
+
# A message that gets sent to users requesting help.
|
59
|
+
attr_accessor :help_message_response
|
60
|
+
|
61
|
+
# Indicates whether the content is age-gated.
|
62
|
+
attr_accessor :age_gated_content
|
63
|
+
|
64
|
+
class EnumAttributeValidator
|
65
|
+
attr_reader :datatype
|
66
|
+
attr_reader :allowable_values
|
67
|
+
|
68
|
+
def initialize(datatype, allowable_values)
|
69
|
+
@allowable_values = allowable_values.map do |value|
|
70
|
+
case datatype.to_s
|
71
|
+
when /Integer/i
|
72
|
+
value.to_i
|
73
|
+
when /Float/i
|
74
|
+
value.to_f
|
75
|
+
else
|
76
|
+
value
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
def valid?(value)
|
82
|
+
!value || allowable_values.include?(value)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
51
86
|
# Attribute mapping from ruby-style variable name to JSON key.
|
52
87
|
def self.attribute_map
|
53
88
|
{
|
@@ -62,7 +97,12 @@ module Bandwidth
|
|
62
97
|
:'isv_reseller' => :'isvReseller',
|
63
98
|
:'privacy_policy_url' => :'privacyPolicyUrl',
|
64
99
|
:'terms_and_conditions_url' => :'termsAndConditionsUrl',
|
65
|
-
:'business_dba' => :'businessDba'
|
100
|
+
:'business_dba' => :'businessDba',
|
101
|
+
:'business_registration_number' => :'businessRegistrationNumber',
|
102
|
+
:'business_registration_type' => :'businessRegistrationType',
|
103
|
+
:'business_entity_type' => :'businessEntityType',
|
104
|
+
:'help_message_response' => :'helpMessageResponse',
|
105
|
+
:'age_gated_content' => :'ageGatedContent'
|
66
106
|
}
|
67
107
|
end
|
68
108
|
|
@@ -85,7 +125,12 @@ module Bandwidth
|
|
85
125
|
:'isv_reseller' => :'String',
|
86
126
|
:'privacy_policy_url' => :'String',
|
87
127
|
:'terms_and_conditions_url' => :'String',
|
88
|
-
:'business_dba' => :'String'
|
128
|
+
:'business_dba' => :'String',
|
129
|
+
:'business_registration_number' => :'String',
|
130
|
+
:'business_registration_type' => :'BusinessRegistrationTypeEnum',
|
131
|
+
:'business_entity_type' => :'BusinessEntityTypeEnum',
|
132
|
+
:'help_message_response' => :'String',
|
133
|
+
:'age_gated_content' => :'Boolean'
|
89
134
|
}
|
90
135
|
end
|
91
136
|
|
@@ -94,6 +139,10 @@ module Bandwidth
|
|
94
139
|
Set.new([
|
95
140
|
:'additional_information',
|
96
141
|
:'isv_reseller',
|
142
|
+
:'business_registration_number',
|
143
|
+
:'business_registration_type',
|
144
|
+
:'business_entity_type',
|
145
|
+
:'help_message_response',
|
97
146
|
])
|
98
147
|
end
|
99
148
|
|
@@ -173,6 +222,26 @@ module Bandwidth
|
|
173
222
|
if attributes.key?(:'business_dba')
|
174
223
|
self.business_dba = attributes[:'business_dba']
|
175
224
|
end
|
225
|
+
|
226
|
+
if attributes.key?(:'business_registration_number')
|
227
|
+
self.business_registration_number = attributes[:'business_registration_number']
|
228
|
+
end
|
229
|
+
|
230
|
+
if attributes.key?(:'business_registration_type')
|
231
|
+
self.business_registration_type = attributes[:'business_registration_type']
|
232
|
+
end
|
233
|
+
|
234
|
+
if attributes.key?(:'business_entity_type')
|
235
|
+
self.business_entity_type = attributes[:'business_entity_type']
|
236
|
+
end
|
237
|
+
|
238
|
+
if attributes.key?(:'help_message_response')
|
239
|
+
self.help_message_response = attributes[:'help_message_response']
|
240
|
+
end
|
241
|
+
|
242
|
+
if attributes.key?(:'age_gated_content')
|
243
|
+
self.age_gated_content = attributes[:'age_gated_content']
|
244
|
+
end
|
176
245
|
end
|
177
246
|
|
178
247
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -256,6 +325,14 @@ module Bandwidth
|
|
256
325
|
invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.')
|
257
326
|
end
|
258
327
|
|
328
|
+
if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
329
|
+
invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.')
|
330
|
+
end
|
331
|
+
|
332
|
+
if !@help_message_response.nil? && @help_message_response.to_s.length > 500
|
333
|
+
invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.')
|
334
|
+
end
|
335
|
+
|
259
336
|
invalid_properties
|
260
337
|
end
|
261
338
|
|
@@ -282,6 +359,8 @@ module Bandwidth
|
|
282
359
|
return false if !@additional_information.nil? && @additional_information.to_s.length < 0
|
283
360
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
|
284
361
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
|
362
|
+
return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
363
|
+
return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500
|
285
364
|
true
|
286
365
|
end
|
287
366
|
|
@@ -385,6 +464,26 @@ module Bandwidth
|
|
385
464
|
@isv_reseller = isv_reseller
|
386
465
|
end
|
387
466
|
|
467
|
+
# Custom attribute writer method with validation
|
468
|
+
# @param [Object] business_registration_number Value to be assigned
|
469
|
+
def business_registration_number=(business_registration_number)
|
470
|
+
if !business_registration_number.nil? && business_registration_number.to_s.length > 500
|
471
|
+
fail ArgumentError, 'invalid value for "business_registration_number", the character length must be smaller than or equal to 500.'
|
472
|
+
end
|
473
|
+
|
474
|
+
@business_registration_number = business_registration_number
|
475
|
+
end
|
476
|
+
|
477
|
+
# Custom attribute writer method with validation
|
478
|
+
# @param [Object] help_message_response Value to be assigned
|
479
|
+
def help_message_response=(help_message_response)
|
480
|
+
if !help_message_response.nil? && help_message_response.to_s.length > 500
|
481
|
+
fail ArgumentError, 'invalid value for "help_message_response", the character length must be smaller than or equal to 500.'
|
482
|
+
end
|
483
|
+
|
484
|
+
@help_message_response = help_message_response
|
485
|
+
end
|
486
|
+
|
388
487
|
# Checks equality by comparing each attribute.
|
389
488
|
# @param [Object] Object to be compared
|
390
489
|
def ==(o)
|
@@ -401,7 +500,12 @@ module Bandwidth
|
|
401
500
|
isv_reseller == o.isv_reseller &&
|
402
501
|
privacy_policy_url == o.privacy_policy_url &&
|
403
502
|
terms_and_conditions_url == o.terms_and_conditions_url &&
|
404
|
-
business_dba == o.business_dba
|
503
|
+
business_dba == o.business_dba &&
|
504
|
+
business_registration_number == o.business_registration_number &&
|
505
|
+
business_registration_type == o.business_registration_type &&
|
506
|
+
business_entity_type == o.business_entity_type &&
|
507
|
+
help_message_response == o.help_message_response &&
|
508
|
+
age_gated_content == o.age_gated_content
|
405
509
|
end
|
406
510
|
|
407
511
|
# @see the `==` method
|
@@ -413,7 +517,7 @@ module Bandwidth
|
|
413
517
|
# Calculates hash code according to all attributes.
|
414
518
|
# @return [Integer] Hash code
|
415
519
|
def 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
|
520
|
+
[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
|
417
521
|
end
|
418
522
|
|
419
523
|
# Builds the object from hash
|
data/lib/bandwidth-sdk.rb
CHANGED
@@ -24,6 +24,8 @@ require 'bandwidth-sdk/models/answer_callback'
|
|
24
24
|
require 'bandwidth-sdk/models/blocked_webhook'
|
25
25
|
require 'bandwidth-sdk/models/bridge_complete_callback'
|
26
26
|
require 'bandwidth-sdk/models/bridge_target_complete_callback'
|
27
|
+
require 'bandwidth-sdk/models/business_entity_type_enum'
|
28
|
+
require 'bandwidth-sdk/models/business_registration_type_enum'
|
27
29
|
require 'bandwidth-sdk/models/call_direction_enum'
|
28
30
|
require 'bandwidth-sdk/models/call_recording_metadata'
|
29
31
|
require 'bandwidth-sdk/models/call_state'
|
@@ -106,6 +108,7 @@ require 'bandwidth-sdk/models/multi_channel_message_response_data_channel_list_i
|
|
106
108
|
require 'bandwidth-sdk/models/opt_in_workflow'
|
107
109
|
require 'bandwidth-sdk/models/page_info'
|
108
110
|
require 'bandwidth-sdk/models/priority_enum'
|
111
|
+
require 'bandwidth-sdk/models/product_type_enum'
|
109
112
|
require 'bandwidth-sdk/models/rbm_action_base'
|
110
113
|
require 'bandwidth-sdk/models/rbm_action_dial'
|
111
114
|
require 'bandwidth-sdk/models/rbm_action_open_url'
|
@@ -76,7 +76,8 @@ describe 'MessagesApi Integration Tests' do
|
|
76
76
|
it 'lists messages' do
|
77
77
|
get_opts = {
|
78
78
|
source_tn: BW_NUMBER,
|
79
|
-
message_direction: list_message_direction
|
79
|
+
message_direction: list_message_direction,
|
80
|
+
calling_number_country_a3: 'USA'
|
80
81
|
}
|
81
82
|
data, status_code = @messaging_api_instance.list_messages_with_http_info(BW_ACCOUNT_ID, get_opts)
|
82
83
|
|
data/spec/spec_helper.rb
CHANGED
@@ -9,9 +9,10 @@ SimpleCov.start do
|
|
9
9
|
else
|
10
10
|
!(['/models/call_state_enum.rb',
|
11
11
|
'/models/call_state.rb',
|
12
|
-
'/models/
|
12
|
+
'/models/tfv_error.rb',
|
13
13
|
'/models/message.rb',
|
14
|
-
'/models/verify_code_request.rb'
|
14
|
+
'/models/verify_code_request.rb',
|
15
|
+
'/models/verify_code_response.rb'
|
15
16
|
].any? { |name| source_file.filename.include?(name) })
|
16
17
|
end
|
17
18
|
end
|
@@ -75,6 +75,7 @@ describe 'MessagesApi' do
|
|
75
75
|
expect(data.page_info.prev_page_token).to be_instance_of(String)
|
76
76
|
expect(data.page_info.next_page_token).to be_instance_of(String)
|
77
77
|
expect(data.messages).to be_instance_of(Array)
|
78
|
+
expect(data.messages[0]).to be_instance_of(Bandwidth::ListMessageItem)
|
78
79
|
expect(data.messages[0].message_id.length).to eq(29)
|
79
80
|
expect(data.messages[0].account_id.length).to eq(7)
|
80
81
|
expect(data.messages[0].source_tn.length).to eq(12)
|
@@ -92,6 +93,11 @@ describe 'MessagesApi' do
|
|
92
93
|
expect(data.messages[0].recipient_count).to be_instance_of(Integer)
|
93
94
|
expect(data.messages[0].campaign_class).to be_instance_of(String)
|
94
95
|
expect(data.messages[0].campaign_id).to be_instance_of(String)
|
96
|
+
expect(data.messages[0].bw_latency).to be_instance_of(Integer)
|
97
|
+
expect(data.messages[0].calling_number_country_a3).to be_instance_of(String)
|
98
|
+
expect(data.messages[0].called_number_country_a3).to be_instance_of(String)
|
99
|
+
expect(data.messages[0].product).to be_one_of(Bandwidth::ProductTypeEnum.all_vars)
|
100
|
+
expect(data.messages[0].location).to be_instance_of(String)
|
95
101
|
end
|
96
102
|
|
97
103
|
it 'causes an ArgumentError for a missing account_id' do
|
@@ -2,13 +2,15 @@
|
|
2
2
|
describe 'Bandwidth::Bxml::StopStream' do
|
3
3
|
let(:initial_attributes) {
|
4
4
|
{
|
5
|
-
name: 'initial_name'
|
5
|
+
name: 'initial_name',
|
6
|
+
wait: true
|
6
7
|
}
|
7
8
|
}
|
8
9
|
|
9
10
|
let(:new_attributes) {
|
10
11
|
{
|
11
|
-
name: 'new_name'
|
12
|
+
name: 'new_name',
|
13
|
+
wait: false
|
12
14
|
}
|
13
15
|
}
|
14
16
|
|
@@ -21,13 +23,13 @@ describe 'Bandwidth::Bxml::StopStream' do
|
|
21
23
|
end
|
22
24
|
|
23
25
|
it 'tests the to_bxml method of the StopStream instance' do
|
24
|
-
expected = "\n<StopStream name=\"initial_name\"/>\n"
|
26
|
+
expected = "\n<StopStream name=\"initial_name\" wait=\"true\"/>\n"
|
25
27
|
expect(instance.to_bxml).to eq(expected)
|
26
28
|
end
|
27
29
|
|
28
30
|
it 'tests the set_attributes method of the StopStream instance' do
|
29
31
|
instance.set_attributes(new_attributes)
|
30
|
-
expected = "\n<StopStream name=\"new_name\"/>\n"
|
32
|
+
expected = "\n<StopStream name=\"new_name\" wait=\"false\"/>\n"
|
31
33
|
expect(instance.to_bxml).to eq(expected)
|
32
34
|
end
|
33
35
|
end
|