Package software.xdev.brevo.api
Class DealsApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.DealsApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet deal attributescrmAttributesDealsGet(Map<String, String> additionalHeaders) Get deal attributescrmAttributesPost(CrmAttributesPostRequest crmAttributesPostRequest) Create a company/deal attributecrmAttributesPost(CrmAttributesPostRequest crmAttributesPostRequest, Map<String, String> additionalHeaders) Create a company/deal attributecrmDealsGet(String filtersAttributesDealName, String filtersLinkedCompaniesIds, String filtersLinkedContactsIds, String modifiedSince, String createdSince, Long offset, Long limit, String sort) Get all dealscrmDealsGet(String filtersAttributesDealName, String filtersLinkedCompaniesIds, String filtersLinkedContactsIds, String modifiedSince, String createdSince, Long offset, Long limit, String sort, Map<String, String> additionalHeaders) Get all dealsvoidDelete a dealvoidcrmDealsIdDelete(String id, Map<String, String> additionalHeaders) Delete a dealcrmDealsIdGet(String id) Get a dealcrmDealsIdGet(String id, Map<String, String> additionalHeaders) Get a dealvoidcrmDealsIdPatch(String id, CrmDealsIdPatchRequest crmDealsIdPatchRequest) Update a dealvoidcrmDealsIdPatch(String id, CrmDealsIdPatchRequest crmDealsIdPatchRequest, Map<String, String> additionalHeaders) Update a dealcrmDealsImportPost(File _file, Object mapping) Import deals(creation and updation) Import deals from a CSV file with mapping options.Import deals(creation and updation) Import deals from a CSV file with mapping options.voidcrmDealsLinkUnlinkIdPatch(String id, CrmDealsLinkUnlinkIdPatchRequest crmDealsLinkUnlinkIdPatchRequest) Link and Unlink a deal with contacts and companiesvoidcrmDealsLinkUnlinkIdPatch(String id, CrmDealsLinkUnlinkIdPatchRequest crmDealsLinkUnlinkIdPatchRequest, Map<String, String> additionalHeaders) Link and Unlink a deal with contacts and companiescrmDealsPost(CrmDealsPostRequest crmDealsPostRequest) Create a dealcrmDealsPost(CrmDealsPostRequest crmDealsPostRequest, Map<String, String> additionalHeaders) Create a dealGet all pipelinescrmPipelineDetailsAllGet(Map<String, String> additionalHeaders) Get all pipelinesDeprecated.crmPipelineDetailsGet(Map<String, String> additionalHeaders) Deprecated.crmPipelineDetailsPipelineIDGet(String pipelineID) Get a pipelinecrmPipelineDetailsPipelineIDGet(String pipelineID, Map<String, String> additionalHeaders) Get a pipeline<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
-
DealsApi
public DealsApi() -
DealsApi
-
-
Method Details
-
crmAttributesDealsGet
Get deal attributes- Returns:
- List<DealAttributesInner>
- Throws:
ApiException- if fails to make API call
-
crmAttributesDealsGet
public List<DealAttributesInner> crmAttributesDealsGet(Map<String, String> additionalHeaders) throws ApiExceptionGet 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 ApiExceptionCreate 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 ApiExceptionGet 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
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 ApiExceptionDelete a deal- Parameters:
id- (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
crmDealsIdGet
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 ApiExceptionGet 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 ApiExceptionUpdate 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 ApiExceptionImport 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 ApiExceptionLink 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 ApiExceptionCreate a deal- Parameters:
crmDealsPostRequest- Deal create data. (required)additionalHeaders- additionalHeaders for this call- Returns:
- CrmDealsPost201Response
- Throws:
ApiException- if fails to make API call
-
crmPipelineDetailsAllGet
Get all pipelines- Returns:
- List<Pipeline>
- Throws:
ApiException- if fails to make API call
-
crmPipelineDetailsAllGet
public List<Pipeline> crmPipelineDetailsAllGet(Map<String, String> additionalHeaders) throws ApiExceptionGet all pipelines- Parameters:
additionalHeaders- additionalHeaders for this call- Returns:
- List<Pipeline>
- Throws:
ApiException- if fails to make API call
-
crmPipelineDetailsGet
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 ApiExceptionDeprecated.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 ApiExceptionGet 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 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.
-