Class ProactiveConnectClient

java.lang.Object
com.vonage.client.proactiveconnect.ProactiveConnectClient

Deprecated.
This API is sunset and will be removed in the next major release.
A client for talking to the Vonage Proactive Connect API. The standard way to obtain an instance of this class is to use VonageClient.getProactiveConnectClient().
  • Constructor Details

    • ProactiveConnectClient

      Deprecated.
      Constructor.
      Parameters:
      wrapper - (REQUIRED) shared HTTP wrapper object used for making REST calls.
  • Method Details

    • createList

      Deprecated.
      Create a new list.
      Parameters:
      list - The new list's properties.
      Returns:
      The list that was created with updated metadata.
      Throws:
      ProactiveConnectResponseException - If the request was unsuccessful. This could be for the following reasons:
      • 400: Invalid request parameter or body.
      • 409: Conflict.
      • 422: Resource limit reached / exceeded.
    • getList

      public ContactsList getList(UUID listId)
      Deprecated.
      Retrieve a list.
      Parameters:
      listId - Unique ID of the list.
      Returns:
      The list associated with the ID.
      Throws:
      ProactiveConnectResponseException - If the list does not exist or couldn't be retrieved.
    • updateList

      public ContactsList updateList(UUID listId, ContactsList updatedList)
      Deprecated.
      Update an existing list.
      Parameters:
      listId - Unique ID of the list.
      updatedList - The new list properties.
      Returns:
      The updated list.
      Throws:
      ProactiveConnectResponseException - If the request was unsuccessful. This could be for the following reasons:
      • 400: Invalid request parameter or body.
      • 404: List not found.
      • 409: Conflict.
    • deleteList

      public void deleteList(UUID listId)
      Deprecated.
      Delete a list.
      Parameters:
      listId - Unique ID of the list.
      Throws:
      ProactiveConnectResponseException - If the list does not exist or couldn't be deleted.
    • clearList

      public void clearList(UUID listId)
      Deprecated.
      Delete all items in a list.
      Parameters:
      listId - Unique ID of the list.
      Throws:
      ProactiveConnectResponseException - If the list does not exist or couldn't be cleared.
    • fetchList

      public void fetchList(UUID listId)
      Deprecated.
      Fetch and replace all items from datasource.
      Parameters:
      listId - Unique ID of the list.
      Throws:
      ProactiveConnectResponseException - If the list does not exist or couldn't be fetched.
    • listLists

      Deprecated.
      Gets the first 1000 lists in the application.
      Returns:
      The lists in order of creation.
      Throws:
      ProactiveConnectResponseException - If there was an error in retrieving the lists.
    • listLists

      public ListListsResponse listLists(int page, int pageSize, SortOrder order)
      Deprecated.
      Get all lists on a particular page.
      Parameters:
      page - The page number of the HAL response to parse results.
      pageSize - Number of results per page in the HAL response.
      order - The order to sort results by (ascending or descending).
      Returns:
      The lists page.
      Throws:
      ProactiveConnectResponseException - If there was an error in retrieving the lists.
    • createListItem

      public ListItem createListItem(UUID listId, Map<String,?> data)
      Deprecated.
      Create a new list item.
      Parameters:
      listId - Unique ID of the list.
      data - The new item's data as a Map.
      Returns:
      The created list item.
      Throws:
      ProactiveConnectResponseException - If the request was unsuccessful. This could be for the following reasons:
      • 400: Invalid request parameter or body.
      • 404: List not found.
      • 422: Resource limit reached / exceeded.
    • getListItem

      public ListItem getListItem(UUID listId, UUID itemId)
      Deprecated.
      Retrieve a list item.
      Parameters:
      listId - Unique ID of the list.
      itemId - Unique ID of the item.
      Returns:
      The requested list item.
      Throws:
      ProactiveConnectResponseException - If the list or item does not exist or couldn't be retrieved.
    • updateListItem

      public ListItem updateListItem(UUID listId, UUID itemId, Map<String,?> data)
      Deprecated.
      Update an existing list item.
      Parameters:
      listId - Unique ID of the list.
      itemId - Unique ID of the item.
      data - The updated item data as a Map.
      Returns:
      The updated list item.
      Throws:
      ProactiveConnectResponseException - If the request was unsuccessful. This could be for the following reasons:
      • 400: Invalid request parameter or body.
      • 404: List or item not found.
    • deleteListItem

      public void deleteListItem(UUID listId, UUID itemId)
      Deprecated.
      Delete a list item.
      Parameters:
      listId - Unique ID of the list.
      itemId - Unique ID of the item.
      Throws:
      ProactiveConnectResponseException - If the list or item does not exist or couldn't be deleted.
    • downloadListItems

      public String downloadListItems(UUID listId)
      Deprecated.
      Download all items in a list in CSV format. Use downloadListItems(UUID, Path) to save the CSV as a file.
      Parameters:
      listId - Unique ID of the list.
      Returns:
      The list items contents as a CSV-formatted String.
      Throws:
      ProactiveConnectResponseException - If the list does not exist or couldn't be retrieved.
      See Also:
    • downloadListItems

      public void downloadListItems(UUID listId, Path file)
      Deprecated.
      Download all items in a list in CSV format. Use downloadListItems(UUID) to get the results as a String.
      Parameters:
      listId - Unique ID of the list.
      file - Path of the file to write the downloaded results to.
      Throws:
      ProactiveConnectResponseException - If the list does not exist or couldn't be retrieved.
    • uploadListItems

      public UploadListItemsResponse uploadListItems(UUID listId, Path csvFile)
      Deprecated.
      Import list items from a CSV file.
      Parameters:
      listId - Unique ID of the list.
      csvFile - Path to the CSV file to upload.
      Returns:
      Result of the upload if successful.
      Throws:
      ProactiveConnectResponseException - If the request was unsuccessful. This could be for the following reasons:
      • 404: List not found.
      • 422: Resource limit reached / exceeded.
    • listItems

      public List<ListItem> listItems(UUID listId)
      Deprecated.
      Gets the first 1000 events in the application.
      Parameters:
      listId - Unique ID of the list to retrieve items from.
      Returns:
      The events in order of creation.
      Throws:
      ProactiveConnectResponseException - If the list does not exist or the items couldn't be retrieved.
    • listItems

      public ListItemsResponse listItems(UUID listId, int page, int pageSize, SortOrder order)
      Deprecated.
      Get all items on a particular page.
      Parameters:
      listId - Unique ID of the list to retrieve items from.
      page - The page number of the HAL response to parse results.
      pageSize - Number of results per page in the HAL response.
      order - The order to sort results by (ascending or descending).
      Returns:
      The items page.
      Throws:
      ProactiveConnectResponseException - If the list does not exist or the items couldn't be retrieved.
    • listEvents

      Deprecated.
      Gets all events in the application matching the criteria.
      Parameters:
      filter - Optional attributes to narrow down the results.
      Returns:
      The list of events applicable to the request criteria, in order of creation.
      Throws:
      ProactiveConnectResponseException - If the events couldn't be retrieved.