bandwidth-sdk 17.0.0 → 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 (246) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +29 -3
  4. data/bandwidth-sdk.gemspec +1 -2
  5. data/bandwidth.yml +85 -22
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +317 -487
  8. data/coverage/index.html +6317 -7908
  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/MultiChannelAction.md +32 -81
  19. data/docs/MultiChannelApi.md +5 -2
  20. data/docs/{MultiChannelChannelListObject.md → MultiChannelChannelListMMSObject.md} +3 -3
  21. data/docs/{MultiChannelMessageResponseDataChannelListInner.md → MultiChannelChannelListMMSResponseObject.md} +3 -3
  22. data/docs/MultiChannelChannelListObjectBase.md +22 -0
  23. data/docs/MultiChannelChannelListOwnerObject.md +18 -0
  24. data/docs/MultiChannelChannelListRBMObject.md +24 -0
  25. data/docs/{MultiChannelChannelListObjectContent.md → MultiChannelChannelListRBMObjectAllOfContent.md} +6 -10
  26. data/docs/MultiChannelChannelListRBMResponseObject.md +26 -0
  27. data/docs/MultiChannelChannelListRequestObject.md +24 -0
  28. data/docs/MultiChannelChannelListResponseObject.md +26 -0
  29. data/docs/MultiChannelChannelListSMSObject.md +24 -0
  30. data/docs/MultiChannelChannelListSMSResponseObject.md +26 -0
  31. data/docs/MultiChannelMessageRequest.md +1 -1
  32. data/docs/MultiChannelMessageResponseData.md +1 -1
  33. data/docs/PhoneNumberLookupApi.md +12 -3
  34. data/docs/RbmActionBase.md +1 -1
  35. data/docs/RbmSuggestionResponse.md +1 -1
  36. data/docs/RecordingsApi.md +40 -10
  37. data/docs/StatisticsApi.md +4 -1
  38. data/docs/TollFreeVerificationApi.md +36 -9
  39. data/docs/TranscriptionsApi.md +12 -3
  40. data/lib/bandwidth-sdk/api/calls_api.rb +6 -6
  41. data/lib/bandwidth-sdk/api/conferences_api.rb +10 -10
  42. data/lib/bandwidth-sdk/api/media_api.rb +5 -5
  43. data/lib/bandwidth-sdk/api/messages_api.rb +3 -3
  44. data/lib/bandwidth-sdk/api/mfa_api.rb +4 -4
  45. data/lib/bandwidth-sdk/api/multi_channel_api.rb +2 -2
  46. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +4 -4
  47. data/lib/bandwidth-sdk/api/recordings_api.rb +11 -11
  48. data/lib/bandwidth-sdk/api/statistics_api.rb +2 -2
  49. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +13 -13
  50. data/lib/bandwidth-sdk/api/transcriptions_api.rb +4 -4
  51. data/lib/bandwidth-sdk/api_client.rb +9 -5
  52. data/lib/bandwidth-sdk/api_error.rb +1 -1
  53. data/lib/bandwidth-sdk/api_model_base.rb +88 -0
  54. data/lib/bandwidth-sdk/configuration.rb +50 -1
  55. data/lib/bandwidth-sdk/models/account_statistics.rb +11 -78
  56. data/lib/bandwidth-sdk/models/additional_denial_reason.rb +41 -78
  57. data/lib/bandwidth-sdk/models/address.rb +23 -90
  58. data/lib/bandwidth-sdk/models/answer_callback.rb +11 -78
  59. data/lib/bandwidth-sdk/models/async_lookup_request.rb +11 -78
  60. data/lib/bandwidth-sdk/models/blocked_webhook.rb +13 -80
  61. data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +11 -78
  62. data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +11 -78
  63. data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +1 -1
  64. data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +1 -1
  65. data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
  66. data/lib/bandwidth-sdk/models/call_recording_metadata.rb +11 -78
  67. data/lib/bandwidth-sdk/models/call_state.rb +11 -78
  68. data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
  69. data/lib/bandwidth-sdk/models/call_transcription.rb +11 -78
  70. data/lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb +1 -1
  71. data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +11 -78
  72. data/lib/bandwidth-sdk/models/call_transcription_response.rb +11 -78
  73. data/lib/bandwidth-sdk/models/call_transcription_track_enum.rb +1 -1
  74. data/lib/bandwidth-sdk/models/callback.rb +1 -1
  75. data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
  76. data/lib/bandwidth-sdk/models/card_width_enum.rb +1 -1
  77. data/lib/bandwidth-sdk/models/code_request.rb +11 -78
  78. data/lib/bandwidth-sdk/models/completed_lookup_status_enum.rb +1 -1
  79. data/lib/bandwidth-sdk/models/conference.rb +11 -78
  80. data/lib/bandwidth-sdk/models/conference_completed_callback.rb +11 -78
  81. data/lib/bandwidth-sdk/models/conference_created_callback.rb +11 -78
  82. data/lib/bandwidth-sdk/models/conference_member.rb +11 -78
  83. data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +11 -78
  84. data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +11 -78
  85. data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +11 -78
  86. data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +11 -78
  87. data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +11 -78
  88. data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
  89. data/lib/bandwidth-sdk/models/contact.rb +19 -86
  90. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb +11 -78
  91. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response_data.rb +11 -78
  92. data/lib/bandwidth-sdk/models/create_call.rb +41 -78
  93. data/lib/bandwidth-sdk/models/create_call_response.rb +81 -78
  94. data/lib/bandwidth-sdk/models/create_message_request_error.rb +31 -78
  95. data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +11 -78
  96. data/lib/bandwidth-sdk/models/create_sync_lookup_response.rb +11 -78
  97. data/lib/bandwidth-sdk/models/create_sync_lookup_response_data.rb +11 -78
  98. data/lib/bandwidth-sdk/models/deactivation_event_enum.rb +1 -1
  99. data/lib/bandwidth-sdk/models/disconnect_callback.rb +11 -78
  100. data/lib/bandwidth-sdk/models/diversion.rb +11 -78
  101. data/lib/bandwidth-sdk/models/dtmf_callback.rb +11 -78
  102. data/lib/bandwidth-sdk/models/error.rb +11 -78
  103. data/lib/bandwidth-sdk/models/error_object.rb +41 -78
  104. data/lib/bandwidth-sdk/models/error_source.rb +11 -78
  105. data/lib/bandwidth-sdk/models/failure_webhook.rb +13 -80
  106. data/lib/bandwidth-sdk/models/field_error.rb +11 -78
  107. data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
  108. data/lib/bandwidth-sdk/models/gather_callback.rb +11 -78
  109. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response.rb +11 -78
  110. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response_data.rb +11 -78
  111. data/lib/bandwidth-sdk/models/in_progress_lookup_status_enum.rb +1 -1
  112. data/lib/bandwidth-sdk/models/inbound_callback.rb +61 -78
  113. data/lib/bandwidth-sdk/models/inbound_callback_message.rb +81 -78
  114. data/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb +1 -1
  115. data/lib/bandwidth-sdk/models/initiate_callback.rb +11 -78
  116. data/lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb +1 -1
  117. data/lib/bandwidth-sdk/models/line_type_enum.rb +1 -1
  118. data/lib/bandwidth-sdk/models/link.rb +11 -78
  119. data/lib/bandwidth-sdk/models/link_schema.rb +11 -78
  120. data/lib/bandwidth-sdk/models/links_object.rb +11 -78
  121. data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
  122. data/lib/bandwidth-sdk/models/list_message_item.rb +11 -78
  123. data/lib/bandwidth-sdk/models/lookup_error_response.rb +11 -78
  124. data/lib/bandwidth-sdk/models/lookup_error_schema.rb +11 -78
  125. data/lib/bandwidth-sdk/models/lookup_error_schema_meta.rb +11 -78
  126. data/lib/bandwidth-sdk/models/lookup_result.rb +11 -78
  127. data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +11 -78
  128. data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +11 -78
  129. data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
  130. data/lib/bandwidth-sdk/models/machine_detection_result.rb +11 -78
  131. data/lib/bandwidth-sdk/models/media.rb +11 -78
  132. data/lib/bandwidth-sdk/models/message.rb +11 -78
  133. data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
  134. data/lib/bandwidth-sdk/models/message_request.rb +31 -78
  135. data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
  136. data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
  137. data/lib/bandwidth-sdk/models/messages_list.rb +11 -78
  138. data/lib/bandwidth-sdk/models/messaging_code_response.rb +11 -78
  139. data/lib/bandwidth-sdk/models/messaging_request_error.rb +31 -78
  140. data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +11 -78
  141. data/lib/bandwidth-sdk/models/mfa_request_error.rb +11 -78
  142. data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +11 -78
  143. data/lib/bandwidth-sdk/models/mms_message_content.rb +11 -78
  144. data/lib/bandwidth-sdk/models/mms_message_content_file.rb +11 -78
  145. data/lib/bandwidth-sdk/models/multi_channel_action.rb +71 -27
  146. data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +41 -78
  147. data/lib/bandwidth-sdk/models/{multi_channel_channel_list_object.rb → multi_channel_channel_list_mms_object.rb} +60 -80
  148. data/lib/bandwidth-sdk/models/{multi_channel_message_response_data_channel_list_inner.rb → multi_channel_channel_list_mms_response_object.rb} +65 -81
  149. data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb +238 -0
  150. data/lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb +163 -0
  151. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb +271 -0
  152. data/lib/bandwidth-sdk/models/{multi_channel_channel_list_object_content.rb → multi_channel_channel_list_rbm_object_all_of_content.rb} +5 -8
  153. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb +299 -0
  154. data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +103 -0
  155. data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +103 -0
  156. data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb +271 -0
  157. data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb +299 -0
  158. data/lib/bandwidth-sdk/models/multi_channel_error.rb +11 -78
  159. data/lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb +1 -1
  160. data/lib/bandwidth-sdk/models/multi_channel_message_content.rb +11 -78
  161. data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +22 -79
  162. data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +42 -79
  163. data/lib/bandwidth-sdk/models/opt_in_workflow.rb +25 -82
  164. data/lib/bandwidth-sdk/models/page_info.rb +11 -78
  165. data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
  166. data/lib/bandwidth-sdk/models/product_type_enum.rb +1 -1
  167. data/lib/bandwidth-sdk/models/rbm_action_base.rb +21 -78
  168. data/lib/bandwidth-sdk/models/rbm_action_dial.rb +31 -78
  169. data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +21 -78
  170. data/lib/bandwidth-sdk/models/rbm_action_type_enum.rb +1 -1
  171. data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +41 -78
  172. data/lib/bandwidth-sdk/models/rbm_card_content.rb +11 -78
  173. data/lib/bandwidth-sdk/models/rbm_card_content_media.rb +21 -78
  174. data/lib/bandwidth-sdk/models/rbm_location_response.rb +11 -78
  175. data/lib/bandwidth-sdk/models/rbm_media_height_enum.rb +1 -1
  176. data/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +21 -78
  177. data/lib/bandwidth-sdk/models/rbm_message_content_file.rb +11 -78
  178. data/lib/bandwidth-sdk/models/rbm_message_content_rich_card.rb +3 -4
  179. data/lib/bandwidth-sdk/models/rbm_message_content_text.rb +11 -78
  180. data/lib/bandwidth-sdk/models/rbm_message_media.rb +21 -78
  181. data/lib/bandwidth-sdk/models/rbm_standalone_card.rb +41 -78
  182. data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +11 -78
  183. data/lib/bandwidth-sdk/models/recording_available_callback.rb +11 -78
  184. data/lib/bandwidth-sdk/models/recording_complete_callback.rb +11 -78
  185. data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
  186. data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +11 -78
  187. data/lib/bandwidth-sdk/models/recording_transcriptions.rb +11 -78
  188. data/lib/bandwidth-sdk/models/redirect_callback.rb +11 -78
  189. data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
  190. data/lib/bandwidth-sdk/models/sms_message_content.rb +11 -78
  191. data/lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb +1 -1
  192. data/lib/bandwidth-sdk/models/status_callback.rb +61 -78
  193. data/lib/bandwidth-sdk/models/status_callback_message.rb +81 -78
  194. data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +6 -6
  195. data/lib/bandwidth-sdk/models/stir_shaken.rb +11 -78
  196. data/lib/bandwidth-sdk/models/sync_lookup_request.rb +11 -78
  197. data/lib/bandwidth-sdk/models/telephone_number.rb +11 -78
  198. data/lib/bandwidth-sdk/models/tfv_basic_authentication.rb +11 -78
  199. data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +1 -1
  200. data/lib/bandwidth-sdk/models/tfv_error.rb +11 -78
  201. data/lib/bandwidth-sdk/models/tfv_status.rb +13 -80
  202. data/lib/bandwidth-sdk/models/tfv_status_enum.rb +1 -1
  203. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +21 -88
  204. data/lib/bandwidth-sdk/models/tfv_submission_wrapper.rb +11 -78
  205. data/lib/bandwidth-sdk/models/thumbnail_alignment_enum.rb +1 -1
  206. data/lib/bandwidth-sdk/models/transcribe_recording.rb +11 -78
  207. data/lib/bandwidth-sdk/models/transcription.rb +11 -78
  208. data/lib/bandwidth-sdk/models/transcription_available_callback.rb +11 -78
  209. data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +11 -78
  210. data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +11 -78
  211. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +11 -78
  212. data/lib/bandwidth-sdk/models/update_call.rb +11 -78
  213. data/lib/bandwidth-sdk/models/update_call_recording.rb +21 -78
  214. data/lib/bandwidth-sdk/models/update_conference.rb +11 -78
  215. data/lib/bandwidth-sdk/models/update_conference_member.rb +11 -78
  216. data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +13 -80
  217. data/lib/bandwidth-sdk/models/verification_request.rb +51 -88
  218. data/lib/bandwidth-sdk/models/verification_update_request.rb +51 -88
  219. data/lib/bandwidth-sdk/models/verification_webhook.rb +13 -80
  220. data/lib/bandwidth-sdk/models/verify_code_request.rb +13 -80
  221. data/lib/bandwidth-sdk/models/verify_code_response.rb +11 -78
  222. data/lib/bandwidth-sdk/models/voice_api_error.rb +11 -78
  223. data/lib/bandwidth-sdk/models/voice_code_response.rb +11 -78
  224. data/lib/bandwidth-sdk/models/webhook_subscription.rb +13 -80
  225. data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +11 -78
  226. data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +15 -82
  227. data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +1 -1
  228. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +21 -78
  229. data/lib/bandwidth-sdk/version.rb +2 -2
  230. data/lib/bandwidth-sdk.rb +13 -4
  231. data/openapitools.json +1 -1
  232. data/spec/smoke/calls_api_spec.rb +50 -76
  233. data/spec/smoke/conferences_api_spec.rb +7 -5
  234. data/spec/smoke/media_api_spec.rb +4 -2
  235. data/spec/smoke/messages_api_spec.rb +9 -4
  236. data/spec/smoke/mfa_api_spec.rb +9 -4
  237. data/spec/smoke/multi_channel_api_spec.rb +128 -25
  238. data/spec/smoke/phone_number_lookup_api_spec.rb +7 -5
  239. data/spec/smoke/recordings_api_spec.rb +7 -33
  240. data/spec/smoke/statistics_api_spec.rb +16 -8
  241. data/spec/smoke/toll_free_verification_api_spec.rb +6 -4
  242. data/spec/smoke/transcriptions_api_spec.rb +7 -5
  243. data/spec/spec_helper.rb +2 -0
  244. data/spec/unit/api/multi_channel_api_spec.rb +13 -2
  245. data/spec/unit/models/verify_code_request_spec.rb +1 -1
  246. metadata +27 -8
