bandwidth-sdk 17.0.1 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +18 -0
  4. data/bandwidth-sdk.gemspec +1 -2
  5. data/bandwidth.yml +7 -0
  6. data/coverage/.last_run.json +1 -1
  7. data/coverage/.resultset.json +198 -387
  8. data/coverage/index.html +5842 -7703
  9. data/custom_templates/README.mustache +4 -1
  10. data/custom_templates/api_client.mustache +254 -0
  11. data/custom_templates/configuration.mustache +545 -0
  12. data/custom_templates/gem.mustache +2 -0
  13. data/docs/CallsApi.md +20 -5
  14. data/docs/ConferencesApi.md +36 -9
  15. data/docs/MFAApi.md +12 -3
  16. data/docs/MediaApi.md +16 -4
  17. data/docs/MessagesApi.md +8 -2
  18. data/docs/MultiChannelApi.md +4 -1
  19. data/docs/PhoneNumberLookupApi.md +12 -3
  20. data/docs/RecordingsApi.md +40 -10
  21. data/docs/StatisticsApi.md +4 -1
  22. data/docs/TollFreeVerificationApi.md +36 -9
  23. data/docs/TranscriptionsApi.md +12 -3
  24. data/lib/bandwidth-sdk/api/calls_api.rb +6 -6
  25. data/lib/bandwidth-sdk/api/conferences_api.rb +10 -10
  26. data/lib/bandwidth-sdk/api/media_api.rb +5 -5
  27. data/lib/bandwidth-sdk/api/messages_api.rb +3 -3
  28. data/lib/bandwidth-sdk/api/mfa_api.rb +4 -4
  29. data/lib/bandwidth-sdk/api/multi_channel_api.rb +2 -2
  30. data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +4 -4
  31. data/lib/bandwidth-sdk/api/recordings_api.rb +11 -11
  32. data/lib/bandwidth-sdk/api/statistics_api.rb +2 -2
  33. data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +13 -13
  34. data/lib/bandwidth-sdk/api/transcriptions_api.rb +4 -4
  35. data/lib/bandwidth-sdk/api_client.rb +9 -5
  36. data/lib/bandwidth-sdk/api_error.rb +1 -1
  37. data/lib/bandwidth-sdk/api_model_base.rb +88 -0
  38. data/lib/bandwidth-sdk/configuration.rb +50 -1
  39. data/lib/bandwidth-sdk/models/account_statistics.rb +11 -78
  40. data/lib/bandwidth-sdk/models/additional_denial_reason.rb +41 -78
  41. data/lib/bandwidth-sdk/models/address.rb +23 -90
  42. data/lib/bandwidth-sdk/models/answer_callback.rb +11 -78
  43. data/lib/bandwidth-sdk/models/async_lookup_request.rb +11 -78
  44. data/lib/bandwidth-sdk/models/blocked_webhook.rb +13 -80
  45. data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +11 -78
  46. data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +11 -78
  47. data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +1 -1
  48. data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +1 -1
  49. data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
  50. data/lib/bandwidth-sdk/models/call_recording_metadata.rb +11 -78
  51. data/lib/bandwidth-sdk/models/call_state.rb +11 -78
  52. data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
  53. data/lib/bandwidth-sdk/models/call_transcription.rb +11 -78
  54. data/lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb +1 -1
  55. data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +11 -78
  56. data/lib/bandwidth-sdk/models/call_transcription_response.rb +11 -78
  57. data/lib/bandwidth-sdk/models/call_transcription_track_enum.rb +1 -1
  58. data/lib/bandwidth-sdk/models/callback.rb +1 -1
  59. data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
  60. data/lib/bandwidth-sdk/models/card_width_enum.rb +1 -1
  61. data/lib/bandwidth-sdk/models/code_request.rb +11 -78
  62. data/lib/bandwidth-sdk/models/completed_lookup_status_enum.rb +1 -1
  63. data/lib/bandwidth-sdk/models/conference.rb +11 -78
  64. data/lib/bandwidth-sdk/models/conference_completed_callback.rb +11 -78
  65. data/lib/bandwidth-sdk/models/conference_created_callback.rb +11 -78
  66. data/lib/bandwidth-sdk/models/conference_member.rb +11 -78
  67. data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +11 -78
  68. data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +11 -78
  69. data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +11 -78
  70. data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +11 -78
  71. data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +11 -78
  72. data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
  73. data/lib/bandwidth-sdk/models/contact.rb +19 -86
  74. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb +11 -78
  75. data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response_data.rb +11 -78
  76. data/lib/bandwidth-sdk/models/create_call.rb +41 -78
  77. data/lib/bandwidth-sdk/models/create_call_response.rb +81 -78
  78. data/lib/bandwidth-sdk/models/create_message_request_error.rb +31 -78
  79. data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +11 -78
  80. data/lib/bandwidth-sdk/models/create_sync_lookup_response.rb +11 -78
  81. data/lib/bandwidth-sdk/models/create_sync_lookup_response_data.rb +11 -78
  82. data/lib/bandwidth-sdk/models/deactivation_event_enum.rb +1 -1
  83. data/lib/bandwidth-sdk/models/disconnect_callback.rb +11 -78
  84. data/lib/bandwidth-sdk/models/diversion.rb +11 -78
  85. data/lib/bandwidth-sdk/models/dtmf_callback.rb +11 -78
  86. data/lib/bandwidth-sdk/models/error.rb +11 -78
  87. data/lib/bandwidth-sdk/models/error_object.rb +41 -78
  88. data/lib/bandwidth-sdk/models/error_source.rb +11 -78
  89. data/lib/bandwidth-sdk/models/failure_webhook.rb +13 -80
  90. data/lib/bandwidth-sdk/models/field_error.rb +11 -78
  91. data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
  92. data/lib/bandwidth-sdk/models/gather_callback.rb +11 -78
  93. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response.rb +11 -78
  94. data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response_data.rb +11 -78
  95. data/lib/bandwidth-sdk/models/in_progress_lookup_status_enum.rb +1 -1
  96. data/lib/bandwidth-sdk/models/inbound_callback.rb +61 -78
  97. data/lib/bandwidth-sdk/models/inbound_callback_message.rb +81 -78
  98. data/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb +1 -1
  99. data/lib/bandwidth-sdk/models/initiate_callback.rb +11 -78
  100. data/lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb +1 -1
  101. data/lib/bandwidth-sdk/models/line_type_enum.rb +1 -1
  102. data/lib/bandwidth-sdk/models/link.rb +11 -78
  103. data/lib/bandwidth-sdk/models/link_schema.rb +11 -78
  104. data/lib/bandwidth-sdk/models/links_object.rb +11 -78
  105. data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
  106. data/lib/bandwidth-sdk/models/list_message_item.rb +11 -78
  107. data/lib/bandwidth-sdk/models/lookup_error_response.rb +11 -78
  108. data/lib/bandwidth-sdk/models/lookup_error_schema.rb +11 -78
  109. data/lib/bandwidth-sdk/models/lookup_error_schema_meta.rb +11 -78
  110. data/lib/bandwidth-sdk/models/lookup_result.rb +11 -78
  111. data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +11 -78
  112. data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +11 -78
  113. data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
  114. data/lib/bandwidth-sdk/models/machine_detection_result.rb +11 -78
  115. data/lib/bandwidth-sdk/models/media.rb +11 -78
  116. data/lib/bandwidth-sdk/models/message.rb +11 -78
  117. data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
  118. data/lib/bandwidth-sdk/models/message_request.rb +31 -78
  119. data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
  120. data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
  121. data/lib/bandwidth-sdk/models/messages_list.rb +11 -78
  122. data/lib/bandwidth-sdk/models/messaging_code_response.rb +11 -78
  123. data/lib/bandwidth-sdk/models/messaging_request_error.rb +31 -78
  124. data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +11 -78
  125. data/lib/bandwidth-sdk/models/mfa_request_error.rb +11 -78
  126. data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +11 -78
  127. data/lib/bandwidth-sdk/models/mms_message_content.rb +11 -78
  128. data/lib/bandwidth-sdk/models/mms_message_content_file.rb +11 -78
  129. data/lib/bandwidth-sdk/models/multi_channel_action.rb +3 -4
  130. data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +41 -78
  131. data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_object.rb +51 -78
  132. data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_response_object.rb +61 -78
  133. data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb +41 -78
  134. data/lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb +21 -78
  135. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb +51 -78
  136. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object_all_of_content.rb +3 -4
  137. data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb +61 -78
  138. data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +3 -4
  139. data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +3 -4
  140. data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb +51 -78
  141. data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb +61 -78
  142. data/lib/bandwidth-sdk/models/multi_channel_error.rb +11 -78
  143. data/lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb +1 -1
  144. data/lib/bandwidth-sdk/models/multi_channel_message_content.rb +11 -78
  145. data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +21 -78
  146. data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +41 -78
  147. data/lib/bandwidth-sdk/models/opt_in_workflow.rb +25 -82
  148. data/lib/bandwidth-sdk/models/page_info.rb +11 -78
  149. data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
  150. data/lib/bandwidth-sdk/models/product_type_enum.rb +1 -1
  151. data/lib/bandwidth-sdk/models/rbm_action_base.rb +21 -78
  152. data/lib/bandwidth-sdk/models/rbm_action_dial.rb +31 -78
  153. data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +21 -78
  154. data/lib/bandwidth-sdk/models/rbm_action_type_enum.rb +1 -1
  155. data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +41 -78
  156. data/lib/bandwidth-sdk/models/rbm_card_content.rb +11 -78
  157. data/lib/bandwidth-sdk/models/rbm_card_content_media.rb +21 -78
  158. data/lib/bandwidth-sdk/models/rbm_location_response.rb +11 -78
  159. data/lib/bandwidth-sdk/models/rbm_media_height_enum.rb +1 -1
  160. data/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +21 -78
  161. data/lib/bandwidth-sdk/models/rbm_message_content_file.rb +11 -78
  162. data/lib/bandwidth-sdk/models/rbm_message_content_rich_card.rb +3 -4
  163. data/lib/bandwidth-sdk/models/rbm_message_content_text.rb +11 -78
  164. data/lib/bandwidth-sdk/models/rbm_message_media.rb +21 -78
  165. data/lib/bandwidth-sdk/models/rbm_standalone_card.rb +41 -78
  166. data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +11 -78
  167. data/lib/bandwidth-sdk/models/recording_available_callback.rb +11 -78
  168. data/lib/bandwidth-sdk/models/recording_complete_callback.rb +11 -78
  169. data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
  170. data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +11 -78
  171. data/lib/bandwidth-sdk/models/recording_transcriptions.rb +11 -78
  172. data/lib/bandwidth-sdk/models/redirect_callback.rb +11 -78
  173. data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
  174. data/lib/bandwidth-sdk/models/sms_message_content.rb +11 -78
  175. data/lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb +1 -1
  176. data/lib/bandwidth-sdk/models/status_callback.rb +61 -78
  177. data/lib/bandwidth-sdk/models/status_callback_message.rb +81 -78
  178. data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +6 -6
  179. data/lib/bandwidth-sdk/models/stir_shaken.rb +11 -78
  180. data/lib/bandwidth-sdk/models/sync_lookup_request.rb +11 -78
  181. data/lib/bandwidth-sdk/models/telephone_number.rb +11 -78
  182. data/lib/bandwidth-sdk/models/tfv_basic_authentication.rb +11 -78
  183. data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +1 -1
  184. data/lib/bandwidth-sdk/models/tfv_error.rb +11 -78
  185. data/lib/bandwidth-sdk/models/tfv_status.rb +13 -80
  186. data/lib/bandwidth-sdk/models/tfv_status_enum.rb +1 -1
  187. data/lib/bandwidth-sdk/models/tfv_submission_info.rb +21 -88
  188. data/lib/bandwidth-sdk/models/tfv_submission_wrapper.rb +11 -78
  189. data/lib/bandwidth-sdk/models/thumbnail_alignment_enum.rb +1 -1
  190. data/lib/bandwidth-sdk/models/transcribe_recording.rb +11 -78
  191. data/lib/bandwidth-sdk/models/transcription.rb +11 -78
  192. data/lib/bandwidth-sdk/models/transcription_available_callback.rb +11 -78
  193. data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +11 -78
  194. data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +11 -78
  195. data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +11 -78
  196. data/lib/bandwidth-sdk/models/update_call.rb +11 -78
  197. data/lib/bandwidth-sdk/models/update_call_recording.rb +21 -78
  198. data/lib/bandwidth-sdk/models/update_conference.rb +11 -78
  199. data/lib/bandwidth-sdk/models/update_conference_member.rb +11 -78
  200. data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +13 -80
  201. data/lib/bandwidth-sdk/models/verification_request.rb +51 -88
  202. data/lib/bandwidth-sdk/models/verification_update_request.rb +51 -88
  203. data/lib/bandwidth-sdk/models/verification_webhook.rb +13 -80
  204. data/lib/bandwidth-sdk/models/verify_code_request.rb +13 -80
  205. data/lib/bandwidth-sdk/models/verify_code_response.rb +11 -78
  206. data/lib/bandwidth-sdk/models/voice_api_error.rb +11 -78
  207. data/lib/bandwidth-sdk/models/voice_code_response.rb +11 -78
  208. data/lib/bandwidth-sdk/models/webhook_subscription.rb +13 -80
  209. data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +11 -78
  210. data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +15 -82
  211. data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +1 -1
  212. data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +21 -78
  213. data/lib/bandwidth-sdk/version.rb +2 -2
  214. data/lib/bandwidth-sdk.rb +2 -1
  215. data/openapitools.json +1 -1
  216. data/spec/smoke/calls_api_spec.rb +50 -76
  217. data/spec/smoke/conferences_api_spec.rb +7 -5
  218. data/spec/smoke/media_api_spec.rb +4 -2
  219. data/spec/smoke/messages_api_spec.rb +9 -4
  220. data/spec/smoke/mfa_api_spec.rb +9 -4
  221. data/spec/smoke/multi_channel_api_spec.rb +4 -2
  222. data/spec/smoke/phone_number_lookup_api_spec.rb +6 -4
  223. data/spec/smoke/recordings_api_spec.rb +7 -33
  224. data/spec/smoke/statistics_api_spec.rb +16 -8
  225. data/spec/smoke/toll_free_verification_api_spec.rb +6 -4
  226. data/spec/smoke/transcriptions_api_spec.rb +7 -5
  227. data/spec/spec_helper.rb +2 -0
  228. data/spec/unit/models/verify_code_request_spec.rb +1 -1
  229. metadata +5 -2
