bandwidth-sdk 16.1.0 → 16.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +5 -5
  3. data/README.md +6 -3
  4. data/bandwidth.yml +266 -11
  5. data/coverage/.last_run.json +1 -1
  6. data/coverage/.resultset.json +501 -1
  7. data/coverage/index.html +6296 -970
  8. data/docs/BusinessEntityTypeEnum.md +15 -0
  9. data/docs/BusinessRegistrationTypeEnum.md +15 -0
  10. data/docs/CallTranscriptionMetadata.md +1 -1
  11. data/docs/ConferenceMember.md +1 -1
  12. data/docs/ListMessageItem.md +13 -1
  13. data/docs/MessagesApi.md +24 -0
  14. data/docs/MultiChannelMessageResponseData.md +2 -2
  15. data/docs/OptInWorkflow.md +3 -1
  16. data/docs/ProductTypeEnum.md +15 -0
  17. data/docs/RbmActionBase.md +1 -1
  18. data/docs/RbmSuggestionResponse.md +1 -1
  19. data/docs/TfvSubmissionInfo.md +7 -1
  20. data/docs/TranscriptionsApi.md +13 -13
  21. data/docs/VerificationRequest.md +11 -1
  22. data/docs/VerificationUpdateRequest.md +11 -1
  23. data/lib/bandwidth-sdk/api/messages_api.rb +36 -0
  24. data/lib/bandwidth-sdk/api/transcriptions_api.rb +8 -8
  25. data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +43 -0
  26. data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +40 -0
  27. data/lib/bandwidth-sdk/models/bxml/verbs/stop_stream.rb +2 -1
  28. data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +1 -1
  29. data/lib/bandwidth-sdk/models/conference_member.rb +1 -1
  30. data/lib/bandwidth-sdk/models/list_message_item.rb +71 -5
  31. data/lib/bandwidth-sdk/models/message_type_enum.rb +2 -1
  32. data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +11 -11
  33. data/lib/bandwidth-sdk/models/opt_in_workflow.rb +38 -4
  34. data/lib/bandwidth-sdk/models/product_type_enum.rb +47 -0
  35. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +72 -4
  36. data/lib/bandwidth-sdk/models/verification_request.rb +108 -4
  37. data/lib/bandwidth-sdk/models/verification_update_request.rb +108 -4
  38. data/lib/bandwidth-sdk/version.rb +1 -1
  39. data/lib/bandwidth-sdk.rb +3 -0
  40. data/spec/smoke/messages_api_spec.rb +2 -1
  41. data/spec/spec_helper.rb +3 -2
  42. data/spec/unit/api/messages_api_spec.rb +6 -0
  43. data/spec/unit/models/bxml/verbs/stop_stream_spec.rb +6 -4
  44. metadata +44 -38
@@ -63,6 +63,24 @@ module Bandwidth
63
63
  # The campaign ID of the message if it has one.
64
64
  attr_accessor :campaign_id
65
65
 
66
+ # The Bandwidth latency of the message in seconds. Only available for accounts with the Advanced Quality Metrics feature enabled.
67
+ attr_accessor :bw_latency
68
+
69
+ # The carrier latency of the message in seconds. Only available for OUTBOUND messages from accounts with the Advanced Quality Metrics feature enabled.
70
+ attr_accessor :carrier_latency
71
+
72
+ # The A3 country code of the calling number.
73
+ attr_accessor :calling_number_country_a3
74
+
75
+ # The A3 country code of the called number.
76
+ attr_accessor :called_number_country_a3
77
+
78
+ # The messaging product associated with the message.
79
+ attr_accessor :product
80
+
81
+ # The location ID associated with this message.
82
+ attr_accessor :location
83
+
66
84
  class EnumAttributeValidator
67
85
  attr_reader :datatype
68
86
  attr_reader :allowable_values
@@ -104,7 +122,13 @@ module Bandwidth
104
122
  :'attachment_count' => :'attachmentCount',
105
123
  :'recipient_count' => :'recipientCount',