@@ -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
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Bandwidth
17
17
  # The gather event is sent after a <Gather> verb is executed. Its purpose is to report the gathered digits to the calling application.
18
- class GatherCallback
18
+ class GatherCallback < ApiModelBase
19
19
  # The event type, value can be one of the following: answer, bridgeComplete, bridgeTargetComplete, conferenceCreated, conferenceRedirect, conferenceMemberJoin, conferenceMemberExit, conferenceCompleted, conferenceRecordingAvailable, disconnect, dtmf, gather, initiate, machineDetectionComplete, recordingComplete, recordingAvailable, redirect, transcriptionAvailable, transferAnswer, transferComplete, transferDisconnect.
20
20
  attr_accessor :event_type
21
21
 
@@ -115,9 +115,14 @@ module Bandwidth
115
115
  }
116
116
  end
117
117
 
118
+ # Returns attribute mapping this model knows about
119
+ def self.acceptable_attribute_map
120
+ attribute_map
121
+ end
122
+
118
123
  # Returns all the JSON keys this model knows about
119
124
  def self.acceptable_attributes
120
- attribute_map.values
125
+ acceptable_attribute_map.values
121
126
  end
122
127
 
123
128
  # Attribute type mapping.
@@ -161,9 +166,10 @@ module Bandwidth
161
166
  end