@@ -6,7 +6,7 @@
6
6
  The version of the OpenAPI document: 1.0.0
7
7
  Contact: letstalk@bandwidth.com
8
8
  Generated by: https://openapi-generator.tech
9
- Generator version: 7.8.0
9
+ Generator version: 7.17.0
10
10
 
11
11
  =end
12
12
 
@@ -15,7 +15,7 @@ require 'time'
15
15
 
16
16
  module Bandwidth
17
17
  # The Transcription Available event is sent when the recording transcription is available to be downloaded.
18
- class TranscriptionAvailableCallback
18
+ class TranscriptionAvailableCallback < 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
 
@@ -125,9 +125,14 @@ module Bandwidth
125
125
  }
126
126
  end
127
127
 
128
+ # Returns attribute mapping this model knows about
129
+ def self.acceptable_attribute_map
130
+ attribute_map
131
+ end
132
+
128
133
  # Returns all the JSON keys this model knows about
129
134
  def self.acceptable_attributes
130
- attribute_map.values
135
+ acceptable_attribute_map.values
131
136
  end
132
137
 
133
138
  # Attribute type mapping.
@@ -174,9 +179,10 @@ module Bandwidth
174
179
  end
175
180
 
176
181
  # check to see if the attribute exists and convert string to symbol for hash key
