bandwidth-sdk 18.1.3 → 18.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +56 -10
- data/README.md +2 -0
- data/UPDATING_MODEL_TESTS.md +17 -2
- data/bandwidth-sdk.gemspec +2 -2
- data/bandwidth.yml +190 -51
- data/coverage/.last_run.json +1 -1
- data/coverage/.resultset.json +819 -144
- data/coverage/index.html +15708 -8440
- data/custom_templates/configuration.mustache +6 -2
- data/custom_templates/gemspec.mustache +1 -1
- data/docs/AnswerCallback.md +4 -2
- data/docs/BridgeCompleteCallback.md +1 -1
- data/docs/BridgeTargetCompleteCallback.md +1 -1
- data/docs/ConferenceCompletedCallback.md +1 -1
- data/docs/ConferenceCreatedCallback.md +1 -1
- data/docs/ConferenceMemberExitCallback.md +1 -1
- data/docs/ConferenceMemberJoinCallback.md +1 -1
- data/docs/ConferenceRecordingAvailableCallback.md +1 -1
- data/docs/ConferenceRedirectCallback.md +1 -1
- data/docs/DisconnectCallback.md +6 -2
- data/docs/DtmfCallback.md +1 -1
- data/docs/GatherCallback.md +1 -1
- data/docs/InitiateCallback.md +6 -2
- data/docs/MachineDetectionCompleteCallback.md +1 -1
- data/docs/MediaApi.md +8 -8
- data/docs/MessagesApi.md +4 -4
- data/docs/MultiChannelApi.md +2 -2
- data/docs/RbmActionBase.md +1 -1
- data/docs/RbmSuggestionResponse.md +1 -1
- data/docs/RecordingAvailableCallback.md +1 -1
- data/docs/RecordingCompleteCallback.md +1 -1
- data/docs/RedirectCallback.md +1 -1
- data/docs/ReferCallStatusEnum.md +15 -0
- data/docs/ReferCompleteCallback.md +46 -0
- data/docs/TranscriptionAvailableCallback.md +1 -1
- data/docs/TransferAnswerCallback.md +1 -1
- data/docs/TransferCompleteCallback.md +1 -1
- data/docs/TransferDisconnectCallback.md +1 -1
- data/lib/bandwidth-sdk/api/calls_api.rb +6 -6
- data/lib/bandwidth-sdk/api/conferences_api.rb +10 -10
- data/lib/bandwidth-sdk/api/endpoints_api.rb +6 -6
- data/lib/bandwidth-sdk/api/media_api.rb +13 -13
- data/lib/bandwidth-sdk/api/messages_api.rb +7 -7
- data/lib/bandwidth-sdk/api/mfa_api.rb +4 -4
- data/lib/bandwidth-sdk/api/multi_channel_api.rb +4 -4
- data/lib/bandwidth-sdk/api/phone_number_lookup_api.rb +4 -4
- data/lib/bandwidth-sdk/api/recordings_api.rb +11 -11
- data/lib/bandwidth-sdk/api/statistics_api.rb +2 -2
- data/lib/bandwidth-sdk/api/toll_free_verification_api.rb +9 -9
- data/lib/bandwidth-sdk/api/transcriptions_api.rb +4 -4
- data/lib/bandwidth-sdk/api_client.rb +1 -1
- data/lib/bandwidth-sdk/api_error.rb +1 -1
- data/lib/bandwidth-sdk/api_model_base.rb +1 -1
- data/lib/bandwidth-sdk/configuration.rb +7 -3
- data/lib/bandwidth-sdk/models/account_statistics.rb +1 -1
- data/lib/bandwidth-sdk/models/additional_denial_reason.rb +1 -1
- data/lib/bandwidth-sdk/models/address.rb +1 -1
- data/lib/bandwidth-sdk/models/answer_callback.rb +17 -7
- data/lib/bandwidth-sdk/models/async_lookup_request.rb +1 -1
- data/lib/bandwidth-sdk/models/blocked_webhook.rb +1 -1
- data/lib/bandwidth-sdk/models/bridge_complete_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/bridge_target_complete_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/brtc_error.rb +1 -1
- data/lib/bandwidth-sdk/models/brtc_error_response.rb +1 -1
- data/lib/bandwidth-sdk/models/brtc_error_source.rb +1 -1
- data/lib/bandwidth-sdk/models/brtc_link.rb +1 -1
- data/lib/bandwidth-sdk/models/business_entity_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/business_registration_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/bxml/root.rb +1 -1
- data/lib/bandwidth-sdk/models/bxml/verb.rb +1 -1
- data/lib/bandwidth-sdk/models/bxml/verbs/gather.rb +1 -1
- data/lib/bandwidth-sdk/models/bxml/verbs/refer.rb +24 -0
- data/lib/bandwidth-sdk/models/bxml/verbs/sip_uri.rb +3 -1
- data/lib/bandwidth-sdk/models/bxml/verbs/speak_sentence.rb +1 -1
- data/lib/bandwidth-sdk/models/call_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_recording_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/call_state.rb +1 -1
- data/lib/bandwidth-sdk/models/call_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription_detected_language_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription_response.rb +1 -1
- data/lib/bandwidth-sdk/models/call_transcription_track_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/callback.rb +1 -1
- data/lib/bandwidth-sdk/models/callback_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/card_width_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/code_request.rb +1 -1
- data/lib/bandwidth-sdk/models/completed_lookup_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/conference.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_completed_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/conference_created_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/conference_member.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_member_exit_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/conference_member_join_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/conference_recording_available_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/conference_recording_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/conference_redirect_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/conference_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/contact.rb +1 -1
- data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_async_bulk_lookup_response_data.rb +1 -1
- data/lib/bandwidth-sdk/models/create_call.rb +1 -1
- data/lib/bandwidth-sdk/models/create_call_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_endpoint_request_base.rb +1 -1
- data/lib/bandwidth-sdk/models/create_endpoint_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_endpoint_response_data.rb +1 -1
- data/lib/bandwidth-sdk/models/create_message_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/create_multi_channel_message_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_sync_lookup_response.rb +1 -1
- data/lib/bandwidth-sdk/models/create_sync_lookup_response_data.rb +1 -1
- data/lib/bandwidth-sdk/models/create_web_rtc_connection_request.rb +1 -1
- data/lib/bandwidth-sdk/models/deactivation_event_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/device.rb +1 -1
- data/lib/bandwidth-sdk/models/device_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/disconnect_callback.rb +27 -7
- data/lib/bandwidth-sdk/models/diversion.rb +1 -1
- data/lib/bandwidth-sdk/models/dtmf_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/endpoint.rb +1 -1
- data/lib/bandwidth-sdk/models/endpoint_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/endpoint_event.rb +1 -1
- data/lib/bandwidth-sdk/models/endpoint_event_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/endpoint_response.rb +1 -1
- data/lib/bandwidth-sdk/models/endpoint_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/endpoint_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/endpoints.rb +1 -1
- data/lib/bandwidth-sdk/models/error_object.rb +1 -1
- data/lib/bandwidth-sdk/models/error_source.rb +1 -1
- data/lib/bandwidth-sdk/models/failure_webhook.rb +1 -1
- data/lib/bandwidth-sdk/models/field_error.rb +1 -1
- data/lib/bandwidth-sdk/models/file_format_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/gather_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response.rb +1 -1
- data/lib/bandwidth-sdk/models/get_async_bulk_lookup_response_data.rb +1 -1
- data/lib/bandwidth-sdk/models/in_progress_lookup_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/inbound_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/inbound_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/inbound_callback_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/initiate_callback.rb +28 -6
- data/lib/bandwidth-sdk/models/latest_message_delivery_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/line_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/link.rb +1 -1
- data/lib/bandwidth-sdk/models/link_schema.rb +1 -1
- data/lib/bandwidth-sdk/models/links_object.rb +1 -1
- data/lib/bandwidth-sdk/models/list_endpoints_response.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/list_message_item.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_error_response.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_error_schema.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_error_schema_meta.rb +1 -1
- data/lib/bandwidth-sdk/models/lookup_result.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_complete_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/machine_detection_configuration.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_mode_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/machine_detection_result.rb +1 -1
- data/lib/bandwidth-sdk/models/media.rb +1 -1
- data/lib/bandwidth-sdk/models/message.rb +1 -1
- data/lib/bandwidth-sdk/models/message_direction_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/message_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/message_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/messages_list.rb +1 -1
- data/lib/bandwidth-sdk/models/messaging_code_response.rb +1 -1
- data/lib/bandwidth-sdk/models/messaging_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_forbidden_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mfa_unauthorized_request_error.rb +1 -1
- data/lib/bandwidth-sdk/models/mms_message_content.rb +1 -1
- data/lib/bandwidth-sdk/models/mms_message_content_file.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_action.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_action_calendar_event.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_mms_response_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_object_base.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_owner_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_object_all_of_content.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_rbm_response_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_request_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_response_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_channel_list_sms_response_object.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_error.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_message_channel_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_message_content.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_message_request.rb +1 -1
- data/lib/bandwidth-sdk/models/multi_channel_message_response_data.rb +1 -1
- data/lib/bandwidth-sdk/models/opt_in_workflow.rb +1 -1
- data/lib/bandwidth-sdk/models/page.rb +1 -1
- data/lib/bandwidth-sdk/models/page_info.rb +1 -1
- data/lib/bandwidth-sdk/models/priority_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/product_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_base.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_dial.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_open_url.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_action_view_location.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_card_content.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_card_content_media.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_location_response.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_media_height_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_message_carousel_card.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_message_content_file.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_message_content_rich_card.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_message_content_text.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_message_media.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_open_url_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_standalone_card.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_suggestion_response.rb +1 -1
- data/lib/bandwidth-sdk/models/rbm_web_view_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_available_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/recording_complete_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/recording_state_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_transcription_clip.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_transcription_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/recording_transcriptions.rb +1 -1
- data/lib/bandwidth-sdk/models/redirect_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/redirect_method_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/refer_call_status_enum.rb +40 -0
- data/lib/bandwidth-sdk/models/refer_complete_callback.rb +309 -0
- data/lib/bandwidth-sdk/models/sip_connection_metadata.rb +1 -1
- data/lib/bandwidth-sdk/models/sip_credentials.rb +1 -1
- data/lib/bandwidth-sdk/models/sms_message_content.rb +1 -1
- data/lib/bandwidth-sdk/models/standalone_card_orientation_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/status_callback.rb +1 -1
- data/lib/bandwidth-sdk/models/status_callback_message.rb +1 -1
- data/lib/bandwidth-sdk/models/status_callback_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/stir_shaken.rb +1 -1
- data/lib/bandwidth-sdk/models/sync_lookup_request.rb +1 -1
- data/lib/bandwidth-sdk/models/telephone_number.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_basic_authentication.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_callback_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_error.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_status.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_status_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_submission_info.rb +1 -1
- data/lib/bandwidth-sdk/models/tfv_submission_wrapper.rb +1 -1
- data/lib/bandwidth-sdk/models/thumbnail_alignment_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/transcribe_recording.rb +1 -1
- data/lib/bandwidth-sdk/models/transcription.rb +1 -1
- data/lib/bandwidth-sdk/models/transcription_available_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/transfer_answer_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/transfer_complete_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/transfer_disconnect_callback.rb +2 -2
- data/lib/bandwidth-sdk/models/update_call.rb +1 -1
- data/lib/bandwidth-sdk/models/update_call_recording.rb +1 -1
- data/lib/bandwidth-sdk/models/update_conference.rb +1 -1
- data/lib/bandwidth-sdk/models/update_conference_member.rb +1 -1
- data/lib/bandwidth-sdk/models/verification_denial_webhook.rb +1 -1
- data/lib/bandwidth-sdk/models/verification_request.rb +1 -1
- data/lib/bandwidth-sdk/models/verification_update_request.rb +1 -1
- data/lib/bandwidth-sdk/models/verification_webhook.rb +1 -1
- data/lib/bandwidth-sdk/models/verify_code_request.rb +1 -1
- data/lib/bandwidth-sdk/models/verify_code_response.rb +1 -1
- data/lib/bandwidth-sdk/models/voice_api_error.rb +1 -1
- data/lib/bandwidth-sdk/models/voice_code_response.rb +1 -1
- data/lib/bandwidth-sdk/models/webhook_subscription.rb +1 -1
- data/lib/bandwidth-sdk/models/webhook_subscription_basic_authentication.rb +1 -1
- data/lib/bandwidth-sdk/models/webhook_subscription_error.rb +1 -1
- data/lib/bandwidth-sdk/models/webhook_subscription_request_schema.rb +1 -1
- data/lib/bandwidth-sdk/models/webhook_subscription_type_enum.rb +1 -1
- data/lib/bandwidth-sdk/models/webhook_subscriptions_list_body.rb +1 -1
- data/lib/bandwidth-sdk/version.rb +2 -2
- data/lib/bandwidth-sdk.rb +4 -1
- data/openapitools.json +1 -1
- data/spec/unit/api/calls_api_spec.rb +1 -2
- data/spec/unit/api/conferences_api_spec.rb +1 -2
- data/spec/unit/api/endpoints_api_spec.rb +1 -2
- data/spec/unit/api/media_api_spec.rb +1 -2
- data/spec/unit/api/messages_api_spec.rb +1 -2
- data/spec/unit/api/mfa_api_spec.rb +1 -2
- data/spec/unit/api/multi_channel_api_spec.rb +1 -2
- data/spec/unit/api/phone_number_lookup_api_spec.rb +1 -2
- data/spec/unit/api/recordings_api_spec.rb +1 -2
- data/spec/unit/api/statistics_api_spec.rb +1 -2
- data/spec/unit/api/toll_free_verification_api_spec.rb +1 -2
- data/spec/unit/api/transcriptions_api_spec.rb +1 -2
- data/spec/unit/models/account_statistics_spec.rb +1 -1
- data/spec/unit/models/additional_denial_reason_spec.rb +1 -1
- data/spec/unit/models/address_spec.rb +1 -1
- data/spec/unit/models/answer_callback_spec.rb +8 -4
- data/spec/unit/models/async_lookup_request_spec.rb +1 -1
- data/spec/unit/models/blocked_webhook_spec.rb +1 -1
- data/spec/unit/models/bridge_complete_callback_spec.rb +1 -1
- data/spec/unit/models/bridge_target_complete_callback_spec.rb +1 -1
- data/spec/unit/models/brtc_error_response_spec.rb +1 -1
- data/spec/unit/models/brtc_error_source_spec.rb +1 -1
- data/spec/unit/models/brtc_error_spec.rb +1 -1
- data/spec/unit/models/brtc_link_spec.rb +1 -1
- data/spec/unit/models/bxml/verbs/refer_spec.rb +54 -0
- data/spec/unit/models/call_recording_metadata_spec.rb +1 -1
- data/spec/unit/models/call_state_spec.rb +1 -1
- data/spec/unit/models/call_transcription_metadata_spec.rb +1 -1
- data/spec/unit/models/call_transcription_response_spec.rb +1 -1
- data/spec/unit/models/call_transcription_spec.rb +1 -1
- data/spec/unit/models/code_request_spec.rb +1 -1
- data/spec/unit/models/conference_completed_callback_spec.rb +1 -1
- data/spec/unit/models/conference_created_callback_spec.rb +1 -1
- data/spec/unit/models/conference_member_exit_callback_spec.rb +1 -1
- data/spec/unit/models/conference_member_join_callback_spec.rb +1 -1
- data/spec/unit/models/conference_member_spec.rb +1 -1
- data/spec/unit/models/conference_recording_available_callback_spec.rb +1 -1
- data/spec/unit/models/conference_recording_metadata_spec.rb +1 -1
- data/spec/unit/models/conference_redirect_callback_spec.rb +1 -1
- data/spec/unit/models/conference_spec.rb +1 -1
- data/spec/unit/models/contact_spec.rb +1 -1
- data/spec/unit/models/create_async_bulk_lookup_response_data_spec.rb +1 -1
- data/spec/unit/models/create_async_bulk_lookup_response_spec.rb +1 -1
- data/spec/unit/models/create_call_response_spec.rb +1 -1
- data/spec/unit/models/create_call_spec.rb +1 -1
- data/spec/unit/models/create_endpoint_request_base_spec.rb +1 -1
- data/spec/unit/models/create_endpoint_response_data_spec.rb +1 -1
- data/spec/unit/models/create_endpoint_response_spec.rb +1 -1
- data/spec/unit/models/create_message_request_error_spec.rb +1 -1
- data/spec/unit/models/create_multi_channel_message_response_spec.rb +1 -1
- data/spec/unit/models/create_sync_lookup_response_data_spec.rb +1 -1
- data/spec/unit/models/create_sync_lookup_response_spec.rb +1 -1
- data/spec/unit/models/create_web_rtc_connection_request_spec.rb +1 -1
- data/spec/unit/models/device_spec.rb +1 -1
- data/spec/unit/models/disconnect_callback_spec.rb +12 -4
- data/spec/unit/models/diversion_spec.rb +1 -1
- data/spec/unit/models/dtmf_callback_spec.rb +1 -1
- data/spec/unit/models/endpoint_event_spec.rb +1 -1
- data/spec/unit/models/endpoint_response_spec.rb +1 -1
- data/spec/unit/models/endpoint_spec.rb +1 -1
- data/spec/unit/models/endpoints_spec.rb +1 -1
- data/spec/unit/models/error_object_spec.rb +1 -1
- data/spec/unit/models/error_source_spec.rb +1 -1
- data/spec/unit/models/failure_webhook_spec.rb +1 -1
- data/spec/unit/models/field_error_spec.rb +1 -1
- data/spec/unit/models/gather_callback_spec.rb +1 -1
- data/spec/unit/models/get_async_bulk_lookup_response_data_spec.rb +1 -1
- data/spec/unit/models/get_async_bulk_lookup_response_spec.rb +1 -1
- data/spec/unit/models/inbound_callback_message_spec.rb +1 -1
- data/spec/unit/models/inbound_callback_spec.rb +1 -1
- data/spec/unit/models/initiate_callback_spec.rb +13 -4
- data/spec/unit/models/link_schema_spec.rb +1 -1
- data/spec/unit/models/link_spec.rb +1 -1
- data/spec/unit/models/links_object_spec.rb +1 -1
- data/spec/unit/models/list_endpoints_response_spec.rb +1 -1
- data/spec/unit/models/list_message_item_spec.rb +1 -1
- data/spec/unit/models/lookup_error_response_spec.rb +1 -1
- data/spec/unit/models/lookup_error_schema_meta_spec.rb +1 -1
- data/spec/unit/models/lookup_error_schema_spec.rb +1 -1
- data/spec/unit/models/lookup_result_spec.rb +1 -1
- data/spec/unit/models/machine_detection_complete_callback_spec.rb +1 -1
- data/spec/unit/models/machine_detection_configuration_spec.rb +1 -1
- data/spec/unit/models/machine_detection_result_spec.rb +1 -1
- data/spec/unit/models/media_spec.rb +1 -1
- data/spec/unit/models/message_request_spec.rb +1 -1
- data/spec/unit/models/message_spec.rb +1 -1
- data/spec/unit/models/messages_list_spec.rb +1 -1
- data/spec/unit/models/messaging_code_response_spec.rb +1 -1
- data/spec/unit/models/messaging_request_error_spec.rb +1 -1
- data/spec/unit/models/mfa_forbidden_request_error_spec.rb +1 -1
- data/spec/unit/models/mfa_request_error_spec.rb +1 -1
- data/spec/unit/models/mfa_unauthorized_request_error_spec.rb +1 -1
- data/spec/unit/models/mms_message_content_file_spec.rb +1 -1
- data/spec/unit/models/mms_message_content_spec.rb +1 -1
- data/spec/unit/models/multi_channel_action_calendar_event_spec.rb +1 -1
- data/spec/unit/models/multi_channel_channel_list_mms_object_spec.rb +1 -1
- data/spec/unit/models/multi_channel_channel_list_mms_response_object_spec.rb +1 -1
- data/spec/unit/models/multi_channel_channel_list_object_base_spec.rb +1 -1
- data/spec/unit/models/multi_channel_channel_list_owner_object_spec.rb +1 -1
- data/spec/unit/models/multi_channel_channel_list_rbm_object_spec.rb +1 -1
- data/spec/unit/models/multi_channel_channel_list_rbm_response_object_spec.rb +1 -1
- data/spec/unit/models/multi_channel_channel_list_sms_object_spec.rb +1 -1
- data/spec/unit/models/multi_channel_channel_list_sms_response_object_spec.rb +1 -1
- data/spec/unit/models/multi_channel_error_spec.rb +1 -1
- data/spec/unit/models/multi_channel_message_content_spec.rb +1 -1
- data/spec/unit/models/multi_channel_message_request_spec.rb +1 -1
- data/spec/unit/models/multi_channel_message_response_data_spec.rb +1 -1
- data/spec/unit/models/opt_in_workflow_spec.rb +1 -1
- data/spec/unit/models/page_info_spec.rb +1 -1
- data/spec/unit/models/page_spec.rb +1 -1
- data/spec/unit/models/rbm_action_base_spec.rb +1 -1
- data/spec/unit/models/rbm_action_dial_spec.rb +1 -1
- data/spec/unit/models/rbm_action_open_url_spec.rb +1 -1
- data/spec/unit/models/rbm_action_view_location_spec.rb +1 -1
- data/spec/unit/models/rbm_card_content_media_spec.rb +1 -1
- data/spec/unit/models/rbm_card_content_spec.rb +1 -1
- data/spec/unit/models/rbm_location_response_spec.rb +1 -1
- data/spec/unit/models/rbm_message_carousel_card_spec.rb +1 -1
- data/spec/unit/models/rbm_message_content_file_spec.rb +1 -1
- data/spec/unit/models/rbm_message_content_text_spec.rb +1 -1
- data/spec/unit/models/rbm_message_media_spec.rb +1 -1
- data/spec/unit/models/rbm_standalone_card_spec.rb +1 -1
- data/spec/unit/models/rbm_suggestion_response_spec.rb +1 -1
- data/spec/unit/models/recording_available_callback_spec.rb +1 -1
- data/spec/unit/models/recording_complete_callback_spec.rb +1 -1
- data/spec/unit/models/recording_transcription_clip_spec.rb +1 -1
- data/spec/unit/models/recording_transcription_metadata_spec.rb +1 -1
- data/spec/unit/models/recording_transcriptions_spec.rb +1 -1
- data/spec/unit/models/redirect_callback_spec.rb +1 -1
- data/spec/unit/models/refer_call_status_enum_spec.rb +31 -0
- data/spec/unit/models/refer_complete_callback_spec.rb +123 -0
- data/spec/unit/models/sip_connection_metadata_spec.rb +1 -1
- data/spec/unit/models/sip_credentials_spec.rb +1 -1
- data/spec/unit/models/sms_message_content_spec.rb +1 -1
- data/spec/unit/models/status_callback_message_spec.rb +1 -1
- data/spec/unit/models/status_callback_spec.rb +1 -1
- data/spec/unit/models/stir_shaken_spec.rb +1 -1
- data/spec/unit/models/sync_lookup_request_spec.rb +1 -1
- data/spec/unit/models/telephone_number_spec.rb +1 -1
- data/spec/unit/models/tfv_basic_authentication_spec.rb +1 -1
- data/spec/unit/models/tfv_error_spec.rb +1 -1
- data/spec/unit/models/tfv_status_spec.rb +1 -1
- data/spec/unit/models/tfv_submission_info_spec.rb +1 -1
- data/spec/unit/models/tfv_submission_wrapper_spec.rb +1 -1
- data/spec/unit/models/transcribe_recording_spec.rb +1 -1
- data/spec/unit/models/transcription_available_callback_spec.rb +1 -1
- data/spec/unit/models/transcription_spec.rb +1 -1
- data/spec/unit/models/transfer_answer_callback_spec.rb +1 -1
- data/spec/unit/models/transfer_complete_callback_spec.rb +1 -1
- data/spec/unit/models/transfer_disconnect_callback_spec.rb +1 -1
- data/spec/unit/models/update_call_recording_spec.rb +1 -1
- data/spec/unit/models/update_call_spec.rb +1 -1
- data/spec/unit/models/update_conference_member_spec.rb +1 -1
- data/spec/unit/models/update_conference_spec.rb +1 -1
- data/spec/unit/models/verification_denial_webhook_spec.rb +1 -1
- data/spec/unit/models/verification_request_spec.rb +1 -1
- data/spec/unit/models/verification_update_request_spec.rb +1 -1
- data/spec/unit/models/verification_webhook_spec.rb +1 -1
- data/spec/unit/models/verify_code_request_spec.rb +1 -1
- data/spec/unit/models/verify_code_response_spec.rb +1 -1
- data/spec/unit/models/voice_api_error_spec.rb +1 -1
- data/spec/unit/models/voice_code_response_spec.rb +1 -1
- data/spec/unit/models/webhook_subscription_basic_authentication_spec.rb +1 -1
- data/spec/unit/models/webhook_subscription_error_spec.rb +1 -1
- data/spec/unit/models/webhook_subscription_request_schema_spec.rb +1 -1
- data/spec/unit/models/webhook_subscription_spec.rb +1 -1
- data/spec/unit/models/webhook_subscriptions_list_body_spec.rb +1 -1
- metadata +241 -227
|
@@ -68,7 +68,7 @@ describe Bandwidth::Address do
|
|
|
68
68
|
|
|
69
69
|
describe '#to_s' do
|
|
70
70
|
it 'returns a string representation of the object' do
|
|
71
|
-
expect(address_values.to_s).to eq(
|
|
71
|
+
expect(address_values.to_s).to eq({ :name => 'Bandwidth', :addr1 => '900 Main Campus Dr', :addr2 => 'Suite 100', :city => 'Raleigh', :state => 'NC', :zip => '27606', :url => 'https://www.bandwidth.com' }.to_s)
|
|
72
72
|
end
|
|
73
73
|
end
|
|
74
74
|
|
|
@@ -15,7 +15,8 @@ describe Bandwidth::AnswerCallback do
|
|
|
15
15
|
start_time: '2022-06-16T13:15:07.160Z',
|
|
16
16
|
answer_time: '2022-06-16T13:15:18.126Z',
|
|
17
17
|
tag: 'custom tag',
|
|
18
|
-
machine_detection_result: { value: 'human', duration: 'PT5S' }
|
|
18
|
+
machine_detection_result: { value: 'human', duration: 'PT5S' },
|
|
19
|
+
sip_call_id: 'sip-call-id-12345',
|
|
19
20
|
}) }
|
|
20
21
|
|
|
21
22
|
describe '#initialize' do
|
|
@@ -65,7 +66,8 @@ describe Bandwidth::AnswerCallback do
|
|
|
65
66
|
startTime: '2022-06-16T13:15:07.160Z',
|
|
66
67
|
answerTime: '2022-06-16T13:15:18.126Z',
|
|
67
68
|
tag: 'custom tag',
|
|
68
|
-
machineDetectionResult: { value: 'human', duration: 'PT5S' }
|
|
69
|
+
machineDetectionResult: { value: 'human', duration: 'PT5S' },
|
|
70
|
+
sipCallId: 'sip-call-id-12345'
|
|
69
71
|
})
|
|
70
72
|
expect(answer_callback_from_hash).to be_instance_of(Bandwidth::AnswerCallback)
|
|
71
73
|
expect(answer_callback_from_hash.event_type).to eq('answer')
|
|
@@ -84,12 +86,13 @@ describe Bandwidth::AnswerCallback do
|
|
|
84
86
|
expect(answer_callback_from_hash.machine_detection_result).to be_instance_of(Bandwidth::MachineDetectionResult)
|
|
85
87
|
expect(answer_callback_from_hash.machine_detection_result.value).to eq('human')
|
|
86
88
|
expect(answer_callback_from_hash.machine_detection_result.duration).to eq('PT5S')
|
|
89
|
+
expect(answer_callback_from_hash.sip_call_id).to eq('sip-call-id-12345')
|
|
87
90
|
end
|
|
88
91
|
end
|
|
89
92
|
|
|
90
93
|
describe '#to_s' do
|
|
91
94
|
it 'returns a string representation of the object' do
|
|
92
|
-
expect(answer_callback_values.to_s).to eq(
|
|
95
|
+
expect(answer_callback_values.to_s).to eq({ :eventType => 'answer', :eventTime => '2022-06-16T13:15:07.160Z', :accountId => '9900000', :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :from => '+19195554321', :to => '+19195551234', :direction => 'inbound', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :callUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :enqueuedTime => '2022-06-16T13:15:07.160Z', :startTime => '2022-06-16T13:15:07.160Z', :answerTime => '2022-06-16T13:15:18.126Z', :tag => 'custom tag', :machineDetectionResult => { :value => 'human', :duration => 'PT5S' }, :sipCallId => 'sip-call-id-12345' }.to_s)
|
|
93
96
|
end
|
|
94
97
|
end
|
|
95
98
|
|
|
@@ -116,7 +119,8 @@ describe Bandwidth::AnswerCallback do
|
|
|
116
119
|
startTime: '2022-06-16T13:15:07.160Z',
|
|
117
120
|
answerTime: '2022-06-16T13:15:18.126Z',
|
|
118
121
|
tag: 'custom tag',
|
|
119
|
-
machineDetectionResult: { value: 'human', duration: 'PT5S' }
|
|
122
|
+
machineDetectionResult: { value: 'human', duration: 'PT5S' },
|
|
123
|
+
sipCallId: 'sip-call-id-12345'
|
|
120
124
|
})
|
|
121
125
|
end
|
|
122
126
|
end
|
|
@@ -45,7 +45,7 @@ describe Bandwidth::AsyncLookupRequest do
|
|
|
45
45
|
|
|
46
46
|
describe '#to_s' do
|
|
47
47
|
it 'returns a string representation of the object' do
|
|
48
|
-
expect(async_lookup_request_values.to_s).to eq(
|
|
48
|
+
expect(async_lookup_request_values.to_s).to eq({ :phoneNumbers => ['+19195551234', '+19195554321'] }.to_s)
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
|
|
@@ -58,7 +58,7 @@ describe Bandwidth::BlockedWebhook do
|
|
|
58
58
|
|
|
59
59
|
describe '#to_s' do
|
|
60
60
|
it 'returns a string representation of the object' do
|
|
61
|
-
expect(blocked_webhook_values.to_s).to eq(
|
|
61
|
+
expect(blocked_webhook_values.to_s).to eq({ :accountId => '9900000', :phoneNumber => '+18005551234', :status => 'VERIFIED', :internalTicketNumber => 'aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee', :blocked => true, :blockedReason => 'spam' }.to_s)
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
|
@@ -94,7 +94,7 @@ describe Bandwidth::BridgeCompleteCallback do
|
|
|
94
94
|
|
|
95
95
|
describe '#to_s' do
|
|
96
96
|
it 'returns a string representation of the object' do
|
|
97
|
-
expect(bridge_complete_callback_values.to_s).to eq(
|
|
97
|
+
expect(bridge_complete_callback_values.to_s).to eq({ :eventType => 'bridgeComplete', :eventTime => '2022-06-16T13:15:07.160Z', :accountId => '9900000', :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :from => '+19195554321', :to => '+19195551234', :direction => 'outbound', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :callUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :enqueuedTime => '2022-06-16T13:15:07.160Z', :startTime => '2022-06-16T13:15:07.160Z', :answerTime => '2022-06-16T13:15:18.126Z', :tag => 'custom tag', :cause => 'hangup', :errorMessage => 'call rejected', :errorId => '4642074b-7b58-478b-96e4-3a60955c6765' }.to_s)
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
@@ -83,7 +83,7 @@ describe Bandwidth::BridgeTargetCompleteCallback do
|
|
|
83
83
|
|
|
84
84
|
describe '#to_s' do
|
|
85
85
|
it 'returns a string representation of the object' do
|
|
86
|
-
expect(bridge_target_complete_callback_values.to_s).to eq(
|
|
86
|
+
expect(bridge_target_complete_callback_values.to_s).to eq({ :eventType => 'bridgeTargetComplete', :eventTime => '2022-06-16T13:15:07.160Z', :accountId => '9900000', :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :from => '+19195554321', :to => '+19195551234', :direction => 'outbound', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :callUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :enqueuedTime => '2022-06-16T13:15:07.160Z', :startTime => '2022-06-16T13:15:07.160Z', :answerTime => '2022-06-16T13:15:18.126Z', :tag => 'custom tag' }.to_s)
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
@@ -52,7 +52,7 @@ describe Bandwidth::BrtcErrorResponse do
|
|
|
52
52
|
|
|
53
53
|
describe '#to_s' do
|
|
54
54
|
it 'returns a string representation of the object' do
|
|
55
|
-
expect(brtc_error_response_values.to_s).to eq(
|
|
55
|
+
expect(brtc_error_response_values.to_s).to eq({ :links => [{ :href => 'https://example.com', :rel => 'self', :method => 'GET' }], :data => { :foo => 'bar' }, :errors => [{ :type => 'validation', :description => 'bad input' }] }.to_s)
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -52,7 +52,7 @@ describe Bandwidth::BrtcErrorSource do
|
|
|
52
52
|
|
|
53
53
|
describe '#to_s' do
|
|
54
54
|
it 'returns a string representation of the object' do
|
|
55
|
-
expect(brtc_error_source_values.to_s).to eq(
|
|
55
|
+
expect(brtc_error_source_values.to_s).to eq({ :parameter => 'limit', :field => 'phoneNumber', :header => 'Authorization', :reference => '/accounts/9900000' }.to_s)
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -58,7 +58,7 @@ describe Bandwidth::BrtcError do
|
|
|
58
58
|
|
|
59
59
|
describe '#to_s' do
|
|
60
60
|
it 'returns a string representation of the object' do
|
|
61
|
-
expect(brtc_error_values.to_s).to eq(
|
|
61
|
+
expect(brtc_error_values.to_s).to eq({ :id => 'abc-123', :type => 'validation', :description => 'bad input', :code => 'E1001', :source => { :field => 'phoneNumber' } }.to_s)
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
|
@@ -49,7 +49,7 @@ describe Bandwidth::BrtcLink do
|
|
|
49
49
|
|
|
50
50
|
describe '#to_s' do
|
|
51
51
|
it 'returns a string representation of the object' do
|
|
52
|
-
expect(brtc_link_values.to_s).to eq(
|
|
52
|
+
expect(brtc_link_values.to_s).to eq({ :href => 'https://example.com', :rel => 'self', :method => 'GET' }.to_s)
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Unit tests for Bandwidth::Bxml::Refer
|
|
2
|
+
describe 'Bandwidth::Bxml::Refer' do
|
|
3
|
+
let(:initial_attributes) {
|
|
4
|
+
{
|
|
5
|
+
refer_complete_url: 'https://initial.com',
|
|
6
|
+
refer_complete_method: 'POST',
|
|
7
|
+
tag: 'initial_tag'
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let(:new_attributes) {
|
|
12
|
+
{
|
|
13
|
+
refer_complete_url: 'https://new.com',
|
|
14
|
+
refer_complete_method: 'GET',
|
|
15
|
+
tag: 'new_tag'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let(:sip_uri) { Bandwidth::Bxml::SipUri.new('sip:alice@atlanta.example.com') }
|
|
20
|
+
|
|
21
|
+
let(:instance) { Bandwidth::Bxml::Refer.new([], initial_attributes) }
|
|
22
|
+
let(:instance_nested) { Bandwidth::Bxml::Refer.new(sip_uri, initial_attributes) }
|
|
23
|
+
|
|
24
|
+
describe 'test an instance of Refer' do
|
|
25
|
+
it 'validates instance of Refer' do
|
|
26
|
+
expect(instance).to be_instance_of(Bandwidth::Bxml::Refer)
|
|
27
|
+
expect(instance).to be_a(Bandwidth::Bxml::Verb)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it 'tests the set_attributes method of the Refer instance' do
|
|
31
|
+
instance.set_attributes(new_attributes)
|
|
32
|
+
expected = "\n<Refer referCompleteUrl=\"https://new.com\" referCompleteMethod=\"GET\" tag=\"new_tag\"/>\n"
|
|
33
|
+
expect(instance.to_bxml).to eq(expected)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it 'tests the set_sip_uri method of the Refer instance' do
|
|
37
|
+
instance.set_sip_uri(sip_uri)
|
|
38
|
+
expected = "\n<Refer referCompleteUrl=\"https://initial.com\" referCompleteMethod=\"POST\" tag=\"initial_tag\">\n <SipUri>sip:alice@atlanta.example.com</SipUri>\n</Refer>\n"
|
|
39
|
+
expect(instance.to_bxml).to eq(expected)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
describe 'test an instance of Refer with a nested SipUri' do
|
|
44
|
+
it 'validates instance of Refer' do
|
|
45
|
+
expect(instance_nested).to be_instance_of(Bandwidth::Bxml::Refer)
|
|
46
|
+
expect(instance_nested).to be_a(Bandwidth::Bxml::Verb)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it 'tests the to_bxml method of the nested Refer instance' do
|
|
50
|
+
expected = "\n<Refer referCompleteUrl=\"https://initial.com\" referCompleteMethod=\"POST\" tag=\"initial_tag\">\n <SipUri>sip:alice@atlanta.example.com</SipUri>\n</Refer>\n"
|
|
51
|
+
expect(instance_nested.to_bxml).to eq(expected)
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -98,7 +98,7 @@ describe Bandwidth::CallRecordingMetadata do
|
|
|
98
98
|
|
|
99
99
|
describe '#to_s' do
|
|
100
100
|
it 'returns a string representation of the object' do
|
|
101
|
-
expect(call_recording_metadata_values.to_s).to eq(
|
|
101
|
+
expect(call_recording_metadata_values.to_s).to eq({ :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :accountId => '9900000', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :parentCallId => 'c-95ac29a2-1331029c-2cb0-4a07-b215-b22865662d99', :recordingId => 'r-fbe05094-9fd2b71d-a4e6-4f43-8c3e-5b04b1d8a4b4', :to => '+19195551234', :from => '+19195554321', :transferCallerId => '+19195555678', :transferTo => '+19195558765', :duration => 'PT13.67S', :direction => 'inbound', :channels => 1, :startTime => '2022-06-16T13:15:07.160Z', :endTime => '2022-06-16T13:15:20.830Z', :fileFormat => 'wav', :status => 'complete', :mediaUrl => 'https://example.com/recording.wav', :transcription => { :id => 't-123', :url => 'https://example.com/t-123', :status => 'available', :completed_time => '2022-06-16T13:15:31.000Z' }, :recordingName => 'sample-recording' }.to_s)
|
|
102
102
|
end
|
|
103
103
|
end
|
|
104
104
|
|
|
@@ -117,7 +117,7 @@ describe Bandwidth::CallState do
|
|
|
117
117
|
|
|
118
118
|
describe '#to_s' do
|
|
119
119
|
it 'returns a string representation of the object' do
|
|
120
|
-
expect(call_state_values.to_s).to eq(
|
|
120
|
+
expect(call_state_values.to_s).to eq({ :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :accountId => '9900000', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :parentCallId => 'c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :to => '+19195551234', :from => '+19195554321', :direction => 'inbound', :state => 'disconnected', :stirShaken => { :verstat => 'TN-Verification-Passed', :attestationIndicator => 'A', :originatingId => 'abc123' }, :identity => 'eyJhbGciOiJFUzI1NiI', :enqueuedTime => '2022-06-16T13:15:07.160Z', :startTime => '2022-06-16T13:15:07.160Z', :answerTime => '2022-06-16T13:15:18.126Z', :endTime => '2022-06-16T13:15:18.314Z', :disconnectCause => 'hangup', :errorMessage => nil, :errorId => nil, :lastUpdate => '2022-06-16T13:15:18.314Z' }.to_s)
|
|
121
121
|
end
|
|
122
122
|
end
|
|
123
123
|
|
|
@@ -49,7 +49,7 @@ describe Bandwidth::CallTranscriptionMetadata do
|
|
|
49
49
|
|
|
50
50
|
describe '#to_s' do
|
|
51
51
|
it 'returns a string representation of the object' do
|
|
52
|
-
expect(call_transcription_metadata_values.to_s).to eq(
|
|
52
|
+
expect(call_transcription_metadata_values.to_s).to eq({ :transcriptionId => 't-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :transcriptionName => 'live-transcription', :transcriptionUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-1/transcriptions/t-1' }.to_s)
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -52,7 +52,7 @@ describe Bandwidth::CallTranscriptionResponse do
|
|
|
52
52
|
|
|
53
53
|
describe '#to_s' do
|
|
54
54
|
it 'returns a string representation of the object' do
|
|
55
|
-
expect(call_transcription_response_values.to_s).to eq(
|
|
55
|
+
expect(call_transcription_response_values.to_s).to eq({ :accountId => '9900000', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :transcriptionId => 't-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :tracks => [{ :detectedLanguage => 'en-US', :track => 'inbound', :transcript => 'Hello', :confidence => 0.9 }] }.to_s)
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -52,7 +52,7 @@ describe Bandwidth::CallTranscription do
|
|
|
52
52
|
|
|
53
53
|
describe '#to_s' do
|
|
54
54
|
it 'returns a string representation of the object' do
|
|
55
|
-
expect(call_transcription_values.to_s).to eq(
|
|
55
|
+
expect(call_transcription_values.to_s).to eq({ :detectedLanguage => 'en-US', :track => 'inbound', :transcript => 'Hello world', :confidence => 0.9 }.to_s)
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -64,7 +64,7 @@ describe Bandwidth::CodeRequest do
|
|
|
64
64
|
|
|
65
65
|
describe '#to_s' do
|
|
66
66
|
it 'returns a string representation of the object' do
|
|
67
|
-
expect(code_request_values.to_s).to eq(
|
|
67
|
+
expect(code_request_values.to_s).to eq({ :to => '+19195551234', :from => '+19195554321', :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :scope => '2FA', :message => 'Your verification code is {CODE}', :digits => 8 }.to_s)
|
|
68
68
|
end
|
|
69
69
|
end
|
|
70
70
|
|
|
@@ -57,7 +57,7 @@ describe Bandwidth::ConferenceCompletedCallback do
|
|
|
57
57
|
|
|
58
58
|
describe '#to_s' do
|
|
59
59
|
it 'returns a string representation of the object' do
|
|
60
|
-
expect(conference_completed_callback_values.to_s).to eq(
|
|
60
|
+
expect(conference_completed_callback_values.to_s).to eq({ :eventType => 'conferenceCompleted', :eventTime => '2022-06-16T13:15:07.160Z', :conferenceId => 'conf-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :name => 'my-conference-name', :tag => 'custom tag' }.to_s)
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -57,7 +57,7 @@ describe Bandwidth::ConferenceCreatedCallback do
|
|
|
57
57
|
|
|
58
58
|
describe '#to_s' do
|
|
59
59
|
it 'returns a string representation of the object' do
|
|
60
|
-
expect(conference_created_callback_values.to_s).to eq(
|
|
60
|
+
expect(conference_created_callback_values.to_s).to eq({ :eventType => 'conferenceCreated', :eventTime => '2022-06-16T13:15:07.160Z', :conferenceId => 'conf-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :name => 'my-conference-name', :tag => 'custom tag' }.to_s)
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -66,7 +66,7 @@ describe Bandwidth::ConferenceMemberExitCallback do
|
|
|
66
66
|
|
|
67
67
|
describe '#to_s' do
|
|
68
68
|
it 'returns a string representation of the object' do
|
|
69
|
-
expect(conference_member_exit_callback_values.to_s).to eq(
|
|
69
|
+
expect(conference_member_exit_callback_values.to_s).to eq({ :eventType => 'conferenceMemberExit', :eventTime => '2022-06-16T13:15:07.160Z', :conferenceId => 'conf-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :name => 'my-conference-name', :from => '+19195554321', :to => '+19195551234', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :tag => 'custom tag' }.to_s)
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
72
|
|
|
@@ -66,7 +66,7 @@ describe Bandwidth::ConferenceMemberJoinCallback do
|
|
|
66
66
|
|
|
67
67
|
describe '#to_s' do
|
|
68
68
|
it 'returns a string representation of the object' do
|
|
69
|
-
expect(conference_member_join_callback_values.to_s).to eq(
|
|
69
|
+
expect(conference_member_join_callback_values.to_s).to eq({ :eventType => 'conferenceMemberJoin', :eventTime => '2022-06-16T13:15:07.160Z', :conferenceId => 'conf-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :name => 'my-conference-name', :from => '+19195554321', :to => '+19195551234', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :tag => 'custom tag' }.to_s)
|
|
70
70
|
end
|
|
71
71
|
end
|
|
72
72
|
|
|
@@ -58,7 +58,7 @@ describe Bandwidth::ConferenceMember do
|
|
|
58
58
|
|
|
59
59
|
describe '#to_s' do
|
|
60
60
|
it 'returns a string representation of the object' do
|
|
61
|
-
expect(conference_member_values.to_s).to eq(
|
|
61
|
+
expect(conference_member_values.to_s).to eq({ :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :conferenceId => 'conf-fe23a767-a75a5b77-23e8-4b5b-a973-1eb967d7d75c', :memberUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-1/members/c-1', :mute => false, :hold => false, :callIdsToCoach => ['c-25ac29a2-1331029c-2cb0-4a07-b215-b22865662d86'] }.to_s)
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
|
@@ -85,7 +85,7 @@ describe Bandwidth::ConferenceRecordingAvailableCallback do
|
|
|
85
85
|
|
|
86
86
|
describe '#to_s' do
|
|
87
87
|
it 'returns a string representation of the object' do
|
|
88
|
-
expect(conference_recording_available_callback_values.to_s).to eq(
|
|
88
|
+
expect(conference_recording_available_callback_values.to_s).to eq({ :eventType => 'conferenceRecordingAvailable', :eventTime => '2022-06-16T13:15:07.160Z', :conferenceId => 'conf-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :name => 'my-conference-name', :accountId => '9900000', :recordingId => 'r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :channels => 1, :startTime => '2022-06-16T13:15:07.160Z', :endTime => '2022-06-16T13:17:07.160Z', :duration => 'PT2M', :fileFormat => 'wav', :mediaUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/conferences/conf-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/recordings/r-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85/media', :tag => 'custom tag', :status => 'complete' }.to_s)
|
|
89
89
|
end
|
|
90
90
|
end
|
|
91
91
|
|
|
@@ -76,7 +76,7 @@ describe Bandwidth::ConferenceRecordingMetadata do
|
|
|
76
76
|
|
|
77
77
|
describe '#to_s' do
|
|
78
78
|
it 'returns a string representation of the object' do
|
|
79
|
-
expect(conference_recording_metadata_values.to_s).to eq(
|
|
79
|
+
expect(conference_recording_metadata_values.to_s).to eq({ :accountId => '9900000', :conferenceId => 'conf-fe23a767-a75a5b77-23e8-4b5b-a973-1eb967d7d75c', :name => 'weekly-stand-up', :recordingId => 'r-fbe05094-9fd2b71d-a4e6-4f43-8c3e-5b04b1d8a4b4', :duration => 'PT13.67S', :channels => 1, :startTime => '2022-06-16T13:15:07.160Z', :endTime => '2022-06-16T13:15:20.830Z', :fileFormat => 'wav', :status => 'complete', :mediaUrl => 'https://example.com/recording.wav', :recordingName => 'sample-recording' }.to_s)
|
|
80
80
|
end
|
|
81
81
|
end
|
|
82
82
|
|
|
@@ -57,7 +57,7 @@ describe Bandwidth::ConferenceRedirectCallback do
|
|
|
57
57
|
|
|
58
58
|
describe '#to_s' do
|
|
59
59
|
it 'returns a string representation of the object' do
|
|
60
|
-
expect(conference_redirect_callback_values.to_s).to eq(
|
|
60
|
+
expect(conference_redirect_callback_values.to_s).to eq({ :eventType => 'conferenceRedirect', :eventTime => '2022-06-16T13:15:07.160Z', :conferenceId => 'conf-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :name => 'my-conference-name', :tag => 'custom tag' }.to_s)
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -70,7 +70,7 @@ describe Bandwidth::Conference do
|
|
|
70
70
|
|
|
71
71
|
describe '#to_s' do
|
|
72
72
|
it 'returns a string representation of the object' do
|
|
73
|
-
expect(conference_values.to_s).to eq(
|
|
73
|
+
expect(conference_values.to_s).to eq({ :id => 'conf-fe23a767-a75a5b77-23e8-4b5b-a973-1eb967d7d75c', :name => 'weekly-stand-up', :createdTime => '2022-06-16T13:15:07.160Z', :completedTime => '2022-06-16T13:45:07.160Z', :conferenceEventUrl => 'https://example.com/conference-event', :conferenceEventMethod => 'POST', :tag => 'custom tag', :activeMembers => [{ :callId => 'c-1', :conferenceId => 'conf-1' }] }.to_s)
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
76
|
|
|
@@ -57,7 +57,7 @@ describe Bandwidth::Contact do
|
|
|
57
57
|
|
|
58
58
|
describe '#to_s' do
|
|
59
59
|
it 'returns a string representation of the object' do
|
|
60
|
-
expect(contact_values.to_s).to eq(
|
|
60
|
+
expect(contact_values.to_s).to eq({ :firstName => 'John', :lastName => 'Doe', :email => 'john.doe@example.com', :phoneNumber => '+19195551234' }.to_s)
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -46,7 +46,7 @@ describe Bandwidth::CreateAsyncBulkLookupResponseData do
|
|
|
46
46
|
|
|
47
47
|
describe '#to_s' do
|
|
48
48
|
it 'returns a string representation of the object' do
|
|
49
|
-
expect(create_async_bulk_lookup_response_data_values.to_s).to eq(
|
|
49
|
+
expect(create_async_bulk_lookup_response_data_values.to_s).to eq({ :requestId => '00b97c1b-d8b4-4a32-ad14-7d09ce04acb6', :status => 'IN_PROGRESS' }.to_s)
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -49,7 +49,7 @@ describe Bandwidth::CreateAsyncBulkLookupResponse do
|
|
|
49
49
|
|
|
50
50
|
describe '#to_s' do
|
|
51
51
|
it 'returns a string representation of the object' do
|
|
52
|
-
expect(create_async_bulk_lookup_response_values.to_s).to eq(
|
|
52
|
+
expect(create_async_bulk_lookup_response_values.to_s).to eq({ :links => [{ :href => 'https://example.com', :rel => 'self', :method => 'GET' }], :data => { :requestId => '00b97c1b-d8b4-4a32-ad14-7d09ce04acb6', :status => 'IN_PROGRESS' }, :errors => [{ :code => 'E1', :description => 'bad', :type => 'validation' }] }.to_s)
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -124,7 +124,7 @@ describe Bandwidth::CreateCallResponse do
|
|
|
124
124
|
|
|
125
125
|
describe '#to_s' do
|
|
126
126
|
it 'returns a string representation of the object' do
|
|
127
|
-
expect(create_call_response_values.to_s).to eq(
|
|
127
|
+
expect(create_call_response_values.to_s).to eq({ :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :accountId => '9900000', :callId => 'c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85', :to => '+19195551234', :from => '+19195554321', :enqueuedTime => '2022-06-16T13:15:07.160Z', :callUrl => 'https://voice.bandwidth.com/api/v2/accounts/9900000/calls/c-1', :callTimeout => 30.0, :callbackTimeout => 15.0, :tag => 'custom tag', :answerMethod => 'POST', :answerUrl => 'https://example.com/answer', :answerFallbackMethod => 'POST', :answerFallbackUrl => 'https://example.com/answer-fallback', :disconnectMethod => 'POST', :disconnectUrl => 'https://example.com/disconnect', :username => 'user', :password => 'pass', :fallbackUsername => 'fallback_user', :fallbackPassword => 'fallback_pass', :priority => 5 }.to_s)
|
|
128
128
|
end
|
|
129
129
|
end
|
|
130
130
|
|
|
@@ -123,7 +123,7 @@ describe Bandwidth::CreateCall do
|
|
|
123
123
|
|
|
124
124
|
describe '#to_s' do
|
|
125
125
|
it 'returns a string representation of the object' do
|
|
126
|
-
expect(create_call_values.to_s).to eq(
|
|
126
|
+
expect(create_call_values.to_s).to eq({ :to => '+19195551234', :from => '+19195554321', :privacy => false, :displayName => 'Caller Name', :uui => 'eyJ0eXAiOiJKV1Q;encoding=jwt', :applicationId => '04e88489-df02-4e34-a0ee-27a91849555f', :answerUrl => 'https://example.com/answer', :answerMethod => 'POST', :username => 'user', :password => 'pass', :answerFallbackUrl => 'https://example.com/answer-fallback', :answerFallbackMethod => 'POST', :fallbackUsername => 'fallback_user', :fallbackPassword => 'fallback_pass', :disconnectUrl => 'https://example.com/disconnect', :disconnectMethod => 'POST', :callTimeout => 30, :callbackTimeout => 15, :machineDetection => {}, :priority => 5, :tag => 'custom tag' }.to_s)
|
|
127
127
|
end
|
|
128
128
|
end
|
|
129
129
|
|
|
@@ -58,7 +58,7 @@ describe Bandwidth::CreateEndpointRequestBase do
|
|
|
58
58
|
|
|
59
59
|
describe '#to_s' do
|
|
60
60
|
it 'returns a string representation of the object' do
|
|
61
|
-
expect(create_endpoint_request_base_values.to_s).to eq(
|
|
61
|
+
expect(create_endpoint_request_base_values.to_s).to eq({ :type => 'WEBRTC', :direction => 'BIDIRECTIONAL', :eventCallbackUrl => 'https://example.com/event-callback', :eventFallbackUrl => 'https://example.com/event-fallback', :tag => 'custom tag' }.to_s)
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
|
|
@@ -71,7 +71,7 @@ describe Bandwidth::CreateEndpointResponseData do
|
|
|
71
71
|
|
|
72
72
|
describe '#to_s' do
|
|
73
73
|
it 'returns a string representation of the object' do
|
|
74
|
-
expect(create_endpoint_response_data_values.to_s).to eq(
|
|
74
|
+
expect(create_endpoint_response_data_values.to_s).to eq({ :endpointId => 'ep-abc-123', :type => 'WEBRTC', :status => 'CONNECTED', :creationTimestamp => '2022-06-16T13:15:07.160Z', :expirationTimestamp => '2022-06-17T13:15:07.160Z', :tag => 'custom tag', :devices => [{ :deviceId => 'd-1', :status => 'CONNECTED', :creationTimestamp => '2022-06-16T13:15:08.000Z' }], :token => 'eyJhbGciOiJIUzI1NiJ9' }.to_s)
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
@@ -67,7 +67,7 @@ describe Bandwidth::CreateEndpointResponse do
|
|
|
67
67
|
|
|
68
68
|
describe '#to_s' do
|
|
69
69
|
it 'returns a string representation of the object' do
|
|
70
|
-
expect(create_endpoint_response_values.to_s).to eq(
|
|
70
|
+
expect(create_endpoint_response_values.to_s).to eq({ :links => [{ :href => 'https://example.com', :rel => 'self', :method => 'GET' }], :data => { :endpointId => 'ep-abc-123', :type => 'WEBRTC', :status => 'CONNECTED', :creationTimestamp => '2022-06-16T13:15:07.160Z', :expirationTimestamp => '2022-06-17T13:15:07.160Z', :token => 'eyJhbGciOiJIUzI1NiJ9' }, :errors => [{ :type => 'validation', :description => 'bad input' }] }.to_s)
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
|
|
@@ -52,7 +52,7 @@ describe Bandwidth::CreateMessageRequestError do
|
|
|
52
52
|
|
|
53
53
|
describe '#to_s' do
|
|
54
54
|
it 'returns a string representation of the object' do
|
|
55
|
-
expect(create_message_request_error_values.to_s).to eq(
|
|
55
|
+
expect(create_message_request_error_values.to_s).to eq({ :type => 'request-validation', :description => 'Your request could not be processed.', :fieldErrors => [{ :fieldName => 'to', :description => 'must be present' }] }.to_s)
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -46,7 +46,7 @@ describe Bandwidth::CreateMultiChannelMessageResponse do
|
|
|
46
46
|
|
|
47
47
|
describe '#to_s' do
|
|
48
48
|
it 'returns a string representation of the object' do
|
|
49
|
-
expect(create_multi_channel_message_response_values.to_s).to eq(
|
|
49
|
+
expect(create_multi_channel_message_response_values.to_s).to eq({ :links => [{ :rel => 'self', :href => 'https://example.com' }], :errors => [{ :type => 'validation', :description => 'bad input', :source => {} }] }.to_s)
|
|
50
50
|
end
|
|
51
51
|
end
|
|
52
52
|
|
|
@@ -49,7 +49,7 @@ describe Bandwidth::CreateSyncLookupResponseData do
|
|
|
49
49
|
|
|
50
50
|
describe '#to_s' do
|
|
51
51
|
it 'returns a string representation of the object' do
|
|
52
|
-
expect(create_sync_lookup_response_data_values.to_s).to eq(
|
|
52
|
+
expect(create_sync_lookup_response_data_values.to_s).to eq({ :requestId => '00b97c1b-d8b4-4a32-ad14-7d09ce04acb6', :status => 'COMPLETE', :results => [{ :phoneNumber => '+19195551234' }] }.to_s)
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -49,7 +49,7 @@ describe Bandwidth::CreateSyncLookupResponse do
|
|
|
49
49
|
|
|
50
50
|
describe '#to_s' do
|
|
51
51
|
it 'returns a string representation of the object' do
|
|
52
|
-
expect(create_sync_lookup_response_values.to_s).to eq(
|
|
52
|
+
expect(create_sync_lookup_response_values.to_s).to eq({ :links => [{ :href => 'https://example.com', :rel => 'self', :method => 'GET' }], :data => { :requestId => '00b97c1b-d8b4-4a32-ad14-7d09ce04acb6', :status => 'COMPLETE' }, :errors => [{ :code => 'E1', :description => 'bad', :type => 'validation' }] }.to_s)
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
|
|
@@ -61,7 +61,7 @@ describe Bandwidth::CreateWebRtcConnectionRequest do
|
|
|
61
61
|
|
|
62
62
|
describe '#to_s' do
|
|
63
63
|
it 'returns a string representation of the object' do
|
|
64
|
-
expect(create_web_rtc_connection_request_values.to_s).to eq(
|
|
64
|
+
expect(create_web_rtc_connection_request_values.to_s).to eq({ :type => 'WEBRTC', :direction => 'BIDIRECTIONAL', :eventCallbackUrl => 'https://example.com/event-callback', :eventFallbackUrl => 'https://example.com/event-fallback', :tag => 'custom tag', :connectionMetadata => { :sessionId => 'session-1' } }.to_s)
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -56,7 +56,7 @@ describe Bandwidth::Device do
|
|
|
56
56
|
|
|
57
57
|
describe '#to_s' do
|
|
58
58
|
it 'returns a string representation of the object' do
|
|
59
|
-
expect(device_values.to_s).to eq(
|
|
59
|
+
expect(device_values.to_s).to eq({ :deviceId => 'd-abc-123', :deviceName => 'Chrome on macOS', :status => 'CONNECTED', :creationTimestamp => '2022-06-16T13:15:07.160Z' }.to_s)
|
|
60
60
|
end
|
|
61
61
|
end
|
|
62
62
|
|