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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.Delete all items in a list.createList(ContactsList list) Deprecated.Create a new list.createListItem(UUID listId, Map<String, ?> data) Deprecated.Create a new list item.voiddeleteList(UUID listId) Deprecated.Delete a list.voiddeleteListItem(UUID listId, UUID itemId) Deprecated.Delete a list item.downloadListItems(UUID listId) Deprecated.Download all items in a list in CSV format.voiddownloadListItems(UUID listId, Path file) Deprecated.Download all items in a list in CSV format.voidDeprecated.Fetch and replace all items from datasource.Deprecated.Retrieve a list.getListItem(UUID listId, UUID itemId) Deprecated.Retrieve a list item.listEvents(ListEventsFilter filter) Deprecated.Gets all events in the application matching the criteria.Deprecated.Gets the first 1000 events in the application.Deprecated.Get all items on a particular page.Deprecated.Gets the first 1000 lists in the application.Deprecated.Get all lists on a particular page.updateList(UUID listId, ContactsList updatedList) Deprecated.Update an existing list.updateListItem(UUID listId, UUID itemId, Map<String, ?> data) Deprecated.Update an existing list item.uploadListItems(UUID listId, Path csvFile) Deprecated.Import list items from a CSV file.
-
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
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
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
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
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
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
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
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
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
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
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
Deprecated.Download all items in a list in CSV format. UsedownloadListItems(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
Deprecated.Download all items in a list in CSV format. UsedownloadListItems(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
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
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
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.
-