bandwidth-sdk 17.0.1 → 17.1.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.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +18 -0
  4. data/bandwidth-sdk.gemspec +1 -2
  5. data/bandwidth.yml +7 -0
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +198 -387
  8. data/coverage/index.html +5842 -7703
  9. data/custom_templates/README.mustache +4 -1
  10. data/custom_templates/api_client.mustache +254 -0
  11. data/custom_templates/configuration.mustache +545 -0
  12. data/custom_templates/gem.mustache +2 -0
  13. data/docs/CallsApi.md +20 -5
  14. data/docs/ConferencesApi.md +36 -9
  15. data/docs/MFAApi.md +12 -3
  16. data/docs/MediaApi.md +16 -4
  17. data/docs/MessagesApi.md +8 -2
  18. data/docs/MultiChannelApi.md +4 -1
  19. data/docs/PhoneNumberLookupApi.md +12 -3
  20. data/docs/RecordingsApi.md +40 -10
  21. data/docs/StatisticsApi.md +4 -1
  22. data/docs/TollFreeVerificationApi.md +36 -9
  23. data/docs/TranscriptionsApi.md +12 -3
  24. data/lib/bandwidth-sdk/api/calls_api.rb +6 -6
  25. data/lib/bandwidth-sdk/api/conferences_api.rb +10 -10
  26. data/lib/bandwidth-sdk/api/media_api.rb +5 -5
  27. data/lib/bandwidth-sdk/api/messages_api.rb +3 -3
  28. data/lib/bandwidth-sdk/api/mfa_api.rb +4 -4
  29. data/lib/bandwidth-sdk/api/multi_channel_api.rb +2 -2
  30. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +4 -4
  31. data/lib/bandwidth-sdk/api/recordings_api.rb +11 -11
  32. data/lib/bandwidth-sdk/api/statistics_api.rb +2 -2
  33. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +13 -13
  34. data/lib/bandwidth-sdk/api/transcriptions_api.rb +4 -4
  35. data/lib/bandwidth-sdk/api_client.rb +9 -5
  36. data/lib/bandwidth-sdk/api_error.rb +1 -1
  37. data/lib/bandwidth-sdk/api_model_base.rb +88 -0
  38. data/lib/bandwidth-sdk/configuration.rb +50 -1
  39. data/lib/bandwidth-sdk/models/account_statistics.rb +11 -78
  40. data/lib/bandwidth-sdk/models/additional_denial_reason.rb +41 -78
  41. data/lib/bandwidth-sdk/models/address.rb +23 -90
  42. data/lib/bandwidth-sdk/models/answer_callback.rb +11 -78
  43. data/lib/bandwidth-sdk/models/async_lookup_request.rb +11 -78
  44. data/lib/bandwidth-sdk/models/blocked_webhook.rb +13 -80
  45. data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +11 -78
  46. data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +11 -78
  47. data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +1 -1
  48. data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +1 -1
  49. data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
  50. data/lib/bandwidth-sdk/models/call_recording_metadata.rb +11 -78
  51. data/lib/bandwidth-sdk/models/call_state.rb +11 -78
  52. data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
  53. data/lib/bandwidth-sdk/models/call_transcription.rb +11 -78
  54. data/lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb +1 -1
  55. data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +11 -78
  56. data/lib/bandwidth-sdk/models/call_transcription_response.rb +11 -78
  57. data/lib/bandwidth-sdk/models/call_transcription_track_enum.rb +1 -1
  58. data/lib/bandwidth-sdk/models/callback.rb +1 -1
  59. data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
  60. data/lib/bandwidth-sdk/models/card_width_enum.rb +1 -1
  61. data/lib/bandwidth-sdk/models/code_request.rb +11 -78
  62. data/lib/bandwidth-sdk/models/completed_lookup_status_enum.rb +1 -1
  63. data/lib/bandwidth-sdk/models/conference.rb +11 -78
  64. data/lib/bandwidth-sdk/models/conference_completed_callback.rb +11 -78
  65. data/lib/bandwidth-sdk/models/conference_created_callback.rb +11 -78
  66. data/lib/bandwidth-sdk/models/conference_member.rb +11 -78
  67. data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +11 -78
  68. data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +11 -78
  69. data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +11 -78
  70. data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +11 -78
  71. data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +11 -78
  72. data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
  73. data/lib/bandwidth-sdk/models/contact.rb +19 -86
  74. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb +11 -78
  75. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response_data.rb +11 -78
  76. data/lib/bandwidth-sdk/models/create_call.rb +41 -78
  77. data/lib/bandwidth-sdk/models/create_call_response.rb +81 -78
  78. data/lib/bandwidth-sdk/models/create_message_request_error.rb +31 -78
  79. data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +11 -78
  80. data/lib/bandwidth-sdk/models/create_sync_lookup_response.rb +11 -78
  81. data/lib/bandwidth-sdk/models/create_sync_lookup_response_data.rb +11 -78
  82. data/lib/bandwidth-sdk/models/deactivation_event_enum.rb +1 -1
  83. data/lib/bandwidth-sdk/models/disconnect_callback.rb +11 -78
  84. data/lib/bandwidth-sdk/models/diversion.rb +11 -78
  85. data/lib/bandwidth-sdk/models/dtmf_callback.rb +11 -78
  86. data/lib/bandwidth-sdk/models/error.rb +11 -78
  87. data/lib/bandwidth-sdk/models/error_object.rb +41 -78
  88. data/lib/bandwidth-sdk/models/error_source.rb +11 -78
  89. data/lib/bandwidth-sdk/models/failure_webhook.rb +13 -80
  90. data/lib/bandwidth-sdk/models/field_error.rb +11 -78
  91. data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
  92. data/lib/bandwidth-sdk/models/gather_callback.rb +11 -78
  93. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response.rb +11 -78
  94. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response_data.rb +11 -78
  95. data/lib/bandwidth-sdk/models/in_progress_lookup_status_enum.rb +1 -1
  96. data/lib/bandwidth-sdk/models/inbound_callback.rb +61 -78
  97. data/lib/bandwidth-sdk/models/inbound_callback_message.rb +81 -78
  98. data/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb +1 -1
  99. data/lib/bandwidth-sdk/models/initiate_callback.rb +11 -78
  100. data/lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb +1 -1
  101. data/lib/bandwidth-sdk/models/line_type_enum.rb +1 -1
  102. data/lib/bandwidth-sdk/models/link.rb +11 -78
  103. data/lib/bandwidth-sdk/models/link_schema.rb +11 -78
  104. data/lib/bandwidth-sdk/models/links_object.rb +11 -78
  105. data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
  106. data/lib/bandwidth-sdk/models/list_message_item.rb +11 -78
  107. data/lib/bandwidth-sdk/models/lookup_error_response.rb +11 -78
  108. data/lib/bandwidth-sdk/models/lookup_error_schema.rb +11 -78
  109. data/lib/bandwidth-sdk/models/lookup_error_schema_meta.rb +11 -78
  110. data/lib/bandwidth-sdk/models/lookup_result.rb +11 -78
  111. data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +11 -78
  112. data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +11 -78
  113. data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
  114. data/lib/bandwidth-sdk/models/machine_detection_result.rb +11 -78
  115. data/lib/bandwidth-sdk/models/media.rb +11 -78
  116. data/lib/bandwidth-sdk/models/message.rb +11 -78
  117. data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
  118. data/lib/bandwidth-sdk/models/message_request.rb +31 -78
  119. data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
  120. data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
  121. data/lib/bandwidth-sdk/models/messages_list.rb +11 -78
  122. data/lib/bandwidth-sdk/models/messaging_code_response.rb +11 -78
  123. data/lib/bandwidth-sdk/models/messaging_request_error.rb +31 -78
  124. data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +11 -78
  125. data/lib/bandwidth-sdk/models/mfa_request_error.rb +11 -78
  126. data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +11 -78
  127. data/lib/bandwidth-sdk/models/mms_message_content.rb +11 -78
  128. data/lib/bandwidth-sdk/models/mms_message_content_file.rb +11 -78
  129. data/lib/bandwidth-sdk/models/multi_channel_action.rb +3 -4
  130. data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +41 -78
  131. data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_object.rb +51 -78
  132. data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_response_object.rb +61 -78
  133. data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb +41 -78
  134. data/lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb +21 -78
  135. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb +51 -78
  136. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object_all_of_content.rb +3 -4
  137. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb +61 -78
  138. data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +3 -4
  139. data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +3 -4
  140. data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb +51 -78
  141. data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb +61 -78
  142. data/lib/bandwidth-sdk/models/multi_channel_error.rb +11 -78
  143. data/lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb +1 -1
  144. data/lib/bandwidth-sdk/models/multi_channel_message_content.rb +11 -78
  145. data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +21 -78
  146. data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +41 -78
  147. data/lib/bandwidth-sdk/models/opt_in_workflow.rb +25 -82
  148. data/lib/bandwidth-sdk/models/page_info.rb +11 -78
  149. data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
  150. data/lib/bandwidth-sdk/models/product_type_enum.rb +1 -1
  151. data/lib/bandwidth-sdk/models/rbm_action_base.rb +21 -78
  152. data/lib/bandwidth-sdk/models/rbm_action_dial.rb +31 -78
  153. data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +21 -78
  154. data/lib/bandwidth-sdk/models/rbm_action_type_enum.rb +1 -1
  155. data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +41 -78
  156. data/lib/bandwidth-sdk/models/rbm_card_content.rb +11 -78
  157. data/lib/bandwidth-sdk/models/rbm_card_content_media.rb +21 -78
  158. data/lib/bandwidth-sdk/models/rbm_location_response.rb +11 -78
  159. data/lib/bandwidth-sdk/models/rbm_media_height_enum.rb +1 -1
  160. data/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +21 -78
  161. data/lib/bandwidth-sdk/models/rbm_message_content_file.rb +11 -78
  162. data/lib/bandwidth-sdk/models/rbm_message_content_rich_card.rb +3 -4
  163. data/lib/bandwidth-sdk/models/rbm_message_content_text.rb +11 -78
  164. data/lib/bandwidth-sdk/models/rbm_message_media.rb +21 -78
  165. data/lib/bandwidth-sdk/models/rbm_standalone_card.rb +41 -78
  166. data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +11 -78
  167. data/lib/bandwidth-sdk/models/recording_available_callback.rb +11 -78
  168. data/lib/bandwidth-sdk/models/recording_complete_callback.rb +11 -78
  169. data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
  170. data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +11 -78
  171. data/lib/bandwidth-sdk/models/recording_transcriptions.rb +11 -78
  172. data/lib/bandwidth-sdk/models/redirect_callback.rb +11 -78
  173. data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
  174. data/lib/bandwidth-sdk/models/sms_message_content.rb +11 -78
  175. data/lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb +1 -1
  176. data/lib/bandwidth-sdk/models/status_callback.rb +61 -78
  177. data/lib/bandwidth-sdk/models/status_callback_message.rb +81 -78
  178. data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +6 -6
  179. data/lib/bandwidth-sdk/models/stir_shaken.rb +11 -78
  180. data/lib/bandwidth-sdk/models/sync_lookup_request.rb +11 -78
  181. data/lib/bandwidth-sdk/models/telephone_number.rb +11 -78
  182. data/lib/bandwidth-sdk/models/tfv_basic_authentication.rb +11 -78
  183. data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +1 -1
  184. data/lib/bandwidth-sdk/models/tfv_error.rb +11 -78
  185. data/lib/bandwidth-sdk/models/tfv_status.rb +13 -80
  186. data/lib/bandwidth-sdk/models/tfv_status_enum.rb +1 -1
  187. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +21 -88
  188. data/lib/bandwidth-sdk/models/tfv_submission_wrapper.rb +11 -78
  189. data/lib/bandwidth-sdk/models/thumbnail_alignment_enum.rb +1 -1
  190. data/lib/bandwidth-sdk/models/transcribe_recording.rb +11 -78
  191. data/lib/bandwidth-sdk/models/transcription.rb +11 -78
  192. data/lib/bandwidth-sdk/models/transcription_available_callback.rb +11 -78
  193. data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +11 -78
  194. data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +11 -78
  195. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +11 -78
  196. data/lib/bandwidth-sdk/models/update_call.rb +11 -78
  197. data/lib/bandwidth-sdk/models/update_call_recording.rb +21 -78
  198. data/lib/bandwidth-sdk/models/update_conference.rb +11 -78
  199. data/lib/bandwidth-sdk/models/update_conference_member.rb +11 -78
  200. data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +13 -80
  201. data/lib/bandwidth-sdk/models/verification_request.rb +51 -88
  202. data/lib/bandwidth-sdk/models/verification_update_request.rb +51 -88
  203. data/lib/bandwidth-sdk/models/verification_webhook.rb +13 -80
  204. data/lib/bandwidth-sdk/models/verify_code_request.rb +13 -80
  205. data/lib/bandwidth-sdk/models/verify_code_response.rb +11 -78
  206. data/lib/bandwidth-sdk/models/voice_api_error.rb +11 -78
  207. data/lib/bandwidth-sdk/models/voice_code_response.rb +11 -78
  208. data/lib/bandwidth-sdk/models/webhook_subscription.rb +13 -80
  209. data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +11 -78
  210. data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +15 -82
  211. data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +1 -1
  212. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +21 -78
  213. data/lib/bandwidth-sdk/version.rb +2 -2
  214. data/lib/bandwidth-sdk.rb +2 -1
  215. data/openapitools.json +1 -1
  216. data/spec/smoke/calls_api_spec.rb +50 -76
  217. data/spec/smoke/conferences_api_spec.rb +7 -5
  218. data/spec/smoke/media_api_spec.rb +4 -2
  219. data/spec/smoke/messages_api_spec.rb +9 -4
  220. data/spec/smoke/mfa_api_spec.rb +9 -4
  221. data/spec/smoke/multi_channel_api_spec.rb +4 -2
  222. data/spec/smoke/phone_number_lookup_api_spec.rb +6 -4
  223. data/spec/smoke/recordings_api_spec.rb +7 -33
  224. data/spec/smoke/statistics_api_spec.rb +16 -8
  225. data/spec/smoke/toll_free_verification_api_spec.rb +6 -4
  226. data/spec/smoke/transcriptions_api_spec.rb +7 -5
  227. data/spec/spec_helper.rb +2 -0
  228. data/spec/unit/models/verify_code_request_spec.rb +1 -1
  229. metadata +5 -2
