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
 
@@ -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 CallRecordingMetadata
17
+ class CallRecordingMetadata < ApiModelBase
18
18
  # The id of the application associated with the call.
19
19
  attr_accessor :application_id
20
20
 
@@ -116,9 +116,14 @@ module Bandwidth
116
116
  }
117
117
  end
118
118
 
119
+ # Returns attribute mapping this model knows about
120
+ def self.acceptable_attribute_map
121
+ attribute_map
122
+ end
123
+
119
124
  # Returns all the JSON keys this model knows about
120
125
  def self.acceptable_attributes
121
- attribute_map.values
126
+ acceptable_attribute_map.values
122
127
  end
123
128
 
124
129
  # Attribute type mapping.
@@ -162,9 +167,10 @@ module Bandwidth
162
167
  end
163
168
 
164
169
  # check to see if the attribute exists and convert string to symbol for hash key
170
+ acceptable_attribute_map = self.class.acceptable_attribute_map
165
171
  attributes = attributes.each_with_object({}) { |(k, v), h|
166
- if (!self.class.attribute_map.key?(k.to_sym))
167
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallRecordingMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
172
+ if (!acceptable_attribute_map.key?(k.to_sym))
173
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallRecordingMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
168
174
  end
169
175
  h[k.to_sym] = v
170
176
  }
@@ -322,61 +328,6 @@ module Bandwidth
322
328
  new(transformed_hash)
323
329
  end
324
330
 
325
- # Deserializes the data based on type
326
- # @param string type Data type
327
- # @param string value Value to be deserialized
328
- # @return [Object] Deserialized data
329
- def self._deserialize(type, value)
330
- case type.to_sym
331
- when :Time
332
- Time.parse(value)
333
- when :Date
334
- Date.parse(value)
335
- when :String
336
- value.to_s
337
- when :Integer
338
- value.to_i
339
- when :Float
340
- value.to_f
341
- when :Boolean
342
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
343
- true
344
- else
345
- false
346
- end
347
- when :Object
348
- # generic object (usually a Hash), return directly
349
- value
350
- when /\AArray<(?<inner_type>.+)>\z/
351
- inner_type = Regexp.last_match[:inner_type]
352
- value.map { |v| _deserialize(inner_type, v) }
353
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
354
- k_type = Regexp.last_match[:k_type]
355
- v_type = Regexp.last_match[:v_type]
356
- {}.tap do |hash|
357
- value.each do |k, v|
358
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
359
- end
360
- end
361
- else # model
362
- # models (e.g. Pet) or oneOf
363
- klass = Bandwidth.const_get(type)
364
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
365
- end
366
- end
367
-
368
- # Returns the string representation of the object
369
- # @return [String] String presentation of the object
370
- def to_s
371
- to_hash.to_s
372
- end
373
-
374
- # to_body is an alias to to_hash (backward compatibility)
375
- # @return [Hash] Returns the object in the form of hash
376
- def to_body
377
- to_hash
378
- end
379
-
380
331
  # Returns the object in the form of hash
381
332
  # @return [Hash] Returns the object in the form of hash
382
333
  def to_hash
@@ -392,23 +343,5 @@ module Bandwidth
392
343
  end
393
344
  hash
394
345
  end
395
-
396
- # Outputs non-array value in the form of hash
397
- # For object, use to_hash. Otherwise, just return the value
398
- # @param [Object] value Any valid value
399
- # @return [Hash] Returns the value in the form of hash
400
- def _to_hash(value)
401
- if value.is_a?(Array)
402
- value.compact.map { |v| _to_hash(v) }
403
- elsif value.is_a?(Hash)
404
- {}.tap do |hash|
405
- value.each { |k, v| hash[k] = _to_hash(v) }
406
- end
407
- elsif value.respond_to? :to_hash
408
- value.to_hash
409
- else
410
- value
411
- end
412
- end
413
346
  end
414
347
  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 CallState
17
+ class CallState < ApiModelBase
18
18
  # The application id associated with the call.
19
19
  attr_accessor :application_id
20
20
 
@@ -114,9 +114,14 @@ module Bandwidth
114
114
  }
115
115
  end
116
116
 
117
+ # Returns attribute mapping this model knows about
118
+ def self.acceptable_attribute_map
119
+ attribute_map
120
+ end
121
+
117
122
  # Returns all the JSON keys this model knows about
118
123
  def self.acceptable_attributes
119
- attribute_map.values
124
+ acceptable_attribute_map.values
120
125
  end
121
126
 
122
127
  # Attribute type mapping.
@@ -167,9 +172,10 @@ module Bandwidth
167
172
  end
168
173
 
169
174
  # check to see if the attribute exists and convert string to symbol for hash key
