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.AttachmentDeleteBody;
import com.zendesk.sunshine_conversations_client.model.AttachmentResponse;
import com.zendesk.sunshine_conversations_client.model.ErrorResponse;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class AttachmentsApi {
private ApiClient apiClient;
public AttachmentsApi() {
this(Configuration.getDefaultApiClient());
}
public AttachmentsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Delete Attachment
* Remove an attachment uploaded to Sunshine Conversations through the Upload attachment API. See [Attachments for Messages](#section/Attachments-for-Messages) to have attachments automatically deleted when deleting messages, conversations or users. <aside class=\"notice\">Note that deleted attachments can remain available on our CDN’s cache up to 15 minutes after the delete call.</aside>
* @param attachmentDeleteBody (required)
* @param appId Identifies the app. (required)
* @return a {@code Object}
* @throws ApiException if fails to make API call
*/
public Object deleteAttachment(AttachmentDeleteBody attachmentDeleteBody, String appId) throws ApiException {
Object localVarPostBody = attachmentDeleteBody;
// verify the required parameter 'attachmentDeleteBody' is set
if (attachmentDeleteBody == null) {
throw new ApiException(400, "Missing the required parameter 'attachmentDeleteBody' when calling deleteAttachment");
}
// verify the required parameter 'appId' is set
if (appId == null) {
throw new ApiException(400, "Missing the required parameter 'appId' when calling deleteAttachment");
}
// create path and map variables
String localVarPath = "/v2/apps/{appId}/attachments/remove".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "appId" + "\\}", apiClient.escapeString(appId.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