@@ -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
- Generator version: 7.8.0
9
+ Generator version: 7.17.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class VerificationRequest
17
+ class VerificationRequest < ApiModelBase
18
18
  attr_accessor :business_address
19
19
 
20
20
  attr_accessor :business_contact
@@ -109,9 +109,14 @@ module Bandwidth
109
109
  }
110
110
  end
111
111
 
112
+ # Returns attribute mapping this model knows about
113
+ def self.acceptable_attribute_map
114
+ attribute_map
115
+ end
116
+
112
117
  # Returns all the JSON keys this model knows about
113
118
  def self.acceptable_attributes
114
- attribute_map.values
119
+ acceptable_attribute_map.values
115
120
  end
116
121
 
117
122
  # Attribute type mapping.
@@ -158,9 +163,10 @@ module Bandwidth
158
163
  end
159
164
 
160
165
  # check to see if the attribute exists and convert string to symbol for hash key
166
+ acceptable_attribute_map = self.class.acceptable_attribute_map
161
167
  attributes = attributes.each_with_object({}) { |(k, v), h|
162
- if (!self.class.attribute_map.key?(k.to_sym))
163
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::VerificationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
168
+ if (!acceptable_attribute_map.key?(k.to_sym))
169
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::VerificationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
164
170
  end
165
171
  h[k.to_sym] = v
166
172
  }
