From 672b5f16a5bc51b6c263b176c27248d84c2ebd85 Mon Sep 17 00:00:00 2001 From: DX-Bandwidth Date: Tue, 8 Oct 2024 14:05:20 +0000 Subject: [PATCH] Generate SDK with OpenAPI Generator Version 7.6.0 --- api/openapi.yaml | 23 +++++++++++++++++-- bandwidth.yml | 23 +++++++++++++++++-- docs/CallsApi.md | 6 ++--- .../java/com/bandwidth/sdk/api/CallsApi.java | 11 +++++---- 4 files changed, 51 insertions(+), 12 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index 35253011..cc618c31 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -5461,8 +5461,27 @@ components: application/json: schema: $ref: '#/components/schemas/updateCall' - description: JSON object containing information to redirect an existing call - to a new BXML document + application/xml: + examples: + speakSentence: + summary: Speak Sentence + value: |- + + + This is a test sentence. + + redirectUrl: + summary: Redirect + value: |- + + + + + schema: + description: A valid BXML document to replace the call's current BXML. + type: string + description: JSON or BXML object containing information to redirect an existing + call to a new BXML document required: true updateCallBxmlRequest: content: diff --git a/bandwidth.yml b/bandwidth.yml index c4b1fb2b..1361c836 100644 --- a/bandwidth.yml +++ b/bandwidth.yml @@ -5658,13 +5658,32 @@ components: $ref: '#/components/schemas/createCall' updateCallRequest: description: >- - JSON object containing information to redirect an existing call to a new - BXML document + JSON or BXML object containing information to redirect an existing call + to a new BXML document required: true content: application/json: schema: $ref: '#/components/schemas/updateCall' + application/xml: + schema: + type: string + description: A valid BXML document to replace the call's current BXML. + examples: + speakSentence: + summary: Speak Sentence + value: |- + + + This is a test sentence. + + redirectUrl: + summary: Redirect + value: |- + + + + updateCallBxmlRequest: required: true content: diff --git a/docs/CallsApi.md b/docs/CallsApi.md index f02b185c..7bc445ed 100644 --- a/docs/CallsApi.md +++ b/docs/CallsApi.md @@ -288,7 +288,7 @@ public class Example { CallsApi apiInstance = new CallsApi(defaultClient); String accountId = "9900000"; // String | Your Bandwidth Account ID. String callId = "c-15ac29a2-1331029c-2cb0-4a07-b215-b22865662d85"; // String | Programmable Voice API Call ID. - UpdateCall updateCall = new UpdateCall(); // UpdateCall | JSON object containing information to redirect an existing call to a new BXML document + UpdateCall updateCall = new UpdateCall(); // UpdateCall | JSON or BXML object containing information to redirect an existing call to a new BXML document try { apiInstance.updateCall(accountId, callId, updateCall); } catch (ApiException e) { @@ -308,7 +308,7 @@ public class Example { |------------- | ------------- | ------------- | -------------| | **accountId** | **String**| Your Bandwidth Account ID. | | | **callId** | **String**| Programmable Voice API Call ID. | | -| **updateCall** | [**UpdateCall**](UpdateCall.md)| JSON object containing information to redirect an existing call to a new BXML document | | +| **updateCall** | [**UpdateCall**](UpdateCall.md)| JSON or BXML object containing information to redirect an existing call to a new BXML document | | ### Return type @@ -320,7 +320,7 @@ null (empty response body) ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, application/xml - **Accept**: application/json ### HTTP response details diff --git a/src/main/java/com/bandwidth/sdk/api/CallsApi.java b/src/main/java/com/bandwidth/sdk/api/CallsApi.java index 0310cdf7..23d31d25 100644 --- a/src/main/java/com/bandwidth/sdk/api/CallsApi.java +++ b/src/main/java/com/bandwidth/sdk/api/CallsApi.java @@ -621,7 +621,7 @@ public okhttp3.Call listCallsAsync(String accountId, String to, String from, Str * Build call for updateCall * @param accountId Your Bandwidth Account ID. (required) * @param callId Programmable Voice API Call ID. (required) - * @param updateCall JSON object containing information to redirect an existing call to a new BXML document (required) + * @param updateCall JSON or BXML object containing information to redirect an existing call to a new BXML document (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -676,7 +676,8 @@ public okhttp3.Call updateCallCall(String accountId, String callId, UpdateCall u } final String[] localVarContentTypes = { - "application/json" + "application/json", + "application/xml" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -713,7 +714,7 @@ private okhttp3.Call updateCallValidateBeforeCall(String accountId, String callI * Interrupts and redirects a call to a different URL that should return a BXML document. * @param accountId Your Bandwidth Account ID. (required) * @param callId Programmable Voice API Call ID. (required) - * @param updateCall JSON object containing information to redirect an existing call to a new BXML document (required) + * @param updateCall JSON or BXML object containing information to redirect an existing call to a new BXML document (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -739,7 +740,7 @@ public void updateCall(String accountId, String callId, UpdateCall updateCall) t * Interrupts and redirects a call to a different URL that should return a BXML document. * @param accountId Your Bandwidth Account ID. (required) * @param callId Programmable Voice API Call ID. (required) - * @param updateCall JSON object containing information to redirect an existing call to a new BXML document (required) + * @param updateCall JSON or BXML object containing information to redirect an existing call to a new BXML document (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -767,7 +768,7 @@ public ApiResponse updateCallWithHttpInfo(String accountId, String callId, * Interrupts and redirects a call to a different URL that should return a BXML document. * @param accountId Your Bandwidth Account ID. (required) * @param callId Programmable Voice API Call ID. (required) - * @param updateCall JSON object containing information to redirect an existing call to a new BXML document (required) + * @param updateCall JSON or BXML object containing information to redirect an existing call to a new BXML document (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object