Class ClientsApi


  • public class ClientsApi
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ClientResponse createClient​(ClientCreate clientCreate, java.lang.String appId, java.lang.String userIdOrExternalId)
      Create Client Create a client and link it to a channel specified by the `matchCriteria.type`.
      ClientResponse createClient​(java.lang.String bearerToken, ClientCreate clientCreate, java.lang.String appId, java.lang.String userIdOrExternalId)
      Create Client Create a client and link it to a channel specified by the `matchCriteria.type`.
      ApiClient getApiClient()  
      ClientListResponse listClients​(java.lang.String appId, java.lang.String userIdOrExternalId, Page page)
      List Clients Get all the clients for a particular user, including both linked clients and pending clients.
      ClientListResponse listClients​(java.lang.String bearerToken, java.lang.String appId, java.lang.String userIdOrExternalId, Page page)
      List Clients Get all the clients for a particular user, including both linked clients and pending clients.
      java.lang.Object removeClient​(java.lang.String appId, java.lang.String userIdOrExternalId, java.lang.String clientId)
      Remove Client Remove a particular client and unsubscribe it from all connected conversations.
      java.lang.Object removeClient​(java.lang.String bearerToken, java.lang.String appId, java.lang.String userIdOrExternalId, java.lang.String clientId)
      Remove Client Remove a particular client and unsubscribe it from all connected conversations.
      void setApiClient​(ApiClient apiClient)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ClientsApi

        public ClientsApi()
      • ClientsApi

        public ClientsApi​(ApiClient apiClient)
    • Method Detail

      • getApiClient

        public ApiClient getApiClient()
      • setApiClient

        public void setApiClient​(ApiClient apiClient)
      • createClient

        public ClientResponse createClient​(ClientCreate clientCreate,
                                           java.lang.String appId,
                                           java.lang.String userIdOrExternalId)
                                    throws ApiException
        Create Client Create a client and link it to a channel specified by the `matchCriteria.type`. Note that the client is initially created with a `pending` status. The status of the linking request can be tracked by listening to the `link:match`, `link:success` and `link:failure` webhooks (only available in v1). For more information, see [link-events](https://docs.smooch.io/rest/v1/#link-events).
        Parameters:
        clientCreate - (required)
        appId - Identifies the app. (required)
        userIdOrExternalId - The user's id or externalId. (required)
        Returns:
        a ClientResponse
        Throws:
        ApiException - if fails to make API call
      • listClients

        public ClientListResponse listClients​(java.lang.String appId,
                                              java.lang.String userIdOrExternalId,
                                              Page page)
                                       throws ApiException
        List Clients Get all the clients for a particular user, including both linked clients and pending clients. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). ```shell /v2/apps/:appId/users/:userId/clients?page[after]=5ebee0975ac5304b664a12fa ```
        Parameters:
        appId - Identifies the app. (required)
        userIdOrExternalId - The user's id or externalId. (required)
        page - Contains parameters for applying cursor pagination. (optional)
        Returns:
        a ClientListResponse
        Throws:
        ApiException - if fails to make API call
      • removeClient

        public java.lang.Object removeClient​(java.lang.String appId,
                                             java.lang.String userIdOrExternalId,
                                             java.lang.String clientId)
                                      throws ApiException
        Remove Client Remove a particular client and unsubscribe it from all connected conversations.
        Parameters:
        appId - Identifies the app. (required)
        userIdOrExternalId - The user's id or externalId. (required)
        clientId - The client's id. (required)
        Returns:
        a Object
        Throws:
        ApiException - if fails to make API call
      • createClient

        public ClientResponse createClient​(java.lang.String bearerToken,
                                           ClientCreate clientCreate,
                                           java.lang.String appId,
                                           java.lang.String userIdOrExternalId)
                                    throws ApiException
        Create Client Create a client and link it to a channel specified by the `matchCriteria.type`. Note that the client is initially created with a `pending` status. The status of the linking request can be tracked by listening to the `link:match`, `link:success` and `link:failure` webhooks (only available in v1). For more information, see [link-events](https://docs.smooch.io/rest/v1/#link-events).
        Parameters:
        bearerToken - a token to be used for this request (required)
        clientCreate - (required)
        appId - Identifies the app. (required)
        userIdOrExternalId - The user's id or externalId. (required)
        Returns:
        a ClientResponse
        Throws:
        ApiException - if fails to make API call
      • listClients

        public ClientListResponse listClients​(java.lang.String bearerToken,
                                              java.lang.String appId,
                                              java.lang.String userIdOrExternalId,
                                              Page page)
                                       throws ApiException
        List Clients Get all the clients for a particular user, including both linked clients and pending clients. This API is paginated through [cursor pagination](#section/Introduction/API-pagination-and-records-limits). ```shell /v2/apps/:appId/users/:userId/clients?page[after]=5ebee0975ac5304b664a12fa ```
        Parameters:
        bearerToken - a token to be used for this request (required)
        appId - Identifies the app. (required)
        userIdOrExternalId - The user's id or externalId. (required)
        page - Contains parameters for applying cursor pagination. (optional)
        Returns:
        a ClientListResponse
        Throws:
        ApiException - if fails to make API call
      • removeClient

        public java.lang.Object removeClient​(java.lang.String bearerToken,
                                             java.lang.String appId,
                                             java.lang.String userIdOrExternalId,
                                             java.lang.String clientId)
                                      throws ApiException
        Remove Client Remove a particular client and unsubscribe it from all connected conversations.
        Parameters:
        bearerToken - a token to be used for this request (required)
        appId - Identifies the app. (required)
        userIdOrExternalId - The user's id or externalId. (required)
        clientId - The client's id. (required)
        Returns:
        a Object
        Throws:
        ApiException - if fails to make API call