Class FilesApi

java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.FilesApi

public class FilesApi extends BaseApi
  • Constructor Details

    • FilesApi

      public FilesApi()
    • FilesApi

      public FilesApi(ApiClient apiClient)
  • 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 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)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<FileData>
      Throws:
      ApiException - if fails to make API call
    • crmFilesIdDataGet

      public FileData crmFilesIdDataGet(@Nonnull String id) throws ApiException
      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 ApiException
      Get 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

      public void crmFilesIdDelete(@Nonnull String id) throws ApiException
      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 ApiException
      Delete a file
      Parameters:
      id - File id to delete. (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • crmFilesIdGet

      public FileDownloadableLink crmFilesIdGet(@Nonnull String id) throws ApiException
      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 ApiException
      Download 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 ApiException
      Upload 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 ApiException
      Description copied from class: BaseApi
      Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
      Specified by:
      invokeAPI in class BaseApi
      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.