Package software.xdev.brevo.api
Class FilesApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.FilesApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncrmFilesGet(String entity, String entityIds, Integer dateFrom, Integer dateTo, Long offset, Long limit, String sort) Get all filescrmFilesGet(String entity, String entityIds, Integer dateFrom, Integer dateTo, Long offset, Long limit, String sort, Map<String, String> additionalHeaders) Get all filesGet file detailscrmFilesIdDataGet(String id, Map<String, String> additionalHeaders) Get file detailsvoidDelete a filevoidcrmFilesIdDelete(String id, Map<String, String> additionalHeaders) Delete a filecrmFilesIdGet(String id) Download a filecrmFilesIdGet(String id, Map<String, String> additionalHeaders) Download a filecrmFilesPost(File _file, String dealId, Long contactId, String companyId) Upload a filecrmFilesPost(File _file, String dealId, Long contactId, String companyId, Map<String, String> additionalHeaders) Upload a file<T> TinvokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) Directly invoke the API for the given URL.Methods inherited from class software.xdev.brevo.client.BaseApi
getApiClient, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, invokeAPI, setApiClient
-
Constructor Details
-
FilesApi
public FilesApi() -
FilesApi
-
-
Method Details
-
crmFilesGet
public List<FileData> crmFilesGet(@Nullable String entity, @Nullable String entityIds, @Nullable Integer dateFrom, @Nullable Integer dateTo, @Nullable Long offset, @Nullable Long limit, @Nullable String sort) throws ApiException Get all files- Parameters:
entity- Filter by file entity type (optional)entityIds- Filter by file entity IDs (optional)dateFrom- dateFrom to date range filter type (timestamp in milliseconds) (optional)dateTo- dateTo to date range filter type (timestamp in milliseconds) (optional)offset- Index of the first document of the page (optional)limit- Number of documents per page (optional, default to 50)sort- Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional)- Returns:
- List<FileData>
- Throws:
ApiException- if fails to make API call
-
crmFilesGet
public List<FileData> crmFilesGet(@Nullable String entity, @Nullable String entityIds, @Nullable Integer dateFrom, @Nullable Integer dateTo, @Nullable Long offset, @Nullable Long limit, @Nullable String sort, Map<String, String> additionalHeaders) throws ApiExceptionGet all files- Parameters:
entity- Filter by file entity type (optional)entityIds- Filter by file entity IDs (optional)dateFrom- dateFrom to date range filter type (timestamp in milliseconds) (optional)dateTo- dateTo to date range filter type (timestamp in milliseconds) (optional)offset- Index of the first document of the page (optional)limit- Number of documents per page (optional, default to 50)sort- Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional)additionalHeaders- additionalHeaders for this call- Returns:
- List<FileData>
- Throws:
ApiException- if fails to make API call
-
crmFilesIdDataGet
Get file details- Parameters:
id- File id to get file data. (required)- Returns:
- FileData
- Throws:
ApiException- if fails to make API call
-
crmFilesIdDataGet
public FileData crmFilesIdDataGet(@Nonnull String id, Map<String, String> additionalHeaders) throws ApiExceptionGet file details- Parameters:
id- File id to get file data. (required)additionalHeaders- additionalHeaders for this call- Returns:
- FileData
- Throws:
ApiException- if fails to make API call
-
crmFilesIdDelete
Delete a file- Parameters:
id- File id to delete. (required)- Throws:
ApiException- if fails to make API call
-
crmFilesIdDelete
public void crmFilesIdDelete(@Nonnull String id, Map<String, String> additionalHeaders) throws ApiExceptionDelete a file- Parameters:
id- File id to delete. (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
crmFilesIdGet
Download a file- Parameters:
id- File id to download. (required)- Returns:
- FileDownloadableLink
- Throws:
ApiException- if fails to make API call
-
crmFilesIdGet
public FileDownloadableLink crmFilesIdGet(@Nonnull String id, Map<String, String> additionalHeaders) throws ApiExceptionDownload a file- Parameters:
id- File id to download. (required)additionalHeaders- additionalHeaders for this call- Returns:
- FileDownloadableLink
- Throws:
ApiException- if fails to make API call
-
crmFilesPost
public FileData crmFilesPost(@Nonnull File _file, @Nullable String dealId, @Nullable Long contactId, @Nullable String companyId) throws ApiException Upload a file- Parameters:
_file- File data to create a file. (required)dealId- (optional)contactId- (optional)companyId- (optional)- Returns:
- FileData
- Throws:
ApiException- if fails to make API call
-
crmFilesPost
public FileData crmFilesPost(@Nonnull File _file, @Nullable String dealId, @Nullable Long contactId, @Nullable String companyId, Map<String, String> additionalHeaders) throws ApiExceptionUpload a file- Parameters:
_file- File data to create a file. (required)dealId- (optional)contactId- (optional)companyId- (optional)additionalHeaders- additionalHeaders for this call- Returns:
- FileData
- Throws:
ApiException- if fails to make API call
-
invokeAPI
public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String, String> additionalHeaders) throws ApiExceptionDescription copied from class:BaseApiDirectly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.- Specified by:
invokeAPIin classBaseApi- Parameters:
url- The URL for the request, either full URL or only the path.method- The HTTP method for the request.request- The request object.returnType- The return type.additionalHeaders- Additional headers for the request.- Returns:
- The API response in the specified type.
- Throws:
ApiException- if fails to make API call.
-