@@ -302,7 +308,7 @@ module Bandwidth
302
308
  end
303
309
 
304
310
  if @use_case.to_s.length < 0
305
- invalid_properties.push('invalid value for "use_case", the character length must be great than or equal to 0.')
311
+ invalid_properties.push('invalid value for "use_case", the character length must be greater than or equal to 0.')
306
312
  end
307
313
 
308
314
  if @use_case_summary.nil?
@@ -314,7 +320,7 @@ module Bandwidth
314
320
  end
315
321
 
316
322
  if @use_case_summary.to_s.length < 0
317
- invalid_properties.push('invalid value for "use_case_summary", the character length must be great than or equal to 0.')
323
+ invalid_properties.push('invalid value for "use_case_summary", the character length must be greater than or equal to 0.')
318
324
  end
319
325
 
320
326
  if @production_message_content.nil?
@@ -326,7 +332,7 @@ module Bandwidth
326
332
  end
327
333
 
328
334
  if @production_message_content.to_s.length < 0
329
- invalid_properties.push('invalid value for "production_message_content", the character length must be great than or equal to 0.')
335
+ invalid_properties.push('invalid value for "production_message_content", the character length must be greater than or equal to 0.')
330
336
  end
331
337
 
332
338
  if @opt_in_workflow.nil?