175
+ acceptable_attribute_map = self.class.acceptable_attribute_map
170
176
  attributes = attributes.each_with_object({}) { |(k, v), h|
171
- if (!self.class.attribute_map.key?(k.to_sym))
172
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallState`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
177
+ if (!acceptable_attribute_map.key?(k.to_sym))
178
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallState`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
173
179
  end
174
180
  h[k.to_sym] = v
175
181
  }
@@ -324,61 +330,6 @@ module Bandwidth
324
330
  new(transformed_hash)
325
331
  end
326
332
 
327
- # Deserializes the data based on type
328
- # @param string type Data type
329
- # @param string value Value to be deserialized
330
- # @return [Object] Deserialized data
331
- def self._deserialize(type, value)
332
- case type.to_sym
333
- when :Time
334
- Time.parse(value)
335
- when :Date
336
- Date.parse(value)
337
- when :String
338
- value.to_s
339
- when :Integer
340
- value.to_i
341
- when :Float
342
- value.to_f
343
- when :Boolean
344
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
345
- true
346
- else
347
- false
348
- end
349
- when :Object
350
- # generic object (usually a Hash), return directly
351
- value
352
- when /\AArray<(?<inner_type>.+)>\z/
353
- inner_type = Regexp.last_match[:inner_type]
354
- value.map { |v| _deserialize(inner_type, v) }
355
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
356
- k_type = Regexp.last_match[:k_type]
357
- v_type = Regexp.last_match[:v_type]
358
- {}.tap do |hash|
359
- value.each do |k, v|
360
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
361
- end
362
- end
363
- else # model
364
- # models (e.g. Pet) or oneOf
365
- klass = Bandwidth.const_get(type)
366
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
367
- end
368
- end
369
-
370
- # Returns the string representation of the object
371
- # @return [String] String presentation of the object
372
- def to_s
373
- to_hash.to_s
374
- end
375
-
376
- # to_body is an alias to to_hash (backward compatibility)
377
- # @return [Hash] Returns the object in the form of hash
378
- def to_body
379
- to_hash
380
- end
381
-
382
333
  # Returns the object in the form of hash
383
334
  # @return [Hash] Returns the object in the form of hash
384
335
  def to_hash
@@ -394,23 +345,5 @@ module Bandwidth
394
345
  end
395
346
  hash
396
347
  end
397
-
398
- # Outputs non-array value in the form of hash
399
- # For object, use to_hash. Otherwise, just return the value
400
- # @param [Object] value Any valid value
401
- # @return [Hash] Returns the value in the form of hash
402
- def _to_hash(value)
403
- if value.is_a?(Array)
404
- value.compact.map { |v| _to_hash(v) }
405
- elsif value.is_a?(Hash)
406
- {}.tap do |hash|
407
- value.each { |k, v| hash[k] = _to_hash(v) }
408
- end
409
- elsif value.respond_to? :to_hash
410
- value.to_hash
411
- else
412
- value
413
- end
414
- end
415
348
  end
416
349
  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
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class CallTranscription
17
+ class CallTranscription < ApiModelBase
18
18
  attr_accessor :detected_language
19
19
 
20
20
  attr_accessor :track
@@ -57,9 +57,14 @@ module Bandwidth
57
57
  }
58
58
  end
59
59
 
60
+ # Returns attribute mapping this model knows about
61
+ def self.acceptable_attribute_map
62
+ attribute_map
63
+ end
64
+
60
65
  # Returns all the JSON keys this model knows about
61
66
  def self.acceptable_attributes
62
- attribute_map.values
67
+ acceptable_attribute_map.values
63
68
  end
64
69
 
65
70
  # Attribute type mapping.
@@ -86,9 +91,10 @@ module Bandwidth
86
91
  end
87
92
 
88
93
  # check to see if the attribute exists and convert string to symbol for hash key
94
+ acceptable_attribute_map = self.class.acceptable_attribute_map
89
95
  attributes = attributes.each_with_object({}) { |(k, v), h|
90
- if (!self.class.attribute_map.key?(k.to_sym))
91
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallTranscription`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ if (!acceptable_attribute_map.key?(k.to_sym))
97
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallTranscription`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
98
  end
93
99
  h[k.to_sym] = v
94
100
  }
@@ -199,61 +205,6 @@ module Bandwidth
199
205
  new(transformed_hash)
200
206
  end
201
207
 