182
+ acceptable_attribute_map = self.class.acceptable_attribute_map
177
183
  attributes = attributes.each_with_object({}) { |(k, v), h|
178
- if (!self.class.attribute_map.key?(k.to_sym))
179
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TranscriptionAvailableCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
184
+ if (!acceptable_attribute_map.key?(k.to_sym))
185
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TranscriptionAvailableCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
180
186
  end
181
187
  h[k.to_sym] = v
182
188
  }
@@ -344,61 +350,6 @@ module Bandwidth
344
350
  new(transformed_hash)
345
351
  end
346
352
 
347
- # Deserializes the data based on type
348
- # @param string type Data type
349
- # @param string value Value to be deserialized
350
- # @return [Object] Deserialized data
351
- def self._deserialize(type, value)
352
- case type.to_sym
353
- when :Time
354
- Time.parse(value)
355
- when :Date
356
- Date.parse(value)
357
- when :String
358
- value.to_s
359
- when :Integer
360
- value.to_i
361
- when :Float
362
- value.to_f
363
- when :Boolean
364
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
365
- true
366
- else
367
- false
368
- end
369
- when :Object
370
- # generic object (usually a Hash), return directly
371
- value
372
- when /\AArray<(?<inner_type>.+)>\z/
373
- inner_type = Regexp.last_match[:inner_type]
374
- value.map { |v| _deserialize(inner_type, v) }
375
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
376
- k_type = Regexp.last_match[:k_type]
377
- v_type = Regexp.last_match[:v_type]
378
- {}.tap do |hash|
379
- value.each do |k, v|
380
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
381
- end
382
- end
383
- else # model
384
- # models (e.g. Pet) or oneOf
385
- klass = Bandwidth.const_get(type)
386
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
387
- end
388
- end
389
-
390
- # Returns the string representation of the object
391
- # @return [String] String presentation of the object
392
- def to_s
393
- to_hash.to_s
394
- end
395
-
396
- # to_body is an alias to to_hash (backward compatibility)
397
- # @return [Hash] Returns the object in the form of hash
398
- def to_body
399
- to_hash
400
- end
401
-
402
353
  # Returns the object in the form of hash
