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 Conference Member Exit event is fired whenever a caller exits a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference.
18
- class ConferenceMemberExitCallback
18
+ class ConferenceMemberExitCallback < 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
 
@@ -54,9 +54,14 @@ module Bandwidth
54
54
  }
55
55
  end
56
56
 
57
+ # Returns attribute mapping this model knows about
58
+ def self.acceptable_attribute_map
59
+ attribute_map
60
+ end
61
+
57
62
  # Returns all the JSON keys this model knows about
58
63
  def self.acceptable_attributes
59
- attribute_map.values
64
+ acceptable_attribute_map.values
60
65
  end
61
66
 
62
67
  # Attribute type mapping.
@@ -88,9 +93,10 @@ module Bandwidth
88
93
  end
89
94
 
90
95
  # check to see if the attribute exists and convert string to symbol for hash key
96
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
97
  attributes = attributes.each_with_object({}) { |(k, v), h|
92
- if (!self.class.attribute_map.key?(k.to_sym))
93
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceMemberExitCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
98
+ if (!acceptable_attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceMemberExitCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
100
  end
95
101
  h[k.to_sym] = v
96
102
  }
@@ -193,61 +199,6 @@ module Bandwidth
193
199
  new(transformed_hash)
194
200
  end
195
201
 
196
- # Deserializes the data based on type
197
- # @param string type Data type
198
- # @param string value Value to be deserialized
199
- # @return [Object] Deserialized data
200
- def self._deserialize(type, value)
201
- case type.to_sym
202
- when :Time
203
- Time.parse(value)
204
- when :Date
205
- Date.parse(value)
206
- when :String
207
- value.to_s
208
- when :Integer
209
- value.to_i
210
- when :Float
211
- value.to_f
212
- when :Boolean
213
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
214
- true
215
- else
216
- false
217
- end
218
- when :Object
219
- # generic object (usually a Hash), return directly
220
- value
221
- when /\AArray<(?<inner_type>.+)>\z/
222
- inner_type = Regexp.last_match[:inner_type]
223
- value.map { |v| _deserialize(inner_type, v) }
224
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
225
- k_type = Regexp.last_match[:k_type]
226
- v_type = Regexp.last_match[:v_type]
227
- {}.tap do |hash|
228
- value.each do |k, v|
229
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
230
- end
231
- end
232
- else # model
233
- # models (e.g. Pet) or oneOf
234
- klass = Bandwidth.const_get(type)
235
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
236
- end
237
- end
238
-
239
- # Returns the string representation of the object
240
- # @return [String] String presentation of the object
241
- def to_s
242
- to_hash.to_s
243
- end
244
-
245
- # to_body is an alias to to_hash (backward compatibility)
246
- # @return [Hash] Returns the object in the form of hash
247
- def to_body
248
- to_hash
249
- end
250
-
251
202
  # Returns the object in the form of hash
252
203
  # @return [Hash] Returns the object in the form of hash
253
204
  def to_hash
@@ -263,23 +214,5 @@ module Bandwidth
263
214
  end
264
215
  hash
265
216
  end
266
-
267
- # Outputs non-array value in the form of hash
268
- # For object, use to_hash. Otherwise, just return the value
269
- # @param [Object] value Any valid value
270
- # @return [Hash] Returns the value in the form of hash
271
- def _to_hash(value)
272
- if value.is_a?(Array)
273
- value.compact.map { |v| _to_hash(v) }
274
- elsif value.is_a?(Hash)
275
- {}.tap do |hash|
276
- value.each { |k, v| hash[k] = _to_hash(v) }
277
- end
278
- elsif value.respond_to? :to_hash
279
- value.to_hash
280
- else
281
- value
282
- end
283
- end
284
217
  end
285
218
  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 Conference Member Join event is fired whenever a caller joins a conference that specified a callbackUrl. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference.
18
- class ConferenceMemberJoinCallback
18
+ class ConferenceMemberJoinCallback < 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
 
@@ -54,9 +54,14 @@ module Bandwidth
54
54
  }