162
167
 
163
168
  # check to see if the attribute exists and convert string to symbol for hash key
169
+ acceptable_attribute_map = self.class.acceptable_attribute_map
164
170
  attributes = attributes.each_with_object({}) { |(k, v), h|
165
- if (!self.class.attribute_map.key?(k.to_sym))
166
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::GatherCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
171
+ if (!acceptable_attribute_map.key?(k.to_sym))
172
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::GatherCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
167
173
  end
168
174
  h[k.to_sym] = v
169
175
  }
@@ -316,61 +322,6 @@ module Bandwidth
316
322
  new(transformed_hash)
317
323
  end
318
324
 
319
- # Deserializes the data based on type
320
- # @param string type Data type
321
- # @param string value Value to be deserialized
322
- # @return [Object] Deserialized data
323
- def self._deserialize(type, value)
324
- case type.to_sym
325
- when :Time
326
- Time.parse(value)
327
- when :Date
328
- Date.parse(value)
329
- when :String
330
- value.to_s
331
- when :Integer
332
- value.to_i
333
- when :Float
334
- value.to_f
335
- when :Boolean
336
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
337
- true
338
- else
339
- false
340
- end
341
- when :Object
342
- # generic object (usually a Hash), return directly
343
- value
344
- when /\AArray<(?<inner_type>.+)>\z/
345
- inner_type = Regexp.last_match[:inner_type]
346
- value.map { |v| _deserialize(inner_type, v) }
347
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
348
- k_type = Regexp.last_match[:k_type]
349
- v_type = Regexp.last_match[:v_type]
350
- {}.tap do |hash|
351
- value.each do |k, v|
352
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
353
- end
354
- end
355
- else # model
356
- # models (e.g. Pet) or oneOf
357
- klass = Bandwidth.const_get(type)
358
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
359
- end
360
- end
361
-
362
- # Returns the string representation of the object
363
- # @return [String] String presentation of the object
364
- def to_s
365
- to_hash.to_s
366
- end
367
-
368
- # to_body is an alias to to_hash (backward compatibility)
369
- # @return [Hash] Returns the object in the form of hash
370
- def to_body
371
- to_hash
372
- end
373
-
374
325
  # Returns the object in the form of hash