403
354
  # @return [Hash] Returns the object in the form of hash
404
355
  def to_hash
@@ -414,23 +365,5 @@ module Bandwidth
414
365
  end
415
366
  hash
416
367
  end
417
-
418
- # Outputs non-array value in the form of hash
419
- # For object, use to_hash. Otherwise, just return the value
420
- # @param [Object] value Any valid value
421
- # @return [Hash] Returns the value in the form of hash
422
- def _to_hash(value)
423
- if value.is_a?(Array)
424
- value.compact.map { |v| _to_hash(v) }
425
- elsif value.is_a?(Hash)
426
- {}.tap do |hash|
427
- value.each { |k, v| hash[k] = _to_hash(v) }
428
- end
429
- elsif value.respond_to? :to_hash
430
- value.to_hash
431
- else
432
- value
433
- end
434
- end
435
368
  end
436
369
  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
  # When processing a <Transfer> verb, this event is sent when a called party (B-leg) answers. The event is sent to the endpoint specified in the transferAnswerUrl attribute of the <PhoneNumber> tag that answered. BXML returned by this callback will be executed for the called party only. After all BXML has been executed, the called party will be bridged to the original call. Most BXML verbs are allowed in response to a transferAnswer event, but some are not allowed.
18
- class TransferAnswerCallback
18
+ class TransferAnswerCallback < 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
 