202
- # Deserializes the data based on type
203
- # @param string type Data type
204
- # @param string value Value to be deserialized
205
- # @return [Object] Deserialized data
206
- def self._deserialize(type, value)
207
- case type.to_sym
208
- when :Time
209
- Time.parse(value)
210
- when :Date
211
- Date.parse(value)
212
- when :String
213
- value.to_s
214
- when :Integer
215
- value.to_i
216
- when :Float
217
- value.to_f
218
- when :Boolean
219
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
220
- true
221
- else
222
- false
223
- end
224
- when :Object
225
- # generic object (usually a Hash), return directly
226
- value
227
- when /\AArray<(?<inner_type>.+)>\z/
228
- inner_type = Regexp.last_match[:inner_type]
229
- value.map { |v| _deserialize(inner_type, v) }
230
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
231
- k_type = Regexp.last_match[:k_type]
232
- v_type = Regexp.last_match[:v_type]
233
- {}.tap do |hash|
234
- value.each do |k, v|
235
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
236
- end
237
- end
238
- else # model
239
- # models (e.g. Pet) or oneOf
240
- klass = Bandwidth.const_get(type)
241
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
242
- end
243
- end
244
-
245
- # Returns the string representation of the object
246
- # @return [String] String presentation of the object
247
- def to_s
248
- to_hash.to_s
249
- end
250
-
251
- # to_body is an alias to to_hash (backward compatibility)
252
- # @return [Hash] Returns the object in the form of hash
253
- def to_body
254
- to_hash
255
- end
256
-
257
208
  # Returns the object in the form of hash
258
209
  # @return [Hash] Returns the object in the form of hash
259
210
  def to_hash
@@ -269,23 +220,5 @@ module Bandwidth
269
220
  end
270
221
  hash
271
222
  end
272
-
273
- # Outputs non-array value in the form of hash
274
- # For object, use to_hash. Otherwise, just return the value
275
- # @param [Object] value Any valid value
276
- # @return [Hash] Returns the value in the form of hash
277
- def _to_hash(value)
278
- if value.is_a?(Array)
279
- value.compact.map { |v| _to_hash(v) }
280
- elsif value.is_a?(Hash)
281
- {}.tap do |hash|
282
- value.each { |k, v| hash[k] = _to_hash(v) }
283
- end
284
- elsif value.respond_to? :to_hash
285
- value.to_hash
286
- else
287
- value
288
- end
289
- end
290
223
  end
291
224
  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
 
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Bandwidth
17
- class CallTranscriptionMetadata
17
+ class CallTranscriptionMetadata < ApiModelBase
18
18
  # The programmable voice API transcription ID.
19
19
  attr_accessor :transcription_id
20
20
 
@@ -33,9 +33,14 @@ module Bandwidth
33
33
  }
34
34
  end
35
35
 
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
36
41
  # Returns all the JSON keys this model knows about
37
42
  def self.acceptable_attributes
38
- attribute_map.values
43
+ acceptable_attribute_map.values
39
44
  end
40
45
 
41
46
  # Attribute type mapping.
@@ -61,9 +66,10 @@ module Bandwidth
61
66
  end
62
67
 
63
68
  # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
64
70
  attributes = attributes.each_with_object({}) { |(k, v), h|
65
- if (!self.class.attribute_map.key?(k.to_sym))
66
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallTranscriptionMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallTranscriptionMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
67
73
  end
68
74
  h[k.to_sym] = v
69
75
  }
@@ -141,61 +147,6 @@ module Bandwidth
141
147
  new(transformed_hash)
142
148
  end
143
149
 
144
- # Deserializes the data based on type
145
- # @param string type Data type
146
- # @param string value Value to be deserialized
147
- # @return [Object] Deserialized data
148
- def self._deserialize(type, value)
149
- case type.to_sym
150
- when :Time
151
- Time.parse(value)
152
- when :Date
153
- Date.parse(value)
154
- when :String
155
- value.to_s
156
- when :Integer
157
- value.to_i
158
- when :Float
159
- value.to_f
160
- when :Boolean
161
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
162
- true
163
- else
164
- false
165
- end
166
- when :Object
167
- # generic object (usually a Hash), return directly
168
- value
169
- when /\AArray<(?<inner_type>.+)>\z/
170
- inner_type = Regexp.last_match[:inner_type]
171
- value.map { |v| _deserialize(inner_type, v) }
172
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
173
- k_type = Regexp.last_match[:k_type]
174
- v_type = Regexp.last_match[:v_type]
175
- {}.tap do |hash|
176
- value.each do |k, v|
177
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
178
- end
179
- end
180
- else # model
181
- # models (e.g. Pet) or oneOf
182
- klass = Bandwidth.const_get(type)
183
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
184
- end
185
- end
186
-
187
- # Returns the string representation of the object
188
- # @return [String] String presentation of the object
189
- def to_s
190
- to_hash.to_s
191
- end
192
-
193
- # to_body is an alias to to_hash (backward compatibility)
194
- # @return [Hash] Returns the object in the form of hash
195
- def to_body
196
- to_hash
197
- end
198
-
199
150
  # Returns the object in the form of hash