375
326
  # @return [Hash] Returns the object in the form of hash
376
327
  def to_hash
@@ -386,23 +337,5 @@ module Bandwidth
386
337
  end
387
338
  hash
388
339
  end
389
-
390
- # Outputs non-array value in the form of hash
391
- # For object, use to_hash. Otherwise, just return the value
392
- # @param [Object] value Any valid value
393
- # @return [Hash] Returns the value in the form of hash
394
- def _to_hash(value)
395
- if value.is_a?(Array)
396
- value.compact.map { |v| _to_hash(v) }
397
- elsif value.is_a?(Hash)
398
- {}.tap do |hash|
399
- value.each { |k, v| hash[k] = _to_hash(v) }
400
- end
401
- elsif value.respond_to? :to_hash
402
- value.to_hash
403
- else
404
- value
405
- end
406
- end
407
340
  end
408
341
  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 GetAsyncBulkLookupResponse
17
+ class GetAsyncBulkLookupResponse < ApiModelBase
18
18
  attr_accessor :links
19
19
 
20
20
  attr_accessor :data
@@ -30,9 +30,14 @@ module Bandwidth
30
30
  }
31
31
  end
32
32
 
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
33
38
  # Returns all the JSON keys this model knows about
34
39
  def self.acceptable_attributes