55
55
  end
56
56
 
57
+ # Returns attribute mapping this model knows about
58
+ def self.acceptable_attribute_map
59
+ attribute_map
60
+ end
61
+
57
62
  # Returns all the JSON keys this model knows about
58
63
  def self.acceptable_attributes
59
- attribute_map.values
64
+ acceptable_attribute_map.values
60
65
  end
61
66
 
62
67
  # Attribute type mapping.
@@ -88,9 +93,10 @@ module Bandwidth
88
93
  end
89
94
 
90
95
  # check to see if the attribute exists and convert string to symbol for hash key
96
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
97
  attributes = attributes.each_with_object({}) { |(k, v), h|
92
- if (!self.class.attribute_map.key?(k.to_sym))
93
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceMemberJoinCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
98
+ if (!acceptable_attribute_map.key?(k.to_sym))
99
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceMemberJoinCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
100
  end
95
101
  h[k.to_sym] = v
96
102
  }
@@ -193,61 +199,6 @@ module Bandwidth
193
199
  new(transformed_hash)
194
200
  end
195
201
 
196
- # Deserializes the data based on type
197
- # @param string type Data type
198
- # @param string value Value to be deserialized
199
- # @return [Object] Deserialized data
200
- def self._deserialize(type, value)
201
- case type.to_sym
202
- when :Time
203
- Time.parse(value)
204
- when :Date
205
- Date.parse(value)
206
- when :String
207
- value.to_s
208
- when :Integer
209
- value.to_i
210
- when :Float
211
- value.to_f
212
- when :Boolean
213
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
214
- true
215
- else
216
- false
217
- end
218
- when :Object
219
- # generic object (usually a Hash), return directly
220
- value
221
- when /\AArray<(?<inner_type>.+)>\z/
222
- inner_type = Regexp.last_match[:inner_type]
223
- value.map { |v| _deserialize(inner_type, v) }
224
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
225
- k_type = Regexp.last_match[:k_type]
226
- v_type = Regexp.last_match[:v_type]
227
- {}.tap do |hash|
228
- value.each do |k, v|
229
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
230
- end
231
- end
232
- else # model
233
- # models (e.g. Pet) or oneOf
234
- klass = Bandwidth.const_get(type)
235
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
236
- end
237
- end
238
-
239
- # Returns the string representation of the object
240
- # @return [String] String presentation of the object
241
- def to_s
242
- to_hash.to_s
243
- end
244
-
245
- # to_body is an alias to to_hash (backward compatibility)
246
- # @return [Hash] Returns the object in the form of hash
247
- def to_body
248
- to_hash
249
- end
250
-
251
202
  # Returns the object in the form of hash
252
203
  # @return [Hash] Returns the object in the form of hash
253
204
  def to_hash
@@ -263,23 +214,5 @@ module Bandwidth
263
214
  end
264
215
  hash
265
216
  end
266
-
267
- # Outputs non-array value in the form of hash
268
- # For object, use to_hash. Otherwise, just return the value
269
- # @param [Object] value Any valid value
270
- # @return [Hash] Returns the value in the form of hash
271
- def _to_hash(value)
272
- if value.is_a?(Array)
273
- value.compact.map { |v| _to_hash(v) }
274
- elsif value.is_a?(Hash)
275
- {}.tap do |hash|
276
- value.each { |k, v| hash[k] = _to_hash(v) }
277
- end
278
- elsif value.respond_to? :to_hash
279
- value.to_hash
280
- else
281
- value
282
- end
283
- end
284
217
  end
285
218
  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 Conference Recording Available event is sent after a conference recording has been processed. It indicates that the recording is available for download.
18
- class ConferenceRecordingAvailableCallback
18
+ class ConferenceRecordingAvailableCallback < 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
 
@@ -99,9 +99,14 @@ module Bandwidth
99
99
  }
