bandwidth-sdk 17.1.1 → 17.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +19 -15
- data/README.md +1 -0
- data/bandwidth.yml +139 -29
- data/coverage/.resultset.json +18 -9
- data/coverage/index.html +673 -573
- data/custom_templates/Gemfile.mustache +1 -1
- data/custom_templates/partial_anyof_module.mustache +135 -0
- data/docs/BusinessRegistrationIssuingCountryEnum.md +15 -0
- data/docs/LookupResult.md +2 -2
- data/docs/MessagesApi.md +1 -1
- data/docs/RbmActionBase.md +1 -1
- data/docs/RbmMessageMedia.md +1 -1
- data/docs/RbmSuggestionResponse.md +1 -1
- data/docs/TfvStatus.md +3 -1
- data/docs/TfvSubmissionInfo.md +3 -1
- data/docs/TollFreeVerificationApi.md +1 -1
- data/docs/VerificationRequest.md +7 -3
- data/docs/VerificationUpdateRequest.md +6 -2
- data/lib/bandwidth-sdk/api/messages_api.rb +2 -2
- data/lib/bandwidth-sdk/models/business_registration_issuing_country_enum.rb +51 -0
- data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +17 -1
- data/lib/bandwidth-sdk/models/multi_channel_action.rb +23 -67
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +20 -67
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +20 -67
- data/lib/bandwidth-sdk/models/rbm_message_media.rb +4 -2
- data/lib/bandwidth-sdk/models/tfv_status.rb +39 -4
- data/lib/bandwidth-sdk/models/tfv_submission_info.rb +11 -3
- data/lib/bandwidth-sdk/models/verification_request.rb +66 -6
- data/lib/bandwidth-sdk/models/verification_update_request.rb +49 -6
- data/lib/bandwidth-sdk/version.rb +1 -1
- data/lib/bandwidth-sdk.rb +1 -0
- data/spec/smoke/multi_channel_api_spec.rb +236 -7
- data/spec/unit/api/toll_free_verification_api_spec.rb +8 -0
- metadata +5 -2
|
@@ -25,79 +25,32 @@ module Bandwidth
|
|
|
25
25
|
]
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
+
# Discriminator's property name (OpenAPI v3)
|
|
29
|
+
def openapi_discriminator_name
|
|
30
|
+
:'channel'
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Discriminator's mapping (OpenAPI v3)
|
|
34
|
+
def openapi_discriminator_mapping
|
|
35
|
+
{
|
|
36
|
+
:'MMS' => :'MultiChannelChannelListMMSResponseObject',
|
|
37
|
+
:'RBM' => :'MultiChannelChannelListRBMResponseObject',
|
|
38
|
+
:'SMS' => :'MultiChannelChannelListSMSResponseObject'
|
|
39
|
+
}
|
|
40
|
+
end
|
|
41
|
+
|
|
28
42
|
# Builds the object
|
|
29
43
|
# @param [Mixed] Data to be matched against the list of anyOf items
|
|
30
44
|
# @return [Object] Returns the model or the data itself
|
|
31
45
|
def build(data)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
# - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
|
|
35
|
-
# due to the way the deserialization is made in the base_object template (it just casts without verifying).
|
|
36
|
-
# - TODO: scalar values are de facto behaving as if they were nullable.
|
|
37
|
-
# - TODO: logging when debugging is set.
|
|
38
|
-
openapi_any_of.each do |klass|
|
|
39
|
-
begin
|
|
40
|
-
next if klass == :AnyType # "nullable: true"
|
|
41
|
-
return find_and_cast_into_type(klass, data)
|
|
42
|
-
rescue # rescue all errors so we keep iterating even if the current item lookup raises
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
openapi_any_of.include?(:AnyType) ? data : nil
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
private
|
|
50
|
-
|
|
51
|
-
SchemaMismatchError = Class.new(StandardError)
|
|
46
|
+
discriminator_value = data[openapi_discriminator_name]
|
|
47
|
+
return nil if discriminator_value.nil?
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return if data.nil?
|
|
49
|
+
klass = openapi_discriminator_mapping[discriminator_value.to_s.to_sym]
|
|
50
|
+
return nil unless klass
|
|
56
51
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
|
|
60
|
-
when 'Float'
|
|
61
|
-
return data if data.instance_of?(Float)
|
|
62
|
-
when 'Integer'
|
|
63
|
-
return data if data.instance_of?(Integer)
|
|
64
|
-
when 'Time'
|
|
65
|
-
return Time.parse(data)
|
|
66
|
-
when 'Date'
|
|
67
|
-
return Date.iso8601(data)
|
|
68
|
-
when 'String'
|
|
69
|
-
return data if data.instance_of?(String)
|
|
70
|
-
when 'Object' # "type: object"
|
|
71
|
-
return data if data.instance_of?(Hash)
|
|
72
|
-
when /\AArray<(?<sub_type>.+)>\z/ # "type: array"
|
|
73
|
-
if data.instance_of?(Array)
|
|
74
|
-
sub_type = Regexp.last_match[:sub_type]
|
|
75
|
-
return data.map { |item| find_and_cast_into_type(sub_type, item) }
|
|
76
|
-
end
|
|
77
|
-
when /\AHash<String, (?<sub_type>.+)>\z/ # "type: object" with "additionalProperties: { ... }"
|
|
78
|
-
if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
|
|
79
|
-
sub_type = Regexp.last_match[:sub_type]
|
|
80
|
-
return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
|
|
81
|
-
end
|
|
82
|
-
else # model
|
|
83
|
-
const = Bandwidth.const_get(klass)
|
|
84
|
-
if const
|
|
85
|
-
if const.respond_to?(:openapi_any_of) # nested anyOf model
|
|
86
|
-
model = const.build(data)
|
|
87
|
-
return model if model
|
|
88
|
-
else
|
|
89
|
-
# raise if data contains keys that are not known to the model
|
|
90
|
-
raise if const.respond_to?(:acceptable_attributes) && !(data.keys - const.acceptable_attributes).empty?
|
|
91
|
-
model = const.build_from_hash(data)
|
|
92
|
-
return model if model
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
raise # if no match by now, raise
|
|
98
|
-
rescue
|
|
99
|
-
raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
|
|
100
|
-
end
|
|
52
|
+
Bandwidth.const_get(klass).build_from_hash(data)
|
|
53
|
+
end
|
|
101
54
|
end
|
|
102
55
|
end
|
|
103
56
|
end
|
|
@@ -41,7 +41,7 @@ module Bandwidth
|
|
|
41
41
|
# Attribute type mapping.
|
|
42
42
|
def self.openapi_types
|
|
43
43
|
{
|
|
44
|
-
:'media' => :'RbmMessageContentFile',
|
|
44
|
+
:'media' => :'Array<RbmMessageContentFile>',
|
|
45
45
|
:'suggestions' => :'Array<MultiChannelAction>'
|
|
46
46
|
}
|
|
47
47
|
end
|
|
@@ -69,7 +69,9 @@ module Bandwidth
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
if attributes.key?(:'media')
|
|
72
|
-
|
|
72
|
+
if (value = attributes[:'media']).is_a?(Array)
|
|
73
|
+
self.media = value
|
|
74
|
+
end
|
|
73
75
|
else
|
|
74
76
|
self.media = nil
|
|
75
77
|
end
|
|
@@ -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. Supplying an empty string will likely result in rejection.
|
|
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
|
|
@@ -48,11 +48,13 @@ module Bandwidth
|
|
|
48
48
|
# The company 'Doing Business As'.
|
|
49
49
|
attr_accessor :business_dba
|
|
50
50
|
|
|
51
|
-
#
|
|
51
|
+
# Government-issued business identifying number.
|
|
52
52
|
attr_accessor :business_registration_number
|
|
53
53
|
|
|
54
54
|
attr_accessor :business_registration_type
|
|
55
55
|
|
|
56
|
+
attr_accessor :business_registration_issuing_country
|
|
57
|
+
|
|
56
58
|
attr_accessor :business_entity_type
|
|
57
59
|
|
|
58
60
|
class EnumAttributeValidator
|
|
@@ -94,6 +96,7 @@ module Bandwidth
|
|
|
94
96
|
:'business_dba' => :'businessDba',
|
|
95
97
|
:'business_registration_number' => :'businessRegistrationNumber',
|
|
96
98
|
:'business_registration_type' => :'businessRegistrationType',
|
|
99
|
+
:'business_registration_issuing_country' => :'businessRegistrationIssuingCountry',
|
|
97
100
|
:'business_entity_type' => :'businessEntityType'
|
|
98
101
|
}
|
|
99
102
|
end
|
|
@@ -125,6 +128,7 @@ module Bandwidth
|
|
|
125
128
|
:'business_dba' => :'String',
|
|
126
129
|
:'business_registration_number' => :'String',
|
|
127
130
|
:'business_registration_type' => :'BusinessRegistrationTypeEnum',
|
|
131
|
+
:'business_registration_issuing_country' => :'BusinessRegistrationIssuingCountryEnum',
|
|
128
132
|
:'business_entity_type' => :'BusinessEntityTypeEnum'
|
|
129
133
|
}
|
|
130
134
|
end
|
|
@@ -136,7 +140,6 @@ module Bandwidth
|
|
|
136
140
|
:'isv_reseller',
|
|
137
141
|
:'business_registration_number',
|
|
138
142
|
:'business_registration_type',
|
|
139
|
-
:'business_entity_type'
|
|
140
143
|
])
|
|
141
144
|
end
|
|
142
145
|
|
|
@@ -212,6 +215,10 @@ module Bandwidth
|
|
|
212
215
|
self.business_registration_type = attributes[:'business_registration_type']
|
|
213
216
|
end
|
|
214
217
|
|
|
218
|
+
if attributes.key?(:'business_registration_issuing_country')
|
|
219
|
+
self.business_registration_issuing_country = attributes[:'business_registration_issuing_country']
|
|
220
|
+
end
|
|
221
|
+
|
|
215
222
|
if attributes.key?(:'business_entity_type')
|
|
216
223
|
self.business_entity_type = attributes[:'business_entity_type']
|
|
217
224
|
end
|
|
@@ -426,6 +433,7 @@ module Bandwidth
|
|
|
426
433
|
business_dba == o.business_dba &&
|
|
427
434
|
business_registration_number == o.business_registration_number &&
|
|
428
435
|
business_registration_type == o.business_registration_type &&
|
|
436
|
+
business_registration_issuing_country == o.business_registration_issuing_country &&
|
|
429
437
|
business_entity_type == o.business_entity_type
|
|
430
438
|
end
|
|
431
439
|
|
|
@@ -438,7 +446,7 @@ module Bandwidth
|
|
|
438
446
|
# Calculates hash code according to all attributes.
|
|
439
447
|
# @return [Integer] Hash code
|
|
440
448
|
def hash
|
|
441
|
-
[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
|
|
449
|
+
[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_registration_issuing_country, business_entity_type].hash
|
|
442
450
|
end
|
|
443
451
|
|
|
444
452
|
# Builds the object from hash
|
|
@@ -50,11 +50,13 @@ module Bandwidth
|
|
|
50
50
|
# The company 'Doing Business As'.
|
|
51
51
|
attr_accessor :business_dba
|
|
52
52
|
|
|
53
|
-
#
|
|
53
|
+
# Government-issued business identifying number.
|
|
54
54
|
attr_accessor :business_registration_number
|
|
55
55
|
|
|
56
56
|
attr_accessor :business_registration_type
|
|
57
57
|
|
|
58
|
+
attr_accessor :business_registration_issuing_country
|
|
59
|
+
|
|
58
60
|
attr_accessor :business_entity_type
|
|
59
61
|
|
|
60
62
|
# A message that gets sent to users requesting help.
|
|
@@ -63,6 +65,9 @@ module Bandwidth
|
|
|
63
65
|
# Indicates whether the content is age-gated.
|
|
64
66
|
attr_accessor :age_gated_content
|
|
65
67
|
|
|
68
|
+
# 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. Supplying an empty string will likely result in rejection.
|
|
69
|
+
attr_accessor :cv_token
|
|
70
|
+
|
|
66
71
|
class EnumAttributeValidator
|
|
67
72
|
attr_reader :datatype
|
|
68
73
|
attr_reader :allowable_values
|
|
@@ -103,9 +108,11 @@ module Bandwidth
|
|
|
103
108
|
:'business_dba' => :'businessDba',
|
|
104
109
|
:'business_registration_number' => :'businessRegistrationNumber',
|
|
105
110
|
:'business_registration_type' => :'businessRegistrationType',
|
|
111
|
+
:'business_registration_issuing_country' => :'businessRegistrationIssuingCountry',
|
|
106
112
|
:'business_entity_type' => :'businessEntityType',
|
|
107
113
|
:'help_message_response' => :'helpMessageResponse',
|
|
108
|
-
:'age_gated_content' => :'ageGatedContent'
|
|
114
|
+
:'age_gated_content' => :'ageGatedContent',
|
|
115
|
+
:'cv_token' => :'cvToken'
|
|
109
116
|
}
|
|
110
117
|
end
|
|
111
118
|
|
|
@@ -137,9 +144,11 @@ module Bandwidth
|
|
|
137
144
|
:'business_dba' => :'String',
|
|
138
145
|
:'business_registration_number' => :'String',
|
|
139
146
|
:'business_registration_type' => :'BusinessRegistrationTypeEnum',
|
|
147
|
+
:'business_registration_issuing_country' => :'BusinessRegistrationIssuingCountryEnum',
|
|
140
148
|
:'business_entity_type' => :'BusinessEntityTypeEnum',
|
|
141
149
|
:'help_message_response' => :'String',
|
|
142
|
-
:'age_gated_content' => :'Boolean'
|
|
150
|
+
:'age_gated_content' => :'Boolean',
|
|
151
|
+
:'cv_token' => :'String'
|
|
143
152
|
}
|
|
144
153
|
end
|
|
145
154
|
|
|
@@ -150,8 +159,8 @@ module Bandwidth
|
|
|
150
159
|
:'isv_reseller',
|
|
151
160
|
:'business_registration_number',
|
|
152
161
|
:'business_registration_type',
|
|
153
|
-
:'business_entity_type',
|
|
154
162
|
:'help_message_response',
|
|
163
|
+
:'cv_token'
|
|
155
164
|
])
|
|
156
165
|
end
|
|
157
166
|
|
|
@@ -249,8 +258,14 @@ module Bandwidth
|
|
|
249
258
|
self.business_registration_type = attributes[:'business_registration_type']
|
|
250
259
|
end
|
|
251
260
|
|
|
261
|
+
if attributes.key?(:'business_registration_issuing_country')
|
|
262
|
+
self.business_registration_issuing_country = attributes[:'business_registration_issuing_country']
|
|
263
|
+
end
|
|
264
|
+
|
|
252
265
|
if attributes.key?(:'business_entity_type')
|
|
253
266
|
self.business_entity_type = attributes[:'business_entity_type']
|
|
267
|
+
else
|
|
268
|
+
self.business_entity_type = nil
|
|
254
269
|
end
|
|
255
270
|
|
|
256
271
|
if attributes.key?(:'help_message_response')
|
|
@@ -260,6 +275,10 @@ module Bandwidth
|
|
|
260
275
|
if attributes.key?(:'age_gated_content')
|
|
261
276
|
self.age_gated_content = attributes[:'age_gated_content']
|
|
262
277
|
end
|
|
278
|
+
|
|
279
|
+
if attributes.key?(:'cv_token')
|
|
280
|
+
self.cv_token = attributes[:'cv_token']
|
|
281
|
+
end
|
|
263
282
|
end
|
|
264
283
|
|
|
265
284
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -359,10 +378,22 @@ module Bandwidth
|
|
|
359
378
|
invalid_properties.push('invalid value for "business_registration_number", the character length must be smaller than or equal to 500.')
|
|
360
379
|
end
|
|
361
380
|
|
|
381
|
+
if @business_entity_type.nil?
|
|
382
|
+
invalid_properties.push('invalid value for "business_entity_type", business_entity_type cannot be nil.')
|
|
383
|
+
end
|
|
384
|
+
|
|
362
385
|
if !@help_message_response.nil? && @help_message_response.to_s.length > 500
|
|
363
386
|
invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.')
|
|
364
387
|
end
|
|
365
388
|
|
|
389
|
+
if !@cv_token.nil? && @cv_token.to_s.length > 500
|
|
390
|
+
invalid_properties.push('invalid value for "cv_token", the character length must be smaller than or equal to 500.')
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
if !@cv_token.nil? && @cv_token.to_s.length < 0
|
|
394
|
+
invalid_properties.push('invalid value for "cv_token", the character length must be greater than or equal to 0.')
|
|
395
|
+
end
|
|
396
|
+
|
|
366
397
|
invalid_properties
|
|
367
398
|
end
|
|
368
399
|
|
|
@@ -393,7 +424,10 @@ module Bandwidth
|
|
|
393
424
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
|
|
394
425
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
|
|
395
426
|
return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
|
427
|
+
return false if @business_entity_type.nil?
|
|
396
428
|
return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500
|
|
429
|
+
return false if !@cv_token.nil? && @cv_token.to_s.length > 500
|
|
430
|
+
return false if !@cv_token.nil? && @cv_token.to_s.length < 0
|
|
397
431
|
true
|
|
398
432
|
end
|
|
399
433
|
|
|
@@ -555,6 +589,16 @@ module Bandwidth
|
|
|
555
589
|
@business_registration_number = business_registration_number
|
|
556
590
|
end
|
|
557
591
|
|
|
592
|
+
# Custom attribute writer method with validation
|
|
593
|
+
# @param [Object] business_entity_type Value to be assigned
|
|
594
|
+
def business_entity_type=(business_entity_type)
|
|
595
|
+
if business_entity_type.nil?
|
|
596
|
+
fail ArgumentError, 'business_entity_type cannot be nil'
|
|
597
|
+
end
|
|
598
|
+
|
|
599
|
+
@business_entity_type = business_entity_type
|
|
600
|
+
end
|
|
601
|
+
|
|
558
602
|
# Custom attribute writer method with validation
|
|
559
603
|
# @param [Object] help_message_response Value to be assigned
|
|
560
604
|
def help_message_response=(help_message_response)
|
|
@@ -565,6 +609,20 @@ module Bandwidth
|
|
|
565
609
|
@help_message_response = help_message_response
|
|
566
610
|
end
|
|
567
611
|
|
|
612
|
+
# Custom attribute writer method with validation
|
|
613
|
+
# @param [Object] cv_token Value to be assigned
|
|
614
|
+
def cv_token=(cv_token)
|
|
615
|
+
if !cv_token.nil? && cv_token.to_s.length > 500
|
|
616
|
+
fail ArgumentError, 'invalid value for "cv_token", the character length must be smaller than or equal to 500.'
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
if !cv_token.nil? && cv_token.to_s.length < 0
|
|
620
|
+
fail ArgumentError, 'invalid value for "cv_token", the character length must be greater than or equal to 0.'
|
|
621
|
+
end
|
|
622
|
+
|
|
623
|
+
@cv_token = cv_token
|
|
624
|
+
end
|
|
625
|
+
|
|
568
626
|
# Checks equality by comparing each attribute.
|
|
569
627
|
# @param [Object] Object to be compared
|
|
570
628
|
def ==(o)
|
|
@@ -585,9 +643,11 @@ module Bandwidth
|
|
|
585
643
|
business_dba == o.business_dba &&
|
|
586
644
|
business_registration_number == o.business_registration_number &&
|
|
587
645
|
business_registration_type == o.business_registration_type &&
|
|
646
|
+
business_registration_issuing_country == o.business_registration_issuing_country &&
|
|
588
647
|
business_entity_type == o.business_entity_type &&
|
|
589
648
|
help_message_response == o.help_message_response &&
|
|
590
|
-
age_gated_content == o.age_gated_content
|
|
649
|
+
age_gated_content == o.age_gated_content &&
|
|
650
|
+
cv_token == o.cv_token
|
|
591
651
|
end
|
|
592
652
|
|
|
593
653
|
# @see the `==` method
|
|
@@ -599,7 +659,7 @@ module Bandwidth
|
|
|
599
659
|
# Calculates hash code according to all attributes.
|
|
600
660
|
# @return [Integer] Hash code
|
|
601
661
|
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
|
|
662
|
+
[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_registration_issuing_country, business_entity_type, help_message_response, age_gated_content, cv_token].hash
|
|
603
663
|
end
|
|
604
664
|
|
|
605
665
|
# Builds the object from hash
|
|
@@ -48,19 +48,24 @@ module Bandwidth
|
|
|
48
48
|
# The company 'Doing Business As'.
|
|
49
49
|
attr_accessor :business_dba
|
|
50
50
|
|
|
51
|
-
#
|
|
51
|
+
# Government-issued business identifying number.
|
|
52
52
|
attr_accessor :business_registration_number
|
|
53
53
|
|
|
54
54
|
attr_accessor :business_registration_type
|
|
55
55
|
|
|
56
56
|
attr_accessor :business_entity_type
|
|
57
57
|
|
|
58
|
+
attr_accessor :business_registration_issuing_country
|
|
59
|
+
|
|
58
60
|
# A message that gets sent to users requesting help.
|
|
59
61
|
attr_accessor :help_message_response
|
|
60
62
|
|
|
61
63
|
# Indicates whether the content is age-gated.
|
|
62
64
|
attr_accessor :age_gated_content
|
|
63
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. Supplying an empty string will likely result in rejection.
|
|
67
|
+
attr_accessor :cv_token
|
|
68
|
+
|
|
64
69
|
class EnumAttributeValidator
|
|
65
70
|
attr_reader :datatype
|
|
66
71
|
attr_reader :allowable_values
|
|
@@ -101,8 +106,10 @@ module Bandwidth
|
|
|
101
106
|
:'business_registration_number' => :'businessRegistrationNumber',
|
|
102
107
|
:'business_registration_type' => :'businessRegistrationType',
|
|
103
108
|
:'business_entity_type' => :'businessEntityType',
|
|
109
|
+
:'business_registration_issuing_country' => :'businessRegistrationIssuingCountry',
|
|
104
110
|
:'help_message_response' => :'helpMessageResponse',
|
|
105
|
-
:'age_gated_content' => :'ageGatedContent'
|
|
111
|
+
:'age_gated_content' => :'ageGatedContent',
|
|
112
|
+
:'cv_token' => :'cvToken'
|
|
106
113
|
}
|
|
107
114
|
end
|
|
108
115
|
|
|
@@ -134,8 +141,10 @@ module Bandwidth
|
|
|
134
141
|
:'business_registration_number' => :'String',
|
|
135
142
|
:'business_registration_type' => :'BusinessRegistrationTypeEnum',
|
|
136
143
|
:'business_entity_type' => :'BusinessEntityTypeEnum',
|
|
144
|
+
:'business_registration_issuing_country' => :'BusinessRegistrationIssuingCountryEnum',
|
|
137
145
|
:'help_message_response' => :'String',
|
|
138
|
-
:'age_gated_content' => :'Boolean'
|
|
146
|
+
:'age_gated_content' => :'Boolean',
|
|
147
|
+
:'cv_token' => :'String'
|
|
139
148
|
}
|
|
140
149
|
end
|
|
141
150
|
|
|
@@ -146,8 +155,8 @@ module Bandwidth
|
|
|
146
155
|
:'isv_reseller',
|
|
147
156
|
:'business_registration_number',
|
|
148
157
|
:'business_registration_type',
|
|
149
|
-
:'business_entity_type',
|
|
150
158
|
:'help_message_response',
|
|
159
|
+
:'cv_token'
|
|
151
160
|
])
|
|
152
161
|
end
|
|
153
162
|
|
|
@@ -241,6 +250,10 @@ module Bandwidth
|
|
|
241
250
|
self.business_entity_type = attributes[:'business_entity_type']
|
|
242
251
|
end
|
|
243
252
|
|
|
253
|
+
if attributes.key?(:'business_registration_issuing_country')
|
|
254
|
+
self.business_registration_issuing_country = attributes[:'business_registration_issuing_country']
|
|
255
|
+
end
|
|
256
|
+
|
|
244
257
|
if attributes.key?(:'help_message_response')
|
|
245
258
|
self.help_message_response = attributes[:'help_message_response']
|
|
246
259
|
end
|
|
@@ -248,6 +261,10 @@ module Bandwidth
|
|
|
248
261
|
if attributes.key?(:'age_gated_content')
|
|
249
262
|
self.age_gated_content = attributes[:'age_gated_content']
|
|
250
263
|
end
|
|
264
|
+
|
|
265
|
+
if attributes.key?(:'cv_token')
|
|
266
|
+
self.cv_token = attributes[:'cv_token']
|
|
267
|
+
end
|
|
251
268
|
end
|
|
252
269
|
|
|
253
270
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -339,6 +356,14 @@ module Bandwidth
|
|
|
339
356
|
invalid_properties.push('invalid value for "help_message_response", the character length must be smaller than or equal to 500.')
|
|
340
357
|
end
|
|
341
358
|
|
|
359
|
+
if !@cv_token.nil? && @cv_token.to_s.length > 500
|
|
360
|
+
invalid_properties.push('invalid value for "cv_token", the character length must be smaller than or equal to 500.')
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
if !@cv_token.nil? && @cv_token.to_s.length < 0
|
|
364
|
+
invalid_properties.push('invalid value for "cv_token", the character length must be greater than or equal to 0.')
|
|
365
|
+
end
|
|
366
|
+
|
|
342
367
|
invalid_properties
|
|
343
368
|
end
|
|
344
369
|
|
|
@@ -367,6 +392,8 @@ module Bandwidth
|
|
|
367
392
|
return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
|
|
368
393
|
return false if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
|
|
369
394
|
return false if !@help_message_response.nil? && @help_message_response.to_s.length > 500
|
|
395
|
+
return false if !@cv_token.nil? && @cv_token.to_s.length > 500
|
|
396
|
+
return false if !@cv_token.nil? && @cv_token.to_s.length < 0
|
|
370
397
|
true
|
|
371
398
|
end
|
|
372
399
|
|
|
@@ -520,6 +547,20 @@ module Bandwidth
|
|
|
520
547
|
@help_message_response = help_message_response
|
|
521
548
|
end
|
|
522
549
|
|
|
550
|
+
# Custom attribute writer method with validation
|
|
551
|
+
# @param [Object] cv_token Value to be assigned
|
|
552
|
+
def cv_token=(cv_token)
|
|
553
|
+
if !cv_token.nil? && cv_token.to_s.length > 500
|
|
554
|
+
fail ArgumentError, 'invalid value for "cv_token", the character length must be smaller than or equal to 500.'
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
if !cv_token.nil? && cv_token.to_s.length < 0
|
|
558
|
+
fail ArgumentError, 'invalid value for "cv_token", the character length must be greater than or equal to 0.'
|
|
559
|
+
end
|
|
560
|
+
|
|
561
|
+
@cv_token = cv_token
|
|
562
|
+
end
|
|
563
|
+
|
|
523
564
|
# Checks equality by comparing each attribute.
|
|
524
565
|
# @param [Object] Object to be compared
|
|
525
566
|
def ==(o)
|
|
@@ -540,8 +581,10 @@ module Bandwidth
|
|
|
540
581
|
business_registration_number == o.business_registration_number &&
|
|
541
582
|
business_registration_type == o.business_registration_type &&
|
|
542
583
|
business_entity_type == o.business_entity_type &&
|
|
584
|
+
business_registration_issuing_country == o.business_registration_issuing_country &&
|
|
543
585
|
help_message_response == o.help_message_response &&
|
|
544
|
-
age_gated_content == o.age_gated_content
|
|
586
|
+
age_gated_content == o.age_gated_content &&
|
|
587
|
+
cv_token == o.cv_token
|
|
545
588
|
end
|
|
546
589
|
|
|
547
590
|
# @see the `==` method
|
|
@@ -553,7 +596,7 @@ module Bandwidth
|
|
|
553
596
|
# Calculates hash code according to all attributes.
|
|
554
597
|
# @return [Integer] Hash code
|
|
555
598
|
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
|
|
599
|
+
[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, business_registration_issuing_country, help_message_response, age_gated_content, cv_token].hash
|
|
557
600
|
end
|
|
558
601
|
|
|
559
602
|
# Builds the object from hash
|
data/lib/bandwidth-sdk.rb
CHANGED
|
@@ -27,6 +27,7 @@ require 'bandwidth-sdk/models/blocked_webhook'
|
|
|
27
27
|
require 'bandwidth-sdk/models/bridge_complete_callback'
|
|
28
28
|
require 'bandwidth-sdk/models/bridge_target_complete_callback'
|
|
29
29
|
require 'bandwidth-sdk/models/business_entity_type_enum'
|
|
30
|
+
require 'bandwidth-sdk/models/business_registration_issuing_country_enum'
|
|
30
31
|
require 'bandwidth-sdk/models/business_registration_type_enum'
|
|
31
32
|
require 'bandwidth-sdk/models/call_direction_enum'
|
|
32
33
|
require 'bandwidth-sdk/models/call_recording_metadata'
|