106
124
  :'campaign_class' => :'campaignClass',
107
- :'campaign_id' => :'campaignId'
125
+ :'campaign_id' => :'campaignId',
126
+ :'bw_latency' => :'bwLatency',
127
+ :'carrier_latency' => :'carrierLatency',
128
+ :'calling_number_country_a3' => :'callingNumberCountryA3',
129
+ :'called_number_country_a3' => :'calledNumberCountryA3',
130
+ :'product' => :'product',
131
+ :'location' => :'location'
108
132
  }
109
133
  end
110
134
 
@@ -132,7 +156,13 @@ module Bandwidth
132
156
  :'attachment_count' => :'Integer',
133
157
  :'recipient_count' => :'Integer',
134
158
  :'campaign_class' => :'String',
135
- :'campaign_id' => :'String'
159
+ :'campaign_id' => :'String',
160
+ :'bw_latency' => :'Integer',
161
+ :'carrier_latency' => :'Integer',
162
+ :'calling_number_country_a3' => :'String',
163
+ :'called_number_country_a3' => :'String',
164
+ :'product' => :'String',
165
+ :'location' => :'String'
136
166
  }
137
167
  end
138
168
 
@@ -144,7 +174,13 @@ module Bandwidth
144
174
  :'attachment_count',
145
175
  :'recipient_count',
146
176
  :'campaign_class',
147
- :'campaign_id'
177
+ :'campaign_id',
178
+ :'bw_latency',
179
+ :'carrier_latency',
180
+ :'calling_number_country_a3',
181
+ :'called_number_country_a3',
182
+ :'product',
183
+ :'location'
148
184
  ])
149
185
  end
150
186
 
@@ -230,6 +266,30 @@ module Bandwidth
230
266
  if attributes.key?(:'campaign_id')
231
267
  self.campaign_id = attributes[:'campaign_id']
232
268
  end
269
+
270
+ if attributes.key?(:'bw_latency')
271
+ self.bw_latency = attributes[:'bw_latency']
272
+ end
273
+
274
+ if attributes.key?(:'carrier_latency')
275
+ self.carrier_latency = attributes[:'carrier_latency']
276
+ end
277
+
278
+ if attributes.key?(:'calling_number_country_a3')
279
+ self.calling_number_country_a3 = attributes[:'calling_number_country_a3']
280
+ end
281
+
282
+ if attributes.key?(:'called_number_country_a3')
283
+ self.called_number_country_a3 = attributes[:'called_number_country_a3']
284
+ end
285
+
286
+ if attributes.key?(:'product')
287
+ self.product = attributes[:'product']
288
+ end
289
+
290
+ if attributes.key?(:'location')
291
+ self.location = attributes[:'location']
292
+ end
233
293
  end
234
294
 
235
295
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -268,7 +328,13 @@ module Bandwidth
268
328
  attachment_count == o.attachment_count &&
269
329
  recipient_count == o.recipient_count &&
270
330
  campaign_class == o.campaign_class &&
271
- campaign_id == o.campaign_id
331
+ campaign_id == o.campaign_id &&
332
+ bw_latency == o.bw_latency &&
333
+ carrier_latency == o.carrier_latency &&
334
+ calling_number_country_a3 == o.calling_number_country_a3 &&
335
+ called_number_country_a3 == o.called_number_country_a3 &&
336
+ product == o.product &&
337
+ location == o.location
272
338
  end
273
339
 
274
340
  # @see the `==` method
@@ -280,7 +346,7 @@ module Bandwidth
280
346
  # Calculates hash code according to all attributes.
281
347
  # @return [Integer] Hash code
282
348
  def hash
283
- [message_id, account_id, source_tn, destination_tn, message_status, message_direction, message_type, segment_count, error_code, receive_time, carrier_name, message_size, message_length, attachment_count, recipient_count, campaign_class, campaign_id].hash
349
+ [message_id, account_id, source_tn, destination_tn, message_status, message_direction, message_type, segment_count, error_code, receive_time, carrier_name, message_size, message_length, attachment_count, recipient_count, campaign_class, campaign_id, bw_latency, carrier_latency, calling_number_country_a3, called_number_country_a3, product, location].hash
284
350
  end
