bandwidth-sdk 13.1.4 → 14.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +15 -12
  3. data/README.md +45 -18
  4. data/bandwidth-sdk.gemspec +1 -1
  5. data/bandwidth.yml +1638 -589
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +1388 -420
  8. data/coverage/index.html +20846 -10460
  9. data/custom_templates/README.mustache +6 -6
  10. data/custom_templates/gemspec.mustache +1 -1
  11. data/docs/AdditionalDenialReason.md +22 -0
  12. data/docs/Address.md +30 -0
  13. data/docs/CallbackTypeEnum.md +15 -0
  14. data/docs/Contact.md +24 -0
  15. data/docs/Error.md +22 -0
  16. data/docs/FailureWebhook.md +28 -0
  17. data/docs/LinksObject.md +24 -0
  18. data/docs/MediaApi.md +1 -1
  19. data/docs/Message.md +1 -1
  20. data/docs/MessageCallback.md +28 -0
  21. data/docs/MessageCallbackMessage.md +40 -0
  22. data/docs/OptInWorkflow.md +20 -0
  23. data/docs/TelephoneNumber.md +18 -0
  24. data/docs/TfvBasicAuthentication.md +20 -0
  25. data/docs/TfvCallbackStatusEnum.md +15 -0
  26. data/docs/TfvError.md +22 -0
  27. data/docs/TfvStatus.md +32 -0
  28. data/docs/TfvStatusEnum.md +15 -0
  29. data/docs/TfvSubmissionInfo.md +34 -0
  30. data/docs/TfvSubmissionWrapper.md +18 -0
  31. data/docs/TollFreeVerificationApi.md +585 -0
  32. data/docs/VerificationDenialWebhook.md +32 -0
  33. data/docs/VerificationRequest.md +36 -0
  34. data/docs/VerificationUpdateRequest.md +34 -0
  35. data/docs/VerificationWebhook.md +24 -0
  36. data/docs/WebhookSubscription.md +30 -0
  37. data/docs/WebhookSubscriptionBasicAuthentication.md +20 -0
  38. data/docs/WebhookSubscriptionRequestSchema.md +22 -0
  39. data/docs/WebhookSubscriptionTypeEnum.md +15 -0
  40. data/docs/WebhookSubscriptionsListBody.md +22 -0
  41. data/lib/bandwidth-sdk/api/media_api.rb +1 -1
  42. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +614 -0
  43. data/lib/bandwidth-sdk/configuration.rb +48 -0
  44. data/lib/bandwidth-sdk/models/additional_denial_reason.rb +254 -0
  45. data/lib/bandwidth-sdk/models/address.rb +501 -0
  46. data/lib/bandwidth-sdk/models/callback_type_enum.rb +42 -0
  47. data/lib/bandwidth-sdk/models/contact.rb +393 -0
  48. data/lib/bandwidth-sdk/models/error.rb +232 -0
  49. data/lib/bandwidth-sdk/models/failure_webhook.rb +304 -0
  50. data/lib/bandwidth-sdk/models/{transcription_metadata.rb → links_object.rb} +34 -35
  51. data/lib/bandwidth-sdk/models/{message_failed_callback.rb → message_callback.rb} +31 -13
  52. data/lib/bandwidth-sdk/models/{inbound_message_callback_message.rb → message_callback_message.rb} +6 -4
  53. data/lib/bandwidth-sdk/models/{inbound_message_callback.rb → opt_in_workflow.rb} +42 -61
  54. data/lib/bandwidth-sdk/models/telephone_number.rb +213 -0
  55. data/lib/bandwidth-sdk/models/{message_delivered_callback.rb → tfv_basic_authentication.rb} +58 -69
  56. data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +40 -0
  57. data/lib/bandwidth-sdk/models/{message_sending_callback.rb → tfv_error.rb} +12 -64
  58. data/lib/bandwidth-sdk/models/{message_delivered_callback_message.rb → tfv_status.rb} +86 -162
  59. data/lib/bandwidth-sdk/models/tfv_status_enum.rb +43 -0
  60. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +452 -0
  61. data/lib/bandwidth-sdk/models/{transcription_list.rb → tfv_submission_wrapper.rb} +12 -14
  62. data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +325 -0
  63. data/lib/bandwidth-sdk/models/verification_request.rb +547 -0
  64. data/lib/bandwidth-sdk/models/verification_update_request.rb +501 -0
  65. data/lib/bandwidth-sdk/models/verification_webhook.rb +303 -0
  66. data/lib/bandwidth-sdk/models/{message_failed_callback_message.rb → webhook_subscription.rb} +68 -158
  67. data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +274 -0
  68. data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +306 -0
  69. data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +40 -0
  70. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +242 -0
  71. data/lib/bandwidth-sdk/version.rb +1 -1
  72. data/lib/bandwidth-sdk.rb +28 -8
  73. data/openapi-config.yml +1 -1
  74. data/spec/call_utils.rb +2 -2
  75. data/spec/smoke/toll_free_verification_api_spec.rb +69 -0
  76. data/spec/spec_helper.rb +1 -1
  77. data/spec/unit/api/mfa_api_spec.rb +1 -1
  78. data/spec/unit/api/toll_free_verification_api_spec.rb +278 -0
  79. data/spec/unit/client/api_client_spec.rb +1 -1
  80. metadata +111 -62
  81. data/lib/bandwidth-sdk/models/disconenct_callback.rb +0 -405
  82. data/lib/bandwidth-sdk/models/message_sending_callback_message.rb +0 -418
