Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package com.zendesk.sunshine_conversations_client.api;
import com.zendesk.sunshine_conversations_client.ApiException;
import com.zendesk.sunshine_conversations_client.ApiClient;
import com.zendesk.sunshine_conversations_client.Configuration;
import com.zendesk.sunshine_conversations_client.Pair;
import jakarta.ws.rs.core.GenericType;
import com.zendesk.sunshine_conversations_client.model.SwitchboardIntegrationCreateBody;
import com.zendesk.sunshine_conversations_client.model.SwitchboardIntegrationListResponse;
import com.zendesk.sunshine_conversations_client.model.SwitchboardIntegrationResponse;
import com.zendesk.sunshine_conversations_client.model.SwitchboardIntegrationUpdateBody;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SwitchboardIntegrationsApi {
private ApiClient apiClient;
public SwitchboardIntegrationsApi() {
this(Configuration.getDefaultApiClient());
}
public SwitchboardIntegrationsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create Switchboard Integration
* Create a switchboard integration.
* @param switchboardIntegrationCreateBody (required)
* @param appId Identifies the app. (required)
* @param switchboardId Identifies the switchboard. (required)
* @return a {@code SwitchboardIntegrationResponse}
* @throws ApiException if fails to make API call
*/
public SwitchboardIntegrationResponse createSwitchboardIntegration(SwitchboardIntegrationCreateBody switchboardIntegrationCreateBody, String appId, String switchboardId) throws ApiException {
Object localVarPostBody = switchboardIntegrationCreateBody;
// verify the required parameter 'switchboardIntegrationCreateBody' is set
if (switchboardIntegrationCreateBody == null) {
throw new ApiException(400, "Missing the required parameter 'switchboardIntegrationCreateBody' when calling createSwitchboardIntegration");
}
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException(400, "Missing the required parameter 'appId' when calling createSwitchboardIntegration");
}
// verify the required parameter 'switchboardId' is set
if (switchboardId == null) {
throw new ApiException(400, "Missing the required parameter 'switchboardId' when calling createSwitchboardIntegration");
}
// create path and map variables
String localVarPath = "/v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "appId" + "\\}", apiClient.escapeString(appId.toString()))
.replaceAll("\\{" + "switchboardId" + "\\}", apiClient.escapeString(switchboardId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth", "bearerAuth" };
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete Switchboard Integration
* Deletes the switchboard integration. If the deleted switchboard integration had an active status for some conversations, the default switchboard integration will replace it. Note that it is forbidden to delete a switchboard integration if it's the default one (a new one must be chosen first) or if another switchboard integration's `nextSwitchboardIntegrationId` refers to it. The integration that was linked to the deleted switchboard integration will start receiving all conversation events, regardless of the switchboard status.
* @param appId Identifies the app. (required)
* @param switchboardId Identifies the switchboard. (required)
* @param switchboardIntegrationId Identifies the switchboard integration. (required)
* @return a {@code Object}
* @throws ApiException if fails to make API call
*/
public Object deleteSwitchboardIntegration(String appId, String switchboardId, String switchboardIntegrationId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException(400, "Missing the required parameter 'appId' when calling deleteSwitchboardIntegration");
}
// verify the required parameter 'switchboardId' is set
if (switchboardId == null) {
throw new ApiException(400, "Missing the required parameter 'switchboardId' when calling deleteSwitchboardIntegration");
}
// verify the required parameter 'switchboardIntegrationId' is set
if (switchboardIntegrationId == null) {
throw new ApiException(400, "Missing the required parameter 'switchboardIntegrationId' when calling deleteSwitchboardIntegration");
}
// create path and map variables
String localVarPath = "/v2/apps/{appId}/switchboards/{switchboardId}/switchboardIntegrations/{switchboardIntegrationId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "appId" + "\\}", apiClient.escapeString(appId.toString()))
.replaceAll("\\{" + "switchboardId" + "\\}", apiClient.escapeString(switchboardId.toString()))
.replaceAll("\\{" + "switchboardIntegrationId" + "\\}", apiClient.escapeString(switchboardIntegrationId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "basicAuth", "bearerAuth" };
GenericType