100
100
  end
101
101
 
102
+ # Returns attribute mapping this model knows about
103
+ def self.acceptable_attribute_map
104
+ attribute_map
105
+ end
106
+
102
107
  # Returns all the JSON keys this model knows about
103
108
  def self.acceptable_attributes
104
- attribute_map.values
109
+ acceptable_attribute_map.values
105
110
  end
106
111
 
107
112
  # Attribute type mapping.
@@ -140,9 +145,10 @@ module Bandwidth
140
145
  end
141
146
 
142
147
  # check to see if the attribute exists and convert string to symbol for hash key
148
+ acceptable_attribute_map = self.class.acceptable_attribute_map
143
149
  attributes = attributes.each_with_object({}) { |(k, v), h|
144
- if (!self.class.attribute_map.key?(k.to_sym))
145
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceRecordingAvailableCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
150
+ if (!acceptable_attribute_map.key?(k.to_sym))
151
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceRecordingAvailableCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
146
152
  end
147
153
  h[k.to_sym] = v
148
154
  }
@@ -275,61 +281,6 @@ module Bandwidth
275
281
  new(transformed_hash)
276
282
  end
277
283
 
278
- # Deserializes the data based on type
279
- # @param string type Data type
280
- # @param string value Value to be deserialized
281
- # @return [Object] Deserialized data
282
- def self._deserialize(type, value)
283
- case type.to_sym
284
- when :Time
285
- Time.parse(value)
286
- when :Date
287
- Date.parse(value)
288
- when :String
289
- value.to_s
290
- when :Integer
291
- value.to_i
292
- when :Float
293
- value.to_f
294
- when :Boolean
295
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
296
- true
297
- else
298
- false
299
- end
300
- when :Object
301
- # generic object (usually a Hash), return directly
302
- value
303
- when /\AArray<(?<inner_type>.+)>\z/
304
- inner_type = Regexp.last_match[:inner_type]
305
- value.map { |v| _deserialize(inner_type, v) }
306
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
307
- k_type = Regexp.last_match[:k_type]
308
- v_type = Regexp.last_match[:v_type]
309
- {}.tap do |hash|
310
- value.each do |k, v|
311
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
312
- end
313
- end
314
- else # model
315
- # models (e.g. Pet) or oneOf
316
- klass = Bandwidth.const_get(type)
317
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
318
- end
319
- end
320
-
321
- # Returns the string representation of the object
322
- # @return [String] String presentation of the object
323
- def to_s
324
- to_hash.to_s
325
- end
326
-
327
- # to_body is an alias to to_hash (backward compatibility)
328
- # @return [Hash] Returns the object in the form of hash
329
- def to_body
330
- to_hash
331
- end
332
-
333
284
  # Returns the object in the form of hash
334
285
  # @return [Hash] Returns the object in the form of hash
335
286
  def to_hash
@@ -345,23 +296,5 @@ module Bandwidth
345
296
  end
346
297
  hash
347
298
  end
348
-
349
- # Outputs non-array value in the form of hash
350
- # For object, use to_hash. Otherwise, just return the value
351
- # @param [Object] value Any valid value
352
- # @return [Hash] Returns the value in the form of hash
353
- def _to_hash(value)
354
- if value.is_a?(Array)
355
- value.compact.map { |v| _to_hash(v) }
356
- elsif value.is_a?(Hash)
357
- {}.tap do |hash|
358
- value.each { |k, v| hash[k] = _to_hash(v) }
359
- end
360
- elsif value.respond_to? :to_hash
361
- value.to_hash
362
- else
363
- value
364
- end
365
- end
366
299
  end
367
300
  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 ConferenceRecordingMetadata
17
+ class ConferenceRecordingMetadata < ApiModelBase
18
18
  # The user account associated with the call.
19
19
  attr_accessor :account_id
20
20
 
@@ -90,9 +90,14 @@ module Bandwidth
90
90
  }
