diff --git a/.github/workflows/listener.yml b/.github/workflows/listener.yml index a0a9f5876..5339b0b15 100644 --- a/.github/workflows/listener.yml +++ b/.github/workflows/listener.yml @@ -32,7 +32,7 @@ jobs: - name: Open Pull Request if: steps.replace-specs-snippets.outputs.needs_pr run: | - hub pull-request --base Bandwidth:main $(if ${{ github.event.client_payload.draftPr }} ; then echo "-d" ; fi) -m '${{ github.event.client_payload.branchName }}' -m 'Update API specs from upstream api-specs repository. Opened By: @${{ github.event.client_payload.author }}' + gh pr create -B main $(if ${{ github.event.client_payload.draftPr }} ; then echo "-d" ; fi) -t '${{ github.event.client_payload.branchName }}' -b 'Update API specs from upstream api-specs repository. Opened By: @${{ github.event.client_payload.author }}' env: GITHUB_TOKEN: ${{ secrets.DX_GITHUB_TOKEN }} diff --git a/site/blogposts.config.json b/site/blogposts.config.json index eb98e81b6..8c8014d5d 100644 --- a/site/blogposts.config.json +++ b/site/blogposts.config.json @@ -1,13 +1,57 @@ [ + { + "categories": [ + "CPaaS" + ], + "categoryLinks": [ + "https://www.bandwidth.com/blog/category/cpaas/" + ], + "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_Cybersecurity-awareness-month.png", + "postLink": "https://www.bandwidth.com/blog/cybersecurity-awareness-month-2023/", + "postTitle": "Celebrating Cybersecurity Awareness Month 2023" + }, + { + "categories": [ + "Voice", + "Voice API" + ], + "categoryLinks": [ + "https://www.bandwidth.com/blog/category/voice/", + "https://www.bandwidth.com/blog/category/voice/voice-api/" + ], + "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_Maestro_How-does-WebRTC-work_In-App-Calling.png", + "postLink": "https://www.bandwidth.com/blog/webrtc/", + "postTitle": "Your intro to In-App Calling, and the WebRTC tech it’s based on" + }, + { + "categories": [ + "Voice" + ], + "categoryLinks": [ + "https://www.bandwidth.com/blog/category/voice/" + ], + "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_Evaluating-your-carrier_Picking-the-right-VoIP-provider.png", + "postLink": "https://www.bandwidth.com/blog/how-to-pick-the-right-provider/", + "postTitle": "Picking the right VoIP provider: 7 hacks from an industry insider" + }, + { + "categories": [ + "Voice" + ], + "categoryLinks": [ + "https://www.bandwidth.com/blog/category/voice/" + ], + "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_Maestro_Fraud-scores-and-how-to-calculate-them.png", + "postLink": "https://www.bandwidth.com/blog/fraud-scores/", + "postTitle": "How to calculate fraud scores in your contact center" + }, { "categories": [ "CPaaS", - "Direct Routing", "Voice" ], "categoryLinks": [ "https://www.bandwidth.com/blog/category/cpaas/", - "https://www.bandwidth.com/blog/category/direct-routing/", "https://www.bandwidth.com/blog/category/voice/" ], "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_Call-center-key-KPIs.png", @@ -72,49 +116,5 @@ "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_Webex-Calling-Cloud-Connect-Local-Gateway.png", "postLink": "https://www.bandwidth.com/blog/webex-calling-cloud-connect-vs-local-gateway/", "postTitle": "Webex Calling: Cloud Connect vs. Local Gateway, Explained" - }, - { - "categories": [ - "CPaaS" - ], - "categoryLinks": [ - "https://www.bandwidth.com/blog/category/cpaas/" - ], - "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_Maestro-Ai-Call-Centers.png", - "postLink": "https://www.bandwidth.com/blog/artificial-intelligence-for-call-centers-how-bots-are-saving-enterprise-cx/", - "postTitle": "Artificial intelligence for call centers: how bots are saving enterprise CX" - }, - { - "categories": [ - "CPaaS" - ], - "categoryLinks": [ - "https://www.bandwidth.com/blog/category/cpaas/" - ], - "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_CiscoLive-Recap-1.png", - "postLink": "https://www.bandwidth.com/blog/ciscolive-2023-recap/", - "postTitle": "CiscoLive 2023: 5 highlights in communications" - }, - { - "categories": [ - "CPaaS" - ], - "categoryLinks": [ - "https://www.bandwidth.com/blog/category/cpaas/" - ], - "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_Cloud-Migration.png", - "postLink": "https://www.bandwidth.com/blog/what-is-cloud-migration/", - "postTitle": "What is cloud migration? Cloud migration 101" - }, - { - "categories": [ - "CPaaS" - ], - "categoryLinks": [ - "https://www.bandwidth.com/blog/category/cpaas/" - ], - "imageUrl": "https://www.bandwidth.com/wp-content/uploads/Blog_ECL-Teasers_Executives-ECL-Take.png", - "postLink": "https://www.bandwidth.com/blog/enterprise-communications-landscape-overview/", - "postTitle": "An executive’s take on 2023 Enterprise Communications" } ] diff --git a/site/custom.config.json b/site/custom.config.json index 3d7ae9f4f..2e3130c36 100644 --- a/site/custom.config.json +++ b/site/custom.config.json @@ -11,5 +11,6 @@ "dashSpecLink": "https://github.com/Bandwidth/api-docs/blob/main/site/specs/dash.json", "dashNotificationsSpecLink": "https://github.com/Bandwidth/api-docs/blob/main/site/specs/dashNotifications.json", "identitySpecLink": "https://github.com/Bandwidth/api-docs/blob/main/site/specs/one-identity-management.yml", - "insightsSpecLink": "https://github.com/Bandwidth/api-docs/blob/main/site/specs/insights.yml" + "insightsSpecLink": "https://github.com/Bandwidth/api-docs/blob/main/site/specs/insights.yml", + "emergencyProvisioningSpec": "https://github.com/Bandwidth/api-docs/blob/main/site/specs/emergency.yml" } diff --git a/site/docs/voice/bxml/about.mdx b/site/docs/voice/bxml/about.mdx index 0c7802d35..d7e852fb8 100644 --- a/site/docs/voice/bxml/about.mdx +++ b/site/docs/voice/bxml/about.mdx @@ -28,7 +28,7 @@ export const Highlight = ({children, color}) => ( Bandwidth XML allows you to create a voice application as easily as you create a Web application. Using Bandwidth XML (or BXML) your application handles incoming call events using standard action verbs that are described in XML. -Before we begin creating a new BXML application you’ll need two things initially setup: +Before we begin creating a new BXML application you'll need two things initially setup: 1. A phone number that is allocated to your Bandwidth Application Platform account and is configured to an application. For instructions on setting up your application, read the [applications](/docs/account/applications/) page @@ -59,28 +59,30 @@ If BXML execution ends without performing a webhook, there is an implicit ``](/docs/voice/bxml/conference/) | The Conference verb is used to add a call to a conference. | -| [``](/docs/voice/bxml/bridge/) | The Bridge verb is used to bridge two calls. | -| [``](/docs/voice/bxml/pause/) | The Pause verb is used to delay verb execution for a period of time. | -| [``](/docs/voice/bxml/forward/) | The Forward verb is used to forward an unanswered incoming call to another number. | -| [``](/docs/voice/bxml/transfer/) | The Transfer verb is used to transfer the call to another number. | -| [``](/docs/voice/bxml/ring/) | The Ring verb is used to play ringing audio on a call. | -| [``](/docs/voice/bxml/hangup/) | The Hangup verb is used to hang up or reject a call. | -| [``](/docs/voice/bxml/redirect/) | The Redirect verb is used to redirect the current XML execution to another URL. | -| [``](/docs/voice/bxml/playAudio/) | The PlayAudio verb is used to play an audio file in the call. | -| [``](/docs/voice/bxml/speakSentence/) | The SpeakSentence verb converts text into audible speech. | -| [``](/docs/voice/bxml/record/) | The Record verb allows a segment of audio to be recorded during a call. | -| [``](/docs/voice/bxml/startRecording/) | The StartRecording verb allows a segment of a call to be recorded while other verbs are executing. | -| [``](/docs/voice/bxml/pauseRecording/) | The PauseRecording verb is used to pause a recording previously started by a `` verb. | -| [``](/docs/voice/bxml/resumeRecording/) | The ResumeRecording verb is used to resume a recording previously paused by a `` verb.| -| [``](/docs/voice/bxml/stopRecording/) | The StopRecording verb stops a recording that was previously started by a ``. | -| [``](/docs/voice/bxml/gather/) | The Gather verb is used to collect DTMF digits. | -| [``](/docs/voice/bxml/startGather/) | The StartGather verb is used to collect DTMF digits during the execution of other verbs. | -| [``](/docs/voice/bxml/stopGather/) | The StopGather verb stops the DTMF collection initiated by ``. | -| [``](/docs/voice/bxml/startStream/) | The StartStream verb allows a segment of a call to be streamed to an external destination. | -| [``](/docs/voice/bxml/stopStream/) | The StopStream verb is used to stop a stream previously started by a `` verb. | -| [``](/docs/voice/bxml/sendDtmf/) | The SendDtmf verb is used to play DTMF digits in the call. | -| [``](/docs/voice/bxml/tag/) | The Tag verb is used to set a new tag value without executing a webhook. | +| [``](/docs/voice/bxml/conference/) | The Conference verb is used to add a call to a conference. | +| [``](/docs/voice/bxml/bridge/) | The Bridge verb is used to bridge two calls. | +| [``](/docs/voice/bxml/pause/) | The Pause verb is used to delay verb execution for a period of time. | +| [``](/docs/voice/bxml/forward/) | The Forward verb is used to forward an unanswered incoming call to another number. | +| [``](/docs/voice/bxml/transfer/) | The Transfer verb is used to transfer the call to another number. | +| [``](/docs/voice/bxml/ring/) | The Ring verb is used to play ringing audio on a call. | +| [``](/docs/voice/bxml/hangup/) | The Hangup verb is used to hang up or reject a call. | +| [``](/docs/voice/bxml/redirect/) | The Redirect verb is used to redirect the current XML execution to another URL. | +| [``](/docs/voice/bxml/playAudio/) | The PlayAudio verb is used to play an audio file in the call. | +| [``](/docs/voice/bxml/speakSentence/) | The SpeakSentence verb converts text into audible speech. | +| [``](/docs/voice/bxml/record/) | The Record verb allows a segment of audio to be recorded during a call. | +| [``](/docs/voice/bxml/startRecording/) | The StartRecording verb allows a segment of a call to be recorded while other verbs are executing. | +| [``](/docs/voice/bxml/pauseRecording/) | The PauseRecording verb is used to pause a recording previously started by a `` verb. | +| [``](/docs/voice/bxml/resumeRecording/) | The ResumeRecording verb is used to resume a recording previously paused by a `` verb. | +| [``](/docs/voice/bxml/stopRecording/) | The StopRecording verb stops a recording that was previously started by a ``. | +| [``](/docs/voice/bxml/gather/) | The Gather verb is used to collect DTMF digits. | +| [``](/docs/voice/bxml/startGather/) | The StartGather verb is used to collect DTMF digits during the execution of other verbs. | +| [``](/docs/voice/bxml/stopGather/) | The StopGather verb stops the DTMF collection initiated by ``. | +| [``](/docs/voice/bxml/startStream/) | The StartStream verb allows a segment of a call to be streamed to an external destination. | +| [``](/docs/voice/bxml/stopStream/) | The StopStream verb is used to stop a stream previously started by a `` verb. | +| [``](/docs/voice/bxml/startTranscription/) | The StartTranscription verb allows a segment of a call to be transcribed during the execution of other verbs. | +| [``](/docs/voice/bxml/stopTranscription/) | The StopTranscription verb is used to stop a transcription previously started by a `` verb. | +| [``](/docs/voice/bxml/sendDtmf/) | The SendDtmf verb is used to play DTMF digits in the call. | +| [``](/docs/voice/bxml/tag/) | The Tag verb is used to set a new tag value without executing a webhook. | ### BXML Webhooks diff --git a/site/docs/voice/bxml/bridge.mdx b/site/docs/voice/bxml/bridge.mdx index 9723fe5e3..f727d199c 100644 --- a/site/docs/voice/bxml/bridge.mdx +++ b/site/docs/voice/bxml/bridge.mdx @@ -196,38 +196,23 @@ Console.WriteLine(response.ToBXML()); First call (c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d): ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Wait until the second call answers." -}) - -pause = Bandwidth::Voice::Pause.new({ - :duration => 60 -}) - -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(pause) +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Wait until the second call answers.') +pause = Bandwidth::Bxml::Pause.new({ duration: 60 }) +response = Bandwidth::Bxml::Response.new([speak_sentence, pause]) -puts response.to_bxml() +p response.to_bxml ``` Second call: ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "The bridge will start now." +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('The bridge will start now.') +bridge = Bandwidth::Bxml::Bridge.new('c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d', { + bridge_complete_url: 'https://bridge.url/nextBXMLForSecondCall', + bridge_target_complete_url: 'https://bridge.url/nextBXMLForFirstCall' }) +response = Bandwidth::Bxml::Response.new([speak_sentence, bridge]) -bridge = Bandwidth::Voice::Bridge.new({ - :call_id => "c-c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d", - :bridge_complete_url => "https://bridge.url/nextBXMLForSecondCall", - :bridge_target_complete_url => "https://bridge.url/nextBXMLForFirstCall" -}) - -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(bridge) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/conference.mdx b/site/docs/voice/bxml/conference.mdx index 338280344..f1692b434 100644 --- a/site/docs/voice/bxml/conference.mdx +++ b/site/docs/voice/bxml/conference.mdx @@ -147,20 +147,11 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "You will be added to your conference now.", - :gender => "male" -}) - -conference = Bandwidth::Voice::Conference.new({ - :conference_name => 'my-conference-name' -}) +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('You will be added to your conference now.', { gender: 'male' }) +conference = Bandwidth::Bxml::Conference.new('my-conference-name') +response = Bandwidth::Bxml::Response.new([speak_sentence, conference]) -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(conference) - -puts response.to_bxml() +p response.to_bxml ``` @@ -292,22 +283,15 @@ response.Add(conference); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Welcome. You are going to coach 2 calls, please wait.", - :gender => "male" +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Welcome. You are going to coach 2 calls, please wait.', { + gender: 'male' }) -conference = Bandwidth::Voice::Conference.new({ - :conference_name => 'my-conference-name', - :call_ids_to_coach => "c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d,c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f", - #or - :call_ids_to_coach => ["c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d", "c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f"] +conference = Bandwidth::Bxml::Conference.new('my-conference-name', { + call_ids_to_coach: ['c-95ac8d6e-1a31c52e-b38f-4198-93c1-51633ec68f8d', 'c-2a913f94-6a486f3a-3cae-4034-bcc3-f0c9fa77ca2f'] }) +response = Bandwidth::Bxml::Response.new([speak_sentence, conference]) -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(conference) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/forward.mdx b/site/docs/voice/bxml/forward.mdx index 2f0210777..c33436d99 100644 --- a/site/docs/voice/bxml/forward.mdx +++ b/site/docs/voice/bxml/forward.mdx @@ -97,15 +97,13 @@ Console.WriteLine(response.ToBXML()); ```ruby -forward = Bandwidth::Voice::Forward.new({ - :to => "+10987654321", - :from => "+11234567890" +forward = Bandwidth::Bxml::Forward.new({ + to: '+10987654321', + from: '+11234567890' }) +response = Bandwidth::Bxml::Response.new([forward]) -response = Bandwidth::Voice::Response.new() -response.push(forward) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/gather.mdx b/site/docs/voice/bxml/gather.mdx index cc7c9d8aa..a4782234f 100644 --- a/site/docs/voice/bxml/gather.mdx +++ b/site/docs/voice/bxml/gather.mdx @@ -143,22 +143,15 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Please press a digit.", - :voice => "kate" +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Please press a digit.', { voice: 'kate' }) +gather = Bandwidth::Bxml::Gather.new([speak_sentence], { + gather_url: 'https://gather.url/nextBXML', + terminating_digits: '#', + first_digit_timeout: 10 }) +response = Bandwidth::Bxml::Response.new([gather]) -gather = Bandwidth::Voice::Gather.new({ - :gather_url => "https://gather.url/nextBXML", - :terminating_digits => "#", - :first_digit_timeout => "10", - :speak_sentence => speak_sentence -}) - -response = Bandwidth::Voice::Response.new() -response.push(gather) - -puts response.to_bxml() +p response.to_bxml ``` @@ -300,21 +293,15 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "I am going to keep asking you to press a digit." -}) - -gather = Bandwidth::Voice::Gather.new({ - :gather_url => "https://gather.url/nextBXML", - :repeat_count => "5", - :max_digits => "1", - :speak_sentence => speak_sentence +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('I am going to keep asking you to press a digit.') +gather = Bandwidth::Bxml::Gather.new([speak_sentence], { + gather_url: 'https://gather.url/nextBXML', + repeat_count: 5, + max_digits: 1 }) +response = Bandwidth::Bxml::Response.new([gather]) -response = Bandwidth::Voice::Response.new() -response.push(gather) - -puts response.to_bxml() +p response.to_bxml ``` @@ -477,31 +464,16 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence_1 = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "First Sentence." -}) - -play_audio_1 = Bandwidth::Voice::PlayAudio.new({ - :url => "https://audio.url/audio1.wav" +speak_sentence_1 = Bandwidth::Bxml::SpeakSentence.new('First Sentence.') +play_audio_1 = Bandwidth::Bxml::PlayAudio.new('https://audio.url/audio1.wav') +play_audio_2 = Bandwidth::Bxml::PlayAudio.new('https://audio.url/audio2.mp3') +speak_sentence_2 = Bandwidth::Bxml::SpeakSentence.new('Second Sentence.') +gather = Bandwidth::Bxml::Gather.new([speak_sentence_1, play_audio_1, play_audio_2, speak_sentence_2], { + gather_url: 'https://gather.url/nextBXML' }) +response = Bandwidth::Bxml::Response.new([gather]) -play_audio_2 = Bandwidth::Voice::PlayAudio.new({ - :url => "https://audio.url/audio2.mp3" -}) - -speak_sentence_2 = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Second Sentence." -}) - -gather = Bandwidth::Voice::Gather.new({ - :gather_url => "https://gather.url/nextBXML", - :nested_verbs => [speak_sentence_1, play_audio_1, play_audio_2, speak_sentence_2] -}) - -response = Bandwidth::Voice::Response.new() -response.push(gather) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/hangup.mdx b/site/docs/voice/bxml/hangup.mdx index 761cd359d..6527a959b 100644 --- a/site/docs/voice/bxml/hangup.mdx +++ b/site/docs/voice/bxml/hangup.mdx @@ -87,12 +87,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -hangup = Bandwidth::Voice::Hangup.new() +hangup = Bandwidth::Bxml::Hangup.new +response = Bandwidth::Bxml::Response.new([hangup]) -response = Bandwidth::Voice::Response.new() -response.push(hangup) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/pause.mdx b/site/docs/voice/bxml/pause.mdx index eda7e739c..d3ab3a1c6 100644 --- a/site/docs/voice/bxml/pause.mdx +++ b/site/docs/voice/bxml/pause.mdx @@ -91,14 +91,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -pause = Bandwidth::Voice::Pause.new({ - :duration => 2 -}) +pause = Bandwidth::Bxml::Pause.new({ duration: 2 }) +response = Bandwidth::Bxml::Response.new([pause]) -response = Bandwidth::Voice::Response.new() -response.push(pause) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/pauseRecording.mdx b/site/docs/voice/bxml/pauseRecording.mdx index f1eb17b66..28baa9d1c 100644 --- a/site/docs/voice/bxml/pauseRecording.mdx +++ b/site/docs/voice/bxml/pauseRecording.mdx @@ -89,12 +89,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -pause_recording = Bandwidth::Voice::PauseRecording.new() +pause_recording = Bandwidth::Bxml::PauseRecording.new +response = Bandwidth::Bxml::Response.new([pause_recording]) -response = Bandwidth::Voice::Response.new() -response.push(pause_recording) - -puts response.to_bxml() +p response.to_bxml ``` @@ -342,74 +340,39 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence_start = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "This call is being recorded. Please wait while we transfer you.", - :voice => "bridget" -}) - -start_recording = Bandwidth::Voice::StartRecording.new({ - :recording_available_url => "https://myapp.com/noBXML" -}) - -phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+15554567892" +speak_sentence_start = Bandwidth::Bxml::SpeakSentence.new('This call is being recorded. Please wait while we transfer you.', { + voice: 'bridget' }) - -transfer = Bandwidth::Voice::Transfer.new({ - :phone_numbers => [phone_number] -}) - -pause_recording = Bandwidth::Voice::PauseRecording.new() - -speak_sentence_gather = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Press one if you want to be transferred to another number.", - :voice => "kate" +start_recording = Bandwidth::Bxml::StartRecording.new({ recording_available_url: 'https://myapp.com/noBXML' }) +phone_number = Bandwidth::Bxml::PhoneNumber.new('+15554567892') +transfer = Bandwidth::Bxml::Transfer.new([phone_number]) +pause_recording = Bandwidth::Bxml::PauseRecording.new +speak_sentence_gather = Bandwidth::Bxml::SpeakSentence.new('Press one if you want to be transferred to another number.', { + voice: 'kate' }) - -gather = Bandwidth::Voice::Gather.new({ - :gather_url => "https://myapp.com/gatherCallbackBxml", - :max_digits => 1, - :first_digit_timeout => 10, - :speak_sentence => speak_sentence_gather +gather = Bandwidth::Bxml::Gather.new([speak_sentence_gather], { + gather_url: 'https://myapp.com/gatherCallbackBxml', + max_digits: 1, + first_digit_timeout: 10 }) +response = Bandwidth::Bxml::Response.new([speak_sentence_start, start_recording, transfer, pause_recording, gather]) -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence_start) -response.push(start_recording) -response.push(transfer) -response.push(pause_recording) -response.push(gather) - -puts response.to_bxml() +p response.to_bxml ``` > BXML Response to the Gather Webhook ```ruby -resume_recording = Bandwidth::Voice::ResumeRecording.new() - -phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+15554567893" -}) - -transfer = Bandwidth::Voice::Transfer.new({ - :phone_numbers => [phone_number] +resume_recording = Bandwidth::Bxml::ResumeRecording.new +phone_number = Bandwidth::Bxml::PhoneNumber.new('+15554567893') +transfer = Bandwidth::Bxml::Transfer.new([phone_number]) +stop_recording = Bandwidth::Bxml::StopRecording.new +speak_sentence_end = Bandwidth::Bxml::SpeakSentence.new('Thanks for your call. Have a nice day!', { + voice: 'bridget' }) +response = Bandwidth::Bxml::Response.new([resume_recording, transfer, stop_recording, speak_sentence_end]) -stop_recording = Bandwidth::Voice::StopRecording.new() - -speak_sentence_end = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Thanks for your call. Have a nice day!", - :voice => "bridget" -}) - -response = Bandwidth::Voice::Response.new() -response.push(resume_recording) -response.push(transfer) -response.push(stop_recording) -response.push(speak_sentence_end) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/playAudio.mdx b/site/docs/voice/bxml/playAudio.mdx index 924f52297..3a743ab58 100644 --- a/site/docs/voice/bxml/playAudio.mdx +++ b/site/docs/voice/bxml/playAudio.mdx @@ -130,19 +130,11 @@ Console.WriteLine(response.ToBXML()); ```ruby -play_audio_1 = Bandwidth::Voice::PlayAudio.new({ - :url => "https://audio.url/audio1.wav" -}) +play_audio_1 = Bandwidth::Bxml::PlayAudio.new('https://audio.url/audio1.wav') +play_audio_2 = Bandwidth::Bxml::PlayAudio.new('https://audio.url/audio2.mp3') +response = Bandwidth::Bxml::Response.new([play_audio_1, play_audio_2]) -play_audio_2 = Bandwidth::Voice::PlayAudio.new({ - :url => "https://audio.url/audio2.mp3" -}) - -response = Bandwidth::Voice::Response.new() -response.push(play_audio_1) -response.push(play_audio_2) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/record.mdx b/site/docs/voice/bxml/record.mdx index 4287f9379..6dc71c48e 100644 --- a/site/docs/voice/bxml/record.mdx +++ b/site/docs/voice/bxml/record.mdx @@ -163,27 +163,16 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Please leave your message after the beep.", - :voice => "bridget" +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Please leave your message after the beep.', { voice: 'bridget' }) +play_audio = Bandwidth::Bxml::PlayAudio.new('https://audio.url/beep.wav') +record = Bandwidth::Bxml::Record.new({ + record_complete_url: 'https://myapp.com/nextBXML', + recording_available_url: 'https://myapp.com/recordingAvailable', + max_duration: '10' }) +response = Bandwidth::Bxml::Response.new([speak_sentence, play_audio, record]) -play_audio = Bandwidth::Voice::PlayAudio.new({ - :url => "https://audio.url/beep.wav" -}) - -record = Bandwidth::Voice::Record.new({ - :record_complete_url => "https://myapp.com/nextBXML", - :recording_available_url => "https://myapp.com/recordingAvailable", - :max_duration => "10" -}) - -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(play_audio) -response.push(record) - -puts response.to_bxml() +p response.to_bxml ``` @@ -336,21 +325,15 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Please say your name." -}) - -record = Bandwidth::Voice::Record.new({ - :record_complete_url => "https://record.url.server/record", - :transcribe => true, - :transcription_available_url => "https://transcription.url.server/transcribe/", +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Please say your name.') +record = Bandwidth::Bxml::Record.new({ + record_complete_url: 'https://record.url.server/record', + transcribe: true, + transcription_available_url: 'https://transcription.url.server/transcribe/' }) +response = Bandwidth::Bxml::Response.new([speak_sentence, record]) -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(record) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/redirect.mdx b/site/docs/voice/bxml/redirect.mdx index 054844941..537b0de87 100644 --- a/site/docs/voice/bxml/redirect.mdx +++ b/site/docs/voice/bxml/redirect.mdx @@ -106,14 +106,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -redirect = Bandwidth::Voice::Redirect.new({ - :redirect_url => "http://flow.url/newFlow" -}) +redirect = Bandwidth::Bxml::Redirect.new({ redirect_url: 'http://flow.url/newFlow' }) +response = Bandwidth::Bxml::Response.new([redirect]) -response = Bandwidth::Voice::Response.new() -response.push(redirect) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/resumeRecording.mdx b/site/docs/voice/bxml/resumeRecording.mdx index 14f532b19..a67dfe9de 100644 --- a/site/docs/voice/bxml/resumeRecording.mdx +++ b/site/docs/voice/bxml/resumeRecording.mdx @@ -92,12 +92,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -resume_recording = Bandwidth::Voice::ResumeRecording.new() +resume_recording = Bandwidth::Bxml::ResumeRecording.new +response = Bandwidth::Bxml::Response.new([resume_recording]) -response = Bandwidth::Voice::Response.new() -response.push(resume_recording) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/ring.mdx b/site/docs/voice/bxml/ring.mdx index 4c24404d6..b76afcb8b 100644 --- a/site/docs/voice/bxml/ring.mdx +++ b/site/docs/voice/bxml/ring.mdx @@ -93,14 +93,13 @@ Console.WriteLine(response.ToBXML()); ```ruby -response = Bandwidth::Voice::Response.new() -ring = Bandwidth::Voice::Ring.new({ - :duration => 10, - :answer_call => false +ring = Bandwidth::Bxml::Ring.new({ + duration: 10, + answer_call: false }) +response = Bandwidth::Bxml::Response.new([ring]) -response.push(ring) -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/sendDtmf.mdx b/site/docs/voice/bxml/sendDtmf.mdx index 22266fe47..c3b7b49d1 100644 --- a/site/docs/voice/bxml/sendDtmf.mdx +++ b/site/docs/voice/bxml/sendDtmf.mdx @@ -99,14 +99,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -send_dtmf = Bandwidth::Voice::SendDtmf.new({ - :dtmf => "12w34" -}) - -response = Bandwidth::Voice::Response.new() -response.push(send_dtmf) +send_dtmf = Bandwidth::Bxml::SendDtmf.new('12w34') +response = Bandwidth::Bxml::Response.new([send_dtmf]) -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/speakSentence.mdx b/site/docs/voice/bxml/speakSentence.mdx index c0235a374..df7d985d2 100644 --- a/site/docs/voice/bxml/speakSentence.mdx +++ b/site/docs/voice/bxml/speakSentence.mdx @@ -246,15 +246,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "This is a test.", - :voice => "julie" -}) - -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('This is a test.', { voice: 'julie' }) +response = Bandwidth::Bxml::Response.new([speak_sentence]) -puts response.to_bxml() +p response.to_bxml ``` @@ -365,15 +360,12 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => 'Hello, you have reached the home of Antonio Mendoza. Please leave a message.', - :voice => "jorge" +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Hello, you have reached the home of Antonio Mendoza. Please leave a message.', { + voice: 'jorge' }) +response = Bandwidth::Bxml::Response.new([speak_sentence]) -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/startGather.mdx b/site/docs/voice/bxml/startGather.mdx index 68914eded..3dc0c8fa2 100644 --- a/site/docs/voice/bxml/startGather.mdx +++ b/site/docs/voice/bxml/startGather.mdx @@ -117,19 +117,11 @@ Console.WriteLine(response.ToBXML()); ```ruby -start_gather = Bandwidth::Voice::StartGather.new({ - :dtmf_url => "https://startgather.url/callback" -}) +start_gather = Bandwidth::Bxml::StartGather.new({ dtmf_url: 'https://startgather.url/callback' }) +conference = Bandwidth::Bxml::Conference.new('my-conference-name') +response = Bandwidth::Bxml::Response.new([start_gather, conference]) -conference = Bandwidth::Voice::Conference.new({ - :conference_name => "my-conference-name" -}) - -response = Bandwidth::Voice::Response.new() -response.push(start_gather) -response.push(conference) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/startRecording.mdx b/site/docs/voice/bxml/startRecording.mdx index 35ea3fab4..026fcbd50 100644 --- a/site/docs/voice/bxml/startRecording.mdx +++ b/site/docs/voice/bxml/startRecording.mdx @@ -185,38 +185,23 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence_start = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "This call is being recorded. Please wait while we transfer you.", - :voice => "bridget" +speak_sentence_start = Bandwidth::Bxml::SpeakSentence.new('This call is being recorded. Please wait while we transfer you.', { + voice: 'bridget' }) - -start_recording = Bandwidth::Voice::StartRecording.new({ - :recording_available_url => "https://myapp.com/noBXML" -}) - -phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+15554567892" -}) - -transfer = Bandwidth::Voice::Transfer.new({ - :phone_numbers => [phone_number] -}) - -stop_recording = Bandwidth::Voice::StopRecording.new() - -speak_sentence_end = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Thanks for your call. Have a nice day!", - :voice => "bridget" -}) - -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence_start) -response.push(start_recording) -response.push(transfer) -response.push(stop_recording) -response.push(speak_sentence_end) - -puts response.to_bxml() +start_recording = Bandwidth::Bxml::StartRecording.new({ recording_available_url: 'https://myapp.com/noBXML' }) +phone_number = Bandwidth::Bxml::PhoneNumber.new('+15554567892') +transfer = Bandwidth::Bxml::Transfer.new([phone_number]) +stop_recording = Bandwidth::Bxml::StopRecording.new +speak_sentence_end = Bandwidth::Bxml::SpeakSentence.new('Thanks for your call. Have a nice day!', { voice: 'bridget' }) +response = Bandwidth::Bxml::Response.new([ + speak_sentence_start, + start_recording, + transfer, + stop_recording, + speak_sentence_end +]) + +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/startStream.mdx b/site/docs/voice/bxml/startStream.mdx index d942fe7ed..a61856b28 100644 --- a/site/docs/voice/bxml/startStream.mdx +++ b/site/docs/voice/bxml/startStream.mdx @@ -207,35 +207,25 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence_start = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "This call is being streamed to a live studio audience.", - :voice => "bridget" +speak_sentence_start = Bandwidth::Bxml::SpeakSentence.new('This call is being streamed to a live studio audience.', { + voice: 'bridget' }) - -stream_param = Bandwidth::Voice::StreamParam.new({ - :name => "internal_id", - :value => "call_ABC" +stream_param = Bandwidth::Bxml::StreamParam.new({ + name: 'internal_id', + value: 'call_ABC' }) - -start_stream = Bandwidth::Voice::StartStream.new({ - :name => "live_audience", - :tracks => "both", - :destination => "wss://live-studio-audience.myapp.example.com", - :stream_events_url = "https://myapp.example.com/noBXML" - :stream_params => [stream_param] +start_stream = Bandwidth::Bxml::StartStream.new([stream_param], { + name: 'live_audience', + tracks: 'both', + destination: 'wss://live-studio-audience.myapp.example.com', + stream_events_url: 'ttps://myapp.example.com/noBXML' }) - -speak_sentence_end = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "This will now be streamed to the destination as well as played to the call participants.", - :voice => "bridget" +speak_sentence_end = Bandwidth::Bxml::SpeakSentence.new('This will now be streamed to the destination as well as played to the call participants.', { + voice: 'bridget' }) +response = Bandwidth::Bxml::Response.new([speak_sentence_start, start_stream, speak_sentence_end]) -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence_start) -response.push(start_stream) -response.push(speak_sentence_end) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/startTranscription.mdx b/site/docs/voice/bxml/startTranscription.mdx index 5a67bae39..bb6665201 100644 --- a/site/docs/voice/bxml/startTranscription.mdx +++ b/site/docs/voice/bxml/startTranscription.mdx @@ -116,6 +116,51 @@ If a `destination` is specified, it will be sent JSON messages for the duration ## Examples +### Transcribe an Active Call + + + +```xml + + + This call is being streamed to a live studio audience and transcribed. + + + + + +``` + + + + +```ruby +speak_sentence = Bandwidth::Bxml::SpeakSentence('This call is being streamed to a live studio audience and transcribed.', { + voice: 'bridget' +}) +custom_param_1 = Bandwidth::Bxml::CustomParam({name: 'custom_param_1', value: 'value_1' }) +custom_param_2 = Bandwidth::Bxml::CustomParam({name: 'custom_param_2', value: 'value_2' }) +start_transcription = Bandwidth::Bxml::StartTranscription([custom_param_1, custom_param_2], { + name: 'live_audience', + tracks: 'both', + destination: 'wss://live-studio-audience.myapp.example.com', + transcription_event_url: 'https://myapp.example.com/noBXML' +}) +response = Bandwidth::Bxml::Response.new([speak_sentence, start_transcription]) + +p response.to_bxml +``` + + + + ### A `start` Websocket Message ```json diff --git a/site/docs/voice/bxml/stopGather.mdx b/site/docs/voice/bxml/stopGather.mdx index 8d73bcab3..e66547400 100644 --- a/site/docs/voice/bxml/stopGather.mdx +++ b/site/docs/voice/bxml/stopGather.mdx @@ -134,32 +134,14 @@ Console.WriteLine(response.ToBXML()); ```ruby -start_gather = Bandwidth::Voice::StartGather.new({ - :dtmf_url => "https://startgather.url/callback" -}) - -phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+19195551234" -}) - -transfer = Bandwidth::Voice::Transfer.new({ - :phone_numbers => [phone_number] -}) - -stop_gather = Bandwidth::Voice::StopGather.new() - -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Digits are no longer being gathered." -}) - -response = Bandwidth::Voice::Response.new() - -response.push(start_gather) -response.push(transfer) -response.push(stop_gather) -response.push(speak_sentence) - -puts response.to_bxml() +start_gather = Bandwidth::Bxml::StartGather.new({ dtmf_url: 'https://startgather.url/callback' }) +phone_number = Bandwidth::Bxml::PhoneNumber.new('+19195551234') +transfer = Bandwidth::Bxml::Transfer.new([phone_number]) +stop_gather = Bandwidth::Bxml::StopGather.new +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Digits are no longer being gathered.') +response = Bandwidth::Bxml::Response.new([start_gather, transfer, stop_gather, speak_sentence]) + +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/stopRecording.mdx b/site/docs/voice/bxml/stopRecording.mdx index eb110e08c..fd428bbed 100644 --- a/site/docs/voice/bxml/stopRecording.mdx +++ b/site/docs/voice/bxml/stopRecording.mdx @@ -92,12 +92,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -stop_recording = Bandwidth::Voice::StopRecording.new() +stop_recording = Bandwidth::Bxml::StopRecording.new +response = Bandwidth::Bxml::Response.new([stop_recording]) -response = Bandwidth::Voice::Response.new() -response.push(stop_recording) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/stopStream.mdx b/site/docs/voice/bxml/stopStream.mdx index 26118f565..5a4502804 100644 --- a/site/docs/voice/bxml/stopStream.mdx +++ b/site/docs/voice/bxml/stopStream.mdx @@ -95,14 +95,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -stop_stream = Bandwidth::Voice::StopStream.new({ - :name => "live_audience", -}) +stop_stream = Bandwidth::Bxml::StopStream.new({ name: 'live_audience' }) +response = Bandwidth::Bxml::Response.new([stop_stream]) -response = Bandwidth::Voice::Response.new() -response.push(stop_stream) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/stopTranscription.mdx b/site/docs/voice/bxml/stopTranscription.mdx index 2ed74537e..08e4f8e4f 100644 --- a/site/docs/voice/bxml/stopTranscription.mdx +++ b/site/docs/voice/bxml/stopTranscription.mdx @@ -40,6 +40,37 @@ There is no text content available to be set for the `` verb. ## Examples +### Stop an Active Transcription + + + +```xml + + + + +``` + + + + +```ruby +stop_transcription = Bandwidth::Bxml::StopTranscription.new({ name: 'live_audience' }) +response = Bandwidth::Bxml::Response.new([stop_transcription]) + +p response.to_bxml +``` + + + + [1]: /docs/voice/bxml/startTranscription [2]: /docs/voice/webhooks/realTimeTranscriptionStarted [3]: /docs/voice/webhooks/realTimeTranscriptionStopped diff --git a/site/docs/voice/bxml/tag.mdx b/site/docs/voice/bxml/tag.mdx index 75c81cd67..3127b4bbe 100644 --- a/site/docs/voice/bxml/tag.mdx +++ b/site/docs/voice/bxml/tag.mdx @@ -118,25 +118,12 @@ Console.WriteLine(response.ToBXML()); ```ruby -tag1 = Bandwidth::Voice::Tag.new({ - :tag => "audio playing" -}) +tag_1 = Bandwidth::Bxml::Tag.new('audio playing') +play_audio = Bandwidth::Bxml::PlayAudio.new('https://audio.url/audio1.wav') +tag_2 = Bandwidth::Bxml::Tag.new('audio ended') +response = Bandwidth::Bxml::Response.new([tag_1, play_audio, tag_2]) -play_audio = Bandwidth::Voice::PlayAudio.new({ - :url => "https://audio.url/audio1.wav" -}) - -tag2 = Bandwidth::Voice::Tag.new({ - :tag => "audio ended" -}) - -response = Bandwidth::Voice::Response.new() - -response.push(tag1) -response.push(play_audio) -response.push(tag2) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/bxml/transfer.mdx b/site/docs/voice/bxml/transfer.mdx index e599b7c43..81ff6999e 100644 --- a/site/docs/voice/bxml/transfer.mdx +++ b/site/docs/voice/bxml/transfer.mdx @@ -184,19 +184,13 @@ Console.WriteLine(response.ToBXML()); ```ruby -phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+11234567892" +phone_number = Bandwidth::Bxml::PhoneNumber.new('+11234567892') +transfer = Bandwidth::Bxml::Transfer.new([phone_number], { + transfer_caller_id: '+11234567891' }) +response = Bandwidth::Bxml::Response.new([transfer]) -transfer = Bandwidth::Voice::Transfer.new({ - :transfer_caller_id => "+11234567891", - :phone_numbers => [phone_number] -}) - -response = Bandwidth::Voice::Response.new() -response.push(transfer) - -puts response.to_bxml() +p response.to_bxml ``` @@ -377,34 +371,23 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Transferring your call, please wait.", - :voice => "paul" +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Transferring your call, please wait.', { voice: 'paul' }) +phone_number = Bandwidth::Bxml::PhoneNumber.new('+11234567892', { + transfer_answer_url: 'http://myapp.com/announcement' }) - -phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+11234567892", - :transfer_answer_url => "http://myapp.com/announcement" -}) - -transfer = Bandwidth::Voice::Transfer.new({ - :transfer_caller_id => "+11234567891", - :phone_numbers => [phone_number] +transfer = Bandwidth::Bxml::Transfer.new([phone_number], { + transfer_caller_id: '+11234567891' }) +response = Bandwidth::Bxml::Response.new([speak_sentence, transfer]) -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(transfer) - -puts response.to_bxml() +p response.to_bxml ``` > The announcement BXML response from `http://myapp.com/announcement` is: ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "A customer would like to speak to you.", - :voice => "paul" +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('A customer would like to speak to you.', { + voice: 'paul' }) ``` @@ -590,23 +573,14 @@ Console.WriteLine(response.ToBXML()); ```ruby -phone_number_1 = Bandwidth::Voice::PhoneNumber.new({ - :number => "+15552221234" -}) - -phone_number_2 = Bandwidth::Voice::PhoneNumber.new({ - :number => "+15552221233" +phone_number_1 = Bandwidth::Bxml::PhoneNumber.new('+15552221234') +phone_number_2 = Bandwidth::Bxml::PhoneNumber.new('+15552221233') +transfer = Bandwidth::Bxml::Transfer.new([phone_number_1, phone_number_2], { + transfer_caller_id: '+15552221235' }) +response = Bandwidth::Bxml::Response.new([transfer]) -transfer = Bandwidth::Voice::Transfer.new({ - :transfer_caller_id => "+15552221235", - :phone_numbers => [phone_number_1, phone_number_2] -}) - -response = Bandwidth::Voice::Response.new() -response.push(transfer) - -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/callInformationGuide.mdx b/site/docs/voice/callInformationGuide.mdx index 617adf82a..a77f498d2 100644 --- a/site/docs/voice/callInformationGuide.mdx +++ b/site/docs/voice/callInformationGuide.mdx @@ -170,30 +170,27 @@ class Program ```ruby -require 'bandwidth' +require 'bandwidth-sdk' -include Bandwidth -include Bandwidth::Voice - -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: ENV['BW_USERNAME'], - voice_basic_auth_password: ENV['BW_PASSWORD'] -) +Bandwidth.configure do |config| + config.username = ENV.fetch('BW_USERNAME') + config.password = ENV.fetch('BW_PASSWORD') +end -voice_client = bandwidth_client.voice_client.client +calls_api_instance = Bandwidth::CallsApi.new -body = CreateCallRequest.new -body.from = ENV['BW_NUMBER'] -body.to = ENV['USER_NUMBER'] -body.answer_url = ENV['BASE_CALLBACK_URL'] + "/callbacks/answer" -body.application_id = ENV['BW_VOICE_APPLICATION_ID'] -#remember to add auth for your application if needed! +call_body = Bandwidth::CreateCall.new( + application_id: ENV.fetch('BW_VOICE_APPLICATION_ID'), + to: ENV.fetch('USER_NUMBER'), + from: ENV.fetch('BW_NUMBER'), + answer_url: "#{ENV.fetch('BASE_CALLBACK_URL')}/callbacks/outboundCall", +) begin - result = voice_client.create_call(ENV['BW_ACCOUNT_ID'], body) - puts result.data.call_id -rescue APIException => e - puts e.response_code + result = calls_api_instance.create_call(ENV.fetch('BW_ACCOUNT_ID'), call_body) + p result.call_id +rescue Bandwidth::ApiError => e + p e.code end ``` @@ -419,25 +416,20 @@ class Program ```ruby -require 'bandwidth' +require 'bandwidth-sdk' -include Bandwidth -include Bandwidth::Voice - -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: ENV['BW_USERNAME'], - voice_basic_auth_password: ENV['BW_PASSWORD'] -) - -voice_client = bandwidth_client.voice_client.client +Bandwidth.configure do |config| + config.username = ENV.fetch('BW_USERNAME') + config.password = ENV.fetch('BW_PASSWORD') +end -callId = {CALL_ID} +calls_api_instance = Bandwidth::CallsApi.new begin - result = voice_client.get_call(ENV['BW_ACCOUNT_ID'], callId) - puts result.data.call_id -rescue APIException => e - puts e.response_code + result = calls_api_instance.get_call(ENV.fetch('BW_ACCOUNT_ID'), ENV.fetch('CALL_ID')) + p result.call_id +rescue Bandwidth::ApiError => e + p e.code end ``` diff --git a/site/docs/voice/conferenceGuide.mdx b/site/docs/voice/conferenceGuide.mdx index 992200470..8d4cf81b4 100644 --- a/site/docs/voice/conferenceGuide.mdx +++ b/site/docs/voice/conferenceGuide.mdx @@ -87,19 +87,11 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Joining the conference now.", -}) - -conference = Bandwidth::Voice::Conference.new({ - :conference_name => 'important-meeting' -}) - -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(conference) +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Joining the conference now.') +conference = Bandwidth::Bxml::Conference.new('important-meeting') +response = Bandwidth::Bxml::Response.new([speak_sentence, conference]) -puts response.to_bxml() +p response.to_bxml ``` @@ -234,21 +226,13 @@ response.Add(conference); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Welcome. You are going to coach 2 calls, please wait." +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Welcome. You are going to coach 2 calls, please wait') +conference = Bandwidth::Bxml::Conference.new('my-first-conference', { + call_ids_to_coach: ["c-example-callid-1", "c-example-callid-2"] }) -conference = Bandwidth::Voice::Conference.new({ - :conference_name => 'my-first-conference', - :call_ids_to_coach => "c-example-callid-1, c-example-callid-2", - #or - :call_ids_to_coach => ["c-example-callid-1", "c-example-callid-2"] -}) - -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) -response.push(conference) +response = Bandwidth::Bxml::Response.new([speak_sentence, conference]) -puts response.to_bxml() +p response.to_bxml ``` @@ -420,27 +404,21 @@ class Program -``` -require 'bandwidth' - -include Bandwidth -include Bandwidth::Voice - -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: {BW_USERNAME}, - voice_basic_auth_password: {BW_PASSWORD} -) +```ruby +require 'bandwidth-sdk' -voice_client = bandwidth_client.voice_client.client +Bandwidth.configure do |config| + config.username = ENV.fetch('BW_USERNAME') + config.password = ENV.fetch('BW_PASSWORD') +end -body = ModifyConferenceRequest.new -body.status = StatusEnum::COMPLETED -#remember to add auth for your application if needed! +conferences_api_instance = Bandwidth::ConferencesApi.new +body = Bandwidth::UpdateConference.new({ status: 'completed' }) begin - voice_client.modify_conference({ACCOUNT_ID}, {CONFERENCE_ID}, body) -rescue APIException => e - puts e.response_code + conferences_api_instance.update_conference(ENV.fetch('ACCOUNT_ID'), ENV.fetch('CONFERENCE_ID'), body) +rescue Bandwidth::ApiError => e + p e.code end ``` diff --git a/site/docs/voice/interactiveVoiceResponseGuide.mdx b/site/docs/voice/interactiveVoiceResponseGuide.mdx index c8dfc9cbd..d47da2aa7 100644 --- a/site/docs/voice/interactiveVoiceResponseGuide.mdx +++ b/site/docs/voice/interactiveVoiceResponseGuide.mdx @@ -160,34 +160,25 @@ public ActionResult digitsCallback() { **Note: The endpoint headers are pseudocoded. Your implementation will look different -``` -@POST '/gatherDigits' do: - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Input a digit to hear it read back to you." - }) - - gather = Bandwidth::Voice::Gather.new({ - :gather_url => "/digitsCallback", - :max_digits => 1, - }) - - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - response.push(gather) - - return response.to_bxml() - -@POST '/digitsCallback' do: - #NOTE: This section of the application may look different depending on how your endpoints receive callback events - - callback_data = JSON.parse(request.body.read) - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => callback_data["digits"] - }) - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - - return response.to_bxml() +```ruby +post '/gatherDigits' do + speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Input a digit to hear it read back to you.') + gather = Bandwidth::Bxml::Gather.new([speak_sentence], { + gather_url: '/digitsCallback', + max_digits: 1, + }) + response = Bandwidth::Bxml::Response.new([gather]) + + return response.to_bxml +end + +post '/digitsCallback' do + data = JSON.parse(request.body.read) + speak_sentence = Bandwidth::Bxml::SpeakSentence.new(data['digits']) + response = Bandwidth::Bxml::Response.new([speak_sentence]) + + return response.to_bxml +end ``` @@ -453,39 +444,26 @@ public ActionResult gatherCallback() { **Note: This application is pseudocoded. Your implementation will look different ```ruby -post '/gatherDigits' do: - speak_sentence_1 = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Please listen to the menu of options." - }) - - play_audio_1 = Bandwidth::Voice::PlayAudio.new({ - :url => "http://audio.test/englishMenuOptions.mp3" - }) - - play_audio_2 = Bandwidth::Voice::PlayAudio.new({ - :url => "http://audio.test/spanishMenuOptions.mp3" - }) - - gather = Bandwidth::Voice::Gather.new({ - :gather_url => "/gatherCallback", - :repeat_count => 3, - :nested_verbs => [speak_sentence_1, play_audio_1, play_audio_2] - }) - - response = Bandwidth::Voice::Response.new() - response.push(gather) +post '/gatherDigits' do + speak_sentence_1 = Bandwidth::Bxml::SpeakSentence.new('Please listen to the menu of options.') + play_audio_1 = Bandwidth::Bxml::PlayAudio.new('http://audio.test/englishMenuOptions.mp3') + play_audio_2 = Bandwidth::Bxml::PlayAudio.new('http://audio.test/spanishMenuOptions.mp3') + gather = Bandwidth::Bxml::Gather.new([speak_sentence_1, play_audio_1, play_audio_2], { + gather_url: '/gatherCallback', + repeat_count: 3 + }) + response = Bandwidth::Bxml::Response.new([gather]) + + return response.to_bxml +end get '/gatherCallback' do: - #NOTE: This section of the application may look different depending on how your endpoints receive callback events + data = JSON.parse(request.body.read) + speak_sentence = Bandwidth::Bxml::SpeakSentence.new(data['digits']) + response = Bandwidth::Bxml::Response.new([speak_sentence]) - callback_data = JSON.parse(request.body.read) - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => callback_data["digits"] - }) - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - - return response.to_bxml() + return response.to_bxml +end ``` diff --git a/site/docs/voice/machineDetectionGuide.mdx b/site/docs/voice/machineDetectionGuide.mdx index 0fda48cc3..85aae7d7f 100644 --- a/site/docs/voice/machineDetectionGuide.mdx +++ b/site/docs/voice/machineDetectionGuide.mdx @@ -219,50 +219,47 @@ class Program ```ruby -require 'bandwidth' - -include Bandwidth -include Bandwidth::Voice +require 'bandwidth-sdk' begin - BW_USERNAME = ENV.fetch('BW_USERNAME') - BW_PASSWORD = ENV.fetch('BW_PASSWORD') - BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') - BW_VOICE_APPLICATION_ID = ENV.fetch('BW_VOICE_APPLICATION_ID') - BW_NUMBER = ENV.fetch('BW_NUMBER') - USER_NUMBER = ENV.fetch('USER_NUMBER') - BASE_CALLBACK_URL = ENV.fetch('BASE_CALLBACK_URL') - + BW_USERNAME = ENV.fetch('BW_USERNAME') + BW_PASSWORD = ENV.fetch('BW_PASSWORD') + BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') + BW_VOICE_APPLICATION_ID = ENV.fetch('BW_VOICE_APPLICATION_ID') + BW_NUMBER = ENV.fetch('BW_NUMBER') + USER_NUMBER = ENV.fetch('USER_NUMBER') + BASE_CALLBACK_URL = ENV.fetch('BASE_CALLBACK_URL') rescue - puts "Please set the environmental variables defined in the README" - exit(-1) + p 'Please set the environmental variables defined in the README' + exit(-1) end -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: {BW_USERNAME}, - voice_basic_auth_password: {BW_PASSWORD} -) +Bandwidth.configure do |config| + config.username = BW_USERNAME + config.password = BW_PASSWORD +end -voice_client = bandwidth_client.voice_client.client +calls_api_instance = Bandwidth::CallsApi.new -amd = MachineDetectionConfiguration.new -amd.mode = ModeEnum::ASYNC -amd.callback_url = "http://example.com/machineDetectionCallback" -amd.callback_method = AnswerMethodEnum::POST +amd_config = Bandwidth::MachineDetectionConfiguration.new( + mode: Bandwidth::MachineDetectionModeEnum::ASYNC, + callback_url: BASE_CALLBACK_URL + '/machineDetection', + callback_method: Bandwidth::CallbackMethodEnum::POST +) -body = CreateCallRequest.new -body.from = BW_NUMBER -body.to = USER_NUMBER -body.answer_url = BASE_CALLBACK_URL + "/answer" -body.application_id = BW_VOICE_APPLICATION_ID -body.machine_detection = amd -#remember to add auth for your application if needed! +call_body = Bandwidth::CreateCall.new( + application_id: BW_VOICE_APPLICATION_ID, + to: USER_NUMBER, + from: BW_NUMBER, + answer_url: BASE_CALLBACK_URL + '/answer', + machine_detection: amd_config +) begin - result = voice_client.create_call(ENV['BW_ACCOUNT_ID'], body) - puts result.data.call_id -rescue APIException => e - puts e.response_code + result = calls_api_instance.create_call(BW_ACCOUNT_ID, call_body) + p result.call_id +rescue Bandwidth::ApiError => e + p e.code end ``` @@ -616,53 +613,51 @@ class Program ```ruby -require 'bandwidth' - -include Bandwidth -include Bandwidth::Voice +require 'bandwidth-sdk' begin - BW_USERNAME = ENV.fetch('BW_USERNAME') - BW_PASSWORD = ENV.fetch('BW_PASSWORD') - BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') - BW_VOICE_APPLICATION_ID = ENV.fetch('BW_VOICE_APPLICATION_ID') - BW_NUMBER = ENV.fetch('BW_NUMBER') - USER_NUMBER = ENV.fetch('USER_NUMBER') - BASE_CALLBACK_URL = ENV.fetch('BASE_CALLBACK_URL') - + BW_USERNAME = ENV.fetch('BW_USERNAME') + BW_PASSWORD = ENV.fetch('BW_PASSWORD') + BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') + BW_VOICE_APPLICATION_ID = ENV.fetch('BW_VOICE_APPLICATION_ID') + BW_NUMBER = ENV.fetch('BW_NUMBER') + USER_NUMBER = ENV.fetch('USER_NUMBER') + BASE_CALLBACK_URL = ENV.fetch('BASE_CALLBACK_URL') rescue - puts "Please set the environmental variables defined in the README" - exit(-1) + p 'Please set the environmental variables defined in the README' + exit(-1) end -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: {BW_USERNAME}, - voice_basic_auth_password: {BW_PASSWORD} -) +Bandwidth.configure do |config| + config.username = BW_USERNAME + config.password = BW_PASSWORD +end -voice_client = bandwidth_client.voice_client.client +calls_api_instance = Bandwidth::CallsApi.new -amd = MachineDetectionConfiguration.new -amd.mode = ModeEnum::SYNC -amd.callback_method = AnswerMethodEnum::POST -amd.detection_timeout = 15.0 -amd.silence_timeout = 5.0 -amd.speech_threshold = 5.0 -amd.speech_end_threshold = 1.0 +amd_config = Bandwidth::MachineDetectionConfiguration.new( + mode: Bandwidth::MachineDetectionModeEnum::SYNC, + detection_timeout: 15.0, + silence_timeout: 5.0, + speech_threshold: 5.0, + speech_end_threshold: 1.0, + callback_url: BASE_CALLBACK_URL + '/machineDetection', + callback_method: Bandwidth::CallbackMethodEnum::POST +) -body = CreateCallRequest.new -body.from = BW_NUMBER -body.to = USER_NUMBER -body.answer_url = BASE_CALLBACK_URL + "/answer" -body.application_id = BW_VOICE_APPLICATION_ID -body.machine_detection = amd -#remember to add auth for your application if needed! +call_body = Bandwidth::CreateCall.new( + application_id: BW_VOICE_APPLICATION_ID, + to: USER_NUMBER, + from: BW_NUMBER, + answer_url: BASE_CALLBACK_URL + '/answer', + machine_detection: amd_config +) begin - result = voice_client.create_call(ENV['BW_ACCOUNT_ID'], body) - puts result.data.call_id -rescue APIException => e - puts e.response_code + result = calls_api_instance.create_call(BW_ACCOUNT_ID, call_body) + p result.call_id +rescue Bandwidth::ApiError => e + p e.code end ``` diff --git a/site/docs/voice/mediaAndTTSGuide.mdx b/site/docs/voice/mediaAndTTSGuide.mdx index 5b3495c37..45a10ac57 100644 --- a/site/docs/voice/mediaAndTTSGuide.mdx +++ b/site/docs/voice/mediaAndTTSGuide.mdx @@ -106,23 +106,16 @@ The second instance of PlayAudio (a relative endpoint) assumes there is an endpo **Note: This application is pseudocoded. Your implementation will look different ```ruby -post '/playAudio' do: - play_audio_1 = Bandwidth::Voice::PlayAudio.new({ - :url => "https://audio.url/audio1.wav" - }) +post '/playAudio' do + play_audio_1 = Bandwidth::Bxml::PlayAudio.new('https://audio.url/audio1.wav') + play_audio_2 = Bandwidth::Bxml::PlayAudio.new('/relative_audio') + response = Bandwidth::Bxml::Response.new([play_audio_1, play_audio_2]) - play_audio_2 = Bandwidth::Voice::PlayAudio.new({ - :url => "/relative_audio" - }) - - response = Bandwidth::Voice::Response.new() - response.push(play_audio_1) - response.push(play_audio_2) - - return response.to_bxml() + return response.to_bxml +end get '/relative_audio' do: - ...retrieve and return audio file... + # ...retrieve and return audio file... ``` The second instance of PlayAudio (a relative endpoint) assumes there is an endpoint in the application that serves an audio file. To see an example, look [here](https://github.com/Bandwidth-Samples/voice-record-java/blob/main/src/main/java/com/bandwidth/controller/FilesController.java). @@ -296,16 +289,14 @@ public ActionResult speakSentence() { **Note: The endpoint headers are pseudocoded. Your implementation will look different ``` -@POST '/tts' do: - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => 'Hello Sherlock Holmes. You have an appointment on 11/12/2022.', - :voice => "bridget" - }) - - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - - return response.to_bxml() +post '/tts' do + speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Hello Sherlock Holmes. You have an appointment on 11/12/2022.', { + voice: 'bridget' + }) + response = Bandwidth::Bxml::Response.new([speak_sentence]) + + return response.to_bxml +end ``` diff --git a/site/docs/voice/migrationGuide.mdx b/site/docs/voice/migrationGuide.mdx index 405e1e4f6..f31c81987 100644 --- a/site/docs/voice/migrationGuide.mdx +++ b/site/docs/voice/migrationGuide.mdx @@ -391,30 +391,27 @@ class Program ```ruby -require 'bandwidth' +require 'bandwidth-sdk' -include Bandwidth -include Bandwidth::Voice - -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: ENV['BW_USERNAME'], - voice_basic_auth_password: ENV['BW_PASSWORD'] -) +Bandwidth.configure do |config| + config.username = ENV.fetch('BW_USERNAME') + config.password = ENV.fetch('BW_PASSWORD') +end -voice_client = bandwidth_client.voice_client.client +calls_api_instance = Bandwidth::CallsApi.new -body = CreateCallRequest.new -body.from = ENV['BW_NUMBER'] -body.to = ENV['USER_NUMBER'] -body.answer_url = ENV['BASE_CALLBACK_URL'] + "/callbacks/answer" -body.application_id = ENV['BW_VOICE_APPLICATION_ID'] -#remember to add auth for your application if needed! +call_body = Bandwidth::CreateCall.new( + application_id: ENV.fetch('BW_VOICE_APPLICATION_ID'), + to: ENV.fetch('USER_NUMBER'), + from: ENV.fetch('BW_NUMBER'), + answer_url: "#{ENV.fetch('BASE_CALLBACK_URL')}/callbacks/answer", +) begin - result = voice_client.create_call(ENV['BW_ACCOUNT_ID'], body) - puts result.data.call_id -rescue APIException => e - puts e.response_code + result = calls_api_instance.create_call(ENV.fetch('BW_ACCOUNT_ID'), call_body) + p result.call_id +rescue Bandwidth::ApiError => e + p e.code end ``` @@ -788,31 +785,20 @@ public ActionResult alert() { ```ruby -@POST '/incoming_calls' do: - phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+15555555554", - :transfer_answer_url => "/announcement" - }) +post '/incoming_calls' do + phone_number = Bandwidth::Bxml::PhoneNumber.new('+15555555554', { transfer_answer_url: '/announcement' }) + transfer = Bandwidth::Bxml::Transfer.new([phone_number], { transfer_caller_id: '+15555555555' }) + response = Bandwidth::Bxml::Response.new([transfer]) - transfer = Bandwidth::Voice::Transfer.new({ - :transfer_caller_id => "+15555555555", - :phone_numbers => [phone_number] - }) - - response = Bandwidth::Voice::Response.new() - response.push(transfer) + return response.to_bxml +end - puts response.to_bxml() - return response.to_bxml() +post '/announcement' do + speak_sentence = Bandwidth::Bxml::SpeakSentence.new("Hey! There's a customer on the line.") + response = Bandwidth::Bxml::Response.new([speak_sentence]) -@POST '/announcement' do: - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Hey! There's a customer on the line." - }) - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - puts response.to_bxml() - return response.to_bxml() + return response.to_bxml +end ``` @@ -1099,15 +1085,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "This is a test.", - :voice => "julie" -}) - -response = Bandwidth::Voice::Response.new() -response.push(speak_sentence) +speak_sentence = Bandwidth::Bxml::SpeakSentence.new('This is a test.', { voice: 'julie' }) +response = Bandwidth::Bxml::Response.new([speak_sentence]) -puts response.to_bxml() +p response.to_bxml ``` diff --git a/site/docs/voice/modifyInProgressCallGuide.mdx b/site/docs/voice/modifyInProgressCallGuide.mdx index 6490d249b..73164512c 100644 --- a/site/docs/voice/modifyInProgressCallGuide.mdx +++ b/site/docs/voice/modifyInProgressCallGuide.mdx @@ -79,14 +79,10 @@ Console.WriteLine(response.ToBXML()); ```ruby -pause = Bandwidth::Voice::Pause.new({ - :duration => 60 -}) +pause = Bandwidth::Bxml::Pause.new({ duration: 60 }) +response = Bandwidth::Bxml::Response.new([pause]) -response = Bandwidth::Voice::Response.new() -response.push(pause) - -puts response.to_bxml() +p response.to_bxml ``` @@ -318,36 +314,38 @@ public ActionResult goodbyeMessage() { ```ruby -require 'bandwidth' +require 'bandwidth-sdk' -include Bandwidth -include Bandwidth::Voice +begin + BW_USERNAME = ENV.fetch('BW_USERNAME') + BW_PASSWORD = ENV.fetch('BW_PASSWORD') + BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') + BW_VOICE_APPLICATION_ID = ENV.fetch('BW_VOICE_APPLICATION_ID') + BW_NUMBER = ENV.fetch('BW_NUMBER') + USER_NUMBER = ENV.fetch('USER_NUMBER') + BASE_CALLBACK_URL = ENV.fetch('BASE_CALLBACK_URL') + CALL_ID = ENV.fetch('CALL_ID') +rescue + p 'Please set the environmental variables defined in the README' + exit(-1) +end -ACCOUNT_ID = ENV['BW_ACCOUNT_ID'] +Bandwidth.configure do |config| + config.username = BW_USERNAME + config.password = BW_PASSWORD +end -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: ENV['BW_USERNAME'], - voice_basic_auth_password: ENV['BW_PASSWORD'] -) +calls_api_instance = Bandwidth::CallsApi.new -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: "api-username", - voice_basic_auth_password: "api-password" +call_body = Bandwidth::UpdateCall.new( + state: 'active', + redirect_url: '/goodbyeMessage' ) -voice_client = bandwidth_client.voice_client.client - -body = ModifyCallRequest.new -body.redirect_url = "/goodbyeMessage" -body.state = "active" -#remember to add auth for your application if needed! - -call_id = {CALL_ID} - begin - voice_client.modify_call(ACCOUNT_ID, call_id, body) -rescue APIException => e - puts e.response_code + calls_api_instance.update_call(ACCOUNT_ID, CALL_ID, call_body) +rescue Bandwidth::ApiError => e + p e.code end ``` @@ -356,13 +354,12 @@ end ```ruby #Note: This application is pseudocoded. Your implementation will look different -post '/goodbyeMessage' do: - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Thank you for holding! Goodbye!" - }) - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - return response.to_bxml() +post '/goodbyeMessage' do + speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Thank you for holding! Goodbye!') + response = Bandwidth::Bxml::Response.new([speak_sentence]) + + return response.to_bxml +end ``` diff --git a/site/docs/voice/outboundCallGuide.mdx b/site/docs/voice/outboundCallGuide.mdx index 68d27e52f..6a0561f3e 100644 --- a/site/docs/voice/outboundCallGuide.mdx +++ b/site/docs/voice/outboundCallGuide.mdx @@ -168,30 +168,27 @@ class Program ```ruby -require 'bandwidth' +require 'bandwidth-sdk' -include Bandwidth -include Bandwidth::Voice - -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: ENV['BW_USERNAME'], - voice_basic_auth_password: ENV['BW_PASSWORD'] -) +Bandwidth.configure do |config| + config.username = ENV.fetch('BW_USERNAME') + config.password = ENV.fetch('BW_PASSWORD') +end -voice_client = bandwidth_client.voice_client.client +calls_api_instance = Bandwidth::CallsApi.new -body = CreateCallRequest.new -body.from = ENV['BW_NUMBER'] -body.to = ENV['USER_NUMBER'] -body.answer_url = ENV['BASE_CALLBACK_URL'] + "/callbacks/answer" -body.application_id = ENV['BW_VOICE_APPLICATION_ID'] -#remember to add auth for your application if needed! +call_body = Bandwidth::CreateCall.new( + application_id: ENV.fetch('BW_VOICE_APPLICATION_ID'), + to: ENV.fetch('USER_NUMBER'), + from: ENV.fetch('BW_NUMBER'), + answer_url: "#{ENV.fetch('BASE_CALLBACK_URL')}/callbacks/answer", +) begin - result = voice_client.create_call(ENV['BW_ACCOUNT_ID'], body) - puts result.data.call_id -rescue APIException => e - puts e.response_code + result = calls_api_instance.create_call(ENV.fetch('BW_ACCOUNT_ID'), call_body) + p result.call_id +rescue Bandwidth::ApiError => e + p e.code end ``` diff --git a/site/docs/voice/recordingGuide.mdx b/site/docs/voice/recordingGuide.mdx index bc26515fa..b618323f3 100644 --- a/site/docs/voice/recordingGuide.mdx +++ b/site/docs/voice/recordingGuide.mdx @@ -145,31 +145,23 @@ public ActionResult thankYou() { ```ruby -@POST '/record_name' do: - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Please say your name." - }) - - record = Bandwidth::Voice::Record.new({ - :record_complete_url => "/nextBXML", - :max_duration => "10" - }) - - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - response.push(record) - - return response.to_bxml() - -@POST '/nextBXML' do: - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Thank you." - }) - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) +post '/record_name' do + speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Please say your name.') + record = Bandwidth::Bxml::Record.new({ + record_complete_url: '/nextBXML', + max_duration: 10 + }) + response = Bandwidth::Bxml::Response.new([speak_sentence, record]) + + return response.to_bxml +end - return response.to_bxml() +post '/nextBXML' do + speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Thank you.') + response = Bandwidth::Bxml::Response.new([speak_sentence]) + return response.to_bxml +end ``` @@ -401,36 +393,31 @@ public ActionResult record_call() { **Note: The endpoint headers are pseudocoded. Your implementation will look different -``` -@POST '/secret_agent_endpoint' do: - start_recording = Bandwidth::Voice::StartRecording.new({ - :recording_available_url => "https://myapp.test/noBXML" - }) - intro_tts = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Hello secret agent. What is your message?", - }) - pause1 = Bandwidth::Voice::Pause.new({ :duration => 10 }) - - pause_recording = Bandwidth::Voice::PauseRecording.new() - - passcode_tts = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Please say your secret passcode to send. Don't worry, the recording is paused!", - }) - pause2 = Bandwidth::Voice::Pause.new({ :duration => 5 }) - - resume_recording = Bandwidth::Voice::ResumeRecording.new() - - goodbye_tts = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Thank you agent. Good luck on your mission!", - }) - - stop_recording = Bandwidth::Voice::StopRecording.new() - - response = Bandwidth::Voice::Response.new() - response.push(start_recording, intro_tts, pause1, pause_recording, passcode_tts, - pause2, resume_recording, goodbye_tts, stop_recording) - - return response.to_bxml() +```ruby +post '/secret_agent_endpoint' do + start_recording = Bandwidth::Bxml::StartRecording.new({ recording_available_url: 'https://myapp.test/noBXML' }) + speak_sentence_intro = Bandwidth::Bxml::SpeakSentence.new('Hello secret agent. What is your message?') + pause_1 = Bandwidth::Bxml::Pause.new({ duration: 10 }) + pause_recording = Bandwidth::Bxml::PauseRecording.new + speak_sentence_passcode = Bandwidth::Bxml::SpeakSentence.new("Please say your secret passcode to send. Don't worry, the recording is paused!") + pause_2 = Bandwidth::Bxml::Pause.new({ duration: 5 }) + resume_recording = Bandwidth::Bxml::ResumeRecording.new() + speak_sentence_goodbye = Bandwidth::Bxml::SpeakSentence.new('Thank you agent. Good luck on your mission!') + stop_recording = Bandwidth::Bxml::StopRecording.new() + response = Bandwidth::Bxml::Response.new([ + start_recording, + speak_sentence_intro, + pause_1, + pause_recording, + speak_sentence_passcode, + pause_2, + resume_recording, + speak_sentence_goodbye, + stop_recording + ]) + + return response.to_bxml +end ``` @@ -646,23 +633,31 @@ class Program ```ruby -require 'bandwidth' +require 'bandwidth-sdk' -include Bandwidth -include Bandwidth::Voice +begin + BW_USERNAME = ENV.fetch('BW_USERNAME') + BW_PASSWORD = ENV.fetch('BW_PASSWORD') + BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') + CALL_ID = ENV.fetch('CALL_ID') + RECORDING_ID = ENV.fetch('RECORDING_ID') +rescue + p 'Please set the environmental variables defined in the README' + exit(-1) +end -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: {BW_USERNAME}, - voice_basic_auth_password: {BW_PASSWORD} -) +Bandwidth.configure do |config| + config.username = BW_USERNAME + config.password = BW_PASSWORD +end -voice_client = bandwidth_client.voice_client.client +recordings_api_instance = Bandwidth::RecordingsApi.new begin - response = voice_client.get_call_recording({ACCOUNT_ID}, {CALL_ID}, {RECORDING_ID}) - puts response.data.application_id -rescue APIException => e - puts e.response_code + response = calls_api_instance.get_call_recording(BW_ACCOUNT_ID, CALL_ID, RECORDING_ID) + p response.application_id +rescue Bandwidth::ApiError => e + p e.code end ``` @@ -861,27 +856,32 @@ static async Task Main(string[] args) { ```ruby -require 'bandwidth' +require 'bandwidth-sdk' -include Bandwidth -include Bandwidth::Voice +begin + BW_USERNAME = ENV.fetch('BW_USERNAME') + BW_PASSWORD = ENV.fetch('BW_PASSWORD') + BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') + CALL_ID = ENV.fetch('CALL_ID') + RECORDING_ID = ENV.fetch('RECORDING_ID') +rescue + p 'Please set the environmental variables defined in the README' + exit(-1) +end -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: {BW_USERNAME}, - voice_basic_auth_password: {BW_PASSWORD} -) +Bandwidth.configure do |config| + config.username = BW_USERNAME + config.password = BW_PASSWORD +end -voice_client = bandwidth_client.voice_client.client +recordings_api_instance = Bandwidth::RecordingsApi.new -body = TranscribeRecordingRequest.new -body.callback_url = "http://example.test/transcription" -#remember to add auth for your application if needed! +body = Bandwidth::TranscribeRecording.new(callback_url: 'http://example.test/transcription') begin - response = voice_client.create_transcribe_call_recording({ACCOUNT_ID}, {CALL_ID}, {RECORDING_ID}, body) - puts response.data.transcripts -rescue APIException => e - puts e.response_code + recordings_api_instance.transcribe_call_recording(BW_ACCOUNT_ID, CALL_ID, RECORDING_ID, body) +rescue Bandwidth::ApiError => e + p e.code end ``` @@ -1053,22 +1053,21 @@ public ActionResult alert() { **Note: The endpoint headers are pseudocoded. Your implementation will look different -``` -@POST '/incoming_calls' do: - - record = Bandwidth::Voice::Record.new({ - :transcribe => true, - :transcription_available_url => "/transcription_callback", - :max_duration => "10" - }) - - response = Bandwidth::Voice::Response.new() - response.push(record) - - return response.to_bxml() +```ruby +post '/incoming_calls' do + record = Bandwidth::Bxml::Record.new({ + transcribe: true, + transcription_available_url: '/transcription_callback', + max_duration: 10 + }) + response = Bandwidth::Bxml::Response.new([record]) + + return response.to_bxml +end -@POST '/transcription_callback' do: - puts "Oh! A transcription!".inspect +post '/transcription_callback' do + # handle transcription callback +end ``` @@ -1233,18 +1232,33 @@ static async Task Main(string[] args) ```ruby -bandwidth_client = Bandwidth::Client.new( - voice_basic_auth_user_name: {BW_USERNAME}, - voice_basic_auth_password: {BW_PASSWORD} -) +require 'bandwidth-sdk' -voice_client = bandwidth_client.voice_client.client +begin + BW_USERNAME = ENV.fetch('BW_USERNAME') + BW_PASSWORD = ENV.fetch('BW_PASSWORD') + BW_ACCOUNT_ID = ENV.fetch('BW_ACCOUNT_ID') + CALL_ID = ENV.fetch('CALL_ID') + RECORDING_ID = ENV.fetch('RECORDING_ID') +rescue + p 'Please set the environmental variables defined in the README' + exit(-1) +end + +Bandwidth.configure do |config| + config.username = BW_USERNAME + config.password = BW_PASSWORD +end + +recordings_api_instance = Bandwidth::RecordingsApi.new + +body = Bandwidth::TranscribeRecording.new(callback_url: 'http://example.test/transcription') begin - response = voice_client.get_call_transcription({ACCOUNT_ID}, {CALL_ID}, {RECORDING_ID}) - puts response.data.transcripts -rescue APIException => e - puts e.response_code + response = recordings_api_instance.get_call_transcription(BW_ACCOUNT_ID, CALL_ID, RECORDING_ID) + p response.transcripts +rescue Bandwidth::ApiError => e + p e.code end ``` diff --git a/site/docs/voice/transferGuide.mdx b/site/docs/voice/transferGuide.mdx index 2f1c442a8..92fa86f1a 100644 --- a/site/docs/voice/transferGuide.mdx +++ b/site/docs/voice/transferGuide.mdx @@ -88,18 +88,11 @@ Console.WriteLine(response.ToBXML()); ```ruby -phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+11234567892" -}) +phone_number = Bandwidth::Bxml::PhoneNumber.new('+11234567892') +transfer = Bandwidth::Bxml::Transfer.new([phone_number]) +response = Bandwidth::Bxml::Response.new([transfer]) -transfer = Bandwidth::Voice::Transfer.new({ - :phone_numbers => [phone_number] -}) - -response = Bandwidth::Voice::Response.new() -response.push(transfer) - -puts response.to_bxml() +p response.to_bxml ``` @@ -288,36 +281,21 @@ public ActionResult alert() { ```ruby -@POST '/incoming_calls' do: - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Thank you for calling Scrooge and Marley! Please hold while we connect you to an associate.", - }) - - phone_number = Bandwidth::Voice::PhoneNumber.new({ - :number => "+15555555554", - :transfer_answer_url => "/announcement" - }) - - transfer = Bandwidth::Voice::Transfer.new({ - :transfer_caller_id => "+15555555555", - :phone_numbers => [phone_number] - }) - - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - response.push(transfer) - - puts response.to_bxml() - return response.to_bxml() +post '/incoming_calls' do + speak_sentence = Bandwidth::Bxml::SpeakSentence.new('Thank you for calling Scrooge and Marley! Please hold while we connect you to an associate.') + phone_number = Bandwidth::Bxml::PhoneNumber.new('+15555555554', { transfer_answer_url: '/announcement' }) + transfer = Bandwidth::Bxml::Transfer.new([phone_number], { transfer_caller_id: '+15555555555' }) + response = Bandwidth::Bxml::Response.new([speak_sentence, transfer]) -@POST '/announcement' do: - speak_sentence = Bandwidth::Voice::SpeakSentence.new({ - :sentence => "Hey! There's a customer on the line." - }) - response = Bandwidth::Voice::Response.new() - response.push(speak_sentence) - puts response.to_bxml() - return response.to_bxml() + return response.to_bxml +end + +post '/announcement' do + speak_sentence = Bandwidth::Bxml::SpeakSentence.new("Hey! There's a customer on the line.") + response = Bandwidth::Bxml::Response.new([speak_sentence]) + + return response.to_bxml +end ``` diff --git a/site/docusaurus.config.js b/site/docusaurus.config.js index 081fba98c..d8eecd58e 100644 --- a/site/docusaurus.config.js +++ b/site/docusaurus.config.js @@ -40,6 +40,8 @@ const identitySpec = fs.readFileSync( const identityspecLink = ""; const insightsSpec = fs.readFileSync("./specs/insights.yml", "utf-8"); +const emergencyProvisioningSpec = fs.readFileSync("./specs/emergency.yml", "utf-8"); + module.exports = { title: "Bandwidth API Docs", tagline: "Learn About Bandwidth's Product APIs", @@ -200,6 +202,8 @@ module.exports = { identitySpecLink: `${customConfig.dashNotificationsSpecLink}`, insightsSpec: YAML.parse(insightsSpec), insightsSpecLink: `${customConfig.insightsSpecLink}`, + emergencyProvisioningSpec: YAML.parse(emergencyProvisioningSpec), + emergencyProvisioningSpecLink: `${customConfig.emergencyProvisioningSpecLink}`, blogPosts: blogPosts, diff --git a/site/lts.config.json b/site/lts.config.json index e48b216d2..69e773751 100644 --- a/site/lts.config.json +++ b/site/lts.config.json @@ -1,4 +1,5 @@ [ + "v2023.09.29", "v2023.09.15", "v2023.08.30", "v2023.08.15", @@ -9,6 +10,5 @@ "v2023.05.31", "v2023.05.12", "v2023.04.25", - "v2023.04.12", - "v2023.03.29" + "v2023.04.12" ] diff --git a/site/specs/emergency.yml b/site/specs/emergency.yml new file mode 100644 index 000000000..eca455ab5 --- /dev/null +++ b/site/specs/emergency.yml @@ -0,0 +1,2913 @@ +openapi: 3.0.3 +info: + title: Unified Emergency Services Provisioning API + version: 1.0.0 + termsOfService: https://www.bandwidth.com/legal/terms-of-use-bandwidthcom-web-sites/ + description: >- + The API specification for Bandwidth’s unified Emergency Services + provisioning API. + + + ## Base URL + + `https://dashboard.bandwidth.com/api/v2/accounts/{accountId}/emergency` + contact: + email: support@bandwidth.com + name: Bandwidth + url: https://support.bandwidth.com +servers: + - url: https://dashboard.bandwidth.com/api/v2/accounts/{accountId}/emergency +paths: + /endpoints: + get: + summary: List Endpoints + operationId: listAllEndpoints + description: List all emergency provisioned endpoints. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/addressIdQuery' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listEndpoints' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + post: + summary: Add Endpoints + operationId: addEndpoints + description: Provision new emergency endpoints. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/addEndpoints' + responses: + '202': + $ref: '#/components/responses/provisioningOrderAddEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Endpoints + operationId: updateEndpoints + description: Update endpoints. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/updateEndpoints' + responses: + '202': + $ref: '#/components/responses/provisioningOrderUpdateEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Endpoints + operationId: deleteEndpoints + description: Delete emergency endpoints. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/deleteEndpoints' + responses: + '202': + $ref: '#/components/responses/provisioningOrderDeleteEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /endpoints/{endpointId}: + get: + summary: Get Endpoint + operationId: getEndpoint + description: Get an endpoint. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/endpointId' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/getEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Endpoint + operationId: updateEndpoint + description: Get an endpoint. + tags: + - Endpoints + requestBody: + $ref: '#/components/requestBodies/updateEndpoint' + parameters: + - $ref: '#/components/parameters/endpointId' + - $ref: '#/components/parameters/region' + responses: + '202': + $ref: '#/components/responses/provisioningOrderUpdateEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Endpoint + operationId: deleteEndpoint + description: Delete an endpoint. + tags: + - Endpoints + parameters: + - $ref: '#/components/parameters/endpointId' + - $ref: '#/components/parameters/region' + responses: + '202': + $ref: '#/components/responses/provisioningOrderDeleteEndpoint' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /addresses: + get: + summary: List Addresses + operationId: listAddresses + description: List all emergency addresses. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listAddresses' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + post: + summary: Add Address + operationId: addAddress + description: Provision emergency addresses. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/addAddress' + responses: + '201': + $ref: '#/components/responses/addAddressResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /addresses/{addressId}: + get: + summary: Get Address + operationId: getAddress + description: Get an emergency address. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/addressId' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/getAddress' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Address + operationId: updateAddress + description: Update an emergency address. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/addressId' + - $ref: '#/components/parameters/region' + requestBody: + $ref: '#/components/requestBodies/updateAddress' + responses: + '200': + $ref: '#/components/responses/updateAddress' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Address + operationId: deleteAddress + description: Delete an emergency address. + tags: + - Addresses + parameters: + - $ref: '#/components/parameters/addressId' + - $ref: '#/components/parameters/region' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /notifications: + get: + summary: List Notifications + operationId: listNotifications + description: List all emergency notifications. + tags: + - Notifications + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + $ref: '#/components/responses/listNotifications' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + post: + summary: Add Notification + operationId: addNotification + description: Add emergency notification. + tags: + - Notifications + requestBody: + $ref: '#/components/requestBodies/addNotification' + responses: + '201': + $ref: '#/components/responses/addNotification' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /notifications/{notificationId}: + get: + summary: Get Notification + operationId: getNotification + description: Get an emergency notification. + tags: + - Notifications + parameters: + - $ref: '#/components/parameters/notificationId' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + $ref: '#/components/responses/getNotification' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Notification + operationId: updateNotification + description: Update an emergency notification. + tags: + - Notifications + parameters: + - $ref: '#/components/parameters/notificationId' + requestBody: + $ref: '#/components/requestBodies/updateNotification' + responses: + '200': + $ref: '#/components/responses/updateNotification' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Notification + operationId: deleteNotification + description: Delete an emergency notification. + tags: + - Notifications + parameters: + - $ref: '#/components/parameters/notificationId' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /notificationGroups: + get: + summary: List Notification Groups + operationId: listNotificationsGroups + description: List emergency notification groups. + tags: + - Notification Groups + parameters: + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + responses: + '200': + $ref: '#/components/responses/listNotificationGroups' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + post: + summary: Add Notification Group + operationId: addNotificationGroup + description: Add emergency notification group. + tags: + - Notification Groups + requestBody: + $ref: '#/components/requestBodies/addNotificationGroup' + responses: + '201': + $ref: '#/components/responses/addNotificationGroup' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /notificationGroups/{groupId}: + get: + summary: Get Notification Group + operationId: getNotificationGroup + description: Get emergency notification group. + tags: + - Notification Groups + parameters: + - $ref: '#/components/parameters/groupId' + responses: + '200': + $ref: '#/components/responses/getNotificationGroup' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + patch: + summary: Update Notification Group + operationId: updateNotificationGroup + description: Update emergency notification group. + tags: + - Notification Groups + parameters: + - $ref: '#/components/parameters/groupId' + requestBody: + $ref: '#/components/requestBodies/updateNotificationGroup' + responses: + '200': + $ref: '#/components/responses/updateNotificationGroup' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + delete: + summary: Delete Notification Group + operationId: deleteNotificationGroup + description: Delete emergency notification group. + tags: + - Notification Groups + parameters: + - $ref: '#/components/parameters/groupId' + responses: + '204': + $ref: '#/components/responses/noContentResponse' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /orders: + get: + summary: List Orders + operationId: listOrders + description: List all emergency orders. + tags: + - Orders + parameters: + - $ref: '#/components/parameters/orderType' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listOrders' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /orders/{orderId}/details: + get: + summary: Get Order Details + operationId: getOrderDetails + description: Get emergency order details. + tags: + - Orders + parameters: + - $ref: '#/components/parameters/orderId' + - $ref: '#/components/parameters/limit' + - $ref: '#/components/parameters/offset' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listOrderDetails' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' + /orders/{orderId}/history: + get: + summary: Get Order History + operationId: getOrderHistory + description: Get emergency order History. + tags: + - Orders + parameters: + - $ref: '#/components/parameters/orderId' + - $ref: '#/components/parameters/region' + responses: + '200': + $ref: '#/components/responses/listOrderHistory' + '400': + $ref: '#/components/responses/badRequestError' + '401': + $ref: '#/components/responses/unauthorizedError' + '403': + $ref: '#/components/responses/forbiddenError' + '404': + $ref: '#/components/responses/notFoundError' + '405': + $ref: '#/components/responses/notAllowedError' + '429': + $ref: '#/components/responses/tooManyRequestsError' + '500': + $ref: '#/components/responses/internalServerError' +components: + schemas: + addEndpoints: + title: Add Endpoints + description: Add Endpoints. + type: object + properties: + endpoints: + type: array + items: + type: object + properties: + id: + type: string + example: home + phoneNumber: + type: string + example: '+16175551212' + pattern: >- + ^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$ + name: + type: string + example: Bob + lang: + type: string + example: en + country: + type: string + example: US + addressId: + type: string + example: '7888993' + updateEndpoints: + title: Update Endpoints + description: Update Endpoints. + type: object + properties: + action: + $ref: '#/components/schemas/updateAction' + endpoints: + type: array + items: + type: object + properties: + id: + type: string + example: '1606772208758' + pattern: ^\S*$ + addressId: + type: string + example: '7888993' + pattern: ^\S*$ + deleteEndpoints: + title: Delete Endpoints + description: Delete Endpoints. + type: object + properties: + endpointIds: + type: array + items: + type: string + example: + - '1606772208758' + updateEndpoint: + title: Update Endpoint + description: Update Endpoint. + type: object + properties: + action: + $ref: '#/components/schemas/updateAction' + addressId: + type: string + example: '7888993' + addAddressRequest: + title: Add Address Request + description: Add Address Request. + type: object + properties: + id: + type: string + example: home_office + pattern: ^\S*$ + description: + type: string + example: Home office, downstairs + addressLine1: + type: string + example: 14111 NE 145th St + addressLine2: + type: string + example: Apt. 8 + city: + type: string + example: Woodinville + state: + type: string + example: WA + postalCode: + type: string + example: '98072' + country: + type: string + example: US + customerType: + $ref: '#/components/schemas/customerType' + service: + $ref: '#/components/schemas/service' + district: + type: string + example: '' + companyName: + type: string + example: '' + firstName: + type: string + example: '' + lastName: + type: string + example: '' + floor: + type: string + example: '' + title: + type: string + example: '' + county: + type: string + example: '' + std: + type: string + example: '' + description: Subscriber Trunk Dialing + buildingName: + type: string + example: '' + houseNumberLetter: + type: string + example: '' + telephoneBook: + type: string + example: '' + contactFirstName: + type: string + example: '' + contactLastName: + type: string + example: '' + contactPhoneNumber: + type: string + example: '' + province: + type: string + example: '' + buildingLocation: + type: string + example: '' + buildingType: + type: string + example: '' + flatNumber: + type: string + example: '' + flatNumberLetter: + type: string + example: '' + floorLetter: + type: string + example: '' + floorType: + type: string + example: '' + secondaryHouseNumber: + type: string + example: '' + secondaryHouseNumberLetter: + type: string + example: '' + secondaryStreetType: + type: string + example: '' + secondFlatNumber: + type: string + example: '' + secondFlatNumberLetter: + type: string + example: '' + streetSuffix: + type: string + example: '' + streetType: + type: string + example: '' + addressSupplement: + type: string + example: '' + birthDate: + type: string + example: '' + birthPlace: + type: string + example: '' + block: + type: string + example: '' + commune: + type: string + example: '' + description: Community name using local name/spelling + companyLegalName: + type: string + example: '' + companyNameAddition: + type: string + example: '' + companyNumber: + type: string + example: '' + companyType: + type: string + example: '' + contactLanguage: + type: string + example: '' + documentNumber: + type: string + example: '' + door: + type: string + example: '' + email: + type: string + example: '' + entrance: + type: string + example: '' + foreignCity: + type: string + example: '' + foreignCountry: + type: string + example: '' + foreignStreet: + type: string + example: '' + houseNumberAddition: + type: string + example: '' + idNumber: + type: string + example: '' + idType: + type: string + example: '' + inseeCode: + type: string + example: '' + description: >- + is a numerical indexing code used by the French National Institute + for Statistics and Economic Studies + language: + type: string + example: '' + latitude: + type: string + example: '' + listingLanguage: + type: string + example: '' + longitude: + type: string + example: '' + middleName: + type: string + example: '' + municipality: + type: string + example: '' + municipalityCode: + type: string + example: '' + naceCode: + type: string + example: '' + description: Standard European nomenclature of productive economic activities + officialMunicipalityKey: + type: string + example: '' + poBox: + type: string + example: '' + postalDesignation: + type: string + example: '' + prepaidPhonecard: + type: boolean + example: false + description: Is the TN for a a prepaid phonecard? + profession: + type: string + example: '' + ruianAddressCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianBuildingCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianRegionCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianResidenceUnitCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianStreetCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianTownCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + secondLastName: + type: string + example: '' + siretNumber: + type: string + example: '' + description: >- + a 14-digit identifier that includes the SIREN number and an + additional five-digit number that represents the specific location + or establishment of the business + socialSecurityNumber: + type: string + example: '' + streetCode: + type: string + example: '' + taxNumber: + type: string + example: '' + taxOffice: + type: string + example: '' + tranditionalName: + type: string + example: '' + vatNumber: + type: string + example: '' + description: Value Added Tax ID Number + friendlyName: + type: string + example: '' + updateAddressRequest: + title: Update Address Request + description: Update Address Request. + type: object + properties: + addressLine1: + type: string + example: 14024 NE 181st St + description: + type: string + example: Home office, upstairs + notificationsRequest: + title: notifications Request + description: notifications Request. + type: object + properties: + id: + type: string + example: Notification1 + pattern: ^\S*$ + type: + $ref: '#/components/schemas/notificationType' + recipient: + type: string + example: test1@bandwidth.com + password: + type: string + example: '' + username: + type: string + example: '' + updateNotification: + title: notifications Request + description: notifications Request. + type: object + properties: + type: + $ref: '#/components/schemas/notificationType' + recipient: + type: string + example: test1@bandwidth.com + password: + type: string + example: '' + username: + type: string + example: '' + notificationGroupRequest: + title: Notification Groups Request + description: Notification Groups Request. + type: object + properties: + id: + type: string + example: NotificationGroup1 + pattern: ^\S*$ + description: + type: string + example: Notification Group 1 + endpoints: + type: array + items: + type: string + example: + - '48658456485' + notifications: + type: array + items: + type: string + example: + - '85485345848' + updateNotificationGroup: + title: Notification Groups Update Request + description: Notification Groups Update Request. + type: object + properties: + description: + type: string + example: Update Group No. 1 + notificationIdsToAdd: + type: array + items: + type: string + example: + - '85485345848' + notificationIdsToDelete: + type: array + items: + type: string + example: + - '85485342348' + provisioningOrderAddEndpoint: + title: Provisioning Order + description: Provisioning Order. + type: object + properties: + orderId: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86835c534aad + updatedBy: + type: string + example: joe@crabshack.com + orderType: + $ref: '#/components/schemas/orderTypeAdd' + orderStatus: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + minimum: 0 + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + provisioningOrderDeleteEndpoint: + title: Provisioning Order + description: Provisioning Order. + type: object + properties: + orderId: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86835c534aad + updatedBy: + type: string + example: joe@crabshack.com + orderType: + $ref: '#/components/schemas/orderTypeDelete' + orderStatus: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + minimum: 0 + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + provisioningOrderUpdateEndpoint: + title: Provisioning Order + description: Provisioning Order. + type: object + properties: + orderId: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86835c534aad + updatedBy: + type: string + example: joe@crabshack.com + orderType: + $ref: '#/components/schemas/orderTypeUpdate' + orderStatus: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + minimum: 0 + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + listEndpoints: + title: List Endpoints + description: List Endpoints. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + endpoints: + type: array + items: + type: object + properties: + id: + type: string + example: Joe's_Home_tn + accountId: + type: string + example: '5001232' + phoneNumber: + type: string + example: '+13035554321' + pattern: >- + ^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$ + name: + type: string + example: Joe's Home + lang: + type: string + example: fr + created: + type: string + example: '2016-06-22T16:33:21.959Z' + format: date-time + updated: + type: string + example: '2016-06-22T16:33:21.959Z' + format: date-time + country: + type: string + example: US + addressId: + type: string + example: '7888993' + endpointResponse: + title: Get Endpoint + description: Get an endpoint. + type: object + properties: + id: + type: string + example: '283746343284623684' + accountId: + type: string + example: '5001232' + phoneNumber: + type: string + example: '+13035554321' + pattern: ^(\+\d{1,2}\s?)?1?\-?\.?\s?\(?\d{3}\)?[\s.-]?\d{3}[\s.-]?\d{4}$ + name: + type: string + example: Joe's Home + lang: + type: string + example: fr + created: + type: string + example: '2016-06-22T16:33:21.959Z' + format: date-time + updated: + type: string + example: '2016-06-22T16:33:21.959Z' + format: date-time + country: + type: string + example: US + addressId: + type: string + example: '7888993' + listAddresses: + title: List Addresses + description: List Addresses. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + example: + - href: /relative/uri + rel: RelatedResource + method: GET + addresses: + type: array + items: + type: object + properties: + id: + type: string + example: '7888993' + pattern: ^\S*$ + validationStatus: + $ref: '#/components/schemas/validationStatus' + address: + type: string + example: 4916 NE 145th St + houseNumber: + type: string + example: '14111' + predirectional: + type: string + example: NE + postdirectional: + type: string + example: '' + streetName: + type: string + example: 145th + streetSuffix: + type: string + example: ST + city: + type: string + example: Woodinville + state: + type: string + example: WA + postalCode: + type: string + example: '98072' + country: + type: string + example: US + description: + type: string + example: Home office, downstairs + latitude: + type: number + example: 47.732682 + longitude: + type: number + example: -122.155174 + created: + type: string + format: date-time + example: '2015-03-11T04:09:25.399Z' + updated: + type: string + format: date-time + example: '2016-03-11T04:09:25.399Z' + addressResponse: + title: Address Response + description: Address Response. + type: object + properties: + id: + type: string + example: homeoffice + pattern: ^\S*$ + description: Unique identifier for an address + validationStatus: + $ref: '#/components/schemas/validationStatus' + address: + type: string + example: 14024 NE 181st St + description: The full address + houseNumber: + type: string + example: '14024' + predirectional: + type: string + example: NE + description: >- + A word preceding the street name that indicates the directional + taken by the thoroughfare + postdirectional: + type: string + example: '' + description: >- + A word following the street name that indicates the directional + taken by the thoroughfare from an arbitrary strating point, or the + sector where it is located + streetName: + type: string + example: 181st + streetSuffix: + type: string + example: ST + city: + type: string + example: Woodinville + state: + type: string + example: WA + postalCode: + type: string + example: '98072' + country: + type: string + example: US + description: + type: string + example: Home office, upstairs + latitude: + type: number + example: 47.732682 + longitude: + type: number + example: -122.155174 + created: + type: string + format: date-time + example: '2015-03-11T04:09:25.399Z' + description: when was created + updated: + type: string + format: date-time + example: '2016-03-11T04:09:25.399Z' + description: when was updated last + customerType: + $ref: '#/components/schemas/customerType' + service: + $ref: '#/components/schemas/service' + district: + type: string + example: '' + companyName: + type: string + example: '' + firstName: + type: string + example: '' + lastName: + type: string + example: '' + floor: + type: string + example: '' + title: + type: string + example: '' + county: + type: string + example: '' + std: + type: string + example: '' + description: Subscriber Trunk Dialing + buildingName: + type: string + example: '' + houseNumberLetter: + type: string + example: '' + telephoneBook: + type: string + example: '' + contactFirstName: + type: string + example: '' + contactLastName: + type: string + example: '' + contactPhoneNumber: + type: string + example: '' + province: + type: string + example: '' + buildingLocation: + type: string + example: '' + buildingType: + type: string + example: '' + flatNumber: + type: string + example: '' + flatNumberLetter: + type: string + example: '' + floorLetter: + type: string + example: '' + floorType: + type: string + example: '' + secondaryHouseNumber: + type: string + example: '' + secondaryHouseNumberLetter: + type: string + example: '' + secondaryStreetType: + type: string + example: '' + secondFlatNumber: + type: string + example: '' + secondFlatNumberLetter: + type: string + example: '' + streetType: + type: string + example: '' + addressSupplement: + type: string + example: '' + birthDate: + type: string + example: '' + birthPlace: + type: string + example: '' + block: + type: string + example: '' + commune: + type: string + example: '' + description: Community name using local name/spelling + companyLegalName: + type: string + example: '' + companyNameAddition: + type: string + example: '' + companyNumber: + type: string + example: '' + companyType: + type: string + example: '' + contactLanguage: + type: string + example: '' + documentNumber: + type: string + example: '' + door: + type: string + example: '' + email: + type: string + example: '' + entrance: + type: string + example: '' + foreignCity: + type: string + example: '' + foreignCountry: + type: string + example: '' + foreignStreet: + type: string + example: '' + houseNumberAddition: + type: string + example: '' + idNumber: + type: string + example: '' + idType: + type: string + example: '' + inseeCode: + type: string + example: '' + description: >- + is a numerical indexing code used by the French National Institute + for Statistics and Economic Studies + language: + type: string + example: '' + listingLanguage: + type: string + example: '' + middleName: + type: string + example: '' + municipality: + type: string + example: '' + municipalityCode: + type: string + example: '' + naceCode: + type: string + example: '' + description: Standard European nomenclature of productive economic activities + officialMunicipalityKey: + type: string + example: '' + poBox: + type: string + example: '' + postalDesignation: + type: string + example: '' + prepaidPhonecard: + type: boolean + example: false + description: Is the TN for a a prepaid phonecard? + profession: + type: string + example: '' + ruianAddressCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianBuildingCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianRegionCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianResidenceUnitCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianStreetCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + ruianTownCode: + type: string + example: '' + description: RUIAN address format for Czech Republic + secondLastName: + type: string + example: '' + siretNumber: + type: string + example: '' + description: >- + a 14-digit identifier that includes the SIREN number and an + additional five-digit number that represents the specific location + or establishment of the business + socialSecurityNumber: + type: string + example: '' + streetCode: + type: string + example: '' + taxNumber: + type: string + example: '' + taxOffice: + type: string + example: '' + tranditionalName: + type: string + example: '' + vatNumber: + type: string + example: '' + description: Value Added Tax ID Number + friendlyName: + type: string + example: '' + uicBillingNumber: + type: string + example: '' + listNotifications: + title: List Notifications + description: List Notifications. + type: object + properties: + notifications: + type: array + items: + type: object + properties: + id: + type: string + example: '134314' + pattern: ^\S*$ + accountId: + type: string + example: '6454565654' + activated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + created: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + description: + type: string + example: Notification 1 + groupCount: + type: integer + minimum: 0 + example: 1 + username: + type: string + example: joejoe + recipient: + type: string + example: joe@c.com + type: + $ref: '#/components/schemas/notificationType' + updated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + updatedBy: + type: string + example: joe22 + notificationResponse: + title: Notification Response + description: Notification Response. + type: object + properties: + id: + type: string + example: '343434' + pattern: ^\S*$ + accountId: + type: string + example: '4545454' + activated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + created: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + description: + type: string + example: Notification 2 + username: + type: string + example: '' + recipient: + type: string + example: joe@f.com + type: + $ref: '#/components/schemas/notificationType' + updated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + updatedBy: + type: string + example: username 1 + getNotification: + title: Get Notification + description: Get Notification. + type: object + properties: + id: + type: string + example: '343434' + pattern: ^\S*$ + accountId: + type: string + example: '566565' + activated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + created: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + description: + type: string + example: Notification 3 + username: + type: string + example: d + recipient: + type: string + example: recipient@email.com + type: + $ref: '#/components/schemas/notificationType' + updated: + type: string + format: date-time + example: '2023-01-22T08:15:20.814Z' + updatedBy: + type: string + example: joe33 + listNotificationGroups: + title: Get Notification Groups + description: Get Notification Groups. + type: object + properties: + notificationGroups: + type: array + items: + type: object + properties: + id: + type: string + example: '4334343' + pattern: ^\S*$ + accountId: + type: string + example: '34343434' + created: + type: string + format: date-time + example: '2023-01-22T09:33:36.208Z' + description: + type: string + example: Notification Group 1 + endpointCount: + type: integer + minimum: 0 + example: 0 + endpointIds: + type: array + items: + type: string + example: + - '793629347' + - '793629324' + notificationIds: + type: array + items: + type: string + example: + - '34343434' + updated: + type: string + format: date-time + example: '2023-01-22T09:33:36.208Z' + updatedBy: + type: string + example: Joe + notificationGroups: + title: Notification Group + description: Notification Group. + type: object + properties: + id: + type: string + example: '343434' + pattern: ^\S*$ + accountId: + type: string + example: '3434343' + created: + type: string + format: date-time + example: '2023-01-22T10:12:17.506Z' + description: + type: string + example: Notification Group 3 + endpointCount: + type: integer + example: 1 + endpointIds: + type: array + items: + type: string + example: + - '2243432443' + notificationIds: + type: array + items: + type: string + example: + - '2243432443' + updated: + type: string + format: date-time + example: '2023-01-22T10:12:17.506Z' + updatedBy: + type: string + example: JJ + listOrders: + title: Get Orders + description: Get Orders. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + orders: + type: array + items: + type: object + properties: + id: + type: string + format: uuid + example: 123e4567-e89b-12d3-a456-426614174003 + pattern: ^\S*$ + type: + $ref: '#/components/schemas/orderTypeAdd' + status: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + minimum: 0 + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + listOrderDetails: + title: List Order Details + description: List Order Details. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + id: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86835c534aad + pattern: ^\S*$ + type: + $ref: '#/components/schemas/orderTypeAdd' + status: + $ref: '#/components/schemas/orderStatus' + acceptedCount: + type: integer + minimum: 0 + example: 1 + invalidCount: + type: integer + example: 0 + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + totalNumber: + type: integer + minimum: 0 + example: 1 + endpoints: + type: array + items: + type: object + properties: + id: + type: string + example: '4525324234324' + pattern: ^\S*$ + updatedBy: + type: string + example: JJ + status: + $ref: '#/components/schemas/endpointStatus' + error: + type: string + example: A reason + errorCode: + type: string + example: XXX + listOrderHistory: + title: List Order History + description: List Order History. + type: object + properties: + links: + type: array + items: + $ref: '#/components/schemas/links' + nullable: true + id: + type: string + format: uuid + example: 08e0be9a-52fd-45a0-be2e-86845c534aad + pattern: ^\S*$ + type: + $ref: '#/components/schemas/orderTypeUpdate' + status: + $ref: '#/components/schemas/orderStatus' + created: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + orderHistory: + type: array + items: + type: object + properties: + status: + $ref: '#/components/schemas/orderStatus' + updated: + type: string + format: date-time + example: '2022-05-18T08:57:04Z' + updatedBy: + type: string + example: JJ + note: + type: string + example: message + genericError: + title: Generic Error + type: object + properties: + errors: + type: array + items: + $ref: '#/components/schemas/error' + nullable: true + required: + - errors + links: + title: Links + type: object + properties: + href: + type: string + description: URI of the link. + example: /relative/uri + rel: + type: string + description: Specifies the relationship between this link and the resource. + example: RelatedResource + method: + type: string + description: HTTP method to be used. + example: GET + error: + title: Error + type: object + properties: + id: + type: string + description: A unique identifier for this particular instance of this problem. + example: optional-error-id + pattern: ^\S*$ + type: + type: string + description: >- + A short, human-readable summary of the problem that SHOULD NOT + change from occurrence to occurrence of the problem. + example: REQUEST_ERROR + description: + type: string + description: >- + A human-readable explanation that SHOULD be specific to this + occurrence of the problem. + example: There was an issue with a field in your request body + code: + type: integer + format: int32 + description: >- + An application-specific error code for services with extensive error + scenarios to supplement `description`. + minimum: 4 + example: 51130 + source: + $ref: '#/components/schemas/errorSource' + meta: + $ref: '#/components/schemas/errorMeta' + required: + - description + errorSource: + title: Error Source + type: object + properties: + parameter: + type: string + description: A string indicating which URI query parameter caused the error. + example: someParameter + field: + type: string + description: A string indicating which request body field caused the error. + example: someField + header: + type: string + description: A string indicating which header field caused the error. + example: someHeader + reference: + type: string + description: >- + A string that references a resource ID or path to the resource (or + non-existent resource) causing the error. + example: /some/reference + errorMeta: + title: Error Meta + type: object + properties: + message: + type: string + example: An optional metadata field + service: + type: string + enum: + - ES + - DS + - ESDS + example: ES + description: Emergency services, directory services, or both + customerType: + type: string + enum: + - RES + - BUS + example: BUS + description: Residential or Business + updateAction: + type: string + enum: + - PROVISION + - UNPROVISION + example: PROVISION + notificationType: + type: string + enum: + - HTTP + - SMS + - EMAIL + - VOICE + example: EMAIL + orderTypeAdd: + type: string + enum: + - ADD_ENDPOINTS + - UPDATE_ENDPOINTS + - DELETE_ENDPOINTS + example: ADD_ENDPOINTS + orderTypeUpdate: + type: string + enum: + - ADD_ENDPOINTS + - UPDATE_ENDPOINTS + - DELETE_ENDPOINTS + example: UPDATE_ENDPOINTS + orderTypeDelete: + type: string + enum: + - ADD_ENDPOINTS + - UPDATE_ENDPOINTS + - DELETE_ENDPOINTS + example: DELETE_ENDPOINTS + orderStatus: + type: string + enum: + - RECEIVED + - PROCESSING + - COMPLETED + - PARTIAL + - FAILED + example: COMPLETED + validationStatus: + type: string + enum: + - VALID + - INVALID + - UNVALIDATED + example: INVALID + description: Address is valid and represents a location + endpointStatus: + type: string + enum: + - INPROGRESS + - SUCCESS + - ERROR + example: INPROGRESS + region: + type: string + enum: + - NA + - ROW + example: NA + requestBodies: + addEndpoints: + content: + application/json: + schema: + $ref: '#/components/schemas/addEndpoints' + description: Provision new endpoints and link them to an address using address id. + updateEndpoints: + content: + application/json: + schema: + $ref: '#/components/schemas/updateEndpoints' + description: >- + Update endpoints context, associate (PROVISION) or dissociate + (UNPROVISION) address using an address id. + updateEndpoint: + content: + application/json: + schema: + $ref: '#/components/schemas/updateEndpoint' + description: >- + Update endpoint context, associate (PROVISION) or dissociate + (UNPROVISION) address using an address id. + deleteEndpoints: + content: + application/json: + schema: + $ref: '#/components/schemas/deleteEndpoints' + description: Delete endpoints. + addAddress: + content: + application/json: + schema: + $ref: '#/components/schemas/addAddressRequest' + examples: + usaAddAddressRequest: + $ref: '#/components/examples/usaAddAddressRequest' + gbrAddAddressRequest: + $ref: '#/components/examples/gbrAddAddressRequest' + description: Add addresses, pick an id or leave id out to autogenerate one. + updateAddress: + content: + application/json: + schema: + $ref: '#/components/schemas/updateAddressRequest' + addNotification: + content: + application/json: + schema: + $ref: '#/components/schemas/notificationsRequest' + updateNotification: + content: + application/json: + schema: + $ref: '#/components/schemas/updateNotification' + addNotificationGroup: + content: + application/json: + schema: + $ref: '#/components/schemas/notificationGroupRequest' + updateNotificationGroup: + content: + application/json: + schema: + $ref: '#/components/schemas/updateNotificationGroup' + responses: + provisioningOrderAddEndpoint: + description: Accepted. + content: + application/json: + schema: + $ref: '#/components/schemas/provisioningOrderAddEndpoint' + provisioningOrderUpdateEndpoint: + description: Accepted. + content: + application/json: + schema: + $ref: '#/components/schemas/provisioningOrderUpdateEndpoint' + provisioningOrderDeleteEndpoint: + description: Accepted. + content: + application/json: + schema: + $ref: '#/components/schemas/provisioningOrderDeleteEndpoint' + listEndpoints: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listEndpoints' + examples: + listEndpoints: + $ref: '#/components/examples/listEndpoints' + getEndpoint: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/endpointResponse' + listAddresses: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listAddresses' + examples: + listAddresses: + $ref: '#/components/examples/listAddresses' + addAddressResponse: + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/addressResponse' + examples: + usaAddressResponse: + $ref: '#/components/examples/usaAddressResponse' + gbrAddressResponse: + $ref: '#/components/examples/gbrAddressResponse' + getAddress: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/addressResponse' + examples: + usaAddressResponse: + $ref: '#/components/examples/usaAddressResponse' + gbrAddressResponse: + $ref: '#/components/examples/gbrAddressResponse' + noContentResponse: + description: No Content. + updateAddress: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/addressResponse' + examples: + usaAddressResponse: + $ref: '#/components/examples/usaAddressResponse' + gbrAddressResponse: + $ref: '#/components/examples/gbrAddressResponse' + listNotifications: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listNotifications' + addNotification: + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationResponse' + getNotification: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/getNotification' + updateNotification: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationResponse' + listNotificationGroups: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listNotificationGroups' + getNotificationGroup: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationGroups' + addNotificationGroup: + description: Created. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationGroups' + updateNotificationGroup: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/notificationGroups' + listOrders: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listOrders' + examples: + listOrders: + $ref: '#/components/examples/listOrders' + listOrderDetails: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listOrderDetails' + examples: + listOrderDetails: + $ref: '#/components/examples/listOrderDetails' + listOrderHistory: + description: OK. + content: + application/json: + schema: + $ref: '#/components/schemas/listOrderHistory' + examples: + listOrderHistory: + $ref: '#/components/examples/listOrderHistory' + badRequestError: + description: Bad Request. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + badRequestErrorExample: + $ref: '#/components/examples/badRequestErrorExample' + notFoundError: + description: Not Found. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + notFoundErrorExample: + $ref: '#/components/examples/notFoundErrorExample' + notAllowedError: + description: Method Not Allowed. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + notAllowedErrorExample: + $ref: '#/components/examples/notAllowedErrorExample' + tooManyRequestsError: + description: Too Many Requests. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + tooManyRequestsErrorExample: + $ref: '#/components/examples/tooManyRequestsErrorExample' + internalServerError: + description: Internal Server Error. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + internalServerErrorExample: + $ref: '#/components/examples/internalServerErrorExample' + forbiddenError: + description: Forbidden. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + forbiddenErrorExample: + $ref: '#/components/examples/forbiddenErrorExample' + unauthorizedError: + description: Unauthorized. + content: + application/json: + schema: + $ref: '#/components/schemas/genericError' + examples: + unauthorizedErrorExample: + $ref: '#/components/examples/unauthorizedErrorExample' + parameters: + endpointId: + name: endpointId + in: path + required: true + schema: + type: string + description: String that identifies an endpoint. + addressIdQuery: + name: addressId + in: query + required: false + schema: + type: string + description: Unique ID for an address. + limit: + name: limit + in: query + required: false + schema: + type: string + description: Limit the number of returned record. + orderId: + name: orderId + in: path + required: true + schema: + type: string + description: UUID for orders. + notificationId: + name: notificationId + in: path + required: true + schema: + type: string + description: Unique emergency notification ID. + groupId: + name: groupId + in: path + required: true + schema: + type: integer + description: Unique emergency notification group ID. + orderType: + name: orderType + in: query + required: false + schema: + $ref: '#/components/schemas/orderTypeAdd' + description: Emergency order type filter. + addressId: + name: addressId + in: path + required: true + schema: + type: string + description: Address Id. + offset: + name: offset + in: query + description: Position in the dataset of a particular record to start the response. + schema: + type: integer + example: 100 + region: + name: region + in: query + required: false + schema: + $ref: '#/components/schemas/region' + description: List resources filtered by region + examples: + listEndpoints: + summary: Get Endpoints + value: + links: + - href: /endpoints + rel: self + method: GET + - href: /endpoints + rel: first + method: GET + - href: /endpoints?offset=99000&limit=1000 + rel: last + method: GET + - href: '' + rel: prev + method: GET + - href: /endpoints?offset=1000&limit=1000 + rel: next + method: GET + endpoints: + - id: '82734632846238746' + accountId: '5001232' + phoneNumber: '+13035554321' + name: Joe's Home + lang: fr + created: '2016-06-22T16:33:21.959Z' + updated: '2016-06-22T16:33:21.959Z' + country: US + addressId: '7888993' + - id: JDF9223kslemm23432 + accountId: '5001232' + phoneNumber: '+13035554322' + name: Joe's Office + lang: en + created: '2015-03-11T04:09:25.399Z' + updated: '2016-06-22T16:33:27.980Z' + country: US + addressId: cafoffice + listAddresses: + summary: List Addresses + value: + links: + - href: /addresses + rel: self + method: GET + - href: /addresses + rel: first + method: GET + - href: /addresses?offset=99000&limit=1000 + rel: last + method: GET + - href: '' + rel: prev + method: GET + - href: /addresses?offset=1000&limit=1000 + rel: next + method: GET + addresses: + - id: '7888993' + validationStatus: VALID + address: 4916 NE 145th St + houseNumber: '4916' + predirectional: NE + postdirectional: '' + streetName: 145th + streetSuffix: ST + city: Woodinville + state: WA + postalCode: '98072' + country: US + description: Home office, downstairs + latitude: 47.732682 + longitude: -122.155174 + created: '2015-03-11T04:09:25.399Z' + updated: '2016-06-22T16:33:27.980Z' + - id: cafoffice + validationStatus: INVALID + address: 4916 S Angeline St + houseNumber: '4916' + predirectional: S + postdirectional: '' + streetName: Angeline + streetSuffix: ST + city: Seattle + state: WA + postalCode: '98118' + country: US + description: Office by cafeteria + latitude: 47.560154 + longitude: -122.271105 + created: '2015-03-11T04:09:28.819Z' + updated: '2016-06-22T16:33:27.980Z' + usaAddAddressRequest: + summary: Add a US Address + value: + id: home_office + description: Home office, downstairs + addressLine1: 14111 NE 145th St + addressLine2: Apt. 8 + city: Woodinville + state: WA + postalCode: '98072' + country: US + gbrAddAddressRequest: + summary: Add a GBR Address + value: + id: london_office + friendlyName: London office + companyName: Jones + service: ES + customerType: BUS + addressLine1: 102-104 Albert Street + city: London + postalCode: NW1 7NE + country: BGR + usaAddressResponse: + summary: USA Address Response + value: + id: homeoffice + validationStatus: INVALID + address: 14024 NE 181st St + houseNumber: '14024' + predirectional: NE + postdirectional: '' + streetName: 181st + streetSuffix: ST + city: Woodinville + state: WA + postalCode: '98072' + country: US + description: Home office, upstairs + latitude: 47.732682 + longitude: -122.155174 + created: '2015-03-11T04:09:25.399Z' + updated: '2016-03-11T04:09:25.399Z' + gbrAddressResponse: + summary: GBR Address Response + value: + id: london_office_01 + validationStatus: UNVALIDATED + friendlyName: London office + customerType: BUS + service: ES + houseNumber: 102-104 + streetName: ALBERT STREET + streetType: STREET + city: LONDON + postalCode: NW1 7NE + country: GBR + created: '2023-09-26T17:37:10.432Z' + updated: '2023-09-26T17:37:10.432Z' + listOrders: + summary: Get Orders + value: + links: + - href: /orders + rel: self + method: GET + - href: /orders + rel: first + method: GET + - href: /orders?offset=99000&limit=1000 + rel: last + method: GET + - href: /orders + rel: prev + method: GET + - href: /orders?offset=1000&limit=1000 + rel: next + method: GET + orders: + - id: 08e0be9a-52fd-45a0-be2e-86825c534aad + type: ADD_ENDPOINTS + status: COMPLETED + acceptedCount: 1 + invalidCount: 0 + updated: '2022-05-18T08:57:04Z' + totalNumber: 1 + - id: 08e0be9a-52fd-45a0-be2e-96835c534aad + type: UPDATE_ENDPOINTS + status: COMPLETED + acceptedCount: 3 + invalidCount: 0 + updated: '2022-05-18T08:57:04Z' + totalNumber: 3 + listOrderDetails: + summary: List Order Details + value: + links: + - href: /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad + rel: self + method: GET + - href: /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad + rel: first + method: GET + - href: >- + /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad?offset=99000&limit=1000 + rel: last + method: GET + - href: /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad + rel: prev + method: GET + - href: >- + /orders/details/08e0be9a-52fd-45a0-be2e-86825c537aad?offset=1000&limit=1000 + rel: next + method: GET + id: 08e0be9a-52fd-45a0-be2e-86825c537aad + type: DELETE_ENDPOINTS + status: COMPLETED + acceptedCount: 1 + invalidCount: 0 + updated: '2022-05-18T08:57:04Z' + totalNumber: 1 + endpoints: + - id: '263946349349374' + updatedBy: JJ + status: INPROGRESS + error: A reason + errorCode: XXX + - id: '2945239843274934' + updatedBy: JJ + status: SUCCESS + error: A reason + errorCode: DDD + listOrderHistory: + summary: List Order History + value: + id: 08e0be9a-52fd-45a0-be2e-86825c734aad + type: ADD_ENDPOINTS + status: COMPLETED + created: '2022-01-18T08:57:04Z' + orderHistory: + - status: RECEIVED + updatedBy: JJ + updated: '2022-05-18T08:57:04Z' + note: message + - status: PROCESSING + updatedBy: JJ + updated: '2022-05-18T08:58:04Z' + note: message + - status: COMPLETED + updatedBy: JJ + updated: '2022-05-18T08:59:04Z' + note: message + badRequestErrorExample: + summary: An example of a generic Bad Request Error + value: + errors: + - id: optional-error-id + type: bad-request + description: There was an issue with your request. + code: 205617 + pattern: ^\S*$ + unauthorizedErrorExample: + summary: An example of a generic Unauthorized Error + value: + errors: + - id: optional-error-id + type: authentication-credentials + description: Invalid or missing credentials. + code: 206401 + pattern: ^\S*$ + forbiddenErrorExample: + summary: An example of a generic Unauthorized Error + value: + errors: + - id: optional-error-id + type: resource-permissions + description: User does not have permissions to access this resource. + code: 109107 + notFoundErrorExample: + summary: An example of a generic Not Found Error + value: + errors: + - id: optional-error-id + type: resource-not-found + description: The resource specified cannot be found. + code: 50420 + notAllowedErrorExample: + summary: An example of a generic Not Allowed Error + value: + errors: + - id: optional-error-id + type: http-method-not-supported + description: The HTTP method used is not supported by this resource. + code: 205621 + meta: + method: TRACE + tooManyRequestsErrorExample: + summary: An example of a generic Too Many Requests Error + value: + errors: + - id: optional-error-id + type: rate-limiting + description: >- + Rate limit exceeded. Wait for the time specified in the + 'Retry-After' header before sending another request. + code: 32002 + internalServerErrorExample: + summary: An example of a generic Internal Server Error + value: + errors: + - id: optional-error-id + type: internal-server-error + description: >- + Unexpected internal server error. Contact Bandwidth Customer + Support if this problem persists. + code: 32030 + securitySchemes: + Basic: + type: http + scheme: basic + description: >- + Basic authentication is a simple authentication scheme built into the + HTTP protocol. To use it, send your HTTP requests with an Authorization + header that contains the word Basic followed by a space and a + base64-encoded string `username:password`. + + Example: `Authorization: Basic ZGVtbZpwQDU1dzByZA==` + Token: + type: http + scheme: bearer + bearerFormat: JWT + ApiKey: + type: apiKey + in: header + name: apikey +security: + - Basic: [] + - Token: [] + - ApiKey: [] +tags: + - name: Endpoints + - name: Addresses + - name: Notifications + - name: Notification Groups + - name: Orders diff --git a/site/src/pages/apis/emergency-provisioning.js b/site/src/pages/apis/emergency-provisioning.js new file mode 100644 index 000000000..20e70546d --- /dev/null +++ b/site/src/pages/apis/emergency-provisioning.js @@ -0,0 +1,16 @@ +import React from 'react'; +import Layout from '@theme/Layout'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import ApiReference from '@site/src/components/ApiReference'; + +export default function ApiReferencePage() { + const {siteConfig} = useDocusaurusContext(); + return ( + + + + ); +} diff --git a/site/yarn.lock b/site/yarn.lock index dd4833bc5..eafb5d37a 100644 --- a/site/yarn.lock +++ b/site/yarn.lock @@ -7121,9 +7121,9 @@ postcss-zindex@^5.1.0: integrity sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A== postcss@^8.3.11, postcss@^8.4.14, postcss@^8.4.17, postcss@^8.4.21: - version "8.4.26" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.26.tgz" - integrity sha512-jrXHFF8iTloAenySjM/ob3gSj7pCu0Ji49hnjqzsgSRa50hkWCKD0HQ+gMNJkW38jBI68MpAAg7ZWwHwX8NMMw== + version "8.4.31" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.31.tgz#92b451050a9f914da6755af352bdc0192508656d" + integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== dependencies: nanoid "^3.3.6" picocolors "^1.0.0" diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 000000000..fb57ccd13 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + +