Package software.xdev.brevo.api
Class CompaniesApi
java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.CompaniesApi
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncompaniesGet(String filters, Long linkedContactsIds, String linkedDealsIds, String modifiedSince, String createdSince, Long page, Long limit, String sort, String sortBy) Get all CompaniescompaniesGet(String filters, Long linkedContactsIds, String linkedDealsIds, String modifiedSince, String createdSince, Long page, Long limit, String sort, String sortBy, Map<String, String> additionalHeaders) Get all CompaniesvoidDelete a companyvoidcompaniesIdDelete(String id, Map<String, String> additionalHeaders) Delete a companycompaniesIdGet(String id) Get a companycompaniesIdGet(String id, Map<String, String> additionalHeaders) Get a companycompaniesIdPatch(String id, CompaniesIdPatchRequest companiesIdPatchRequest) Update a companycompaniesIdPatch(String id, CompaniesIdPatchRequest companiesIdPatchRequest, Map<String, String> additionalHeaders) Update a companycompaniesImportPost(File _file, Object mapping) Import companies(creation and updation) Import companies from a CSV file with mapping options.Import companies(creation and updation) Import companies from a CSV file with mapping options.voidcompaniesLinkUnlinkIdPatch(String id, CompaniesLinkUnlinkIdPatchRequest companiesLinkUnlinkIdPatchRequest) Link and Unlink company with contact and dealvoidcompaniesLinkUnlinkIdPatch(String id, CompaniesLinkUnlinkIdPatchRequest companiesLinkUnlinkIdPatchRequest, Map<String, String> additionalHeaders) Link and Unlink company with contact and dealcompaniesPost(CompaniesPostRequest companiesPostRequest) Create a companycompaniesPost(CompaniesPostRequest companiesPostRequest, Map<String, String> additionalHeaders) Create a companyGet company attributescrmAttributesCompaniesGet(Map<String, String> additionalHeaders) Get company attributescrmAttributesPost(CrmAttributesPostRequest crmAttributesPostRequest) Create a company/deal attributecrmAttributesPost(CrmAttributesPostRequest crmAttributesPostRequest, Map<String, String> additionalHeaders) Create a company/deal attribute<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
-
CompaniesApi
public CompaniesApi() -
CompaniesApi
-
-
Method Details
-
companiesGet
public CompaniesList companiesGet(@Nullable String filters, @Nullable Long linkedContactsIds, @Nullable String linkedDealsIds, @Nullable String modifiedSince, @Nullable String createdSince, @Nullable Long page, @Nullable Long limit, @Nullable String sort, @Nullable String sortBy) throws ApiException Get all Companies- Parameters:
filters- Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"6299dcf3874a14eacbc65c46\"} (optional)linkedContactsIds- Filter by linked contacts ids (optional)linkedDealsIds- Filter by linked Deals 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)page- 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)sortBy- The field used to sort field names. (optional)- Returns:
- CompaniesList
- Throws:
ApiException- if fails to make API call
-
companiesGet
public CompaniesList companiesGet(@Nullable String filters, @Nullable Long linkedContactsIds, @Nullable String linkedDealsIds, @Nullable String modifiedSince, @Nullable String createdSince, @Nullable Long page, @Nullable Long limit, @Nullable String sort, @Nullable String sortBy, Map<String, String> additionalHeaders) throws ApiExceptionGet all Companies- Parameters:
filters- Filter by attrbutes. If you have filter for owner on your side please send it as {\"attributes.owner\":\"6299dcf3874a14eacbc65c46\"} (optional)linkedContactsIds- Filter by linked contacts ids (optional)linkedDealsIds- Filter by linked Deals 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)page- 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)sortBy- The field used to sort field names. (optional)additionalHeaders- additionalHeaders for this call- Returns:
- CompaniesList
- Throws:
ApiException- if fails to make API call
-
companiesIdDelete
Delete a company- Parameters:
id- Company ID to delete (required)- Throws:
ApiException- if fails to make API call
-
companiesIdDelete
public void companiesIdDelete(@Nonnull String id, Map<String, String> additionalHeaders) throws ApiExceptionDelete a company- Parameters:
id- Company ID to delete (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
companiesIdGet
Get a company- Parameters:
id- Get Company Details (required)- Returns:
- Company
- Throws:
ApiException- if fails to make API call
-
companiesIdGet
public Company companiesIdGet(@Nonnull String id, Map<String, String> additionalHeaders) throws ApiExceptionGet a company- Parameters:
id- Get Company Details (required)additionalHeaders- additionalHeaders for this call- Returns:
- Company
- Throws:
ApiException- if fails to make API call
-
companiesIdPatch
public Company companiesIdPatch(@Nonnull String id, @Nonnull CompaniesIdPatchRequest companiesIdPatchRequest) throws ApiException Update a company- Parameters:
id- (required)companiesIdPatchRequest- Updated company details. (required)- Returns:
- Company
- Throws:
ApiException- if fails to make API call
-
companiesIdPatch
public Company companiesIdPatch(@Nonnull String id, @Nonnull CompaniesIdPatchRequest companiesIdPatchRequest, Map<String, String> additionalHeaders) throws ApiExceptionUpdate a company- Parameters:
id- (required)companiesIdPatchRequest- Updated company details. (required)additionalHeaders- additionalHeaders for this call- Returns:
- Company
- Throws:
ApiException- if fails to make API call
-
companiesImportPost
public CompaniesImportPost200Response companiesImportPost(@Nullable File _file, @Nullable Object mapping) throws ApiException Import companies(creation and updation) Import companies 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) company_id [brevo mongoID to update deals] (b) associated_contact (c) associated_deal (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
-
companiesImportPost
public CompaniesImportPost200Response companiesImportPost(@Nullable File _file, @Nullable Object mapping, Map<String, String> additionalHeaders) throws ApiExceptionImport companies(creation and updation) Import companies 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) company_id [brevo mongoID to update deals] (b) associated_contact (c) associated_deal (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
-
companiesLinkUnlinkIdPatch
public void companiesLinkUnlinkIdPatch(@Nonnull String id, @Nonnull CompaniesLinkUnlinkIdPatchRequest companiesLinkUnlinkIdPatchRequest) throws ApiException Link and Unlink company with contact and deal- Parameters:
id- (required)companiesLinkUnlinkIdPatchRequest- Linked / Unlinked contacts and deals ids. (required)- Throws:
ApiException- if fails to make API call
-
companiesLinkUnlinkIdPatch
public void companiesLinkUnlinkIdPatch(@Nonnull String id, @Nonnull CompaniesLinkUnlinkIdPatchRequest companiesLinkUnlinkIdPatchRequest, Map<String, String> additionalHeaders) throws ApiExceptionLink and Unlink company with contact and deal- Parameters:
id- (required)companiesLinkUnlinkIdPatchRequest- Linked / Unlinked contacts and deals ids. (required)additionalHeaders- additionalHeaders for this call- Throws:
ApiException- if fails to make API call
-
companiesPost
public CompaniesPost200Response companiesPost(@Nonnull CompaniesPostRequest companiesPostRequest) throws ApiException Create a company- Parameters:
companiesPostRequest- Company create data. (required)- Returns:
- CompaniesPost200Response
- Throws:
ApiException- if fails to make API call
-
companiesPost
public CompaniesPost200Response companiesPost(@Nonnull CompaniesPostRequest companiesPostRequest, Map<String, String> additionalHeaders) throws ApiExceptionCreate a company- Parameters:
companiesPostRequest- Company create data. (required)additionalHeaders- additionalHeaders for this call- Returns:
- CompaniesPost200Response
- Throws:
ApiException- if fails to make API call
-
crmAttributesCompaniesGet
Get company attributes- Returns:
- List<CompanyAttributesInner>
- Throws:
ApiException- if fails to make API call
-
crmAttributesCompaniesGet
public List<CompanyAttributesInner> crmAttributesCompaniesGet(Map<String, String> additionalHeaders) throws ApiExceptionGet company attributes- Parameters:
additionalHeaders- additionalHeaders for this call- Returns:
- List<CompanyAttributesInner>
- 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
-
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.
-