Class AsyncRawCompaniesClient
- java.lang.Object
-
- com.intercom.api.resources.unstable.companies.AsyncRawCompaniesClient
-
public class AsyncRawCompaniesClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description AsyncRawCompaniesClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>attachContactToACompany(AttachContactToACompanyRequest request)You can attach a company to a single contact.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>attachContactToACompany(AttachContactToACompanyRequest request, RequestOptions requestOptions)You can attach a company to a single contact.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>createOrUpdateCompany(java.lang.Object request)You can create or update a company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>createOrUpdateCompany(java.lang.Object request, RequestOptions requestOptions)You can create or update a company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<DeletedCompanyObject>>deleteCompany(DeleteCompanyRequest request)You can delete a single company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<DeletedCompanyObject>>deleteCompany(DeleteCompanyRequest request, RequestOptions requestOptions)You can delete a single company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>detachContactFromACompany(DetachContactFromACompanyRequest request)You can detach a company from a single contact.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>detachContactFromACompany(DetachContactFromACompanyRequest request, RequestOptions requestOptions)You can detach a company from a single contact.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>>listAllCompanies()You can list companies.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>>listAllCompanies(ListAllCompaniesRequest request)You can list companies.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>>listAllCompanies(ListAllCompaniesRequest request, RequestOptions requestOptions)You can list companies.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyAttachedContacts>>listAttachedContacts(ListAttachedContactsRequest request)You can fetch a list of all contacts that belong to a company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyAttachedContacts>>listAttachedContacts(ListAttachedContactsRequest request, RequestOptions requestOptions)You can fetch a list of all contacts that belong to a company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyAttachedSegments>>listAttachedSegmentsForCompanies(ListAttachedSegmentsForCompaniesRequest request)You can fetch a list of all segments that belong to a company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyAttachedSegments>>listAttachedSegmentsForCompanies(ListAttachedSegmentsForCompaniesRequest request, RequestOptions requestOptions)You can fetch a list of all segments that belong to a company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>retrieveACompanyById(RetrieveACompanyByIdRequest request)You can fetch a single company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>retrieveACompanyById(RetrieveACompanyByIdRequest request, RequestOptions requestOptions)You can fetch a single company.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>>retrieveCompany()You can fetch a single company by passing incompany_idorname.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>>retrieveCompany(RetrieveCompanyRequest request)You can fetch a single company by passing incompany_idorname.java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>>retrieveCompany(RetrieveCompanyRequest request, RequestOptions requestOptions)You can fetch a single company by passing incompany_idorname.java.util.concurrent.CompletableFuture<IntercomHttpResponse<java.util.Optional<CompanyScroll>>>scrollOverAllCompanies()Thelist all companiesfunctionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply.java.util.concurrent.CompletableFuture<IntercomHttpResponse<java.util.Optional<CompanyScroll>>>scrollOverAllCompanies(ScrollOverAllCompaniesRequest request)Thelist all companiesfunctionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply.java.util.concurrent.CompletableFuture<IntercomHttpResponse<java.util.Optional<CompanyScroll>>>scrollOverAllCompanies(ScrollOverAllCompaniesRequest request, RequestOptions requestOptions)Thelist all companiesfunctionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>updateCompany(UpdateCompanyRequest request)You can update a single company using the Intercom provisionedid.java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>>updateCompany(UpdateCompanyRequest request, RequestOptions requestOptions)You can update a single company using the Intercom provisionedid.
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
AsyncRawCompaniesClient
public AsyncRawCompaniesClient(ClientOptions clientOptions)
-
-
Method Detail
-
retrieveCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>> retrieveCompany()
You can fetch a single company by passing incompany_idorname.https://api.intercom.io/companies?name={name}https://api.intercom.io/companies?company_id={company_id}You can fetch all companies and filter by
segment_idortag_idas a query parameter.https://api.intercom.io/companies?tag_id={tag_id}https://api.intercom.io/companies?segment_id={segment_id}
-
retrieveCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>> retrieveCompany(RetrieveCompanyRequest request)
You can fetch a single company by passing incompany_idorname.https://api.intercom.io/companies?name={name}https://api.intercom.io/companies?company_id={company_id}You can fetch all companies and filter by
segment_idortag_idas a query parameter.https://api.intercom.io/companies?tag_id={tag_id}https://api.intercom.io/companies?segment_id={segment_id}
-
retrieveCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>> retrieveCompany(RetrieveCompanyRequest request, RequestOptions requestOptions)
You can fetch a single company by passing incompany_idorname.https://api.intercom.io/companies?name={name}https://api.intercom.io/companies?company_id={company_id}You can fetch all companies and filter by
segment_idortag_idas a query parameter.https://api.intercom.io/companies?tag_id={tag_id}https://api.intercom.io/companies?segment_id={segment_id}
-
createOrUpdateCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> createOrUpdateCompany(java.lang.Object request)
You can create or update a company.Companies will be only visible in Intercom when there is at least one associated user.
Companies are looked up via
company_idin aPOSTrequest, if not found viacompany_id, the new company will be created, if found, that company will be updated.{% admonition type="warning" name="Using
company_id" %} You can set a uniquecompany_idvalue when creating a company. However, it is not possible to updatecompany_id. Be sure to set a unique value once upon creation of the company. {% /admonition %}
-
createOrUpdateCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> createOrUpdateCompany(java.lang.Object request, RequestOptions requestOptions)
You can create or update a company.Companies will be only visible in Intercom when there is at least one associated user.
Companies are looked up via
company_idin aPOSTrequest, if not found viacompany_id, the new company will be created, if found, that company will be updated.{% admonition type="warning" name="Using
company_id" %} You can set a uniquecompany_idvalue when creating a company. However, it is not possible to updatecompany_id. Be sure to set a unique value once upon creation of the company. {% /admonition %}
-
retrieveACompanyById
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> retrieveACompanyById(RetrieveACompanyByIdRequest request)
You can fetch a single company.
-
retrieveACompanyById
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> retrieveACompanyById(RetrieveACompanyByIdRequest request, RequestOptions requestOptions)
You can fetch a single company.
-
updateCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> updateCompany(UpdateCompanyRequest request)
You can update a single company using the Intercom provisionedid.{% admonition type="warning" name="Using
company_id" %} When updating a company it is not possible to updatecompany_id. This can only be set once upon creation of the company. {% /admonition %}
-
updateCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> updateCompany(UpdateCompanyRequest request, RequestOptions requestOptions)
You can update a single company using the Intercom provisionedid.{% admonition type="warning" name="Using
company_id" %} When updating a company it is not possible to updatecompany_id. This can only be set once upon creation of the company. {% /admonition %}
-
deleteCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<DeletedCompanyObject>> deleteCompany(DeleteCompanyRequest request)
You can delete a single company.
-
deleteCompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<DeletedCompanyObject>> deleteCompany(DeleteCompanyRequest request, RequestOptions requestOptions)
You can delete a single company.
-
listAttachedContacts
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyAttachedContacts>> listAttachedContacts(ListAttachedContactsRequest request)
You can fetch a list of all contacts that belong to a company.
-
listAttachedContacts
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyAttachedContacts>> listAttachedContacts(ListAttachedContactsRequest request, RequestOptions requestOptions)
You can fetch a list of all contacts that belong to a company.
-
listAttachedSegmentsForCompanies
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyAttachedSegments>> listAttachedSegmentsForCompanies(ListAttachedSegmentsForCompaniesRequest request)
You can fetch a list of all segments that belong to a company.
-
listAttachedSegmentsForCompanies
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyAttachedSegments>> listAttachedSegmentsForCompanies(ListAttachedSegmentsForCompaniesRequest request, RequestOptions requestOptions)
You can fetch a list of all segments that belong to a company.
-
listAllCompanies
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>> listAllCompanies()
You can list companies. The company list is sorted by thelast_request_atfield and by default is ordered descending, most recently requested first.Note that the API does not include companies who have no associated users in list responses.
When using the Companies endpoint and the pages object to iterate through the returned companies, there is a limit of 10,000 Companies that can be returned. If you need to list or iterate on more than 10,000 Companies, please use the Scroll API. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
listAllCompanies
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>> listAllCompanies(ListAllCompaniesRequest request)
You can list companies. The company list is sorted by thelast_request_atfield and by default is ordered descending, most recently requested first.Note that the API does not include companies who have no associated users in list responses.
When using the Companies endpoint and the pages object to iterate through the returned companies, there is a limit of 10,000 Companies that can be returned. If you need to list or iterate on more than 10,000 Companies, please use the Scroll API. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
listAllCompanies
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<CompanyList>> listAllCompanies(ListAllCompaniesRequest request, RequestOptions requestOptions)
You can list companies. The company list is sorted by thelast_request_atfield and by default is ordered descending, most recently requested first.Note that the API does not include companies who have no associated users in list responses.
When using the Companies endpoint and the pages object to iterate through the returned companies, there is a limit of 10,000 Companies that can be returned. If you need to list or iterate on more than 10,000 Companies, please use the Scroll API. {% admonition type="warning" name="Pagination" %} You can use pagination to limit the number of results returned. The default is
20results per page. See the pagination section for more details on how to use thestarting_afterparam. {% /admonition %}
-
scrollOverAllCompanies
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<java.util.Optional<CompanyScroll>>> scrollOverAllCompanies()
Thelist all companiesfunctionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply. The Scroll API provides an efficient mechanism for iterating over all companies in a dataset.- Each app can only have 1 scroll open at a time. You'll get an error message if you try to have more than one open per app.
- If the scroll isn't used for 1 minute, it expires and calls with that scroll param will fail
- If the end of the scroll is reached, "companies" will be empty and the scroll parameter will expire
{% admonition type="info" name="Scroll Parameter" %} You can get the first page of companies by simply sending a GET request to the scroll endpoint. For subsequent requests you will need to use the scroll parameter from the response. {% /admonition %} {% admonition type="danger" name="Scroll network timeouts" %} Since scroll is often used on large datasets network errors such as timeouts can be encountered. When this occurs you will see a HTTP 500 error with the following message: "Request failed due to an internal network error. Please restart the scroll operation." If this happens, you will need to restart your scroll query: It is not possible to continue from a specific point when using scroll. {% /admonition %}
-
scrollOverAllCompanies
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<java.util.Optional<CompanyScroll>>> scrollOverAllCompanies(ScrollOverAllCompaniesRequest request)
Thelist all companiesfunctionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply. The Scroll API provides an efficient mechanism for iterating over all companies in a dataset.- Each app can only have 1 scroll open at a time. You'll get an error message if you try to have more than one open per app.
- If the scroll isn't used for 1 minute, it expires and calls with that scroll param will fail
- If the end of the scroll is reached, "companies" will be empty and the scroll parameter will expire
{% admonition type="info" name="Scroll Parameter" %} You can get the first page of companies by simply sending a GET request to the scroll endpoint. For subsequent requests you will need to use the scroll parameter from the response. {% /admonition %} {% admonition type="danger" name="Scroll network timeouts" %} Since scroll is often used on large datasets network errors such as timeouts can be encountered. When this occurs you will see a HTTP 500 error with the following message: "Request failed due to an internal network error. Please restart the scroll operation." If this happens, you will need to restart your scroll query: It is not possible to continue from a specific point when using scroll. {% /admonition %}
-
scrollOverAllCompanies
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<java.util.Optional<CompanyScroll>>> scrollOverAllCompanies(ScrollOverAllCompaniesRequest request, RequestOptions requestOptions)
Thelist all companiesfunctionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply. The Scroll API provides an efficient mechanism for iterating over all companies in a dataset.- Each app can only have 1 scroll open at a time. You'll get an error message if you try to have more than one open per app.
- If the scroll isn't used for 1 minute, it expires and calls with that scroll param will fail
- If the end of the scroll is reached, "companies" will be empty and the scroll parameter will expire
{% admonition type="info" name="Scroll Parameter" %} You can get the first page of companies by simply sending a GET request to the scroll endpoint. For subsequent requests you will need to use the scroll parameter from the response. {% /admonition %} {% admonition type="danger" name="Scroll network timeouts" %} Since scroll is often used on large datasets network errors such as timeouts can be encountered. When this occurs you will see a HTTP 500 error with the following message: "Request failed due to an internal network error. Please restart the scroll operation." If this happens, you will need to restart your scroll query: It is not possible to continue from a specific point when using scroll. {% /admonition %}
-
attachContactToACompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> attachContactToACompany(AttachContactToACompanyRequest request)
You can attach a company to a single contact.
-
attachContactToACompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> attachContactToACompany(AttachContactToACompanyRequest request, RequestOptions requestOptions)
You can attach a company to a single contact.
-
detachContactFromACompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> detachContactFromACompany(DetachContactFromACompanyRequest request)
You can detach a company from a single contact.
-
detachContactFromACompany
public java.util.concurrent.CompletableFuture<IntercomHttpResponse<Company>> detachContactFromACompany(DetachContactFromACompanyRequest request, RequestOptions requestOptions)
You can detach a company from a single contact.
-
-