@@ -103,9 +103,14 @@ module Bandwidth
103
103
  }
104
104
  end
105
105
 
106
+ # Returns attribute mapping this model knows about
107
+ def self.acceptable_attribute_map
108
+ attribute_map
109
+ end
110
+
106
111
  # Returns all the JSON keys this model knows about
107
112
  def self.acceptable_attributes
108
- attribute_map.values
113
+ acceptable_attribute_map.values
109
114
  end
110
115
 
111
116
  # Attribute type mapping.
@@ -146,9 +151,10 @@ module Bandwidth
146
151
  end
147
152
 
148
153
  # check to see if the attribute exists and convert string to symbol for hash key
154
+ acceptable_attribute_map = self.class.acceptable_attribute_map
149
155
  attributes = attributes.each_with_object({}) { |(k, v), h|
150
- if (!self.class.attribute_map.key?(k.to_sym))
151
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TransferAnswerCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
156
+ if (!acceptable_attribute_map.key?(k.to_sym))
157
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TransferAnswerCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
152
158
  end
153
159
  h[k.to_sym] = v
154
160
  }
@@ -286,61 +292,6 @@ module Bandwidth
286
292
  new(transformed_hash)
287
293
  end
288
294
 
289
- # Deserializes the data based on type
290
- # @param string type Data type
291
- # @param string value Value to be deserialized
292
- # @return [Object] Deserialized data
293
- def self._deserialize(type, value)
294
- case type.to_sym
295
- when :Time
296
- Time.parse(value)
297
- when :Date
298
- Date.parse(value)
299
- when :String
300
- value.to_s
301
- when :Integer
302
- value.to_i
303
- when :Float
304
- value.to_f
305
- when :Boolean
306
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
307
- true
308
- else
309
- false
310
- end
311
- when :Object
312
- # generic object (usually a Hash), return directly
313
- value
314
- when /\AArray<(?<inner_type>.+)>\z/
315
- inner_type = Regexp.last_match[:inner_type]
316
- value.map { |v| _deserialize(inner_type, v) }
317
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
318
- k_type = Regexp.last_match[:k_type]
319
- v_type = Regexp.last_match[:v_type]
320
- {}.tap do |hash|
321
- value.each do |k, v|
322
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
323
- end
324
- end
325
- else # model
326
- # models (e.g. Pet) or oneOf
327
- klass = Bandwidth.const_get(type)
328
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
329
- end
330
- end
331
-
332
- # Returns the string representation of the object
333
- # @return [String] String presentation of the object
334
- def to_s
335
- to_hash.to_s
336
- end
337
-
338
- # to_body is an alias to to_hash (backward compatibility)
339
- # @return [Hash] Returns the object in the form of hash
340
- def to_body
341
- to_hash
342
- end
343
-
344
295
  # Returns the object in the form of hash