@@ -338,7 +344,7 @@ module Bandwidth
338
344
  end
339
345
 
340
346
  if !@additional_information.nil? && @additional_information.to_s.length < 0
341
- invalid_properties.push('invalid value for "additional_information", the character length must be great than or equal to 0.')
347
+ invalid_properties.push('invalid value for "additional_information", the character length must be greater than or equal to 0.')
342
348
  end
343
349
 
344
350
  if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
@@ -346,7 +352,7 @@ module Bandwidth
346
352
  end
347
353
 
348
354
  if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
349
- invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.')
355
+ invalid_properties.push('invalid value for "isv_reseller", the character length must be greater than or equal to 0.')
350
356
  end
351
357
 
352
358
  if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
@@ -391,6 +397,26 @@ module Bandwidth
391
397
  true
392
398
  end
393
399
 
400
+ # Custom attribute writer method with validation
401
+ # @param [Object] business_address Value to be assigned
402
+ def business_address=(business_address)
403
+ if business_address.nil?
404
+ fail ArgumentError, 'business_address cannot be nil'
405
+ end
406
+
407
+ @business_address = business_address
408
+ end
409
+
410
+ # Custom attribute writer method with validation
411
+ # @param [Object] business_contact Value to be assigned
412
+ def business_contact=(business_contact)
413
+ if business_contact.nil?
414
+ fail ArgumentError, 'business_contact cannot be nil'
415
+ end
416
+
417
+ @business_contact = business_contact
418
+ end
419
+
394
420
  # Custom attribute writer method with validation
395
421
  # @param [Object] message_volume Value to be assigned
396
422
  def message_volume=(message_volume)
@@ -439,7 +465,7 @@ module Bandwidth
439
465
  end
440
466
 
441
467
  if use_case.to_s.length < 0
442
- fail ArgumentError, 'invalid value for "use_case", the character length must be great than or equal to 0.'
468
+ fail ArgumentError, 'invalid value for "use_case", the character length must be greater than or equal to 0.'
443
469
  end
444
470
 
445
471
  @use_case = use_case
@@ -457,7 +483,7 @@ module Bandwidth
457
483
  end
458
484
 
459
485
  if use_case_summary.to_s.length < 0