@@ -0,0 +1,452 @@
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 TfvSubmissionInfo
18
+ attr_accessor :business_address
19
+
20
+ attr_accessor :business_contact
21
+
22
+ # Estimated monthly volume of messages from the toll-free number.
23
+ attr_accessor :message_volume
24
+
25
+ # The category of the use case.
26
+ attr_accessor :use_case
27
+
28
+ # A general idea of the use case and customer.
29
+ attr_accessor :use_case_summary
30
+
31
+ # Example of message content.
32
+ attr_accessor :production_message_content
33
+
34
+ attr_accessor :opt_in_workflow
35
+
36
+ # Any additional information.
37
+ attr_accessor :additional_information
38
+
39
+ # ISV name.
40
+ attr_accessor :isv_reseller
41
+
42
+ # Attribute mapping from ruby-style variable name to JSON key.
43
+ def self.attribute_map
44
+ {
45
+ :'business_address' => :'businessAddress',
46
+ :'business_contact' => :'businessContact',
47
+ :'message_volume' => :'messageVolume',
48
+ :'use_case' => :'useCase',
49
+ :'use_case_summary' => :'useCaseSummary',
50
+ :'production_message_content' => :'productionMessageContent',
51
+ :'opt_in_workflow' => :'optInWorkflow',
52
+ :'additional_information' => :'additionalInformation',
53
+ :'isv_reseller' => :'isvReseller'
54
+ }
55
+ end
56
+
57
+ # Returns all the JSON keys this model knows about
58
+ def self.acceptable_attributes
59
+ attribute_map.values
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.openapi_types
64
+ {
65
+ :'business_address' => :'Address',
66
+ :'business_contact' => :'Contact',
67
+ :'message_volume' => :'Integer',
68
+ :'use_case' => :'String',
69
+ :'use_case_summary' => :'String',
70
+ :'production_message_content' => :'String',
71
+ :'opt_in_workflow' => :'OptInWorkflow',
72
+ :'additional_information' => :'String',
73
+ :'isv_reseller' => :'String'
74
+ }
75
+ end
76
+
77
+ # List of attributes with nullable: true
78
+ def self.openapi_nullable
79
+ Set.new([
80
+ :'additional_information',
81
+ :'isv_reseller'
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::TfvSubmissionInfo` initialize method'
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TfvSubmissionInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'business_address')
101
+ self.business_address = attributes[:'business_address']
102
+ end
103
+
104
+ if attributes.key?(:'business_contact')
105
+ self.business_contact = attributes[:'business_contact']
106
+ end
107
+
108
+ if attributes.key?(:'message_volume')
109
+ self.message_volume = attributes[:'message_volume']
110
+ end
111
+
112
+ if attributes.key?(:'use_case')
113
+ self.use_case = attributes[:'use_case']
114
+ end
115
+
116
+ if attributes.key?(:'use_case_summary')
117
+ self.use_case_summary = attributes[:'use_case_summary']
118
+ end
119
+
120
+ if attributes.key?(:'production_message_content')
121
+ self.production_message_content = attributes[:'production_message_content']
122
+ end
123
+
124
+ if attributes.key?(:'opt_in_workflow')
125
+ self.opt_in_workflow = attributes[:'opt_in_workflow']
126
+ end
127
+
128
+ if attributes.key?(:'additional_information')
129
+ self.additional_information = attributes[:'additional_information']
130
+ end
131
+
132
+ if attributes.key?(:'isv_reseller')
133
+ self.isv_reseller = attributes[:'isv_reseller']
134
+ end
135
+ end
136
+
137
+ # Show invalid properties with the reasons. Usually used together with valid?
138
+ # @return Array for valid properties with the reasons
139
+ def list_invalid_properties
140
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
141
+ invalid_properties = Array.new
142
+ if !@message_volume.nil? && @message_volume > 10000000
143
+ invalid_properties.push('invalid value for "message_volume", must be smaller than or equal to 10000000.')
144
+ end
145
+
146
+ if !@message_volume.nil? && @message_volume < 10
147
+ invalid_properties.push('invalid value for "message_volume", must be greater than or equal to 10.')
148
+ end
149
+
150
+ if !@use_case.nil? && @use_case.to_s.length > 500
151
+ invalid_properties.push('invalid value for "use_case", the character length must be smaller than or equal to 500.')
152
+ end
153
+
154
+ if !@use_case.nil? && @use_case.to_s.length < 0
155
+ invalid_properties.push('invalid value for "use_case", the character length must be great than or equal to 0.')
156
+ end
157
+
158
+ if !@use_case_summary.nil? && @use_case_summary.to_s.length > 500
159
+ invalid_properties.push('invalid value for "use_case_summary", the character length must be smaller than or equal to 500.')
160
+ end
161
+
162
+ if !@use_case_summary.nil? && @use_case_summary.to_s.length < 0
163
+ invalid_properties.push('invalid value for "use_case_summary", the character length must be great than or equal to 0.')
164
+ end
165
+
166
+ if !@production_message_content.nil? && @production_message_content.to_s.length > 500
167
+ invalid_properties.push('invalid value for "production_message_content", the character length must be smaller than or equal to 500.')
168
+ end
169
+
170
+ if !@production_message_content.nil? && @production_message_content.to_s.length < 0
171
+ invalid_properties.push('invalid value for "production_message_content", the character length must be great than or equal to 0.')
172
+ end
173
+
174
+ if !@additional_information.nil? && @additional_information.to_s.length > 500
175
+ invalid_properties.push('invalid value for "additional_information", the character length must be smaller than or equal to 500.')
176
+ end
177
+
178
+ if !@additional_information.nil? && @additional_information.to_s.length < 0
179
+ invalid_properties.push('invalid value for "additional_information", the character length must be great than or equal to 0.')
180
+ end
181
+
182
+ if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
183
+ invalid_properties.push('invalid value for "isv_reseller", the character length must be smaller than or equal to 500.')
184
+ end
185
+
186
+ if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
187
+ invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.')
188
+ end
189
+
190
+ invalid_properties
191
+ end
192
+
193
+ # Check to see if the all the properties in the model are valid
194
+ # @return true if the model is valid
195
+ def valid?
196
+ warn '[DEPRECATED] the `valid?` method is obsolete'
197
+ return false if !@message_volume.nil? && @message_volume > 10000000
198
+ return false if !@message_volume.nil? && @message_volume < 10
199
+ return false if !@use_case.nil? && @use_case.to_s.length > 500
200
+ return false if !@use_case.nil? && @use_case.to_s.length < 0
201
+ return false if !@use_case_summary.nil? && @use_case_summary.to_s.length > 500
202
+ return false if !@use_case_summary.nil? && @use_case_summary.to_s.length < 0
203
+ return false if !@production_message_content.nil? && @production_message_content.to_s.length > 500
204
+ return false if !@production_message_content.nil? && @production_message_content.to_s.length < 0
205
+ return false if !@additional_information.nil? && @additional_information.to_s.length > 500
206
+ return false if !@additional_information.nil? && @additional_information.to_s.length < 0
207
+ return false if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
208
+ return false if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
209
+ true
210
+ end
211
+
212
+ # Custom attribute writer method with validation
213
+ # @param [Object] message_volume Value to be assigned
214
+ def message_volume=(message_volume)
215
+ if message_volume.nil?
216
+ fail ArgumentError, 'message_volume cannot be nil'
217
+ end
218
+
219
+ if message_volume > 10000000
220
+ fail ArgumentError, 'invalid value for "message_volume", must be smaller than or equal to 10000000.'
221
+ end
222
+
223
+ if message_volume < 10
224
+ fail ArgumentError, 'invalid value for "message_volume", must be greater than or equal to 10.'
225
+ end
226
+
227
+ @message_volume = message_volume
228
+ end
229
+
230
+ # Custom attribute writer method with validation
231
+ # @param [Object] use_case Value to be assigned
232
+ def use_case=(use_case)
233
+ if use_case.nil?
234
+ fail ArgumentError, 'use_case cannot be nil'
235
+ end
236
+
237
+ if use_case.to_s.length > 500
238
+ fail ArgumentError, 'invalid value for "use_case", the character length must be smaller than or equal to 500.'
239
+ end
240
+
241
+ if use_case.to_s.length < 0
242
+ fail ArgumentError, 'invalid value for "use_case", the character length must be great than or equal to 0.'
243
+ end
244
+
245
+ @use_case = use_case
246
+ end
247
+
248
+ # Custom attribute writer method with validation
249
+ # @param [Object] use_case_summary Value to be assigned
250
+ def use_case_summary=(use_case_summary)
251
+ if use_case_summary.nil?
252
+ fail ArgumentError, 'use_case_summary cannot be nil'
253
+ end
254
+
255
+ if use_case_summary.to_s.length > 500
256
+ fail ArgumentError, 'invalid value for "use_case_summary", the character length must be smaller than or equal to 500.'
257
+ end
258
+
259
+ if use_case_summary.to_s.length < 0
260
+ fail ArgumentError, 'invalid value for "use_case_summary", the character length must be great than or equal to 0.'
261
+ end
262
+
263
+ @use_case_summary = use_case_summary
264
+ end
265
+
266
+ # Custom attribute writer method with validation
267
+ # @param [Object] production_message_content Value to be assigned
268
+ def production_message_content=(production_message_content)
269
+ if production_message_content.nil?
270
+ fail ArgumentError, 'production_message_content cannot be nil'
271
+ end
272
+
273
+ if production_message_content.to_s.length > 500
274
+ fail ArgumentError, 'invalid value for "production_message_content", the character length must be smaller than or equal to 500.'
275
+ end
276
+
277
+ if production_message_content.to_s.length < 0
278
+ fail ArgumentError, 'invalid value for "production_message_content", the character length must be great than or equal to 0.'
279
+ end
280
+
281
+ @production_message_content = production_message_content
282
+ end
283
+
284
+ # Custom attribute writer method with validation
285
+ # @param [Object] additional_information Value to be assigned
286
+ def additional_information=(additional_information)
287
+ if !additional_information.nil? && additional_information.to_s.length > 500
288
+ fail ArgumentError, 'invalid value for "additional_information", the character length must be smaller than or equal to 500.'
289
+ end
290
+
291
+ if !additional_information.nil? && additional_information.to_s.length < 0
292
+ fail ArgumentError, 'invalid value for "additional_information", the character length must be great than or equal to 0.'
293
+ end
294
+
295
+ @additional_information = additional_information
296
+ end
297
+
298
+ # Custom attribute writer method with validation
299
+ # @param [Object] isv_reseller Value to be assigned
300
+ def isv_reseller=(isv_reseller)
301
+ if !isv_reseller.nil? && isv_reseller.to_s.length > 500
302
+ fail ArgumentError, 'invalid value for "isv_reseller", the character length must be smaller than or equal to 500.'
303
+ end
304
+
305
+ if !isv_reseller.nil? && isv_reseller.to_s.length < 0
306
+ fail ArgumentError, 'invalid value for "isv_reseller", the character length must be great than or equal to 0.'
307
+ end
308
+
309
+ @isv_reseller = isv_reseller
310
+ end
311
+
312
+ # Checks equality by comparing each attribute.
313
+ # @param [Object] Object to be compared
314
+ def ==(o)
315
+ return true if self.equal?(o)
316
+ self.class == o.class &&
317
+ business_address == o.business_address &&
318
+ business_contact == o.business_contact &&
319
+ message_volume == o.message_volume &&
320
+ use_case == o.use_case &&
321
+ use_case_summary == o.use_case_summary &&
322
+ production_message_content == o.production_message_content &&
323
+ opt_in_workflow == o.opt_in_workflow &&
324
+ additional_information == o.additional_information &&
325
+ isv_reseller == o.isv_reseller
326
+ end
327
+
328
+ # @see the `==` method
329
+ # @param [Object] Object to be compared
330
+ def eql?(o)
331
+ self == o
332
+ end
333
+
334
+ # Calculates hash code according to all attributes.
335
+ # @return [Integer] Hash code
336
+ def hash
337
+ [business_address, business_contact, message_volume, use_case, use_case_summary, production_message_content, opt_in_workflow, additional_information, isv_reseller].hash
338
+ end
339
+
340
+ # Builds the object from hash
341
+ # @param [Hash] attributes Model attributes in the form of hash
342
+ # @return [Object] Returns the model itself
343
+ def self.build_from_hash(attributes)
344
+ return nil unless attributes.is_a?(Hash)
345
+ attributes = attributes.transform_keys(&:to_sym)
346
+ transformed_hash = {}
347
+ openapi_types.each_pair do |key, type|
348
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
349
+ transformed_hash["#{key}"] = nil
350
+ elsif type =~ /\AArray<(.*)>/i
351
+ # check to ensure the input is an array given that the attribute
352
+ # is documented as an array but the input is not
353
+ if attributes[attribute_map[key]].is_a?(Array)
354
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
355
+ end
356
+ elsif !attributes[attribute_map[key]].nil?
357
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
358
+ end
359
+ end
360
+ new(transformed_hash)
361
+ end
362
+
363
+ # Deserializes the data based on type
364
+ # @param string type Data type
365
+ # @param string value Value to be deserialized
366
+ # @return [Object] Deserialized data
367
+ def self._deserialize(type, value)
368
+ case type.to_sym
369
+ when :Time
370
+ Time.parse(value)
371
+ when :Date
372
+ Date.parse(value)
373
+ when :String
374
+ value.to_s
375
+ when :Integer
376
+ value.to_i
377
+ when :Float
378
+ value.to_f
379
+ when :Boolean
380
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
381
+ true
382
+ else
383
+ false
384
+ end
385
+ when :Object
386
+ # generic object (usually a Hash), return directly
387
+ value
388
+ when /\AArray<(?<inner_type>.+)>\z/
389
+ inner_type = Regexp.last_match[:inner_type]
390
+ value.map { |v| _deserialize(inner_type, v) }
391
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
392
+ k_type = Regexp.last_match[:k_type]
393
+ v_type = Regexp.last_match[:v_type]
394
+ {}.tap do |hash|
395
+ value.each do |k, v|
396
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
397
+ end
398
+ end
399
+ else # model
400
+ # models (e.g. Pet) or oneOf
401
+ klass = Bandwidth.const_get(type)
402
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
403
+ end
404
+ end
405
+
406
+ # Returns the string representation of the object
407
+ # @return [String] String presentation of the object
408
+ def to_s
409
+ to_hash.to_s
410
+ end
411
+
412
+ # to_body is an alias to to_hash (backward compatibility)
413
+ # @return [Hash] Returns the object in the form of hash
414
+ def to_body
415
+ to_hash
416
+ end
417
+
418
+ # Returns the object in the form of hash
419
+ # @return [Hash] Returns the object in the form of hash
420
+ def to_hash
421
+ hash = {}
422
+ self.class.attribute_map.each_pair do |attr, param|
423
+ value = self.send(attr)
424
+ if value.nil?
425
+ is_nullable = self.class.openapi_nullable.include?(attr)
426
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
427
+ end
428
+
429
+ hash[param] = _to_hash(value)
430
+ end
431
+ hash
432
+ end
433
+
434
+ # Outputs non-array value in the form of hash
435
+ # For object, use to_hash. Otherwise, just return the value
436
+ # @param [Object] value Any valid value
437
+ # @return [Hash] Returns the value in the form of hash
438
+ def _to_hash(value)
439
+ if value.is_a?(Array)
440
+ value.compact.map { |v| _to_hash(v) }
441
+ elsif value.is_a?(Hash)
442
+ {}.tap do |hash|
443
+ value.each { |k, v| hash[k] = _to_hash(v) }
444
+ end
445
+ elsif value.respond_to? :to_hash
446
+ value.to_hash
447
+ else
448
+ value
449
+ end
450
+ end
451
+ end
452
+ end
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 7.0.0
9
+ Generator version: 7.8.0
10
10
 
11
11
  =end
12
12
 
@@ -14,13 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class TranscriptionList
18
- attr_accessor :transcripts
17
+ class TfvSubmissionWrapper
18
+ attr_accessor :submission
19
19
 
20
20
  # Attribute mapping from ruby-style variable name to JSON key.
21
21
  def self.attribute_map
22
22
  {
23
- :'transcripts' => :'transcripts'
23
+ :'submission' => :'submission'
24
24
  }
25
25
  end
26
26
 
@@ -32,7 +32,7 @@ module Bandwidth
32
32
  # Attribute type mapping.
33
33
  def self.openapi_types
34
34
  {
35
- :'transcripts' => :'Array<Transcription>'
35
+ :'submission' => :'VerificationUpdateRequest'
36
36
  }
37
37
  end
38
38
 
@@ -46,21 +46,19 @@ module Bandwidth
46
46
  # @param [Hash] attributes Model attributes in the form of hash
47
47
  def initialize(attributes = {})
48
48
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::TranscriptionList` initialize method'
49
+ fail ArgumentError, 'The input argument (attributes) must be a hash in `Bandwidth::TfvSubmissionWrapper` initialize method'
50
50
  end
51
51
 
52
52
  # check to see if the attribute exists and convert string to symbol for hash key
53
53
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
54
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TranscriptionList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TfvSubmissionWrapper`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
56
  end
57
57
  h[k.to_sym] = v
58
58
  }
59
59
 
60
- if attributes.key?(:'transcripts')
61
- if (value = attributes[:'transcripts']).is_a?(Array)
62
- self.transcripts = value
63
- end
60
+ if attributes.key?(:'submission')
61
+ self.submission = attributes[:'submission']
64
62
  end
65
63
  end
66
64
 
@@ -84,7 +82,7 @@ module Bandwidth
84
82
  def ==(o)
85
83
  return true if self.equal?(o)
86
84
  self.class == o.class &&
87
- transcripts == o.transcripts
85
+ submission == o.submission
88
86
  end
89
87
 
90
88
  # @see the `==` method
@@ -96,7 +94,7 @@ module Bandwidth
96
94
  # Calculates hash code according to all attributes.
97
95
  # @return [Integer] Hash code
98
96
  def hash
99
- [transcripts].hash
97
+ [submission].hash
100
98
  end
101
99
 
102
100
  # Builds the object from hash
@@ -161,7 +159,7 @@ module Bandwidth
161
159
  else # model
162
160
  # models (e.g. Pet) or oneOf
163
161
  klass = Bandwidth.const_get(type)
164
- klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
162
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
163
  end
166
164
  end
167
165