345
296
  # @return [Hash] Returns the object in the form of hash
346
297
  def to_hash
@@ -356,23 +307,5 @@ module Bandwidth
356
307
  end
357
308
  hash
358
309
  end
359
-
360
- # Outputs non-array value in the form of hash
361
- # For object, use to_hash. Otherwise, just return the value
362
- # @param [Object] value Any valid value
363
- # @return [Hash] Returns the value in the form of hash
364
- def _to_hash(value)
365
- if value.is_a?(Array)
366
- value.compact.map { |v| _to_hash(v) }
367
- elsif value.is_a?(Hash)
368
- {}.tap do |hash|
369
- value.each { |k, v| hash[k] = _to_hash(v) }
370
- end
371
- elsif value.respond_to? :to_hash
372
- value.to_hash
373
- else
374
- value
375
- end
376
- end
377
310
  end
378
311
  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
  # This event is sent to the transferCompleteUrl of the A-leg's <Transfer> verb when the transferred call (B-leg) completes. In a simultaneous ringing scenario, only one B-leg succeeds and this event corresponds to that successful leg. If none of the calls were answered, the transferComplete event corresponds to one of the legs.
18
- class TransferCompleteCallback
18
+ class TransferCompleteCallback < 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.
@@ -163,9 +168,10 @@ module Bandwidth
163
168
  end
164
169
 
165
170
  # check to see if the attribute exists and convert string to symbol for hash key
171
+ acceptable_attribute_map = self.class.acceptable_attribute_map
166
172
  attributes = attributes.each_with_object({}) { |(k, v), h|
167
- if (!self.class.attribute_map.key?(k.to_sym))
168
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TransferCompleteCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
173
+ if (!acceptable_attribute_map.key?(k.to_sym))
174
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TransferCompleteCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
169
175
  end
170
176
  h[k.to_sym] = v
171
177
  }
@@ -318,61 +324,6 @@ module Bandwidth
318
324
  new(transformed_hash)
319
325
  end
320
326
 
321
- # Deserializes the data based on type
322
- # @param string type Data type
323
- # @param string value Value to be deserialized
324
- # @return [Object] Deserialized data
325
- def self._deserialize(type, value)
326
- case type.to_sym
327
- when :Time
328
- Time.parse(value)
329
- when :Date
330
- Date.parse(value)
331
- when :String
332
- value.to_s
333
- when :Integer
334
- value.to_i
335
- when :Float
336
- value.to_f
337
- when :Boolean
338
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
339
- true
340
- else
341
- false
342
- end
343
- when :Object
344
- # generic object (usually a Hash), return directly
345
- value
346
- when /\AArray<(?<inner_type>.+)>\z/
347
- inner_type = Regexp.last_match[:inner_type]
348
- value.map { |v| _deserialize(inner_type, v) }
349
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
350
- k_type = Regexp.last_match[:k_type]
351
- v_type = Regexp.last_match[:v_type]
352
- {}.tap do |hash|
353
- value.each do |k, v|
354
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
355
- end
356
- end
357
- else # model
358
- # models (e.g. Pet) or oneOf
359
- klass = Bandwidth.const_get(type)
360
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
361
- end
362
- end
363
-
364
- # Returns the string representation of the object
365
- # @return [String] String presentation of the object
366
- def to_s
367
- to_hash.to_s
368
- end
369
-
370
- # to_body is an alias to to_hash (backward compatibility)
371
- # @return [Hash] Returns the object in the form of hash
372
- def to_body
373
- to_hash
374
- end
375
-
376
327
  # Returns the object in the form of hash
377
328
  # @return [Hash] Returns the object in the form of hash
378
329
  def to_hash
@@ -388,23 +339,5 @@ module Bandwidth
388
339
  end
389
340
  hash
390
341
  end