200
151
  # @return [Hash] Returns the object in the form of hash
201
152
  def to_hash
@@ -211,23 +162,5 @@ module Bandwidth
211
162
  end
212
163
  hash
213
164
  end
214
-
215
- # Outputs non-array value in the form of hash
216
- # For object, use to_hash. Otherwise, just return the value
217
- # @param [Object] value Any valid value
218
- # @return [Hash] Returns the value in the form of hash
219
- def _to_hash(value)
220
- if value.is_a?(Array)
221
- value.compact.map { |v| _to_hash(v) }
222
- elsif value.is_a?(Hash)
223
- {}.tap do |hash|
224
- value.each { |k, v| hash[k] = _to_hash(v) }
225
- end
226
- elsif value.respond_to? :to_hash
227
- value.to_hash
228
- else
229
- value
230
- end
231
- end
232
165
  end
233
166
  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 CallTranscriptionResponse
17
+ class CallTranscriptionResponse < ApiModelBase
18
18
  # The user account associated with the call.
19
19
  attr_accessor :account_id
20
20
 
@@ -36,9 +36,14 @@ module Bandwidth
36
36
  }
37
37
  end
38
38
 
39
+ # Returns attribute mapping this model knows about
40
+ def self.acceptable_attribute_map
41
+ attribute_map
42
+ end
43
+
39
44
  # Returns all the JSON keys this model knows about
40
45
  def self.acceptable_attributes
41
- attribute_map.values
46
+ acceptable_attribute_map.values
42
47
  end
43
48
 
44
49
  # Attribute type mapping.
@@ -65,9 +70,10 @@ module Bandwidth
65
70
  end
66
71
 
67
72
  # check to see if the attribute exists and convert string to symbol for hash key
73
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
74
  attributes = attributes.each_with_object({}) { |(k, v), h|
69
- if (!self.class.attribute_map.key?(k.to_sym))
70
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallTranscriptionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
75
+ if (!acceptable_attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::CallTranscriptionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
77
  end
72
78
  h[k.to_sym] = v
73
79
  }
@@ -152,61 +158,6 @@ module Bandwidth
152
158
  new(transformed_hash)
153
159
  end
154
160
 
155
- # Deserializes the data based on type
156
- # @param string type Data type
157
- # @param string value Value to be deserialized
158
- # @return [Object] Deserialized data
159
- def self._deserialize(type, value)
160
- case type.to_sym
161
- when :Time
162
- Time.parse(value)
163
- when :Date
164
- Date.parse(value)
165
- when :String
166
- value.to_s
167
- when :Integer
168
- value.to_i
169
- when :Float
170
- value.to_f
171
- when :Boolean
172
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
173
- true
174
- else
175
- false
176
- end
177
- when :Object
178
- # generic object (usually a Hash), return directly
179
- value
180
- when /\AArray<(?<inner_type>.+)>\z/
181
- inner_type = Regexp.last_match[:inner_type]
182
- value.map { |v| _deserialize(inner_type, v) }
183
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
184
- k_type = Regexp.last_match[:k_type]
185
- v_type = Regexp.last_match[:v_type]
186
- {}.tap do |hash|
187
- value.each do |k, v|
188
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
189
- end
190
- end
191
- else # model
192
- # models (e.g. Pet) or oneOf
193
- klass = Bandwidth.const_get(type)
194
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
195
- end
196
- end
197
-
198
- # Returns the string representation of the object
199
- # @return [String] String presentation of the object
200
- def to_s
201
- to_hash.to_s
202
- end
203
-
204
- # to_body is an alias to to_hash (backward compatibility)
205
- # @return [Hash] Returns the object in the form of hash
206
- def to_body
207
- to_hash
208
- end
209
-
210
161
  # Returns the object in the form of hash
211
162
  # @return [Hash] Returns the object in the form of hash
212
163
  def to_hash
@@ -222,23 +173,5 @@ module Bandwidth
222
173
  end
223
174
  hash
224
175
  end
225
-
226
- # Outputs non-array value in the form of hash
227
- # For object, use to_hash. Otherwise, just return the value
228
- # @param [Object] value Any valid value
229
- # @return [Hash] Returns the value in the form of hash
230
- def _to_hash(value)
231
- if value.is_a?(Array)
232
- value.compact.map { |v| _to_hash(v) }
233
- elsif value.is_a?(Hash)
234
- {}.tap do |hash|
235
- value.each { |k, v| hash[k] = _to_hash(v) }
236
- end
237
- elsif value.respond_to? :to_hash
238
- value.to_hash
239
- else
240
- value
241
- end
242
- end
243
176
  end
244
177
  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