-
public final class AttachmentControllerApi extends ApiClient
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAttachmentControllerApi.Companion
-
Constructor Summary
Constructors Constructor Description AttachmentControllerApi(String xApiKey, String basePath)
-
Method Summary
Modifier and Type Method Description final StringgetBaseUrl()final UnitdeleteAllAttachments()Delete all attachments final RequestConfigdeleteAllAttachmentsRequestConfig()To obtain the request config of the operation deleteAllAttachments final UnitdeleteAttachment(String attachmentId)Delete an attachment final RequestConfigdeleteAttachmentRequestConfig(String attachmentId)To obtain the request config of the operation deleteAttachment final DownloadAttachmentDtodownloadAttachmentAsBase64Encoded(String attachmentId)Get email attachment as base64 encoded string as alternative to binary responses. final RequestConfigdownloadAttachmentAsBase64EncodedRequestConfig(String attachmentId)To obtain the request config of the operation downloadAttachmentAsBase64Encoded final ByteArraydownloadAttachmentAsBytes(String attachmentId)Download attachments. final RequestConfigdownloadAttachmentAsBytesRequestConfig(String attachmentId)To obtain the request config of the operation downloadAttachmentAsBytes final AttachmentEntitygetAttachment(String attachmentId)Get an attachment entity final RequestConfiggetAttachmentRequestConfig(String attachmentId)To obtain the request config of the operation getAttachment final AttachmentMetaDatagetAttachmentInfo(String attachmentId)Get email attachment metadata information Returns the metadata for an attachment. final RequestConfiggetAttachmentInfoRequestConfig(String attachmentId)To obtain the request config of the operation getAttachmentInfo final PageAttachmentEntitygetAttachments1(Integer page, Integer size, String sort, String fileNameFilter, OffsetDateTime since, OffsetDateTime before)Get email attachments Get all attachments in paginated response. final RequestConfiggetAttachments1RequestConfig(Integer page, Integer size, String sort, String fileNameFilter, OffsetDateTime since, OffsetDateTime before)To obtain the request config of the operation getAttachments1 final List<String>uploadAttachment(UploadAttachmentOptions uploadAttachmentOptions)Upload an attachment for sending using base64 file encoding. final RequestConfiguploadAttachmentRequestConfig(UploadAttachmentOptions uploadAttachmentOptions)To obtain the request config of the operation uploadAttachment final List<String>uploadAttachmentBytes(List<ByteArray> requestBody, String contentType, String filename)Upload an attachment for sending using file byte stream input octet stream. final RequestConfiguploadAttachmentBytesRequestConfig(List<ByteArray> requestBody, String contentType, String filename)To obtain the request config of the operation uploadAttachmentBytes final List<String>uploadMultipartForm(String contentType, String filename, String xFilename, InlineObject inlineObject)Upload an attachment for sending using a Multipart Form request. final RequestConfiguploadMultipartFormRequestConfig(String contentType, String filename, String xFilename, InlineObject inlineObject)To obtain the request config of the operation uploadMultipartForm -
-
Method Detail
-
getBaseUrl
final String getBaseUrl()
-
deleteAllAttachments
final Unit deleteAllAttachments()
Delete all attachments
-
deleteAllAttachmentsRequestConfig
final RequestConfig deleteAllAttachmentsRequestConfig()
To obtain the request config of the operation deleteAllAttachments
-
deleteAttachment
final Unit deleteAttachment(String attachmentId)
Delete an attachment
- Parameters:
attachmentId- ID of attachment
-
deleteAttachmentRequestConfig
final RequestConfig deleteAttachmentRequestConfig(String attachmentId)
To obtain the request config of the operation deleteAttachment
- Parameters:
attachmentId- ID of attachment
-
downloadAttachmentAsBase64Encoded
final DownloadAttachmentDto downloadAttachmentAsBase64Encoded(String attachmentId)
Get email attachment as base64 encoded string as alternative to binary responses. To read the content decode the Base64 encoded contents. Returns the specified attachment for a given email as a base 64 encoded string. The response type is application/json. This method is similar to the `downloadAttachment` method but allows some clients to get around issues with binary responses.
- Parameters:
attachmentId- ID of attachment
-
downloadAttachmentAsBase64EncodedRequestConfig
final RequestConfig downloadAttachmentAsBase64EncodedRequestConfig(String attachmentId)
To obtain the request config of the operation downloadAttachmentAsBase64Encoded
- Parameters:
attachmentId- ID of attachment
-
downloadAttachmentAsBytes
final ByteArray downloadAttachmentAsBytes(String attachmentId)
Download attachments. Get email attachment bytes. If you have trouble with byte responses try the `downloadAttachmentBase64` response endpoints. Returns the specified attachment for a given email as a stream / array of bytes. You can find attachment ids in email responses endpoint responses. The response type is application/octet-stream.
- Parameters:
attachmentId- ID of attachment
-
downloadAttachmentAsBytesRequestConfig
final RequestConfig downloadAttachmentAsBytesRequestConfig(String attachmentId)
To obtain the request config of the operation downloadAttachmentAsBytes
- Parameters:
attachmentId- ID of attachment
-
getAttachment
final AttachmentEntity getAttachment(String attachmentId)
Get an attachment entity
- Parameters:
attachmentId- ID of attachment
-
getAttachmentRequestConfig
final RequestConfig getAttachmentRequestConfig(String attachmentId)
To obtain the request config of the operation getAttachment
- Parameters:
attachmentId- ID of attachment
-
getAttachmentInfo
final AttachmentMetaData getAttachmentInfo(String attachmentId)
Get email attachment metadata information Returns the metadata for an attachment. It is saved separately to the content of the attachment. Contains properties `name` and `content-type` and `content-length` in bytes for a given attachment.
- Parameters:
attachmentId- ID of attachment
-
getAttachmentInfoRequestConfig
final RequestConfig getAttachmentInfoRequestConfig(String attachmentId)
To obtain the request config of the operation getAttachmentInfo
- Parameters:
attachmentId- ID of attachment
-
getAttachments1
final PageAttachmentEntity getAttachments1(Integer page, Integer size, String sort, String fileNameFilter, OffsetDateTime since, OffsetDateTime before)
Get email attachments Get all attachments in paginated response. Each entity contains meta data for the attachment such as `name` and `content-type`. Use the `attachmentId` and the download endpoints to get the file contents.
- Parameters:
page- Optional page index event list pagination (optional, default to 0)size- Optional page size event list pagination (optional, default to 20)sort- Optional createdAt sort direction ASC or DESC (optional, default to ASC)fileNameFilter- Optional file name and content type search filter (optional)since- Filter by created at after the given timestamp (optional)before- Filter by created at before the given timestamp (optional)
-
getAttachments1RequestConfig
final RequestConfig getAttachments1RequestConfig(Integer page, Integer size, String sort, String fileNameFilter, OffsetDateTime since, OffsetDateTime before)
To obtain the request config of the operation getAttachments1
- Parameters:
page- Optional page index event list pagination (optional, default to 0)size- Optional page size event list pagination (optional, default to 20)sort- Optional createdAt sort direction ASC or DESC (optional, default to ASC)fileNameFilter- Optional file name and content type search filter (optional)since- Filter by created at after the given timestamp (optional)before- Filter by created at before the given timestamp (optional)
-
uploadAttachment
final List<String> uploadAttachment(UploadAttachmentOptions uploadAttachmentOptions)
Upload an attachment for sending using base64 file encoding. Returns an array whose first element is the ID of the uploaded attachment.
-
uploadAttachmentRequestConfig
final RequestConfig uploadAttachmentRequestConfig(UploadAttachmentOptions uploadAttachmentOptions)
To obtain the request config of the operation uploadAttachment
-
uploadAttachmentBytes
final List<String> uploadAttachmentBytes(List<ByteArray> requestBody, String contentType, String filename)
Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
- Parameters:
contentType- Optional contentType for file.filename- Optional filename to save upload with (optional)
-
uploadAttachmentBytesRequestConfig
final RequestConfig uploadAttachmentBytesRequestConfig(List<ByteArray> requestBody, String contentType, String filename)
To obtain the request config of the operation uploadAttachmentBytes
- Parameters:
contentType- Optional contentType for file.filename- Optional filename to save upload with (optional)
-
uploadMultipartForm
final List<String> uploadMultipartForm(String contentType, String filename, String xFilename, InlineObject inlineObject)
Upload an attachment for sending using a Multipart Form request. Returns an array whose first element is the ID of the uploaded attachment.
- Parameters:
contentType- Optional content type of attachment (optional)filename- Optional name of file (optional)xFilename- Optional content type header of attachment (optional)inlineObject- (optional)
-
uploadMultipartFormRequestConfig
final RequestConfig uploadMultipartFormRequestConfig(String contentType, String filename, String xFilename, InlineObject inlineObject)
To obtain the request config of the operation uploadMultipartForm
- Parameters:
contentType- Optional content type of attachment (optional)filename- Optional name of file (optional)xFilename- Optional content type header of attachment (optional)inlineObject- (optional)
-
-
-
-