391
-
392
- # Outputs non-array value in the form of hash
393
- # For object, use to_hash. Otherwise, just return the value
394
- # @param [Object] value Any valid value
395
- # @return [Hash] Returns the value in the form of hash
396
- def _to_hash(value)
397
- if value.is_a?(Array)
398
- value.compact.map { |v| _to_hash(v) }
399
- elsif value.is_a?(Hash)
400
- {}.tap do |hash|
401
- value.each { |k, v| hash[k] = _to_hash(v) }
402
- end
403
- elsif value.respond_to? :to_hash
404
- value.to_hash
405
- else
406
- value
407
- end
408
- end
409
342
  end
410
343
  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
  # This event is sent to the transferDisconnectUrl of each <PhoneNumber> tag when its respective call leg ends for any reason. The event is sent in the normal case, when the transferred leg is answered and later hung up, but is also sent if the new leg was never answered in the first place, if it was rejected, and if the original call leg hung up before the transferred leg.
18
- class TransferDisconnectCallback
18
+ class TransferDisconnectCallback < 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
 
@@ -123,9 +123,14 @@ module Bandwidth
123
123
  }
124
124
  end
125
125
 
126
+ # Returns attribute mapping this model knows about
127
+ def self.acceptable_attribute_map
128
+ attribute_map
129
+ end
130
+
126
131
  # Returns all the JSON keys this model knows about
127
132
  def self.acceptable_attributes
128
- attribute_map.values
133
+ acceptable_attribute_map.values
129
134
  end
130
135
 
131
136
  # Attribute type mapping.
@@ -173,9 +178,10 @@ module Bandwidth
173
178
  end
174
179
 
175
180
  # check to see if the attribute exists and convert string to symbol for hash key
181
+ acceptable_attribute_map = self.class.acceptable_attribute_map
176
182
  attributes = attributes.each_with_object({}) { |(k, v), h|
177
- if (!self.class.attribute_map.key?(k.to_sym))
178
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TransferDisconnectCallback`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
183
+ if (!acceptable_attribute_map.key?(k.to_sym))
184
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::TransferDisconnectCallback`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
179
185
  end
180
186
  h[k.to_sym] = v
181
187
  }
@@ -338,61 +344,6 @@ module Bandwidth
338
344
  new(transformed_hash)
339
345
  end
340
346
 
341
- # Deserializes the data based on type
342
- # @param string type Data type
343
- # @param string value Value to be deserialized
344
- # @return [Object] Deserialized data
345
- def self._deserialize(type, value)
346
- case type.to_sym
347
- when :Time
348
- Time.parse(value)
349
- when :Date
350
- Date.parse(value)
351
- when :String
352
- value.to_s
353
- when :Integer
354
- value.to_i
355
- when :Float
356
- value.to_f
357
- when :Boolean
358
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
359
- true
360
- else
361
- false
362
- end
363
- when :Object
364
- # generic object (usually a Hash), return directly
365
- value
366
- when /\AArray<(?<inner_type>.+)>\z/
367
- inner_type = Regexp.last_match[:inner_type]
368
- value.map { |v| _deserialize(inner_type, v) }
369
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
370
- k_type = Regexp.last_match[:k_type]
371
- v_type = Regexp.last_match[:v_type]
372
- {}.tap do |hash|
373
- value.each do |k, v|
374
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
375
- end
376
- end
377
- else # model
378
- # models (e.g. Pet) or oneOf
379
- klass = Bandwidth.const_get(type)
380
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
381
- end
382
- end
383
-
384
- # Returns the string representation of the object
385
- # @return [String] String presentation of the object
386
- def to_s
387
- to_hash.to_s
388
- end
389
-
390
- # to_body is an alias to to_hash (backward compatibility)
391
- # @return [Hash] Returns the object in the form of hash
392
- def to_body
393
- to_hash
394
- end
395
-
396
347
  # Returns the object in the form of hash
397
348
  # @return [Hash] Returns the object in the form of hash
398
349
  def to_hash
@@ -408,23 +359,5 @@ module Bandwidth
408
359
  end
409
360
  hash
410
361
  end