285
351
 
286
352
  # Builds the object from hash
@@ -17,9 +17,10 @@ module Bandwidth
17
17
  class MessageTypeEnum
18
18
  SMS = 'sms'.freeze
19
19
  MMS = 'mms'.freeze
20
+ RCS = 'rcs'.freeze
20
21
 
21
22
  def self.all_vars
22
- @all_vars ||= [SMS, MMS].freeze
23
+ @all_vars ||= [SMS, MMS, RCS].freeze
23
24
  end
24
25
 
25
26
  # Builds the enum from string
@@ -17,7 +17,7 @@ module Bandwidth
17
17
  # The data returned in a multichannel message response.
18
18
  class MultiChannelMessageResponseData
19
19
  # The ID of the message.
20
- attr_accessor :message_id
20
+ attr_accessor :id
21
21
 
22
22
  # The time the message was received by the Bandwidth API.
23
23
  attr_accessor :time
@@ -63,7 +63,7 @@ module Bandwidth
63
63
  # Attribute mapping from ruby-style variable name to JSON key.
64
64
  def self.attribute_map
65
65
  {
66
- :'message_id' => :'messageId',
66
+ :'id' => :'id',
67
67
  :'time' => :'time',
68
68
  :'direction' => :'direction',
69
69
  :'to' => :'to',
@@ -82,7 +82,7 @@ module Bandwidth
82
82
  # Attribute type mapping.
83
83
  def self.openapi_types
84
84
  {
85
- :'message_id' => :'String',
85
+ :'id' => :'String',
86
86
  :'time' => :'Time',
87
87
  :'direction' => :'MessageDirectionEnum',
88
88
  :'to' => :'Array<String>',
@@ -114,10 +114,10 @@ module Bandwidth
114
114
  h[k.to_sym] = v
115
115
  }
116
116
 
117
- if attributes.key?(:'message_id')
118
- self.message_id = attributes[:'message_id']
117
+ if attributes.key?(:'id')
118
+ self.id = attributes[:'id']
119
119
  else
120
- self.message_id = nil
120
+ self.id = nil
121
121
  end
122
122
 
123
123
  if attributes.key?(:'time')
@@ -166,8 +166,8 @@ module Bandwidth
166
166
  def list_invalid_properties
167
167
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
168
168
  invalid_properties = Array.new
169
- if @message_id.nil?
170
- invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
169
+ if @id.nil?
170
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
171
171
  end
172
172
 
173
173
  if @time.nil?
@@ -197,7 +197,7 @@ module Bandwidth
197
197
  # @return true if the model is valid
198
198
  def valid?
199
199
  warn '[DEPRECATED] the `valid?` method is obsolete'
200
- return false if @message_id.nil?
200
+ return false if @id.nil?
201
201
  return false if @time.nil?
202
202
  return false if @direction.nil?
203
203
  return false if @to.nil?
@@ -235,7 +235,7 @@ module Bandwidth
235
235
  def ==(o)
236
236
  return true if self.equal?(o)
237
237
  self.class == o.class &&
238
- message_id == o.message_id &&
238
+ id == o.id &&
239
239
  time == o.time &&
240
240
  direction == o.direction &&
241
241
  to == o.to &&
@@ -254,7 +254,7 @@ module Bandwidth
254
254
  # Calculates hash code according to all attributes.
255
255
  # @return [Integer] Hash code
256
256
  def hash
257
- [message_id, time, direction, to, channel_list, tag, priority, expiration].hash
257
+ [id, time, direction, to, channel_list, tag, priority, expiration].hash
258
258
  end
259
259
 
260
260
  # Builds the object from hash
@@ -19,11 +19,14 @@ module Bandwidth
19
19
 
20
20
  attr_accessor :image_urls
21
21
 
22
+ attr_accessor :confirmation_response
23
+
22
24
  # Attribute mapping from ruby-style variable name to JSON key.
23
25
  def self.attribute_map
24
26
  {
25
27
  :'description' => :'description',
26
- :'image_urls' => :'imageUrls'
28
+ :'image_urls' => :'imageUrls',
29
+ :'confirmation_response' => :'confirmationResponse'
27
30
  }
28
31
  end
29
32
 
@@ -36,13 +39,15 @@ module Bandwidth
36
39
  def self.openapi_types
37
40
  {
38
41
  :'description' => :'String',
39
- :'image_urls' => :'Array<String>'
42
+ :'image_urls' => :'Array<String>',
43
+ :'confirmation_response' => :'String'
40
44
  }
41
45
  end
42
46
 
43
47
  # List of attributes with nullable: true
44
48
  def self.openapi_nullable
45
49
  Set.new([
50
+ :'confirmation_response'
46
51
  ])
47
52
  end
48
53
 
@@ -74,6 +79,10 @@ module Bandwidth
74
79
  else
75
80
  self.image_urls = nil
76
81
  end
82
+
83
+ if attributes.key?(:'confirmation_response')
84
+ self.confirmation_response = attributes[:'confirmation_response']
85
+ end
77
86
  end
78
87
 
79
88
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -97,6 +106,14 @@ module Bandwidth
97
106
  invalid_properties.push('invalid value for "image_urls", image_urls cannot be nil.')
98
107
  end
99
108
 
109
+ if !@confirmation_response.nil? && @confirmation_response.to_s.length > 500
110
+ invalid_properties.push('invalid value for "confirmation_response", the character length must be smaller than or equal to 500.')
111
+ end
112
+
113
+ if !@confirmation_response.nil? && @confirmation_response.to_s.length < 0
114
+ invalid_properties.push('invalid value for "confirmation_response", the character length must be great than or equal to 0.')
115
+ end
116
+
100
117
  invalid_properties
101
118
  end
102
119
 
@@ -108,6 +125,8 @@ module Bandwidth
108
125
  return false if @description.to_s.length > 500
109
126
  return false if @description.to_s.length < 1
110
127
  return false if @image_urls.nil?
128
+ return false if !@confirmation_response.nil? && @confirmation_response.to_s.length > 500
129
+ return false if !@confirmation_response.nil? && @confirmation_response.to_s.length < 0
111
130
  true
112
131
  end
113
132
 
@@ -129,13 +148,28 @@ module Bandwidth
129
148
  @description = description
130
149
  end
131
150
 
151
+ # Custom attribute writer method with validation
152
+ # @param [Object] confirmation_response Value to be assigned
153
+ def confirmation_response=(confirmation_response)
154
+ if !confirmation_response.nil? && confirmation_response.to_s.length > 500
155
+ fail ArgumentError, 'invalid value for "confirmation_response", the character length must be smaller than or equal to 500.'
156
+ end
157
+
158
+ if !confirmation_response.nil? && confirmation_response.to_s.length < 0
159
+ fail ArgumentError, 'invalid value for "confirmation_response", the character length must be great than or equal to 0.'
160
+ end
161
+
162
+ @confirmation_response = confirmation_response
163
+ end
164
+
132
165
  # Checks equality by comparing each attribute.
133
166
  # @param [Object] Object to be compared
134
167
  def ==(o)
135
168
  return true if self.equal?(o)
136
169
  self.class == o.class &&
137
170
  description == o.description &&
138
- image_urls == o.image_urls
171
+ image_urls == o.image_urls &&
172
+ confirmation_response == o.confirmation_response
139
173
  end
140
174
 
141
175
  # @see the `==` method
@@ -147,7 +181,7 @@ module Bandwidth
147
181
  # Calculates hash code according to all attributes.
148
182
  # @return [Integer] Hash code
149
183
  def hash
150
- [description, image_urls].hash
184
+ [description, image_urls, confirmation_response].hash
151
185
  end
152
186
 
153
187
  # Builds the object from hash
@@ -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