460
- fail ArgumentError, 'invalid value for "use_case_summary", the character length must be great than or equal to 0.'
486
+ fail ArgumentError, 'invalid value for "use_case_summary", the character length must be greater than or equal to 0.'
461
487
  end
462
488
 
463
489
  @use_case_summary = use_case_summary
@@ -475,12 +501,22 @@ module Bandwidth
475
501
  end
476
502
 
477
503
  if production_message_content.to_s.length < 0
478
- fail ArgumentError, 'invalid value for "production_message_content", the character length must be great than or equal to 0.'
504
+ fail ArgumentError, 'invalid value for "production_message_content", the character length must be greater than or equal to 0.'
479
505
  end
480
506
 
481
507
  @production_message_content = production_message_content
482
508
  end
483
509
 
510
+ # Custom attribute writer method with validation
511
+ # @param [Object] opt_in_workflow Value to be assigned
512
+ def opt_in_workflow=(opt_in_workflow)
513
+ if opt_in_workflow.nil?
514
+ fail ArgumentError, 'opt_in_workflow cannot be nil'
515
+ end
516
+
517
+ @opt_in_workflow = opt_in_workflow
518
+ end
519
+
484
520
  # Custom attribute writer method with validation
485
521
  # @param [Object] additional_information Value to be assigned
486
522
  def additional_information=(additional_information)
@@ -489,7 +525,7 @@ module Bandwidth
489
525
  end
490
526
 
491
527
  if !additional_information.nil? && additional_information.to_s.length < 0
492
- fail ArgumentError, 'invalid value for "additional_information", the character length must be great than or equal to 0.'
528
+ fail ArgumentError, 'invalid value for "additional_information", the character length must be greater than or equal to 0.'
493
529
  end
494
530
 
495
531
  @additional_information = additional_information
@@ -503,7 +539,7 @@ module Bandwidth
503
539
  end
504
540
 
505
541
  if !isv_reseller.nil? && isv_reseller.to_s.length < 0
506
- fail ArgumentError, 'invalid value for "isv_reseller", the character length must be great than or equal to 0.'
542
+ fail ArgumentError, 'invalid value for "isv_reseller", the character length must be greater than or equal to 0.'
507
543
  end
508
544
 
509
545
  @isv_reseller = isv_reseller
@@ -589,61 +625,6 @@ module Bandwidth
589
625
  new(transformed_hash)
590
626
  end
591
627
 
592
- # Deserializes the data based on type
593
- # @param string type Data type
594
- # @param string value Value to be deserialized
595
- # @return [Object] Deserialized data
596
- def self._deserialize(type, value)
597
- case type.to_sym
598
- when :Time
599
- Time.parse(value)
600
- when :Date
601
- Date.parse(value)
602
- when :String
603
- value.to_s
604
- when :Integer
605
- value.to_i
606
- when :Float
607
- value.to_f
608
- when :Boolean
609
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
610
- true
611
- else
612
- false
613
- end
614
- when :Object
615
- # generic object (usually a Hash), return directly
616
- value
617
- when /\AArray<(?<inner_type>.+)>\z/
618
- inner_type = Regexp.last_match[:inner_type]
619
- value.map { |v| _deserialize(inner_type, v) }
620
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
621
- k_type = Regexp.last_match[:k_type]
622
- v_type = Regexp.last_match[:v_type]
623
- {}.tap do |hash|
624
- value.each do |k, v|
625
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
626
- end
627
- end
628
- else # model
629
- # models (e.g. Pet) or oneOf
630
- klass = Bandwidth.const_get(type)
631
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
632
- end
633
- end
634
-
635
- # Returns the string representation of the object
636
- # @return [String] String presentation of the object
637
- def to_s
638
- to_hash.to_s
639
- end
640
-
641
- # to_body is an alias to to_hash (backward compatibility)
642
- # @return [Hash] Returns the object in the form of hash
643
- def to_body
644
- to_hash
645
- end
646
-
647
628
  # Returns the object in the form of hash
648
629
  # @return [Hash] Returns the object in the form of hash
649
630
  def to_hash
@@ -659,23 +640,5 @@ module Bandwidth
659
640
  end
660
641
  hash
661
642
  end
662
-
663
- # Outputs non-array value in the form of hash
664
- # For object, use to_hash. Otherwise, just return the value
665
- # @param [Object] value Any valid value
666
- # @return [Hash] Returns the value in the form of hash
667
- def _to_hash(value)
668
- if value.is_a?(Array)
669
- value.compact.map { |v| _to_hash(v) }
670
- elsif value.is_a?(Hash)
671
- {}.tap do |hash|
672
- value.each { |k, v| hash[k] = _to_hash(v) }
673
- end
674
- elsif value.respond_to? :to_hash
675
- value.to_hash
676
- else
677
- value
678
- end
679
- end
680
643
  end
681
644
  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