411
-
412
- # Outputs non-array value in the form of hash
413
- # For object, use to_hash. Otherwise, just return the value
414
- # @param [Object] value Any valid value
415
- # @return [Hash] Returns the value in the form of hash
416
- def _to_hash(value)
417
- if value.is_a?(Array)
418
- value.compact.map { |v| _to_hash(v) }
419
- elsif value.is_a?(Hash)
420
- {}.tap do |hash|
421
- value.each { |k, v| hash[k] = _to_hash(v) }
422
- end
423
- elsif value.respond_to? :to_hash
424
- value.to_hash
425
- else
426
- value
427
- end
428
- end
429
362
  end
430
363
  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 UpdateCall
17
+ class UpdateCall < ApiModelBase
18
18
  attr_accessor :state
19
19
 
20
20
  # The URL to send the [Redirect](/docs/voice/bxml/redirect) event to which will provide new BXML. Required if `state` is `active`. Not allowed if `state` is `completed`.
@@ -80,9 +80,14 @@ module Bandwidth
80
80
  }
81
81
  end
82
82
 
83
+ # Returns attribute mapping this model knows about
84
+ def self.acceptable_attribute_map
85
+ attribute_map
86
+ end
87
+
83
88
  # Returns all the JSON keys this model knows about
84
89
  def self.acceptable_attributes
85
- attribute_map.values
90
+ acceptable_attribute_map.values
86
91
  end
87
92
 
88
93
  # Attribute type mapping.
@@ -125,9 +130,10 @@ module Bandwidth
125
130
  end
126
131
 
127
132
  # check to see if the attribute exists and convert string to symbol for hash key
133
+ acceptable_attribute_map = self.class.acceptable_attribute_map
128
134
  attributes = attributes.each_with_object({}) { |(k, v), h|
129
- if (!self.class.attribute_map.key?(k.to_sym))
130
- fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::UpdateCall`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
135
+ if (!acceptable_attribute_map.key?(k.to_sym))
136
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Bandwidth::UpdateCall`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
131
137
  end
132
138
  h[k.to_sym] = v
133
139
  }
@@ -321,61 +327,6 @@ module Bandwidth
321
327
  new(transformed_hash)
322
328
  end
323
329
 
324
- # Deserializes the data based on type
325
- # @param string type Data type
326
- # @param string value Value to be deserialized
327
- # @return [Object] Deserialized data
328
- def self._deserialize(type, value)
329
- case type.to_sym
330
- when :Time
331
- Time.parse(value)
332
- when :Date
333
- Date.parse(value)
334
- when :String
335
- value.to_s
336
- when :Integer
337
- value.to_i
338
- when :Float
339
- value.to_f
340
- when :Boolean
341
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
342
- true
343
- else
344
- false
345
- end
346
- when :Object
347
- # generic object (usually a Hash), return directly
348
- value
349
- when /\AArray<(?<inner_type>.+)>\z/
350
- inner_type = Regexp.last_match[:inner_type]
351
- value.map { |v| _deserialize(inner_type, v) }
352
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
353
- k_type = Regexp.last_match[:k_type]
354
- v_type = Regexp.last_match[:v_type]
355
- {}.tap do |hash|
356
- value.each do |k, v|
357
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
358
- end
359
- end
360
- else # model
361
- # models (e.g. Pet) or oneOf
362
- klass = Bandwidth.const_get(type)
363
- klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
364
- end
365
- end
366
-
367
- # Returns the string representation of the object
368
- # @return [String] String presentation of the object
369
- def to_s
370
- to_hash.to_s
371
- end
372
-
373
- # to_body is an alias to to_hash (backward compatibility)
374
- # @return [Hash] Returns the object in the form of hash
375
- def to_body
376
- to_hash
377
- end
378
-
379
330
  # Returns the object in the form of hash
380
331
  # @return [Hash] Returns the object in the form of hash
381
332
  def to_hash
@@ -391,23 +342,5 @@ module Bandwidth
391
342
  end
392
343
  hash
393
344
  end
394
-
395
- # Outputs non-array value in the form of hash
396
- # For object, use to_hash. Otherwise, just return the value
397
- # @param [Object] value Any valid value
398
- # @return [Hash] Returns the value in the form of hash
399
- def _to_hash(value)
400
- if value.is_a?(Array)
401
- value.compact.map { |v| _to_hash(v) }
402
- elsif value.is_a?(Hash)
403
- {}.tap do |hash|
404
- value.each { |k, v| hash[k] = _to_hash(v) }
405
- end
406
- elsif value.respond_to? :to_hash
407
- value.to_hash
408
- else
409
- value
410
- end
411
- end
412
345
  end
413
346
  end