35
- attribute_map.values
40
+ acceptable_attribute_map.values
36
41
  end
37
42
 
38
43
  # Attribute type mapping.
@@ -58,9 +63,10 @@ module Bandwidth
58
63
  end
59
64
 
60
65
  # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
61
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
62
- if (!self.class.attribute_map.key?(k.to_sym))
63
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::GetAsyncBulkLookupResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::GetAsyncBulkLookupResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
64
70
  end
65
71
  h[k.to_sym] = v
66
72
  }
@@ -142,61 +148,6 @@ module Bandwidth
142
148
  new(transformed_hash)
143
149
  end
144
150
 
145
- # Deserializes the data based on type
146
- # @param string type Data type
147
- # @param string value Value to be deserialized
148
- # @return [Object] Deserialized data
149
- def self._deserialize(type, value)
150
- case type.to_sym
151
- when :Time
152
- Time.parse(value)
153
- when :Date
154
- Date.parse(value)
155
- when :String
156
- value.to_s
157
- when :Integer
158
- value.to_i
159
- when :Float
160
- value.to_f
161
- when :Boolean
162
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
163
- true
164
- else
165
- false
166
- end
167
- when :Object
168
- # generic object (usually a Hash), return directly
169
- value
170
- when /\AArray<(?<inner_type>.+)>\z/
171
- inner_type = Regexp.last_match[:inner_type]
172
- value.map { |v| _deserialize(inner_type, v) }
173
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
174
- k_type = Regexp.last_match[:k_type]
175
- v_type = Regexp.last_match[:v_type]
176
- {}.tap do |hash|
177
- value.each do |k, v|
178
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
179
- end
180
- end
181
- else # model
182
- # models (e.g. Pet) or oneOf
183
- klass = Bandwidth.const_get(type)
184
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
185
- end
186
- end
187
-
188
- # Returns the string representation of the object
189
- # @return [String] String presentation of the object
190
- def to_s
191
- to_hash.to_s
192
- end
193
-
194
- # to_body is an alias to to_hash (backward compatibility)
195
- # @return [Hash] Returns the object in the form of hash
196
- def to_body
197
- to_hash
198
- end
199
-
200
151
  # Returns the object in the form of hash