- Generator version: 7.8.0
9
+ Generator version: 7.17.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class VerificationUpdateRequest
17
+ class VerificationUpdateRequest < ApiModelBase
18
18
  attr_accessor :business_address
19
19
 
20
20
  attr_accessor :business_contact
@@ -106,9 +106,14 @@ module Bandwidth
106
106
  }
107
107
  end
108
108
 
109
+ # Returns attribute mapping this model knows about
110
+ def self.acceptable_attribute_map
111
+ attribute_map
112
+ end
113
+
109
114
  # Returns all the JSON keys this model knows about
110
115
  def self.acceptable_attributes
111
- attribute_map.values
116
+ acceptable_attribute_map.values
112
117
  end
113
118
 
114
119
  # Attribute type mapping.
@@ -154,9 +159,10 @@ module Bandwidth
154
159
  end
155
160
 
156
161
  # check to see if the attribute exists and convert string to symbol for hash key
162
+ acceptable_attribute_map = self.class.acceptable_attribute_map
157
163
  attributes = attributes.each_with_object({}) { |(k, v), h|
158
- if (!self.class.attribute_map.key?(k.to_sym))
159
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::VerificationUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
164
+ if (!acceptable_attribute_map.key?(k.to_sym))
165
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::VerificationUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
160
166
  end
161
167
  h[k.to_sym] = v
162
168
  }
@@ -278,7 +284,7 @@ module Bandwidth
278
284
  end
279
285
 
280
286
  if @use_case.to_s.length < 0
281
- invalid_properties.push('invalid value for "use_case", the character length must be great than or equal to 0.')
287
+ invalid_properties.push('invalid value for "use_case", the character length must be greater than or equal to 0.')
282
288
  end
283
289
 
284
290
  if @use_case_summary.nil?
@@ -290,7 +296,7 @@ module Bandwidth
290
296
  end
291
297
 
292
298
  if @use_case_summary.to_s.length < 0
293
- invalid_properties.push('invalid value for "use_case_summary", the character length must be great than or equal to 0.')
299
+ invalid_properties.push('invalid value for "use_case_summary", the character length must be greater than or equal to 0.')
294
300
  end
295
301
 
296
302
  if @production_message_content.nil?
@@ -302,7 +308,7 @@ module Bandwidth
302
308
  end
303
309
 
304
310
  if @production_message_content.to_s.length < 0
305
- invalid_properties.push('invalid value for "production_message_content", the character length must be great than or equal to 0.')
311
+ invalid_properties.push('invalid value for "production_message_content", the character length must be greater than or equal to 0.')
306
312
  end
307
313
 
308
314
  if @opt_in_workflow.nil?
@@ -314,7 +320,7 @@ module Bandwidth
314
320
  end
315
321
 
316
322
  if !@additional_information.nil? && @additional_information.to_s.length < 0
317
- invalid_properties.push('invalid value for "additional_information", the character length must be great than or equal to 0.')
323
+ invalid_properties.push('invalid value for "additional_information", the character length must be greater than or equal to 0.')
318
324
  end
319
325
 
320
326
  if !@isv_reseller.nil? && @isv_reseller.to_s.length > 500
@@ -322,7 +328,7 @@ module Bandwidth
322
328
  end
323
329
 
324
330
  if !@isv_reseller.nil? && @isv_reseller.to_s.length < 0
325
- invalid_properties.push('invalid value for "isv_reseller", the character length must be great than or equal to 0.')
331
+ invalid_properties.push('invalid value for "isv_reseller", the character length must be greater than or equal to 0.')
326
332
  end
327
333
 
328
334
  if !@business_registration_number.nil? && @business_registration_number.to_s.length > 500
@@ -364,6 +370,26 @@ module Bandwidth
364
370
  true
365
371
  end
366
372
 
373
+ # Custom attribute writer method with validation
374
+ # @param [Object] business_address Value to be assigned
375
+ def business_address=(business_address)
376
+ if business_address.nil?
377
+ fail ArgumentError, 'business_address cannot be nil'
378
+ end
379
+
380
+ @business_address = business_address
381
+ end
382
+
383
+ # Custom attribute writer method with validation
384
+ # @param [Object] business_contact Value to be assigned
385
+ def business_contact=(business_contact)
386
+ if business_contact.nil?
387
+ fail ArgumentError, 'business_contact cannot be nil'
388
+ end
389
+
390
+ @business_contact = business_contact
391
+ end
392
+
367
393
  # Custom attribute writer method with validation
368
394
  # @param [Object] message_volume Value to be assigned
369
395
  def message_volume=(message_volume)
@@ -394,7 +420,7 @@ module Bandwidth
394
420
  end
395
421
 
396
422
  if use_case.to_s.length < 0
397
- fail ArgumentError, 'invalid value for "use_case", the character length must be great than or equal to 0.'
423
+ fail ArgumentError, 'invalid value for "use_case", the character length must be greater than or equal to 0.'
398
424
  end
