Class CompaniesApi

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

public class CompaniesApi extends BaseApi
  • Constructor Details

    • CompaniesApi

      public CompaniesApi()
    • CompaniesApi

      public CompaniesApi(ApiClient apiClient)
  • Method Details

    • companiesAttributesGet

      public List<CompanyAttributesInner> companiesAttributesGet() throws ApiException
      Get company attributes
      Returns:
      List<CompanyAttributesInner>
      Throws:
      ApiException - if fails to make API call
    • companiesAttributesGet

      public List<CompanyAttributesInner> companiesAttributesGet(Map<String,String> additionalHeaders) throws ApiException
      Get company attributes
      Parameters:
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<CompanyAttributesInner>
      Throws:
      ApiException - if fails to make API call
    • companiesGet

      public CompaniesList companiesGet(String filters, Long linkedContactsIds, String linkedDealsIds, Long page, Long limit, String sort, 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)
      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(String filters, Long linkedContactsIds, String linkedDealsIds, Long page, Long limit, String sort, String sortBy, Map<String,String> additionalHeaders) 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)
      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

      public void companiesIdDelete(String id) throws ApiException
      Delete a company
      Parameters:
      id - Company ID to delete (required)
      Throws:
      ApiException - if fails to make API call
    • companiesIdDelete

      public void companiesIdDelete(String id, Map<String,String> additionalHeaders) throws ApiException
      Delete a company
      Parameters:
      id - Company ID to delete (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • companiesIdGet

      public Company companiesIdGet(String id) throws ApiException
      Get a company
      Parameters:
      id - Get Company Details (required)
      Returns:
      Company
      Throws:
      ApiException - if fails to make API call
    • companiesIdGet

      public Company companiesIdGet(String id, Map<String,String> additionalHeaders) throws ApiException
      Get 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(String id, 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(String id, CompaniesIdPatchRequest companiesIdPatchRequest, Map<String,String> additionalHeaders) throws ApiException
      Update 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
    • companiesLinkUnlinkIdPatch

      public void companiesLinkUnlinkIdPatch(String id, 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(String id, CompaniesLinkUnlinkIdPatchRequest companiesLinkUnlinkIdPatchRequest, Map<String,String> additionalHeaders) throws ApiException
      Link 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(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(CompaniesPostRequest companiesPostRequest, Map<String,String> additionalHeaders) throws ApiException
      Create a company
      Parameters:
      companiesPostRequest - Company create data. (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CompaniesPost200Response
      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.