From 5c25a49be956c9c786ca1c5421fcf1a124645800 Mon Sep 17 00:00:00 2001 From: "band-swi[bot]" <143147434+band-swi[bot]@users.noreply.github.com> Date: Fri, 14 Jun 2024 14:50:36 -0400 Subject: [PATCH] SWI-5445 Update SDK Based on Recent Spec Changes (#138) * Generate SDK with OpenAPI Generator Version 7.0.0 * Clean SDK using Rubocop * update to generator v7.6.0 --------- Co-authored-by: DX-Bandwidth Co-authored-by: ckoegel --- .openapi-generator/VERSION | 2 +- bandwidth-sdk.gemspec | 4 +- bandwidth.yml | 13 +- custom_templates/gemspec.mustache | 2 + docs/AnswerCallback.md | 2 +- docs/BridgeCompleteCallback.md | 2 +- docs/BridgeTargetCompleteCallback.md | 2 +- docs/CallRecordingMetadata.md | 4 +- docs/CallState.md | 2 +- docs/ConferenceRecordingAvailableCallback.md | 2 +- docs/ConferenceRecordingMetadata.md | 2 +- docs/DisconnectCallback.md | 2 +- docs/DtmfCallback.md | 4 +- docs/GatherCallback.md | 4 +- docs/InitiateCallback.md | 2 +- docs/MachineDetectionCompleteCallback.md | 2 +- docs/MessagingCodeResponse.md | 2 +- docs/RecordingAvailableCallback.md | 4 +- docs/RecordingCompleteCallback.md | 4 +- docs/RedirectCallback.md | 4 +- docs/TranscriptionAvailableCallback.md | 4 +- docs/TranscriptionsApi.md | 2 +- docs/TransferAnswerCallback.md | 4 +- docs/TransferCompleteCallback.md | 4 +- docs/TransferDisconnectCallback.md | 4 +- lib/bandwidth-sdk.rb | 2 +- lib/bandwidth-sdk/api/calls_api.rb | 2 +- lib/bandwidth-sdk/api/conferences_api.rb | 2 +- lib/bandwidth-sdk/api/media_api.rb | 2 +- lib/bandwidth-sdk/api/messages_api.rb | 2 +- lib/bandwidth-sdk/api/mfa_api.rb | 2 +- .../api/phone_number_lookup_api.rb | 2 +- lib/bandwidth-sdk/api/recordings_api.rb | 2 +- lib/bandwidth-sdk/api/statistics_api.rb | 2 +- lib/bandwidth-sdk/api/transcriptions_api.rb | 6 +- lib/bandwidth-sdk/api_client.rb | 85 +++--- lib/bandwidth-sdk/api_error.rb | 2 +- lib/bandwidth-sdk/configuration.rb | 2 +- .../models/account_statistics.rb | 4 +- lib/bandwidth-sdk/models/answer_callback.rb | 4 +- .../models/bridge_complete_callback.rb | 4 +- .../models/bridge_target_complete_callback.rb | 4 +- .../models/call_direction_enum.rb | 2 +- .../models/call_recording_metadata.rb | 4 +- lib/bandwidth-sdk/models/call_state.rb | 4 +- lib/bandwidth-sdk/models/call_state_enum.rb | 2 +- .../models/call_transcription.rb | 4 +- .../models/call_transcription_metadata.rb | 4 +- .../models/call_transcription_response.rb | 4 +- .../models/callback_method_enum.rb | 2 +- lib/bandwidth-sdk/models/code_request.rb | 4 +- lib/bandwidth-sdk/models/conference.rb | 4 +- .../models/conference_completed_callback.rb | 4 +- .../models/conference_created_callback.rb | 4 +- lib/bandwidth-sdk/models/conference_member.rb | 4 +- .../models/conference_member_exit_callback.rb | 4 +- .../models/conference_member_join_callback.rb | 4 +- ...conference_recording_available_callback.rb | 4 +- .../models/conference_recording_metadata.rb | 4 +- .../models/conference_redirect_callback.rb | 4 +- .../models/conference_state_enum.rb | 2 +- lib/bandwidth-sdk/models/create_call.rb | 4 +- .../models/create_call_response.rb | 4 +- .../models/create_lookup_response.rb | 4 +- .../models/create_message_request_error.rb | 4 +- lib/bandwidth-sdk/models/deferred_result.rb | 4 +- .../models/disconnect_callback.rb | 4 +- lib/bandwidth-sdk/models/diversion.rb | 4 +- lib/bandwidth-sdk/models/dtmf_callback.rb | 4 +- lib/bandwidth-sdk/models/field_error.rb | 4 +- lib/bandwidth-sdk/models/file_format_enum.rb | 2 +- lib/bandwidth-sdk/models/gather_callback.rb | 4 +- .../models/inbound_message_callback.rb | 4 +- .../inbound_message_callback_message.rb | 4 +- lib/bandwidth-sdk/models/initiate_callback.rb | 4 +- .../models/list_message_direction_enum.rb | 2 +- lib/bandwidth-sdk/models/list_message_item.rb | 4 +- lib/bandwidth-sdk/models/lookup_request.rb | 4 +- lib/bandwidth-sdk/models/lookup_result.rb | 4 +- lib/bandwidth-sdk/models/lookup_status.rb | 4 +- .../models/lookup_status_enum.rb | 2 +- .../machine_detection_complete_callback.rb | 4 +- .../models/machine_detection_configuration.rb | 4 +- .../models/machine_detection_mode_enum.rb | 2 +- .../models/machine_detection_result.rb | 4 +- lib/bandwidth-sdk/models/media.rb | 4 +- lib/bandwidth-sdk/models/message.rb | 4 +- .../models/message_delivered_callback.rb | 4 +- .../message_delivered_callback_message.rb | 4 +- .../models/message_direction_enum.rb | 2 +- .../models/message_failed_callback.rb | 4 +- .../models/message_failed_callback_message.rb | 4 +- lib/bandwidth-sdk/models/message_request.rb | 4 +- .../models/message_sending_callback.rb | 4 +- .../message_sending_callback_message.rb | 4 +- .../models/message_status_enum.rb | 2 +- lib/bandwidth-sdk/models/message_type_enum.rb | 2 +- lib/bandwidth-sdk/models/messages_list.rb | 4 +- .../models/messaging_code_response.rb | 4 +- .../models/messaging_request_error.rb | 4 +- .../models/mfa_forbidden_request_error.rb | 4 +- lib/bandwidth-sdk/models/mfa_request_error.rb | 4 +- .../models/mfa_unauthorized_request_error.rb | 4 +- lib/bandwidth-sdk/models/page_info.rb | 4 +- lib/bandwidth-sdk/models/priority_enum.rb | 2 +- .../models/recording_available_callback.rb | 4 +- .../models/recording_complete_callback.rb | 4 +- .../models/recording_state_enum.rb | 2 +- .../recording_transcription_metadata.rb | 4 +- .../models/recording_transcriptions.rb | 4 +- lib/bandwidth-sdk/models/redirect_callback.rb | 4 +- .../models/redirect_method_enum.rb | 2 +- lib/bandwidth-sdk/models/stir_shaken.rb | 4 +- lib/bandwidth-sdk/models/tag.rb | 4 +- .../models/tn_lookup_request_error.rb | 4 +- .../models/transcribe_recording.rb | 4 +- lib/bandwidth-sdk/models/transcription.rb | 4 +- .../transcription_available_callback.rb | 4 +- .../models/transfer_answer_callback.rb | 4 +- .../models/transfer_complete_callback.rb | 4 +- .../models/transfer_disconnect_callback.rb | 4 +- lib/bandwidth-sdk/models/update_call.rb | 4 +- .../models/update_call_recording.rb | 4 +- lib/bandwidth-sdk/models/update_conference.rb | 4 +- .../models/update_conference_member.rb | 4 +- .../models/verify_code_request.rb | 4 +- .../models/verify_code_response.rb | 4 +- lib/bandwidth-sdk/models/voice_api_error.rb | 4 +- .../models/voice_code_response.rb | 4 +- lib/bandwidth-sdk/version.rb | 2 +- openapitools.json | 2 +- spec/unit/api/calls_api_spec.rb | 273 ++++++++++++++++++ 132 files changed, 545 insertions(+), 264 deletions(-) diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 41225218..93c8ddab 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.0.0 \ No newline at end of file +7.6.0 diff --git a/bandwidth-sdk.gemspec b/bandwidth-sdk.gemspec index 3ed52c1c..6808ce8f 100644 --- a/bandwidth-sdk.gemspec +++ b/bandwidth-sdk.gemspec @@ -8,7 +8,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -26,10 +26,12 @@ Gem::Specification.new do |s| s.description = 'The official client SDK for Bandwidth's Voice, Messaging, MFA, and WebRTC APIs' s.license = 'MIT' s.required_ruby_version = '>=2.7' + s.metadata = {} s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' s.add_runtime_dependency 'faraday-multipart' s.add_runtime_dependency 'ox', '~> 2.4' + s.add_runtime_dependency 'marcel' s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' diff --git a/bandwidth.yml b/bandwidth.yml index eda25102..3f1ff1da 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -1173,7 +1173,7 @@ paths: [startTranscription](/docs/voice/bxml/startTranscription). - Note: After the deletion is requested and a `204` is returned, the + Note: After the deletion is requested and a `200` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. @@ -1183,7 +1183,7 @@ paths: - $ref: '#/components/parameters/callId' - $ref: '#/components/parameters/transcriptionId' responses: - '204': + '200': $ref: '#/components/responses/deleteCallTranscriptionResponse' '400': $ref: '#/components/responses/voiceBadRequestError' @@ -2496,7 +2496,7 @@ components: description: >- The phone number that made the call, in E.164 format (e.g. +15555555555). - example: '19195554321' + example: '+19195554321' direction: $ref: '#/components/schemas/callDirectionEnum' state: @@ -4139,7 +4139,7 @@ components: accountId: type: string description: The user account associated with the call. - example: '920012' + example: '9900000' applicationId: type: string description: The id of the application associated with the call. @@ -4240,7 +4240,7 @@ components: description: >- The phone number used as the to field of the B-leg call, in E.164 format (e.g. +15555555555). - example: +15555555555) + example: '+15555555555' mediaUrl: nullable: true type: string @@ -4451,7 +4451,7 @@ components: messageId: type: string description: Messaging API Message ID. - example: 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 + example: 1589228074636lm4k2je7j7jklbn2 verifyCodeRequest: type: object properties: @@ -5787,6 +5787,7 @@ components: answerMethod: POST answerUrl: https://myServer.example/bandwidth/webhooks/answer answerFallbackMethod: POST + answerFallbackUrl: https://myServer.example/bandwidth/webhooks/answerFallback disconnectMethod: POST disconnectUrl: https://myServer.example/bandwidth/webhooks/disconnect username: mySecretUsername diff --git a/custom_templates/gemspec.mustache b/custom_templates/gemspec.mustache index 5442f71b..d559f45a 100644 --- a/custom_templates/gemspec.mustache +++ b/custom_templates/gemspec.mustache @@ -18,6 +18,7 @@ Gem::Specification.new do |s| s.description = "{{gemDescription}}{{^gemDescription}}{{{appDescription}}}{{^appDescription}}{{{appName}}} Ruby Gem{{/appDescription}}{{/gemDescription}}" s.license = "{{{gemLicense}}}{{^gemLicense}}Unlicense{{/gemLicense}}" s.required_ruby_version = "{{{gemRequiredRubyVersion}}}{{^gemRequiredRubyVersion}}>= 2.7{{/gemRequiredRubyVersion}}" + s.metadata = {} {{#isFaraday}} s.add_runtime_dependency 'faraday', '>= 1.0.1', '< 3.0' @@ -27,6 +28,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' {{/isFaraday}} s.add_runtime_dependency 'ox', '~> 2.4' + s.add_runtime_dependency 'marcel' s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' diff --git a/docs/AnswerCallback.md b/docs/AnswerCallback.md index 94404544..99e24095 100644 --- a/docs/AnswerCallback.md +++ b/docs/AnswerCallback.md @@ -27,7 +27,7 @@ require 'bandwidth-sdk' instance = Bandwidth::AnswerCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, diff --git a/docs/BridgeCompleteCallback.md b/docs/BridgeCompleteCallback.md index 273b7038..edd5ab84 100644 --- a/docs/BridgeCompleteCallback.md +++ b/docs/BridgeCompleteCallback.md @@ -29,7 +29,7 @@ require 'bandwidth-sdk' instance = Bandwidth::BridgeCompleteCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, diff --git a/docs/BridgeTargetCompleteCallback.md b/docs/BridgeTargetCompleteCallback.md index 773d5ea5..6548f456 100644 --- a/docs/BridgeTargetCompleteCallback.md +++ b/docs/BridgeTargetCompleteCallback.md @@ -26,7 +26,7 @@ require 'bandwidth-sdk' instance = Bandwidth::BridgeTargetCompleteCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, diff --git a/docs/CallRecordingMetadata.md b/docs/CallRecordingMetadata.md index 73878fad..d4afcdd1 100644 --- a/docs/CallRecordingMetadata.md +++ b/docs/CallRecordingMetadata.md @@ -30,14 +30,14 @@ require 'bandwidth-sdk' instance = Bandwidth::CallRecordingMetadata.new( application_id: 04e88489-df02-4e34-a0ee-27a91849555f, - account_id: 920012, + account_id: 9900000, call_id: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85, parent_call_id: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d, recording_id: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833, to: +15555555555, from: +15555555555, transfer_caller_id: +15555555555, - transfer_to: +15555555555), + transfer_to: +15555555555, duration: PT13.67S, direction: null, channels: 1, diff --git a/docs/CallState.md b/docs/CallState.md index 4c4240e3..b076efb0 100644 --- a/docs/CallState.md +++ b/docs/CallState.md @@ -34,7 +34,7 @@ instance = Bandwidth::CallState.new( call_id: c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85, parent_call_id: c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85, to: +19195551234, - from: 19195554321, + from: +19195554321, direction: null, state: disconnected, stir_shaken: {"verstat":"TN-Verification-Passed","attestationIndicator":"A","originatingId":"abc123"}, diff --git a/docs/ConferenceRecordingAvailableCallback.md b/docs/ConferenceRecordingAvailableCallback.md index 4b193a68..3c8d67dc 100644 --- a/docs/ConferenceRecordingAvailableCallback.md +++ b/docs/ConferenceRecordingAvailableCallback.md @@ -29,7 +29,7 @@ instance = Bandwidth::ConferenceRecordingAvailableCallback.new( event_time: 2022-06-17T22:19:40.375Z, conference_id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9, name: my-conference-name, - account_id: 920012, + account_id: 9900000, recording_id: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833, channels: 1, start_time: 2022-06-17T22:19:40.375Z, diff --git a/docs/ConferenceRecordingMetadata.md b/docs/ConferenceRecordingMetadata.md index effcaea7..3ae23972 100644 --- a/docs/ConferenceRecordingMetadata.md +++ b/docs/ConferenceRecordingMetadata.md @@ -22,7 +22,7 @@ require 'bandwidth-sdk' instance = Bandwidth::ConferenceRecordingMetadata.new( - account_id: 920012, + account_id: 9900000, conference_id: conf-fe23a767-a75a5b77-20c5-4cca-b581-cbbf0776eca9, name: my-conference-name, recording_id: r-fbe05094-9fd2afe9-bf5b-4c68-820a-41a01c1c5833, diff --git a/docs/DisconnectCallback.md b/docs/DisconnectCallback.md index cff3c109..b01cc6c7 100644 --- a/docs/DisconnectCallback.md +++ b/docs/DisconnectCallback.md @@ -30,7 +30,7 @@ require 'bandwidth-sdk' instance = Bandwidth::DisconnectCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, diff --git a/docs/DtmfCallback.md b/docs/DtmfCallback.md index e15758ef..a0188754 100644 --- a/docs/DtmfCallback.md +++ b/docs/DtmfCallback.md @@ -30,7 +30,7 @@ require 'bandwidth-sdk' instance = Bandwidth::DtmfCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -43,7 +43,7 @@ instance = Bandwidth::DtmfCallback.new( answer_time: 2022-06-17T22:20Z, parent_call_id: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d, transfer_caller_id: +15555555555, - transfer_to: +15555555555), + transfer_to: +15555555555, tag: exampleTag ) ``` diff --git a/docs/GatherCallback.md b/docs/GatherCallback.md index 0031ff84..9a2cff18 100644 --- a/docs/GatherCallback.md +++ b/docs/GatherCallback.md @@ -31,7 +31,7 @@ require 'bandwidth-sdk' instance = Bandwidth::GatherCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -45,7 +45,7 @@ instance = Bandwidth::GatherCallback.new( parent_call_id: c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d, terminating_digit: #, transfer_caller_id: +15555555555, - transfer_to: +15555555555), + transfer_to: +15555555555, tag: exampleTag ) ``` diff --git a/docs/InitiateCallback.md b/docs/InitiateCallback.md index c8b20253..1205b4ec 100644 --- a/docs/InitiateCallback.md +++ b/docs/InitiateCallback.md @@ -25,7 +25,7 @@ require 'bandwidth-sdk' instance = Bandwidth::InitiateCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, diff --git a/docs/MachineDetectionCompleteCallback.md b/docs/MachineDetectionCompleteCallback.md index 6ef87134..eaf97ea2 100644 --- a/docs/MachineDetectionCompleteCallback.md +++ b/docs/MachineDetectionCompleteCallback.md @@ -27,7 +27,7 @@ require 'bandwidth-sdk' instance = Bandwidth::MachineDetectionCompleteCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, diff --git a/docs/MessagingCodeResponse.md b/docs/MessagingCodeResponse.md index 0f1d7930..f4540959 100644 --- a/docs/MessagingCodeResponse.md +++ b/docs/MessagingCodeResponse.md @@ -12,7 +12,7 @@ require 'bandwidth-sdk' instance = Bandwidth::MessagingCodeResponse.new( - message_id: 9e0df4ca-b18d-40d7-a59f-82fcdf5ae8e6 + message_id: 1589228074636lm4k2je7j7jklbn2 ) ``` diff --git a/docs/RecordingAvailableCallback.md b/docs/RecordingAvailableCallback.md index b4c4edb1..c055f0b7 100644 --- a/docs/RecordingAvailableCallback.md +++ b/docs/RecordingAvailableCallback.md @@ -35,7 +35,7 @@ require 'bandwidth-sdk' instance = Bandwidth::RecordingAvailableCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -54,7 +54,7 @@ instance = Bandwidth::RecordingAvailableCallback.new( tag: exampleTag, status: completed, transfer_caller_id: +15555555555, - transfer_to: +15555555555) + transfer_to: +15555555555 ) ``` diff --git a/docs/RecordingCompleteCallback.md b/docs/RecordingCompleteCallback.md index 2a40fb53..aa3e0705 100644 --- a/docs/RecordingCompleteCallback.md +++ b/docs/RecordingCompleteCallback.md @@ -35,7 +35,7 @@ require 'bandwidth-sdk' instance = Bandwidth::RecordingCompleteCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -54,7 +54,7 @@ instance = Bandwidth::RecordingCompleteCallback.new( channels: 1, tag: exampleTag, transfer_caller_id: +15555555555, - transfer_to: +15555555555) + transfer_to: +15555555555 ) ``` diff --git a/docs/RedirectCallback.md b/docs/RedirectCallback.md index 6fd526be..214f55db 100644 --- a/docs/RedirectCallback.md +++ b/docs/RedirectCallback.md @@ -29,7 +29,7 @@ require 'bandwidth-sdk' instance = Bandwidth::RedirectCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -42,7 +42,7 @@ instance = Bandwidth::RedirectCallback.new( answer_time: 2022-06-17T22:20Z, tag: exampleTag, transfer_caller_id: +15555555555, - transfer_to: +15555555555) + transfer_to: +15555555555 ) ``` diff --git a/docs/TranscriptionAvailableCallback.md b/docs/TranscriptionAvailableCallback.md index 5c8ca15c..9c209d86 100644 --- a/docs/TranscriptionAvailableCallback.md +++ b/docs/TranscriptionAvailableCallback.md @@ -34,7 +34,7 @@ require 'bandwidth-sdk' instance = Bandwidth::TranscriptionAvailableCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -52,7 +52,7 @@ instance = Bandwidth::TranscriptionAvailableCallback.new( tag: exampleTag, transcription: null, transfer_caller_id: +15555555555, - transfer_to: +15555555555) + transfer_to: +15555555555 ) ``` diff --git a/docs/TranscriptionsApi.md b/docs/TranscriptionsApi.md index 1a2ce0bc..9ca40c38 100644 --- a/docs/TranscriptionsApi.md +++ b/docs/TranscriptionsApi.md @@ -15,7 +15,7 @@ All URIs are relative to *http://localhost* Delete a specific transcription -Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. +Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `200` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. ### Examples diff --git a/docs/TransferAnswerCallback.md b/docs/TransferAnswerCallback.md index f63e1f97..eaaa7a91 100644 --- a/docs/TransferAnswerCallback.md +++ b/docs/TransferAnswerCallback.md @@ -28,7 +28,7 @@ require 'bandwidth-sdk' instance = Bandwidth::TransferAnswerCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -40,7 +40,7 @@ instance = Bandwidth::TransferAnswerCallback.new( answer_time: 2022-06-17T22:20Z, tag: exampleTag, transfer_caller_id: +15555555555, - transfer_to: +15555555555) + transfer_to: +15555555555 ) ``` diff --git a/docs/TransferCompleteCallback.md b/docs/TransferCompleteCallback.md index 6a29dbd1..9dda3070 100644 --- a/docs/TransferCompleteCallback.md +++ b/docs/TransferCompleteCallback.md @@ -31,7 +31,7 @@ require 'bandwidth-sdk' instance = Bandwidth::TransferCompleteCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -43,7 +43,7 @@ instance = Bandwidth::TransferCompleteCallback.new( answer_time: 2022-06-17T22:20Z, tag: exampleTag, transfer_caller_id: +15555555555, - transfer_to: +15555555555), + transfer_to: +15555555555, cause: busy, error_message: Call c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f is already bridged with another call, error_id: 4642074b-7b58-478b-96e4-3a60955c6765 diff --git a/docs/TransferDisconnectCallback.md b/docs/TransferDisconnectCallback.md index cd52579d..a6b7c87e 100644 --- a/docs/TransferDisconnectCallback.md +++ b/docs/TransferDisconnectCallback.md @@ -33,7 +33,7 @@ require 'bandwidth-sdk' instance = Bandwidth::TransferDisconnectCallback.new( event_type: bridgeComplete, event_time: 2022-06-17T22:19:40.375Z, - account_id: 920012, + account_id: 9900000, application_id: 04e88489-df02-4e34-a0ee-27a91849555f, from: +15555555555, to: +15555555555, @@ -47,7 +47,7 @@ instance = Bandwidth::TransferDisconnectCallback.new( end_time: 2022-06-17T22:20Z, tag: exampleTag, transfer_caller_id: +15555555555, - transfer_to: +15555555555), + transfer_to: +15555555555, cause: busy, error_message: Call c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f is already bridged with another call, error_id: 4642074b-7b58-478b-96e4-3a60955c6765 diff --git a/lib/bandwidth-sdk.rb b/lib/bandwidth-sdk.rb index 8c60f92e..98e902ab 100644 --- a/lib/bandwidth-sdk.rb +++ b/lib/bandwidth-sdk.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/calls_api.rb b/lib/bandwidth-sdk/api/calls_api.rb index 4c1b05bf..511024d6 100644 --- a/lib/bandwidth-sdk/api/calls_api.rb +++ b/lib/bandwidth-sdk/api/calls_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/conferences_api.rb b/lib/bandwidth-sdk/api/conferences_api.rb index 28adc783..afe03ac5 100644 --- a/lib/bandwidth-sdk/api/conferences_api.rb +++ b/lib/bandwidth-sdk/api/conferences_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/media_api.rb b/lib/bandwidth-sdk/api/media_api.rb index bad2d8e5..7e1ea01a 100644 --- a/lib/bandwidth-sdk/api/media_api.rb +++ b/lib/bandwidth-sdk/api/media_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/messages_api.rb b/lib/bandwidth-sdk/api/messages_api.rb index 4f1cdc1f..6e672955 100644 --- a/lib/bandwidth-sdk/api/messages_api.rb +++ b/lib/bandwidth-sdk/api/messages_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/mfa_api.rb b/lib/bandwidth-sdk/api/mfa_api.rb index becdf34f..b6104ce3 100644 --- a/lib/bandwidth-sdk/api/mfa_api.rb +++ b/lib/bandwidth-sdk/api/mfa_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/phone_number_lookup_api.rb b/lib/bandwidth-sdk/api/phone_number_lookup_api.rb index a5c8e0a8..5b861fa1 100644 --- a/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +++ b/lib/bandwidth-sdk/api/phone_number_lookup_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/recordings_api.rb b/lib/bandwidth-sdk/api/recordings_api.rb index 23f8edbd..dab2a542 100644 --- a/lib/bandwidth-sdk/api/recordings_api.rb +++ b/lib/bandwidth-sdk/api/recordings_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/statistics_api.rb b/lib/bandwidth-sdk/api/statistics_api.rb index bbb1ebb5..4501ddd4 100644 --- a/lib/bandwidth-sdk/api/statistics_api.rb +++ b/lib/bandwidth-sdk/api/statistics_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/api/transcriptions_api.rb b/lib/bandwidth-sdk/api/transcriptions_api.rb index 6dc59b08..f5b9fc20 100644 --- a/lib/bandwidth-sdk/api/transcriptions_api.rb +++ b/lib/bandwidth-sdk/api/transcriptions_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -20,7 +20,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # Delete a specific transcription - # Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. + # Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `200` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. # @param account_id [String] Your Bandwidth Account ID. # @param call_id [String] Programmable Voice API Call ID. # @param transcription_id [String] Programmable Voice API Transcription ID. @@ -32,7 +32,7 @@ def delete_real_time_transcription(account_id, call_id, transcription_id, opts = end # Delete a specific transcription - # Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `204` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. + # Delete the specified transcription that was created on this call via [startTranscription](/docs/voice/bxml/startTranscription). Note: After the deletion is requested and a `200` is returned, the transcription will not be accessible anymore. However, it is not deleted immediately. This deletion process, while transparent and irreversible, can take an additional 24 to 48 hours. # @param account_id [String] Your Bandwidth Account ID. # @param call_id [String] Programmable Voice API Call ID. # @param transcription_id [String] Programmable Voice API Transcription ID. diff --git a/lib/bandwidth-sdk/api_client.rb b/lib/bandwidth-sdk/api_client.rb index 2412b9d5..d03a5406 100644 --- a/lib/bandwidth-sdk/api_client.rb +++ b/lib/bandwidth-sdk/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -17,6 +17,8 @@ require 'time' require 'faraday' require 'faraday/multipart' if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.0') +require 'marcel' + module Bandwidth class ApiClient @@ -48,9 +50,11 @@ def self.default # @return [Array<(Object, Integer, Hash)>] an array of 3 elements: # the data deserialized from response body (could be nil), response status code and response headers. def call_api(http_method, path, opts = {}) + stream = nil begin response = connection(opts).public_send(http_method.to_sym.downcase) do |req| - build_request(http_method, path, req, opts) + request = build_request(http_method, path, req, opts) + stream = download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' end if config.debugging @@ -75,7 +79,9 @@ def call_api(http_method, path, opts = {}) fail ApiError.new('Connection failed') end - if opts[:return_type] + if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' + data = deserialize_file(response, stream) + elsif opts[:return_type] data = deserialize(response, opts[:return_type]) else data = nil @@ -117,7 +123,6 @@ def build_request(http_method, path, request, opts = {}) request.url url request.params = query_params - download_file(request) if opts[:return_type] == 'File' || opts[:return_type] == 'Binary' request end @@ -136,8 +141,7 @@ def build_request_body(header_params, form_params, body) form_params.each do |key, value| case value when ::File, ::Tempfile - # TODO hardcode to application/octet-stream, need better way to detect content type - data[key] = Faraday::FilePart.new(value.path, 'application/octet-stream', value.path) + data[key] = Faraday::FilePart.new(value.path, Marcel::MimeType.for(Pathname.new(value.path))) when ::Array, nil # let Faraday handle Array and nil parameters data[key] = value @@ -154,11 +158,40 @@ def build_request_body(header_params, form_params, body) end def download_file(request) - @stream = [] + stream = [] # handle streaming Responses request.options.on_data = Proc.new do |chunk, overall_received_bytes| - @stream << chunk + stream << chunk + end + stream + end + + def deserialize_file(response, stream) + body = response.body + if @config.return_binary_data == true + # return byte stream + encoding = body.encoding + stream.join.force_encoding(encoding) + else + # return file instead of binary data + content_disposition = response.headers['Content-Disposition'] + if content_disposition && content_disposition =~ /filename=/i + filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] + prefix = sanitize_filename(filename) + else + prefix = 'download-' + end + prefix = prefix + '-' unless prefix.end_with?('-') + encoding = body.encoding + tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) + tempfile.write(stream.join.force_encoding(encoding)) + tempfile.close + config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\ + "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ + "will be deleted automatically with GC. It's also recommended to delete the temp file "\ + "explicitly with `tempfile.delete`" + tempfile end end @@ -216,7 +249,7 @@ def basic_auth(conn) # @param [String] mime MIME # @return [Boolean] True if the MIME is application/json def json_mime?(mime) - (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil? + (mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil? end # Deserialize the response to the given return type. @@ -225,40 +258,10 @@ def json_mime?(mime) # @param [String] return_type some examples: "User", "Array", "Hash" def deserialize(response, return_type) body = response.body - - # handle file downloading - return the File instance processed in request callbacks - # note that response body is empty when the file is written in chunks in request on_body callback - if return_type == 'File' - if @config.return_binary_data == true - # return byte stream - encoding = body.encoding - return @stream.join.force_encoding(encoding) - else - # return file instead of binary data - content_disposition = response.headers['Content-Disposition'] - if content_disposition && content_disposition =~ /filename=/i - filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1] - prefix = sanitize_filename(filename) - else - prefix = 'download-' - end - prefix = prefix + '-' unless prefix.end_with?('-') - encoding = body.encoding - @tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding) - @tempfile.write(@stream.join.force_encoding(encoding)) - @tempfile.close - @config.logger.info "Temp file written to #{@tempfile.path}, please copy the file to a proper folder "\ - "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\ - "will be deleted automatically with GC. It's also recommended to delete the temp file "\ - "explicitly with `tempfile.delete`" - return @tempfile - end - end - return nil if body.nil? || body.empty? # return response body directly for String return type - return body if return_type == 'String' + return body.to_s if return_type == 'String' # ensuring a default content type content_type = response.headers['Content-Type'] || 'application/json' @@ -325,7 +328,7 @@ def convert_to_type(data, return_type) # @param [String] filename the filename to be sanitized # @return [String] the sanitized filename def sanitize_filename(filename) - filename.gsub(/.*[\/\\]/, '') + filename.split(/[\/\\]/).last end def build_request_url(path, opts = {}) diff --git a/lib/bandwidth-sdk/api_error.rb b/lib/bandwidth-sdk/api_error.rb index 901fb837..e9ab9e0b 100644 --- a/lib/bandwidth-sdk/api_error.rb +++ b/lib/bandwidth-sdk/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/configuration.rb b/lib/bandwidth-sdk/configuration.rb index 755b5a58..8f2159c9 100644 --- a/lib/bandwidth-sdk/configuration.rb +++ b/lib/bandwidth-sdk/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/account_statistics.rb b/lib/bandwidth-sdk/models/account_statistics.rb index 592530f4..afa1bc81 100644 --- a/lib/bandwidth-sdk/models/account_statistics.rb +++ b/lib/bandwidth-sdk/models/account_statistics.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -170,7 +170,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/answer_callback.rb b/lib/bandwidth-sdk/models/answer_callback.rb index 4780aec6..65f1f736 100644 --- a/lib/bandwidth-sdk/models/answer_callback.rb +++ b/lib/bandwidth-sdk/models/answer_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -315,7 +315,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/bridge_complete_callback.rb b/lib/bandwidth-sdk/models/bridge_complete_callback.rb index 8ddcfeec..88a3c124 100644 --- a/lib/bandwidth-sdk/models/bridge_complete_callback.rb +++ b/lib/bandwidth-sdk/models/bridge_complete_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -337,7 +337,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb b/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb index 2cfad5f7..9ad1f82e 100644 --- a/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +++ b/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -305,7 +305,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/call_direction_enum.rb b/lib/bandwidth-sdk/models/call_direction_enum.rb index 3208d340..4bb833cd 100644 --- a/lib/bandwidth-sdk/models/call_direction_enum.rb +++ b/lib/bandwidth-sdk/models/call_direction_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/call_recording_metadata.rb b/lib/bandwidth-sdk/models/call_recording_metadata.rb index 067b1c7e..18c06e0e 100644 --- a/lib/bandwidth-sdk/models/call_recording_metadata.rb +++ b/lib/bandwidth-sdk/models/call_recording_metadata.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -351,7 +351,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/call_state.rb b/lib/bandwidth-sdk/models/call_state.rb index e5e735cc..4f627618 100644 --- a/lib/bandwidth-sdk/models/call_state.rb +++ b/lib/bandwidth-sdk/models/call_state.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -363,7 +363,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/call_state_enum.rb b/lib/bandwidth-sdk/models/call_state_enum.rb index 16f757f5..f4ee5543 100644 --- a/lib/bandwidth-sdk/models/call_state_enum.rb +++ b/lib/bandwidth-sdk/models/call_state_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/call_transcription.rb b/lib/bandwidth-sdk/models/call_transcription.rb index b906c79b..99f8254c 100644 --- a/lib/bandwidth-sdk/models/call_transcription.rb +++ b/lib/bandwidth-sdk/models/call_transcription.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -264,7 +264,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/call_transcription_metadata.rb b/lib/bandwidth-sdk/models/call_transcription_metadata.rb index aaada7a8..f7289770 100644 --- a/lib/bandwidth-sdk/models/call_transcription_metadata.rb +++ b/lib/bandwidth-sdk/models/call_transcription_metadata.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -170,7 +170,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/call_transcription_response.rb b/lib/bandwidth-sdk/models/call_transcription_response.rb index e83a6639..2ca18769 100644 --- a/lib/bandwidth-sdk/models/call_transcription_response.rb +++ b/lib/bandwidth-sdk/models/call_transcription_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -191,7 +191,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/callback_method_enum.rb b/lib/bandwidth-sdk/models/callback_method_enum.rb index 9face145..e0936a1e 100644 --- a/lib/bandwidth-sdk/models/callback_method_enum.rb +++ b/lib/bandwidth-sdk/models/callback_method_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/code_request.rb b/lib/bandwidth-sdk/models/code_request.rb index c6501549..054f7d8e 100644 --- a/lib/bandwidth-sdk/models/code_request.rb +++ b/lib/bandwidth-sdk/models/code_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -381,7 +381,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference.rb b/lib/bandwidth-sdk/models/conference.rb index 1f239ef6..25075fb7 100644 --- a/lib/bandwidth-sdk/models/conference.rb +++ b/lib/bandwidth-sdk/models/conference.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -260,7 +260,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_completed_callback.rb b/lib/bandwidth-sdk/models/conference_completed_callback.rb index 8074fc50..5e5e9476 100644 --- a/lib/bandwidth-sdk/models/conference_completed_callback.rb +++ b/lib/bandwidth-sdk/models/conference_completed_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -202,7 +202,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_created_callback.rb b/lib/bandwidth-sdk/models/conference_created_callback.rb index 7142732a..027fcfdf 100644 --- a/lib/bandwidth-sdk/models/conference_created_callback.rb +++ b/lib/bandwidth-sdk/models/conference_created_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -202,7 +202,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_member.rb b/lib/bandwidth-sdk/models/conference_member.rb index ed5fe582..38c8de7c 100644 --- a/lib/bandwidth-sdk/models/conference_member.rb +++ b/lib/bandwidth-sdk/models/conference_member.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -213,7 +213,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_member_exit_callback.rb b/lib/bandwidth-sdk/models/conference_member_exit_callback.rb index 6f622832..12a2bc99 100644 --- a/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +++ b/lib/bandwidth-sdk/models/conference_member_exit_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -232,7 +232,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_member_join_callback.rb b/lib/bandwidth-sdk/models/conference_member_join_callback.rb index 6276b0a3..70286119 100644 --- a/lib/bandwidth-sdk/models/conference_member_join_callback.rb +++ b/lib/bandwidth-sdk/models/conference_member_join_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -232,7 +232,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_recording_available_callback.rb b/lib/bandwidth-sdk/models/conference_recording_available_callback.rb index 695007d1..89e2815e 100644 --- a/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +++ b/lib/bandwidth-sdk/models/conference_recording_available_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -314,7 +314,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_recording_metadata.rb b/lib/bandwidth-sdk/models/conference_recording_metadata.rb index 365d04b3..b338ad8c 100644 --- a/lib/bandwidth-sdk/models/conference_recording_metadata.rb +++ b/lib/bandwidth-sdk/models/conference_recording_metadata.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -282,7 +282,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_redirect_callback.rb b/lib/bandwidth-sdk/models/conference_redirect_callback.rb index a0252fc3..0ec8763e 100644 --- a/lib/bandwidth-sdk/models/conference_redirect_callback.rb +++ b/lib/bandwidth-sdk/models/conference_redirect_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -202,7 +202,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/conference_state_enum.rb b/lib/bandwidth-sdk/models/conference_state_enum.rb index 19b83f0f..50b5a11c 100644 --- a/lib/bandwidth-sdk/models/conference_state_enum.rb +++ b/lib/bandwidth-sdk/models/conference_state_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/create_call.rb b/lib/bandwidth-sdk/models/create_call.rb index 2cb29309..54752442 100644 --- a/lib/bandwidth-sdk/models/create_call.rb +++ b/lib/bandwidth-sdk/models/create_call.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -645,7 +645,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/create_call_response.rb b/lib/bandwidth-sdk/models/create_call_response.rb index a93608fa..4a26b3ff 100644 --- a/lib/bandwidth-sdk/models/create_call_response.rb +++ b/lib/bandwidth-sdk/models/create_call_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -506,7 +506,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/create_lookup_response.rb b/lib/bandwidth-sdk/models/create_lookup_response.rb index ce6f0892..8f7aa523 100644 --- a/lib/bandwidth-sdk/models/create_lookup_response.rb +++ b/lib/bandwidth-sdk/models/create_lookup_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -192,7 +192,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/create_message_request_error.rb b/lib/bandwidth-sdk/models/create_message_request_error.rb index 10dd2032..9824226b 100644 --- a/lib/bandwidth-sdk/models/create_message_request_error.rb +++ b/lib/bandwidth-sdk/models/create_message_request_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -193,7 +193,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/deferred_result.rb b/lib/bandwidth-sdk/models/deferred_result.rb index 9aa5a732..96f2d8f8 100644 --- a/lib/bandwidth-sdk/models/deferred_result.rb +++ b/lib/bandwidth-sdk/models/deferred_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -168,7 +168,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/disconnect_callback.rb b/lib/bandwidth-sdk/models/disconnect_callback.rb index d0aa8ccc..f5452c56 100644 --- a/lib/bandwidth-sdk/models/disconnect_callback.rb +++ b/lib/bandwidth-sdk/models/disconnect_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -347,7 +347,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/diversion.rb b/lib/bandwidth-sdk/models/diversion.rb index cc055774..6fa6959d 100644 --- a/lib/bandwidth-sdk/models/diversion.rb +++ b/lib/bandwidth-sdk/models/diversion.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -220,7 +220,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/dtmf_callback.rb b/lib/bandwidth-sdk/models/dtmf_callback.rb index cb7163c8..d619b610 100644 --- a/lib/bandwidth-sdk/models/dtmf_callback.rb +++ b/lib/bandwidth-sdk/models/dtmf_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -345,7 +345,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/field_error.rb b/lib/bandwidth-sdk/models/field_error.rb index f5f50356..63eddf4e 100644 --- a/lib/bandwidth-sdk/models/field_error.rb +++ b/lib/bandwidth-sdk/models/field_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -170,7 +170,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/file_format_enum.rb b/lib/bandwidth-sdk/models/file_format_enum.rb index 30cbaeac..81c8b6b9 100644 --- a/lib/bandwidth-sdk/models/file_format_enum.rb +++ b/lib/bandwidth-sdk/models/file_format_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/gather_callback.rb b/lib/bandwidth-sdk/models/gather_callback.rb index 9267a430..5a7b6004 100644 --- a/lib/bandwidth-sdk/models/gather_callback.rb +++ b/lib/bandwidth-sdk/models/gather_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -355,7 +355,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/inbound_message_callback.rb b/lib/bandwidth-sdk/models/inbound_message_callback.rb index b886eb62..e1730a0e 100644 --- a/lib/bandwidth-sdk/models/inbound_message_callback.rb +++ b/lib/bandwidth-sdk/models/inbound_message_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -231,7 +231,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/inbound_message_callback_message.rb b/lib/bandwidth-sdk/models/inbound_message_callback_message.rb index 3ae2890f..24497f94 100644 --- a/lib/bandwidth-sdk/models/inbound_message_callback_message.rb +++ b/lib/bandwidth-sdk/models/inbound_message_callback_message.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -358,7 +358,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/initiate_callback.rb b/lib/bandwidth-sdk/models/initiate_callback.rb index 0a2adceb..014b97bc 100644 --- a/lib/bandwidth-sdk/models/initiate_callback.rb +++ b/lib/bandwidth-sdk/models/initiate_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -290,7 +290,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/list_message_direction_enum.rb b/lib/bandwidth-sdk/models/list_message_direction_enum.rb index 443b9e96..7f69553e 100644 --- a/lib/bandwidth-sdk/models/list_message_direction_enum.rb +++ b/lib/bandwidth-sdk/models/list_message_direction_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/list_message_item.rb b/lib/bandwidth-sdk/models/list_message_item.rb index 014fb7b1..255f8a92 100644 --- a/lib/bandwidth-sdk/models/list_message_item.rb +++ b/lib/bandwidth-sdk/models/list_message_item.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -345,7 +345,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/lookup_request.rb b/lib/bandwidth-sdk/models/lookup_request.rb index 38b5cda4..f3eccd4f 100644 --- a/lib/bandwidth-sdk/models/lookup_request.rb +++ b/lib/bandwidth-sdk/models/lookup_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -169,7 +169,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/lookup_result.rb b/lib/bandwidth-sdk/models/lookup_result.rb index 159a0e92..a1ddf39d 100644 --- a/lib/bandwidth-sdk/models/lookup_result.rb +++ b/lib/bandwidth-sdk/models/lookup_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -241,7 +241,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/lookup_status.rb b/lib/bandwidth-sdk/models/lookup_status.rb index 4aca5818..ab94b359 100644 --- a/lib/bandwidth-sdk/models/lookup_status.rb +++ b/lib/bandwidth-sdk/models/lookup_status.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -216,7 +216,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/lookup_status_enum.rb b/lib/bandwidth-sdk/models/lookup_status_enum.rb index d78b65a4..8ba58cee 100644 --- a/lib/bandwidth-sdk/models/lookup_status_enum.rb +++ b/lib/bandwidth-sdk/models/lookup_status_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb b/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb index 6968862c..0205d695 100644 --- a/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +++ b/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -315,7 +315,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/machine_detection_configuration.rb b/lib/bandwidth-sdk/models/machine_detection_configuration.rb index 5532f6c8..bc2251b8 100644 --- a/lib/bandwidth-sdk/models/machine_detection_configuration.rb +++ b/lib/bandwidth-sdk/models/machine_detection_configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -440,7 +440,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb b/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb index 3ae4845c..3d66a08d 100644 --- a/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +++ b/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/machine_detection_result.rb b/lib/bandwidth-sdk/models/machine_detection_result.rb index 8a2eb71b..58c2c3ad 100644 --- a/lib/bandwidth-sdk/models/machine_detection_result.rb +++ b/lib/bandwidth-sdk/models/machine_detection_result.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -171,7 +171,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/media.rb b/lib/bandwidth-sdk/models/media.rb index 37da6588..528904ec 100644 --- a/lib/bandwidth-sdk/models/media.rb +++ b/lib/bandwidth-sdk/models/media.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -177,7 +177,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message.rb b/lib/bandwidth-sdk/models/message.rb index 2f551d49..a5601a31 100644 --- a/lib/bandwidth-sdk/models/message.rb +++ b/lib/bandwidth-sdk/models/message.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -324,7 +324,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message_delivered_callback.rb b/lib/bandwidth-sdk/models/message_delivered_callback.rb index ef3143db..877229da 100644 --- a/lib/bandwidth-sdk/models/message_delivered_callback.rb +++ b/lib/bandwidth-sdk/models/message_delivered_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -231,7 +231,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message_delivered_callback_message.rb b/lib/bandwidth-sdk/models/message_delivered_callback_message.rb index e467706d..923bceb7 100644 --- a/lib/bandwidth-sdk/models/message_delivered_callback_message.rb +++ b/lib/bandwidth-sdk/models/message_delivered_callback_message.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -365,7 +365,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message_direction_enum.rb b/lib/bandwidth-sdk/models/message_direction_enum.rb index 0195a462..0d6ca5d2 100644 --- a/lib/bandwidth-sdk/models/message_direction_enum.rb +++ b/lib/bandwidth-sdk/models/message_direction_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/message_failed_callback.rb b/lib/bandwidth-sdk/models/message_failed_callback.rb index e1f55acf..d837e74c 100644 --- a/lib/bandwidth-sdk/models/message_failed_callback.rb +++ b/lib/bandwidth-sdk/models/message_failed_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -247,7 +247,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message_failed_callback_message.rb b/lib/bandwidth-sdk/models/message_failed_callback_message.rb index 0c3ab2c7..8c7d23ad 100644 --- a/lib/bandwidth-sdk/models/message_failed_callback_message.rb +++ b/lib/bandwidth-sdk/models/message_failed_callback_message.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -372,7 +372,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message_request.rb b/lib/bandwidth-sdk/models/message_request.rb index 4704bcf6..1e6546cc 100644 --- a/lib/bandwidth-sdk/models/message_request.rb +++ b/lib/bandwidth-sdk/models/message_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -305,7 +305,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message_sending_callback.rb b/lib/bandwidth-sdk/models/message_sending_callback.rb index 5f662c1f..8794ede0 100644 --- a/lib/bandwidth-sdk/models/message_sending_callback.rb +++ b/lib/bandwidth-sdk/models/message_sending_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -231,7 +231,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message_sending_callback_message.rb b/lib/bandwidth-sdk/models/message_sending_callback_message.rb index f1a7529b..ea216e39 100644 --- a/lib/bandwidth-sdk/models/message_sending_callback_message.rb +++ b/lib/bandwidth-sdk/models/message_sending_callback_message.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -372,7 +372,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/message_status_enum.rb b/lib/bandwidth-sdk/models/message_status_enum.rb index 9a426842..dc68318f 100644 --- a/lib/bandwidth-sdk/models/message_status_enum.rb +++ b/lib/bandwidth-sdk/models/message_status_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/message_type_enum.rb b/lib/bandwidth-sdk/models/message_type_enum.rb index 7e6e91ea..422a5d70 100644 --- a/lib/bandwidth-sdk/models/message_type_enum.rb +++ b/lib/bandwidth-sdk/models/message_type_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/messages_list.rb b/lib/bandwidth-sdk/models/messages_list.rb index ff7d3adf..21390abd 100644 --- a/lib/bandwidth-sdk/models/messages_list.rb +++ b/lib/bandwidth-sdk/models/messages_list.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -180,7 +180,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/messaging_code_response.rb b/lib/bandwidth-sdk/models/messaging_code_response.rb index 1f469f6d..e942f732 100644 --- a/lib/bandwidth-sdk/models/messaging_code_response.rb +++ b/lib/bandwidth-sdk/models/messaging_code_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -160,7 +160,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/messaging_request_error.rb b/lib/bandwidth-sdk/models/messaging_request_error.rb index 26b738a0..88df4ce3 100644 --- a/lib/bandwidth-sdk/models/messaging_request_error.rb +++ b/lib/bandwidth-sdk/models/messaging_request_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -182,7 +182,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb b/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb index 53374d88..62d9a9f1 100644 --- a/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +++ b/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -160,7 +160,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/mfa_request_error.rb b/lib/bandwidth-sdk/models/mfa_request_error.rb index 44f5706a..ecbcf12b 100644 --- a/lib/bandwidth-sdk/models/mfa_request_error.rb +++ b/lib/bandwidth-sdk/models/mfa_request_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -170,7 +170,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb b/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb index 244f18f4..5039c632 100644 --- a/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +++ b/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -160,7 +160,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/page_info.rb b/lib/bandwidth-sdk/models/page_info.rb index 655b916c..3e0989f5 100644 --- a/lib/bandwidth-sdk/models/page_info.rb +++ b/lib/bandwidth-sdk/models/page_info.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -190,7 +190,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/priority_enum.rb b/lib/bandwidth-sdk/models/priority_enum.rb index cd7a1ba6..b954a7ca 100644 --- a/lib/bandwidth-sdk/models/priority_enum.rb +++ b/lib/bandwidth-sdk/models/priority_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/recording_available_callback.rb b/lib/bandwidth-sdk/models/recording_available_callback.rb index 444ccc03..98aed5ea 100644 --- a/lib/bandwidth-sdk/models/recording_available_callback.rb +++ b/lib/bandwidth-sdk/models/recording_available_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -394,7 +394,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/recording_complete_callback.rb b/lib/bandwidth-sdk/models/recording_complete_callback.rb index 9ae15638..a3072cfc 100644 --- a/lib/bandwidth-sdk/models/recording_complete_callback.rb +++ b/lib/bandwidth-sdk/models/recording_complete_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -395,7 +395,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/recording_state_enum.rb b/lib/bandwidth-sdk/models/recording_state_enum.rb index 376e3503..79b8bf35 100644 --- a/lib/bandwidth-sdk/models/recording_state_enum.rb +++ b/lib/bandwidth-sdk/models/recording_state_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/recording_transcription_metadata.rb b/lib/bandwidth-sdk/models/recording_transcription_metadata.rb index bb717639..9b9ef233 100644 --- a/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +++ b/lib/bandwidth-sdk/models/recording_transcription_metadata.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -191,7 +191,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/recording_transcriptions.rb b/lib/bandwidth-sdk/models/recording_transcriptions.rb index 9c52384c..6656b7be 100644 --- a/lib/bandwidth-sdk/models/recording_transcriptions.rb +++ b/lib/bandwidth-sdk/models/recording_transcriptions.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -161,7 +161,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/redirect_callback.rb b/lib/bandwidth-sdk/models/redirect_callback.rb index df51b919..ddadb213 100644 --- a/lib/bandwidth-sdk/models/redirect_callback.rb +++ b/lib/bandwidth-sdk/models/redirect_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -335,7 +335,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/redirect_method_enum.rb b/lib/bandwidth-sdk/models/redirect_method_enum.rb index 5755080d..101f24c2 100644 --- a/lib/bandwidth-sdk/models/redirect_method_enum.rb +++ b/lib/bandwidth-sdk/models/redirect_method_enum.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/lib/bandwidth-sdk/models/stir_shaken.rb b/lib/bandwidth-sdk/models/stir_shaken.rb index 6d496cf8..88021062 100644 --- a/lib/bandwidth-sdk/models/stir_shaken.rb +++ b/lib/bandwidth-sdk/models/stir_shaken.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -180,7 +180,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/tag.rb b/lib/bandwidth-sdk/models/tag.rb index 889bbcf3..ee3e7faf 100644 --- a/lib/bandwidth-sdk/models/tag.rb +++ b/lib/bandwidth-sdk/models/tag.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -168,7 +168,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/tn_lookup_request_error.rb b/lib/bandwidth-sdk/models/tn_lookup_request_error.rb index c03e3106..7326aa10 100644 --- a/lib/bandwidth-sdk/models/tn_lookup_request_error.rb +++ b/lib/bandwidth-sdk/models/tn_lookup_request_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -160,7 +160,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/transcribe_recording.rb b/lib/bandwidth-sdk/models/transcribe_recording.rb index d61d09c3..f36b6444 100644 --- a/lib/bandwidth-sdk/models/transcribe_recording.rb +++ b/lib/bandwidth-sdk/models/transcribe_recording.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -307,7 +307,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/transcription.rb b/lib/bandwidth-sdk/models/transcription.rb index 1570c2e9..0eb616dd 100644 --- a/lib/bandwidth-sdk/models/transcription.rb +++ b/lib/bandwidth-sdk/models/transcription.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -170,7 +170,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/transcription_available_callback.rb b/lib/bandwidth-sdk/models/transcription_available_callback.rb index 35ef069c..9acab05d 100644 --- a/lib/bandwidth-sdk/models/transcription_available_callback.rb +++ b/lib/bandwidth-sdk/models/transcription_available_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -383,7 +383,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/transfer_answer_callback.rb b/lib/bandwidth-sdk/models/transfer_answer_callback.rb index ff1a1781..ffc5a47c 100644 --- a/lib/bandwidth-sdk/models/transfer_answer_callback.rb +++ b/lib/bandwidth-sdk/models/transfer_answer_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -325,7 +325,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/transfer_complete_callback.rb b/lib/bandwidth-sdk/models/transfer_complete_callback.rb index d2491b8c..bdfe9301 100644 --- a/lib/bandwidth-sdk/models/transfer_complete_callback.rb +++ b/lib/bandwidth-sdk/models/transfer_complete_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -357,7 +357,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb b/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb index 7e0f07ea..4b3a3f08 100644 --- a/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +++ b/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -377,7 +377,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/update_call.rb b/lib/bandwidth-sdk/models/update_call.rb index 57b1396c..592e8f32 100644 --- a/lib/bandwidth-sdk/models/update_call.rb +++ b/lib/bandwidth-sdk/models/update_call.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -360,7 +360,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/update_call_recording.rb b/lib/bandwidth-sdk/models/update_call_recording.rb index 06b6300b..3644bc4d 100644 --- a/lib/bandwidth-sdk/models/update_call_recording.rb +++ b/lib/bandwidth-sdk/models/update_call_recording.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -188,7 +188,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/update_conference.rb b/lib/bandwidth-sdk/models/update_conference.rb index c15c034b..b85cdc87 100644 --- a/lib/bandwidth-sdk/models/update_conference.rb +++ b/lib/bandwidth-sdk/models/update_conference.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -334,7 +334,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/update_conference_member.rb b/lib/bandwidth-sdk/models/update_conference_member.rb index 59782916..625b435e 100644 --- a/lib/bandwidth-sdk/models/update_conference_member.rb +++ b/lib/bandwidth-sdk/models/update_conference_member.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -183,7 +183,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/verify_code_request.rb b/lib/bandwidth-sdk/models/verify_code_request.rb index e2324364..400f7b2b 100644 --- a/lib/bandwidth-sdk/models/verify_code_request.rb +++ b/lib/bandwidth-sdk/models/verify_code_request.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -288,7 +288,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/verify_code_response.rb b/lib/bandwidth-sdk/models/verify_code_response.rb index 5ab58b75..1209a38f 100644 --- a/lib/bandwidth-sdk/models/verify_code_response.rb +++ b/lib/bandwidth-sdk/models/verify_code_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -160,7 +160,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/voice_api_error.rb b/lib/bandwidth-sdk/models/voice_api_error.rb index f577959b..f3c05659 100644 --- a/lib/bandwidth-sdk/models/voice_api_error.rb +++ b/lib/bandwidth-sdk/models/voice_api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -178,7 +178,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/models/voice_code_response.rb b/lib/bandwidth-sdk/models/voice_code_response.rb index 7f6c07c4..39d97d81 100644 --- a/lib/bandwidth-sdk/models/voice_code_response.rb +++ b/lib/bandwidth-sdk/models/voice_code_response.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end @@ -160,7 +160,7 @@ def self._deserialize(type, value) else # model # models (e.g. Pet) or oneOf klass = Bandwidth.const_get(type) - klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end diff --git a/lib/bandwidth-sdk/version.rb b/lib/bandwidth-sdk/version.rb index baeb051c..376b41b7 100644 --- a/lib/bandwidth-sdk/version.rb +++ b/lib/bandwidth-sdk/version.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: 1.0.0 Contact: letstalk@bandwidth.com Generated by: https://openapi-generator.tech -OpenAPI Generator version: 7.0.0 +Generator version: 7.6.0 =end diff --git a/openapitools.json b/openapitools.json index 3015568c..5c50d6a2 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "7.0.0" + "version": "7.6.0" } } diff --git a/spec/unit/api/calls_api_spec.rb b/spec/unit/api/calls_api_spec.rb index 11e946a2..4dae0391 100644 --- a/spec/unit/api/calls_api_spec.rb +++ b/spec/unit/api/calls_api_spec.rb @@ -261,3 +261,276 @@ end end end + +# Unit tests for Bandwidth::CallsApi +# describe 'CallsApi' do +# # call info +# let(:call_id) { 'c-15ac29a2-006c67ad-060f-4b98-b148-b753d6e5e2ce' } +# let(:enqueued_time) { '2023-06-23T18:43:51.248Z' } +# let(:call_url) { "https://voice.bandwidth.com/api/v2/accounts/#{BW_ACCOUNT_ID}/calls/#{call_id}" } +# let(:call_timeout) { 30.0 } +# let(:callback_timeout) { 15.0 } +# let(:privacy) { false } +# let(:display_name) { 'Ruby SDK' } +# let(:answer_method) { Bandwidth::CallbackMethodEnum::POST } +# let(:answer_url) { BASE_CALLBACK_URL + '/callbacks/answer' } +# let(:answer_fallback_url) { BASE_CALLBACK_URL + '/callbacks/answer' } +# let(:answer_fallback_method) { Bandwidth::CallbackMethodEnum::POST } +# let(:disconnect_method) { Bandwidth::CallbackMethodEnum::GET } +# let(:disconnect_url) { BASE_CALLBACK_URL + '/callbacks/disconnect' } +# let(:priority) { 5 } +# let(:direction) { Bandwidth::CallDirectionEnum::OUTBOUND } +# let(:state) { 'disconnected' } +# let(:stir_shaken) { {} } +# let(:start_time) { '2023-06-23T19:11:06.049Z' } +# let(:end_time) { '2023-06-23T19:11:06.175Z' } +# let(:disconnect_cause) { 'rejected' } +# let(:error_message) { 'Destination not found' } +# let(:error_id) { '779941c4-6482-461d-b370-177b4ad0b5a7' } +# let(:last_update) { '2023-06-23T19:11:06.175Z' } +# let(:tag) { 'test tag' } + +# # stubs +# # let(:create_call_headers_stub) { { 'content-type' => 'application/json' } } +# # let(:create_call_body_stub) { "{\"applicationId\":\"#{BW_VOICE_APPLICATION_ID}\",\"accountId\":\"#{BW_ACCOUNT_ID}\",\"callId\":\"#{call_id}\",\"to\":\"#{USER_NUMBER}\",\"from\":\"#{BW_NUMBER}\",\"enqueuedTime\":\"#{enqueued_time}\",\"callUrl\":\"#{call_url}\",\"callTimeout\":#{call_timeout},\"callbackTimeout\":#{callback_timeout},\"tag\":\"#{tag}\",\"answerMethod\":\"#{answer_method}\",\"answerUrl\":\"#{answer_url}\",\"answerFallbackUrl\":\"#{answer_fallback_url}\",\"answerFallbackMethod\":\"#{answer_fallback_method}\",\"disconnectMethod\":\"#{disconnect_method}\",\"disconnectUrl\":\"#{disconnect_url}\",\"priority\":#{priority}}" } +# # let(:create_call_bad_request_stub) { '{"type":"validation","description":"Invalid to: must be a valid SIP URI or an E164 TN"}' } +# # let(:get_calls_headers_stub) { { 'content-type' => 'application/json' } } +# # let(:get_calls_body_stub) { "[{\"applicationId\":\"#{BW_VOICE_APPLICATION_ID}\",\"accountId\":\"#{BW_ACCOUNT_ID}\",\"callId\":\"#{call_id}\",\"to\":\"#{USER_NUMBER}\",\"from\":\"#{BW_NUMBER}\",\"direction\":\"#{direction}\",\"state\":\"#{state}\",\"stirShaken\":#{stir_shaken},\"startTime\":\"#{start_time}\",\"endTime\":\"#{end_time}\",\"disconnectCause\":\"#{disconnect_cause}\",\"errorMessage\":\"#{error_message}\",\"errorId\":\"#{error_id}\",\"lastUpdate\":\"#{last_update}\"}]" } +# # let(:get_call_state_headers_stub) { { 'content-type' => 'application/json' } } +# # let(:get_call_state_body_stub) { "{\"applicationId\":\"#{BW_VOICE_APPLICATION_ID}\",\"accountId\":\"#{BW_ACCOUNT_ID}\",\"callId\":\"#{call_id}\",\"to\":\"#{USER_NUMBER}\",\"from\":\"#{BW_NUMBER}\",\"direction\":\"#{direction}\",\"state\":\"#{state}\",\"stirShaken\":#{stir_shaken},\"enqueuedTime\":\"#{enqueued_time}\",\"startTime\":\"#{start_time}\",\"endTime\":\"#{end_time}\",\"disconnectCause\":\"#{disconnect_cause}\",\"errorMessage\":\"#{error_message}\",\"errorId\":\"#{error_id}\",\"lastUpdate\":\"#{last_update}\"}" } +# # let(:get_call_state_not_found_stub) { '{"type":"validation","description":"Call does-not-exist was not found."}' } +# # let(:get_call_state_unauthorized_stub) { '{"type":"authentication-error","description":"The credentials provided were invalid"}' } +# # let(:get_call_state_forbidden_stub) { '{"type":"authorization-error","description":"Access is denied"}' } +# # let(:update_call_headers_stub) { { 'content-length' => '0' } } + +# before(:all) do +# Bandwidth.configure do |config| +# config.username = BW_USERNAME +# config.password = BW_PASSWORD +# config.use_custom_server = true +# # config.debugging = true +# config.host = 'http://127.0.0.1:4010' +# end +# @calls_api_instance = Bandwidth::CallsApi.new +# end + +# describe 'test an instance of CallsApi' do +# it 'should create an instance of CallsApi' do +# expect(@calls_api_instance).to be_instance_of(Bandwidth::CallsApi) +# end +# end + +# # Create Call +# describe '#create_call' do +# it 'creates a call with amd' do +# # stub_request(:post, "https://voice.bandwidth.com/api/v2/accounts/#{BW_ACCOUNT_ID}/calls"). +# # to_return(status: 201, headers: create_call_headers_stub, body: create_call_body_stub) + +# amd_config = Bandwidth::MachineDetectionConfiguration.new( +# mode: 'async', +# detection_timeout: 5.0, +# silence_timeout: 5.0, +# speech_threshold: 5.0, +# speech_end_threshold: 5.0, +# delay_result: true, +# callback_url: BASE_CALLBACK_URL + '/machineDetection', +# callback_method: Bandwidth::CallbackMethodEnum::POST +# ) + +# call_body = Bandwidth::CreateCall.new( +# application_id: BW_VOICE_APPLICATION_ID, +# to: USER_NUMBER, +# from: BW_NUMBER, +# privacy: privacy, +# display_name: display_name, +# answer_url: answer_url, +# answer_fallback_url: answer_fallback_url, +# answer_method: answer_method, +# disconnect_url: disconnect_url, +# disconnect_method: disconnect_method, +# machine_detection: amd_config, +# call_timeout: call_timeout, +# callback_timeout: callback_timeout, +# tag: tag +# ) + +# data, status_code = @calls_api_instance.create_call_with_http_info(BW_ACCOUNT_ID, {}) + +# expect(status_code).to eq(201) +# puts data +# # expect(headers).to eq(create_call_headers_stub) +# expect(data).to be_instance_of(Bandwidth::CreateCallResponse) +# expect(data.application_id.length).to eq(36) +# expect(data.account_id.length).to eq(7) +# expect(data.call_id.length).to eq(47) +# expect(data.to.length).to eq(12) +# expect(data.from.length).to eq(12) +# expect(data.enqueued_time).to be_instance_of(Time) +# expect(data.call_url).to start_with('http') +# expect(data.call_timeout).to be_instance_of(Float) +# expect(data.callback_timeout).to be_instance_of(Float) +# expect(data.tag).to be_instance_of(String) +# expect(data.answer_method).to eq(Bandwidth::CallbackMethodEnum::POST).or eq(Bandwidth::CallbackMethodEnum::GET) +# expect(data.answer_url).to start_with('http') +# expect(data.answer_fallback_method).to eq(Bandwidth::CallbackMethodEnum::POST).or eq(Bandwidth::CallbackMethodEnum::GET) +# expect(data.answer_fallback_url).to start_with('http') +# expect(data.disconnect_method).to eq(Bandwidth::CallbackMethodEnum::POST).or eq(Bandwidth::CallbackMethodEnum::GET) +# expect(data.disconnect_url).to start_with('http') +# expect(data.username).to be_instance_of(String) +# expect(data.password).to be_instance_of(String) +# expect(data.fallback_username).to be_instance_of(String) +# expect(data.fallback_password).to be_instance_of(String) +# expect(data.priority).to be_instance_of(Integer) +# end + +# it 'causes an ArgumentError for a missing account_id' do +# expect { +# @calls_api_instance.create_call(nil, {}) +# }.to raise_error(ArgumentError) +# end + +# it 'causes an ArgumentError for a missing create_call' do +# expect { +# @calls_api_instance.create_call(BW_ACCOUNT_ID, nil) +# }.to raise_error(ArgumentError) +# end +# end + +# # # Get Calls +# # describe '#list_calls' do +# # it 'gets a list of calls' do +# # # stub_request(:get, "https://voice.bandwidth.com/api/v2/accounts/#{BW_ACCOUNT_ID}/calls"). +# # # to_return(status: 200, headers: get_calls_headers_stub, body: get_calls_body_stub) + +# # data, status_code, headers = @calls_api_instance.list_calls_with_http_info(BW_ACCOUNT_ID) + +# # expect(status_code).to eq(200) +# # expect(headers).to eq(get_calls_headers_stub) +# # expect(data).to be_instance_of(Array) +# # expect(data[0]).to be_instance_of(Bandwidth::CallState) +# # expect(data[0].application_id).to eq(BW_VOICE_APPLICATION_ID) +# # expect(data[0].account_id).to eq(BW_ACCOUNT_ID) +# # expect(data[0].call_id).to eq(call_id) +# # expect(data[0].to).to eq(USER_NUMBER) +# # expect(data[0].from).to eq(BW_NUMBER) +# # expect(data[0].direction).to eq(direction) +# # expect(data[0].stir_shaken).to eq(stir_shaken) +# # expect(data[0].state).to eq(state) +# # expect(data[0].start_time).to eq(Time.parse(start_time)) +# # expect(data[0].end_time).to eq(Time.parse(end_time)) +# # expect(data[0].disconnect_cause).to eq(disconnect_cause) +# # expect(data[0].error_message).to eq(error_message) +# # expect(data[0].error_id).to eq(error_id) +# # expect(data[0].last_update).to eq(Time.parse(last_update)) +# # end +# # end + +# # # Get Call State Information +# # describe '#get_call_state' do +# # it 'gets the call state' do +# # # stub_request(:get, "https://voice.bandwidth.com/api/v2/accounts/#{BW_ACCOUNT_ID}/calls/#{call_id}"). +# # # to_return(status: 200, headers: get_call_state_headers_stub, body: get_call_state_body_stub) + +# # data, status_code, headers = @calls_api_instance.get_call_state_with_http_info(BW_ACCOUNT_ID, call_id) + +# # expect(status_code).to eq(200) +# # expect(headers).to eq(get_call_state_headers_stub) +# # expect(data).to be_instance_of(Bandwidth::CallState) +# # expect(data.application_id).to eq(BW_VOICE_APPLICATION_ID) +# # expect(data.account_id).to eq(BW_ACCOUNT_ID) +# # expect(data.call_id).to eq(call_id) +# # expect(data.to).to eq(USER_NUMBER) +# # expect(data.from).to eq(BW_NUMBER) +# # expect(data.direction).to eq(direction) +# # expect(data.stir_shaken).to eq(stir_shaken) +# # expect(data.state).to eq(state) +# # expect(data.enqueued_time).to eq(Time.parse(enqueued_time)) +# # expect(data.start_time).to eq(Time.parse(start_time)) +# # expect(data.end_time).to eq(Time.parse(end_time)) +# # expect(data.disconnect_cause).to eq(disconnect_cause) +# # expect(data.error_message).to eq(error_message) +# # expect(data.error_id).to eq(error_id) +# # expect(data.last_update).to eq(Time.parse(last_update)) +# # end + +# # it 'causes an ArgumentError for a missing account_id' do +# # expect { +# # @calls_api_instance.get_call_state(nil, '') +# # }.to raise_error(ArgumentError) +# # end + +# # it 'causes an ArgumentError for a missing call_id' do +# # expect { +# # @calls_api_instance.get_call_state(BW_ACCOUNT_ID, nil) +# # }.to raise_error(ArgumentError) +# # end +# # end + +# # # Update Call +# # describe '#update_call' do +# # it 'creates and updates a call' do +# # # stub_request(:post, "https://voice.bandwidth.com/api/v2/accounts/#{BW_ACCOUNT_ID}/calls/#{call_id}"). +# # # to_return(status: 200, headers: update_call_headers_stub) + +# # update_call_body = Bandwidth::UpdateCall.new( +# # state: Bandwidth::CallStateEnum::ACTIVE, +# # redirect_url: MANTECA_BASE_URL + '/bxml/pause' +# # ) + +# # _data, status_code, headers = @calls_api_instance.update_call_with_http_info(BW_ACCOUNT_ID, call_id, update_call_body) + +# # expect(status_code).to eq(200) +# # expect(headers).to eq(update_call_headers_stub) +# # end + +# # it 'causes an ArgumentError for a missing account_id' do +# # expect { +# # @calls_api_instance.update_call(nil, '', {}) +# # }.to raise_error(ArgumentError) +# # end + +# # it 'causes an ArgumentError for a missing call_id' do +# # expect { +# # @calls_api_instance.update_call(BW_ACCOUNT_ID, nil, {}) +# # }.to raise_error(ArgumentError) +# # end + +# # it 'causes an ArgumentError for a missing update_call' do +# # expect { +# # @calls_api_instance.update_call(BW_ACCOUNT_ID, '', nil) +# # }.to raise_error(ArgumentError) +# # end +# # end + +# # # Update Call BXML +# # describe '#update_call_bxml' do +# # it 'updates a call using bxml' do +# # # stub_request(:put, "https://voice.bandwidth.com/api/v2/accounts/#{BW_ACCOUNT_ID}/calls/#{call_id}/bxml"). +# # # to_return(status: 204) + +# # update_bxml = 'This is a test bxml response' + +# # _data, status_code = @calls_api_instance.update_call_bxml_with_http_info(BW_ACCOUNT_ID, call_id, update_bxml) + +# # expect(status_code).to eq(204) +# # end + +# # it 'causes an ArgumentError for a missing account_id' do +# # expect { +# # @calls_api_instance.update_call_bxml(nil, '', {}) +# # }.to raise_error(ArgumentError) +# # end + +# # it 'causes an ArgumentError for a missing call_id' do +# # expect { +# # @calls_api_instance.update_call_bxml(BW_ACCOUNT_ID, nil, {}) +# # }.to raise_error(ArgumentError) +# # end + +# # it 'causes an ArgumentError for a missing body' do +# # expect { +# # @calls_api_instance.update_call_bxml(BW_ACCOUNT_ID, '', nil) +# # }.to raise_error(ArgumentError) +# # end +# # end +# end