399
425
 
400
426
  @use_case = use_case
@@ -412,7 +438,7 @@ module Bandwidth
412
438
  end
413
439
 
414
440
  if use_case_summary.to_s.length < 0
415
- fail ArgumentError, 'invalid value for "use_case_summary", the character length must be great than or equal to 0.'
441
+ fail ArgumentError, 'invalid value for "use_case_summary", the character length must be greater than or equal to 0.'
416
442
  end
417
443
 
418
444
  @use_case_summary = use_case_summary
@@ -430,12 +456,22 @@ module Bandwidth
430
456
  end
431
457
 
432
458
  if production_message_content.to_s.length < 0
433
- fail ArgumentError, 'invalid value for "production_message_content", the character length must be great than or equal to 0.'
459
+ fail ArgumentError, 'invalid value for "production_message_content", the character length must be greater than or equal to 0.'
434
460
  end
435
461
 
436
462
  @production_message_content = production_message_content
437
463
  end
438
464
 
465
+ # Custom attribute writer method with validation
466
+ # @param [Object] opt_in_workflow Value to be assigned
467
+ def opt_in_workflow=(opt_in_workflow)
468
+ if opt_in_workflow.nil?
469
+ fail ArgumentError, 'opt_in_workflow cannot be nil'
470
+ end
471
+
472
+ @opt_in_workflow = opt_in_workflow
473
+ end
474
+
439
475
  # Custom attribute writer method with validation
440
476
  # @param [Object] additional_information Value to be assigned
441
477
  def additional_information=(additional_information)
@@ -444,7 +480,7 @@ module Bandwidth
444
480
  end
445
481
 
446
482
  if !additional_information.nil? && additional_information.to_s.length < 0
447
- fail ArgumentError, 'invalid value for "additional_information", the character length must be great than or equal to 0.'
483
+ fail ArgumentError, 'invalid value for "additional_information", the character length must be greater than or equal to 0.'
448
484
  end
449
485
 
450
486
  @additional_information = additional_information
@@ -458,7 +494,7 @@ module Bandwidth
458
494
  end
459
495
 
460
496
  if !isv_reseller.nil? && isv_reseller.to_s.length < 0
461
- fail ArgumentError, 'invalid value for "isv_reseller", the character length must be great than or equal to 0.'
497
+ fail ArgumentError, 'invalid value for "isv_reseller", the character length must be greater than or equal to 0.'
462
498
  end
463
499
 
464
500
  @isv_reseller = isv_reseller
@@ -543,61 +579,6 @@ module Bandwidth
543
579
  new(transformed_hash)
544
580
  end
545
581
 
546
- # Deserializes the data based on type
547
- # @param string type Data type
548
- # @param string value Value to be deserialized
549
- # @return [Object] Deserialized data
550
- def self._deserialize(type, value)
551
- case type.to_sym
552
- when :Time
553
- Time.parse(value)
554
- when :Date
555
- Date.parse(value)
556
- when :String
557
- value.to_s
558
- when :Integer
559
- value.to_i
560
- when :Float
561
- value.to_f
562
- when :Boolean
563
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
564
- true
565
- else
566
- false
567
- end
568
- when :Object
569
- # generic object (usually a Hash), return directly
570
- value
571
- when /\AArray<(?<inner_type>.+)>\z/
572
- inner_type = Regexp.last_match[:inner_type]
573
- value.map { |v| _deserialize(inner_type, v) }
574
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
575
- k_type = Regexp.last_match[:k_type]
576
- v_type = Regexp.last_match[:v_type]
577
- {}.tap do |hash|
578
- value.each do |k, v|
579
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
580
- end
581
- end
582
- else # model
583
- # models (e.g. Pet) or oneOf
584
- klass = Bandwidth.const_get(type)
585
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
586
- end
587
- end
588
-
589
- # Returns the string representation of the object
590
- # @return [String] String presentation of the object
591
- def to_s
592
- to_hash.to_s
593
- end
594
-
595
- # to_body is an alias to to_hash (backward compatibility)
596
- # @return [Hash] Returns the object in the form of hash
597
- def to_body
598
- to_hash
599
- end
600
-
601
582
  # Returns the object in the form of hash
602
583
  # @return [Hash] Returns the object in the form of hash
603
584
  def to_hash
@@ -613,23 +594,5 @@ module Bandwidth
613
594
  end
614
595
  hash
615
596
  end
616
-
617
- # Outputs non-array value in the form of hash
618
- # For object, use to_hash. Otherwise, just return the value
619
- # @param [Object] value Any valid value
620
- # @return [Hash] Returns the value in the form of hash
621
- def _to_hash(value)
622
- if value.is_a?(Array)
623
- value.compact.map { |v| _to_hash(v) }
624
- elsif value.is_a?(Hash)
625
- {}.tap do |hash|
626
- value.each { |k, v| hash[k] = _to_hash(v) }
627
- end
628
- elsif value.respond_to? :to_hash
629
- value.to_hash
630
- else
631
- value
632
- end
633
- end
634
597
  end