201
152
  # @return [Hash] Returns the object in the form of hash
202
153
  def to_hash
@@ -212,23 +163,5 @@ module Bandwidth
212
163
  end
213
164
  hash
214
165
  end
215
-
216
- # Outputs non-array value in the form of hash
217
- # For object, use to_hash. Otherwise, just return the value
218
- # @param [Object] value Any valid value
219
- # @return [Hash] Returns the value in the form of hash
220
- def _to_hash(value)
221
- if value.is_a?(Array)
222
- value.compact.map { |v| _to_hash(v) }
223
- elsif value.is_a?(Hash)
224
- {}.tap do |hash|
225
- value.each { |k, v| hash[k] = _to_hash(v) }
226
- end
227
- elsif value.respond_to? :to_hash
228
- value.to_hash
229
- else
230
- value
231
- end
232
- end
233
166
  end
234
167
  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
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Bandwidth
17
17
  # The phone number lookup response data
18
- class GetAsyncBulkLookupResponseData
18
+ class GetAsyncBulkLookupResponseData < ApiModelBase
19
19
  # The phone number lookup request ID from Bandwidth.
20
20
  attr_accessor :request_id
21
21
 
@@ -55,9 +55,14 @@ module Bandwidth
55
55
  }
56
56
  end
57
57
 
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
58
63
  # Returns all the JSON keys this model knows about
59
64
  def self.acceptable_attributes
60
- attribute_map.values
65
+ acceptable_attribute_map.values
61
66
  end
62
67
 
63
68
  # Attribute type mapping.
@@ -83,9 +88,10 @@ module Bandwidth
83
88
  end
84
89
 
85
90
  # check to see if the attribute exists and convert string to symbol for hash key