91
91
  end
92
92
 
93
+ # Returns attribute mapping this model knows about
94
+ def self.acceptable_attribute_map
95
+ attribute_map
96
+ end
97
+
93
98
  # Returns all the JSON keys this model knows about
94
99
  def self.acceptable_attributes
95
- attribute_map.values
100
+ acceptable_attribute_map.values
96
101
  end
97
102
 
98
103
  # Attribute type mapping.
@@ -128,9 +133,10 @@ module Bandwidth
128
133
  end
129
134
 
130
135
  # check to see if the attribute exists and convert string to symbol for hash key
136
+ acceptable_attribute_map = self.class.acceptable_attribute_map
131
137
  attributes = attributes.each_with_object({}) { |(k, v), h|
132
- if (!self.class.attribute_map.key?(k.to_sym))
133
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceRecordingMetadata`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
138
+ if (!acceptable_attribute_map.key?(k.to_sym))
139
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceRecordingMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
134
140
  end
135
141
  h[k.to_sym] = v
136
142
  }
@@ -253,61 +259,6 @@ module Bandwidth
253
259
  new(transformed_hash)
254
260
  end
255
261
 
256
- # Deserializes the data based on type
257
- # @param string type Data type
258
- # @param string value Value to be deserialized
259
- # @return [Object] Deserialized data
260
- def self._deserialize(type, value)
261
- case type.to_sym
262
- when :Time
263
- Time.parse(value)
264
- when :Date
265
- Date.parse(value)
266
- when :String
267
- value.to_s
268
- when :Integer
269
- value.to_i
270
- when :Float
271
- value.to_f
272
- when :Boolean
273
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
274
- true
275
- else
276
- false
277
- end
278
- when :Object
279
- # generic object (usually a Hash), return directly
280
- value
281
- when /\AArray<(?<inner_type>.+)>\z/
282
- inner_type = Regexp.last_match[:inner_type]
283
- value.map { |v| _deserialize(inner_type, v) }
284
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
285
- k_type = Regexp.last_match[:k_type]
286
- v_type = Regexp.last_match[:v_type]
287
- {}.tap do |hash|
288
- value.each do |k, v|
289
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
290
- end
291
- end
292
- else # model
293
- # models (e.g. Pet) or oneOf
294
- klass = Bandwidth.const_get(type)
295
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
296
- end
297
- end
298
-
299
- # Returns the string representation of the object
300
- # @return [String] String presentation of the object
301
- def to_s
302
- to_hash.to_s
303
- end
304
-
305
- # to_body is an alias to to_hash (backward compatibility)
306
- # @return [Hash] Returns the object in the form of hash
307
- def to_body
308
- to_hash
309
- end
310
-
311
262
  # Returns the object in the form of hash
312
263
  # @return [Hash] Returns the object in the form of hash
313
264
  def to_hash
@@ -323,23 +274,5 @@ module Bandwidth
323
274
  end
324
275
  hash
325
276
  end
326
-
327
- # Outputs non-array value in the form of hash
328
- # For object, use to_hash. Otherwise, just return the value
329
- # @param [Object] value Any valid value
330
- # @return [Hash] Returns the value in the form of hash
331
- def _to_hash(value)
332
- if value.is_a?(Array)
333
- value.compact.map { |v| _to_hash(v) }
334
- elsif value.is_a?(Hash)
335
- {}.tap do |hash|
336
- value.each { |k, v| hash[k] = _to_hash(v) }
337
- end
338
- elsif value.respond_to? :to_hash
339
- value.to_hash
340
- else
341
- value
342
- end
343
- end
344
277
  end
345
278
  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 Conference Redirect event is fired whenever an existing conference is modified via a POST request made to the /conferences/{conferenceId} endpoint. The response may be either empty or a BXML document. Only the following verbs are valid for conferences: PlayAudio, SpeakSentence, StartRecording, StopRecording, PauseRecording, ResumeRecording. Audio verbs will be heard by all members of the conference. Recordings capture audio from all members who are not muted or on hold, as well as any audio verbs that are played into the conference.
18
- class ConferenceRedirectCallback
18
+ class ConferenceRedirectCallback < 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
 
@@ -42,9 +42,14 @@ module Bandwidth
42
42
  }
43
43
  end
44
44
 
45
+ # Returns attribute mapping this model knows about
46
+ def self.acceptable_attribute_map
47
+ attribute_map
48
+ end
49
+
45
50
  # Returns all the JSON keys this model knows about
46
51
  def self.acceptable_attributes
47
- attribute_map.values
52
+ acceptable_attribute_map.values
48
53
  end
49
54
 
50
55
  # Attribute type mapping.
@@ -73,9 +78,10 @@ module Bandwidth
73
78
  end
74
79
 
75
80
  # check to see if the attribute exists and convert string to symbol for hash key
81
+ acceptable_attribute_map = self.class.acceptable_attribute_map
76
82
  attributes = attributes.each_with_object({}) { |(k, v), h|
77
- if (!self.class.attribute_map.key?(k.to_sym))
78
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceRedirectCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ if (!acceptable_attribute_map.key?(k.to_sym))
84
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::ConferenceRedirectCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
79
85
  end
80
86
  h[k.to_sym] = v
81
87
  }
@@ -163,61 +169,6 @@ module Bandwidth
163
169
  new(transformed_hash)
164
170
  end
165
171
 
166
- # Deserializes the data based on type
167
- # @param string type Data type
168
- # @param string value Value to be deserialized
169
- # @return [Object] Deserialized data
170
- def self._deserialize(type, value)
171
- case type.to_sym
172
- when :Time
173
- Time.parse(value)
174
- when :Date
175
- Date.parse(value)
176
- when :String
177
- value.to_s
178
- when :Integer
179
- value.to_i
180
- when :Float
181
- value.to_f
182
- when :Boolean
183
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
- true
185
- else
186
- false
187
- end
188
- when :Object
189
- # generic object (usually a Hash), return directly
190
- value
191
- when /\AArray<(?<inner_type>.+)>\z/
192
- inner_type = Regexp.last_match[:inner_type]
193
- value.map { |v| _deserialize(inner_type, v) }
194
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
- k_type = Regexp.last_match[:k_type]
196
- v_type = Regexp.last_match[:v_type]
197
- {}.tap do |hash|
198
- value.each do |k, v|
199
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
- end
201
- end
202
- else # model
203
- # models (e.g. Pet) or oneOf
204
- klass = Bandwidth.const_get(type)
205
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
- end
207
- end
208
-
209
- # Returns the string representation of the object
210
- # @return [String] String presentation of the object
211
- def to_s
212
- to_hash.to_s
213
- end
214
-
215
- # to_body is an alias to to_hash (backward compatibility)
216
- # @return [Hash] Returns the object in the form of hash
217
- def to_body
218
- to_hash
219
- end
220
-
221
172
  # Returns the object in the form of hash
222
173
  # @return [Hash] Returns the object in the form of hash
223
174
  def to_hash
@@ -233,23 +184,5 @@ module Bandwidth
233
184
  end
234
185
  hash
235
186
  end
236
-
237
- # Outputs non-array value in the form of hash
238
- # For object, use to_hash. Otherwise, just return the value
239
- # @param [Object] value Any valid value
240
- # @return [Hash] Returns the value in the form of hash
241
- def _to_hash(value)
242
- if value.is_a?(Array)
243
- value.compact.map { |v| _to_hash(v) }
244
- elsif value.is_a?(Hash)
245
- {}.tap do |hash|
246
- value.each { |k, v| hash[k] = _to_hash(v) }
247
- end
248
- elsif value.respond_to? :to_hash
249
- value.to_hash
250
- else
251
- value
252
- end
253
- end
254
187
  end
255
188
  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