635
598
  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
- Generator version: 7.8.0
9
+ Generator version: 7.17.0
10
10
 
11
11
  =end
12
12
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class VerificationWebhook
17
+ class VerificationWebhook < ApiModelBase
18
18
  # User's account ID.
19
19
  attr_accessor :account_id
20
20
 
@@ -58,9 +58,14 @@ module Bandwidth
58
58
  }
59
59
  end
60
60
 
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
61
66
  # Returns all the JSON keys this model knows about
62
67
  def self.acceptable_attributes
63
- attribute_map.values
68
+ acceptable_attribute_map.values
64
69
  end
65
70
 
66
71
  # Attribute type mapping.
@@ -87,9 +92,10 @@ module Bandwidth
87
92
  end
88
93
 
89
94
  # check to see if the attribute exists and convert string to symbol for hash key
95
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
96
  attributes = attributes.each_with_object({}) { |(k, v), h|
91
- if (!self.class.attribute_map.key?(k.to_sym))
92
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::VerificationWebhook`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ if (!acceptable_attribute_map.key?(k.to_sym))
98
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::VerificationWebhook`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
99
  end
94
100
  h[k.to_sym] = v
95
101
  }
@@ -121,7 +127,7 @@ module Bandwidth
121
127
  end
122
128
 
123
129
  if !@phone_number.nil? && @phone_number.to_s.length < 12
124
- invalid_properties.push('invalid value for "phone_number", the character length must be great than or equal to 12.')
130
+ invalid_properties.push('invalid value for "phone_number", the character length must be greater than or equal to 12.')
125
131
  end
126
132
 
127
133
  pattern = Regexp.new(/^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$/)
@@ -154,7 +160,7 @@ module Bandwidth
154
160
  end
155
161
 
156
162
  if phone_number.to_s.length < 12
157
- fail ArgumentError, 'invalid value for "phone_number", the character length must be great than or equal to 12.'
163
+ fail ArgumentError, 'invalid value for "phone_number", the character length must be greater than or equal to 12.'
158
164
  end
159
165
 
160
166
  pattern = Regexp.new(/^\+1(800|833|844|855|866|877|888)[2-9]\d{6}$/)
@@ -211,61 +217,6 @@ module Bandwidth
211
217
  new(transformed_hash)
212
218
  end
213
219
 
214
- # Deserializes the data based on type
215
- # @param string type Data type
216
- # @param string value Value to be deserialized
217
- # @return [Object] Deserialized data
218
- def self._deserialize(type, value)
219
- case type.to_sym
220
- when :Time
221
- Time.parse(value)
222
- when :Date
223
- Date.parse(value)
224
- when :String
225
- value.to_s
226
- when :Integer
227
- value.to_i
228
- when :Float
229
- value.to_f
230
- when :Boolean
231
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
232
- true
233
- else
234
- false
235
- end
236
- when :Object
237
- # generic object (usually a Hash), return directly
238
- value
239
- when /\AArray<(?<inner_type>.+)>\z/
240
- inner_type = Regexp.last_match[:inner_type]
241
- value.map { |v| _deserialize(inner_type, v) }
242
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
243
- k_type = Regexp.last_match[:k_type]
244
- v_type = Regexp.last_match[:v_type]
245
- {}.tap do |hash|
246
- value.each do |k, v|
247
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
248
- end
249
- end
250
- else # model
251
- # models (e.g. Pet) or oneOf
252
- klass = Bandwidth.const_get(type)
253
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
254
- end
255
- end
256
-
257
- # Returns the string representation of the object
258
- # @return [String] String presentation of the object
259
- def to_s
260
- to_hash.to_s
261
- end
262
-
263
- # to_body is an alias to to_hash (backward compatibility)
264
- # @return [Hash] Returns the object in the form of hash
265
- def to_body
266
- to_hash
267
- end
268
-
269
220
  # Returns the object in the form of hash
270
221
  # @return [Hash] Returns the object in the form of hash
271
222
  def to_hash
@@ -281,23 +232,5 @@ module Bandwidth
281
232
  end
282
233
  hash
283
234
  end
284
-
285
- # Outputs non-array value in the form of hash
286
- # For object, use to_hash. Otherwise, just return the value
287
- # @param [Object] value Any valid value
288
- # @return [Hash] Returns the value in the form of hash
289
- def _to_hash(value)
290
- if value.is_a?(Array)
291
- value.compact.map { |v| _to_hash(v) }
292
- elsif value.is_a?(Hash)
293
- {}.tap do |hash|
294
- value.each { |k, v| hash[k] = _to_hash(v) }
295
- end
296
- elsif value.respond_to? :to_hash
297
- value.to_hash
298
- else
299
- value
300
- end
301
- end
302
235
  end
303
236
  end