Class DealsApi

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

public class DealsApi extends BaseApi
  • Constructor Details

    • DealsApi

      public DealsApi()
    • DealsApi

      public DealsApi(ApiClient apiClient)
  • Method Details

    • crmAttributesDealsGet

      public List<DealAttributesInner> crmAttributesDealsGet() throws ApiException
      Get deal attributes
      Returns:
      List<DealAttributesInner>
      Throws:
      ApiException - if fails to make API call
    • crmAttributesDealsGet

      public List<DealAttributesInner> crmAttributesDealsGet(Map<String,String> additionalHeaders) throws ApiException
      Get deal attributes
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<DealAttributesInner>
      Throws:
      ApiException - if fails to make API call
    • crmAttributesPost

      public CrmAttributesPost200Response crmAttributesPost(@Nonnull CrmAttributesPostRequest crmAttributesPostRequest) throws ApiException
      Create a company/deal attribute
      Parameters:
      crmAttributesPostRequest - Attribute creation data for a company/deal. (required)
      Returns:
      CrmAttributesPost200Response
      Throws:
      ApiException - if fails to make API call
    • crmAttributesPost

      public CrmAttributesPost200Response crmAttributesPost(@Nonnull CrmAttributesPostRequest crmAttributesPostRequest, Map<String,String> additionalHeaders) throws ApiException
      Create a company/deal attribute
      Parameters:
      crmAttributesPostRequest - Attribute creation data for a company/deal. (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CrmAttributesPost200Response
      Throws:
      ApiException - if fails to make API call
    • crmDealsGet

      public DealsList crmDealsGet(@Nullable String filtersAttributesDealName, @Nullable String filtersLinkedCompaniesIds, @Nullable String filtersLinkedContactsIds, @Nullable String modifiedSince, @Nullable String createdSince, @Nullable Long offset, @Nullable Long limit, @Nullable String sort) throws ApiException
      Get all deals
      Parameters:
      filtersAttributesDealName - Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering. (optional)
      filtersLinkedCompaniesIds - Filter by linked companies ids (optional)
      filtersLinkedContactsIds - Filter by linked companies ids (optional)
      modifiedSince - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional)
      createdSince - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional)
      offset - Index of the first document of the page (optional)
      limit - Number of documents per page (optional)
      sort - Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed (optional)
      Returns:
      DealsList
      Throws:
      ApiException - if fails to make API call
    • crmDealsGet

      public DealsList crmDealsGet(@Nullable String filtersAttributesDealName, @Nullable String filtersLinkedCompaniesIds, @Nullable String filtersLinkedContactsIds, @Nullable String modifiedSince, @Nullable String createdSince, @Nullable Long offset, @Nullable Long limit, @Nullable String sort, Map<String,String> additionalHeaders) throws ApiException
      Get all deals
      Parameters:
      filtersAttributesDealName - Filter by attributes. If you have a filter for the owner on your end, please send it as filters[attributes.deal_owner] and utilize the account email for the filtering. (optional)
      filtersLinkedCompaniesIds - Filter by linked companies ids (optional)
      filtersLinkedContactsIds - Filter by linked companies ids (optional)
      modifiedSince - Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional)
      createdSince - Filter (urlencoded) the contacts created after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. (optional)
      offset - Index of the first document of the page (optional)
      limit - Number of documents per page (optional)
      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:
      DealsList
      Throws:
      ApiException - if fails to make API call
    • crmDealsIdDelete

      public void crmDealsIdDelete(@Nonnull String id) throws ApiException
      Delete a deal
      Parameters:
      id - (required)
      Throws:
      ApiException - if fails to make API call
    • crmDealsIdDelete

      public void crmDealsIdDelete(@Nonnull String id, Map<String,String> additionalHeaders) throws ApiException
      Delete a deal
      Parameters:
      id - (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • crmDealsIdGet

      public Deal crmDealsIdGet(@Nonnull String id) throws ApiException
      Get a deal
      Parameters:
      id - (required)
      Returns:
      Deal
      Throws:
      ApiException - if fails to make API call
    • crmDealsIdGet

      public Deal crmDealsIdGet(@Nonnull String id, Map<String,String> additionalHeaders) throws ApiException
      Get a deal
      Parameters:
      id - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      Deal
      Throws:
      ApiException - if fails to make API call
    • crmDealsIdPatch

      public void crmDealsIdPatch(@Nonnull String id, @Nonnull CrmDealsIdPatchRequest crmDealsIdPatchRequest) throws ApiException
      Update a deal
      Parameters:
      id - (required)
      crmDealsIdPatchRequest - Updated deal details. (required)
      Throws:
      ApiException - if fails to make API call
    • crmDealsIdPatch

      public void crmDealsIdPatch(@Nonnull String id, @Nonnull CrmDealsIdPatchRequest crmDealsIdPatchRequest, Map<String,String> additionalHeaders) throws ApiException
      Update a deal
      Parameters:
      id - (required)
      crmDealsIdPatchRequest - Updated deal details. (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • crmDealsImportPost

      public CompaniesImportPost200Response crmDealsImportPost(@Nullable File _file, @Nullable Object mapping) throws ApiException
      Import deals(creation and updation) Import deals from a CSV file with mapping options.
      Parameters:
      _file - The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name (optional)
      mapping - The mapping options in JSON format. Here is an example of the JSON structure: ```json { \\\"link_entities\\\": true, // Determines whether to link related entities during the import process \\\"unlink_entities\\\": false, // Determines whether to unlink related entities during the import process \\\"update_existing_records\\\": true, // Determines whether to update based on company ID or treat every row as create \\\"unset_empty_attributes\\\": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` (optional)
      Returns:
      CompaniesImportPost200Response
      Throws:
      ApiException - if fails to make API call
    • crmDealsImportPost

      public CompaniesImportPost200Response crmDealsImportPost(@Nullable File _file, @Nullable Object mapping, Map<String,String> additionalHeaders) throws ApiException
      Import deals(creation and updation) Import deals from a CSV file with mapping options.
      Parameters:
      _file - The CSV file to upload.The file should have the first row as the mapping attribute. Some default attribute names are (a) deal_id [brevo mongoID to update deals] (b) associated_contact (c) associated_company (f) any other attribute with internal name (optional)
      mapping - The mapping options in JSON format. Here is an example of the JSON structure: ```json { \\\"link_entities\\\": true, // Determines whether to link related entities during the import process \\\"unlink_entities\\\": false, // Determines whether to unlink related entities during the import process \\\"update_existing_records\\\": true, // Determines whether to update based on company ID or treat every row as create \\\"unset_empty_attributes\\\": false // Determines whether to unset a specific attribute during update if the values input is blank } ``` (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CompaniesImportPost200Response
      Throws:
      ApiException - if fails to make API call
    • crmDealsLinkUnlinkIdPatch

      public void crmDealsLinkUnlinkIdPatch(@Nonnull String id, @Nonnull CrmDealsLinkUnlinkIdPatchRequest crmDealsLinkUnlinkIdPatchRequest) throws ApiException
      Link and Unlink a deal with contacts and companies
      Parameters:
      id - (required)
      crmDealsLinkUnlinkIdPatchRequest - Linked / Unlinked contacts and companies ids. (required)
      Throws:
      ApiException - if fails to make API call
    • crmDealsLinkUnlinkIdPatch

      public void crmDealsLinkUnlinkIdPatch(@Nonnull String id, @Nonnull CrmDealsLinkUnlinkIdPatchRequest crmDealsLinkUnlinkIdPatchRequest, Map<String,String> additionalHeaders) throws ApiException
      Link and Unlink a deal with contacts and companies
      Parameters:
      id - (required)
      crmDealsLinkUnlinkIdPatchRequest - Linked / Unlinked contacts and companies ids. (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • crmDealsPost

      public CrmDealsPost201Response crmDealsPost(@Nonnull CrmDealsPostRequest crmDealsPostRequest) throws ApiException
      Create a deal
      Parameters:
      crmDealsPostRequest - Deal create data. (required)
      Returns:
      CrmDealsPost201Response
      Throws:
      ApiException - if fails to make API call
    • crmDealsPost

      public CrmDealsPost201Response crmDealsPost(@Nonnull CrmDealsPostRequest crmDealsPostRequest, Map<String,String> additionalHeaders) throws ApiException
      Create a deal
      Parameters:
      crmDealsPostRequest - Deal create data. (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CrmDealsPost201Response
      Throws:
      ApiException - if fails to make API call
    • crmPipelineDetailsAllGet

      public List<Pipeline> crmPipelineDetailsAllGet() throws ApiException
      Get all pipelines
      Returns:
      List<Pipeline>
      Throws:
      ApiException - if fails to make API call
    • crmPipelineDetailsAllGet

      public List<Pipeline> crmPipelineDetailsAllGet(Map<String,String> additionalHeaders) throws ApiException
      Get all pipelines
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<Pipeline>
      Throws:
      ApiException - if fails to make API call
    • crmPipelineDetailsGet

      @Deprecated public Pipeline crmPipelineDetailsGet() throws ApiException
      Deprecated.
      Get pipeline stages This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead.
      Returns:
      Pipeline
      Throws:
      ApiException - if fails to make API call
    • crmPipelineDetailsGet

      @Deprecated public Pipeline crmPipelineDetailsGet(Map<String,String> additionalHeaders) throws ApiException
      Deprecated.
      Get pipeline stages This endpoint is deprecated. Prefer /crm/pipeline/details/{pipelineID} instead.
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      Pipeline
      Throws:
      ApiException - if fails to make API call
    • crmPipelineDetailsPipelineIDGet

      public List<Pipeline> crmPipelineDetailsPipelineIDGet(@Nonnull String pipelineID) throws ApiException
      Get a pipeline
      Parameters:
      pipelineID - (required)
      Returns:
      List<Pipeline>
      Throws:
      ApiException - if fails to make API call
    • crmPipelineDetailsPipelineIDGet

      public List<Pipeline> crmPipelineDetailsPipelineIDGet(@Nonnull String pipelineID, Map<String,String> additionalHeaders) throws ApiException
      Get a pipeline
      Parameters:
      pipelineID - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<Pipeline>
      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.