91
+ acceptable_attribute_map = self.class.acceptable_attribute_map
86
92
  attributes = attributes.each_with_object({}) { |(k, v), h|
87
- if (!self.class.attribute_map.key?(k.to_sym))
88
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::GetAsyncBulkLookupResponseData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
93
+ if (!acceptable_attribute_map.key?(k.to_sym))
94
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::GetAsyncBulkLookupResponseData`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
89
95
  end
90
96
  h[k.to_sym] = v
91
97
  }
@@ -165,61 +171,6 @@ module Bandwidth
165
171
  new(transformed_hash)
166
172
  end
167
173
 
168
- # Deserializes the data based on type
169
- # @param string type Data type
170
- # @param string value Value to be deserialized
171
- # @return [Object] Deserialized data
172
- def self._deserialize(type, value)
173
- case type.to_sym
174
- when :Time
175
- Time.parse(value)
176
- when :Date
177
- Date.parse(value)
178
- when :String
179
- value.to_s
180
- when :Integer
181
- value.to_i
182
- when :Float
183
- value.to_f
184
- when :Boolean
185
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
- true
187
- else
188
- false
189
- end
190
- when :Object
191
- # generic object (usually a Hash), return directly
192
- value
193
- when /\AArray<(?<inner_type>.+)>\z/
194
- inner_type = Regexp.last_match[:inner_type]
195
- value.map { |v| _deserialize(inner_type, v) }
196
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
- k_type = Regexp.last_match[:k_type]
198
- v_type = Regexp.last_match[:v_type]
199
- {}.tap do |hash|
200
- value.each do |k, v|
201
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
- end
203
- end
204
- else # model
205
- # models (e.g. Pet) or oneOf
206
- klass = Bandwidth.const_get(type)
207
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
- end
209
- end
210
-
211
- # Returns the string representation of the object
212
- # @return [String] String presentation of the object
213
- def to_s
214
- to_hash.to_s
215
- end
216
-
217
- # to_body is an alias to to_hash (backward compatibility)
218
- # @return [Hash] Returns the object in the form of hash
219
- def to_body
220
- to_hash
221
- end
222
-
223
174
  # Returns the object in the form of hash
224
175
  # @return [Hash] Returns the object in the form of hash
225
176
  def to_hash
@@ -235,23 +186,5 @@ module Bandwidth
235
186
  end
236
187
  hash
237
188
  end
238
-
239
- # Outputs non-array value in the form of hash
240
- # For object, use to_hash. Otherwise, just return the value
241
- # @param [Object] value Any valid value
242
- # @return [Hash] Returns the value in the form of hash
243
- def _to_hash(value)
244
- if value.is_a?(Array)
245
- value.compact.map { |v| _to_hash(v) }
246
- elsif value.is_a?(Hash)
247
- {}.tap do |hash|
248
- value.each { |k, v| hash[k] = _to_hash(v) }
249
- end
250
- elsif value.respond_to? :to_hash
251
- value.to_hash
252
- else
253
- value
254
- end
255
- end
256
189
  end
257
190
  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
 
@@ -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
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Bandwidth
17
17
  # Represents an inbound callback.
18
- class InboundCallback
18
+ class InboundCallback < ApiModelBase
19
19
  attr_accessor :time
20
20
 
21
21
  attr_accessor :type
@@ -65,9 +65,14 @@ module Bandwidth
65
65
  }
66
66
  end
67
67
 
68
+ # Returns attribute mapping this model knows about
69
+ def self.acceptable_attribute_map
70
+ attribute_map
71
+ end
72
+
68
73
  # Returns all the JSON keys this model knows about
69
74
  def self.acceptable_attributes
70
- attribute_map.values
75
+ acceptable_attribute_map.values
71
76
  end
72
77
 
73
78
  # Attribute type mapping.
@@ -96,9 +101,10 @@ module Bandwidth
96
101
  end
97
102
 
98
103
  # check to see if the attribute exists and convert string to symbol for hash key
104
+ acceptable_attribute_map = self.class.acceptable_attribute_map
99
105
  attributes = attributes.each_with_object({}) { |(k, v), h|
100
- if (!self.class.attribute_map.key?(k.to_sym))
101
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::InboundCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
106
+ if (!acceptable_attribute_map.key?(k.to_sym))
107
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::InboundCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
102
108
  end
103
109
  h[k.to_sym] = v
104
110
  }
@@ -178,6 +184,56 @@ module Bandwidth
178
184
  true
179
185
  end
180
186
 
187
+ # Custom attribute writer method with validation
188
+ # @param [Object] time Value to be assigned
189
+ def time=(time)
190
+ if time.nil?
191
+ fail ArgumentError, 'time cannot be nil'
192
+ end
193
+
194
+ @time = time
195
+ end
196
+
197
+ # Custom attribute writer method with validation
198
+ # @param [Object] type Value to be assigned
199
+ def type=(type)
200
+ if type.nil?
201
+ fail ArgumentError, 'type cannot be nil'
202
+ end
203
+
204
+ @type = type
205
+ end
206
+
207
+ # Custom attribute writer method with validation
208
+ # @param [Object] to Value to be assigned
209
+ def to=(to)
210
+ if to.nil?
211
+ fail ArgumentError, 'to cannot be nil'
212
+ end
213
+
214
+ @to = to
215
+ end
216
+
217
+ # Custom attribute writer method with validation
218
+ # @param [Object] description Value to be assigned
219
+ def description=(description)
220
+ if description.nil?
221
+ fail ArgumentError, 'description cannot be nil'
222
+ end
223
+
224
+ @description = description
225
+ end
226
+
227
+ # Custom attribute writer method with validation
228
+ # @param [Object] message Value to be assigned
229
+ def message=(message)
230
+ if message.nil?
231
+ fail ArgumentError, 'message cannot be nil'
232
+ end
233
+
234
+ @message = message
235
+ end
236
+
181
237
  # Checks equality by comparing each attribute.
182
238
  # @param [Object] Object to be compared
183
239
  def ==(o)
@@ -226,61 +282,6 @@ module Bandwidth
226
282
  new(transformed_hash)
227
283
  end
228
284
 
229
- # Deserializes the data based on type
230
- # @param string type Data type
231
- # @param string value Value to be deserialized
232
- # @return [Object] Deserialized data
233
- def self._deserialize(type, value)
234
- case type.to_sym
235
- when :Time
236
- Time.parse(value)
237
- when :Date
238
- Date.parse(value)
239
- when :String
240
- value.to_s
241
- when :Integer
242
- value.to_i
243
- when :Float
244
- value.to_f
245
- when :Boolean
246
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
247
- true
248
- else
249
- false
250
- end
251
- when :Object
252
- # generic object (usually a Hash), return directly
253
- value
254
- when /\AArray<(?<inner_type>.+)>\z/
255
- inner_type = Regexp.last_match[:inner_type]
256
- value.map { |v| _deserialize(inner_type, v) }
257
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
258
- k_type = Regexp.last_match[:k_type]
259
- v_type = Regexp.last_match[:v_type]
260
- {}.tap do |hash|
261
- value.each do |k, v|
262
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
263
- end
264
- end
265
- else # model
266
- # models (e.g. Pet) or oneOf
267
- klass = Bandwidth.const_get(type)
268
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
269
- end
270
- end
271
-
272
- # Returns the string representation of the object
273
- # @return [String] String presentation of the object
274
- def to_s
275
- to_hash.to_s
276
- end
277
-
278
- # to_body is an alias to to_hash (backward compatibility)
279
- # @return [Hash] Returns the object in the form of hash
280
- def to_body
281
- to_hash
282
- end
283
-
284
285
  # Returns the object in the form of hash
285
286
  # @return [Hash] Returns the object in the form of hash
286
287
  def to_hash
@@ -296,23 +297,5 @@ module Bandwidth
296
297
  end
297
298
  hash
298
299
  end
299
-
300
- # Outputs non-array value in the form of hash
301
- # For object, use to_hash. Otherwise, just return the value
302
- # @param [Object] value Any valid value
303
- # @return [Hash] Returns the value in the form of hash
304
- def _to_hash(value)
305
- if value.is_a?(Array)
306
- value.compact.map { |v| _to_hash(v) }
307
- elsif value.is_a?(Hash)
308
- {}.tap do |hash|
309
- value.each { |k, v| hash[k] = _to_hash(v) }
310
- end
311
- elsif value.respond_to? :to_hash
312
- value.to_hash
313
- else
314
- value
315
- end
316
- end
317
300
  end
318
301
  end