Package com.vonage.client.application
Class ApplicationClient
java.lang.Object
com.vonage.client.AbstractClient
com.vonage.client.application.ApplicationClient
public class ApplicationClient extends AbstractClient
A client for talking to the Vonage Application API. The standard way to obtain an instance of this class is to use
VonageClient.getApplicationClient()-
Field Summary
-
Constructor Summary
Constructors Constructor Description ApplicationClient(HttpWrapper httpWrapper) -
Method Summary
Modifier and Type Method Description ApplicationcreateApplication(Application application)Create a new application.voiddeleteApplication(java.lang.String id)Delete an application.ApplicationgetApplication(java.lang.String id)Retrieve an application.ApplicationListlistApplications()List the first page of available applications.ApplicationListlistApplications(ListApplicationRequest listApplicationRequest)List the available applications.ApplicationupdateApplication(Application application)Update an existing application.
-
Constructor Details
-
Method Details
-
createApplication
public Application createApplication(Application application) throws VonageResponseParseException, VonageClientExceptionCreate a new application.- Parameters:
application- The application properties for the application to be created with.- Returns:
- The application which has been created.
- Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request.
-
updateApplication
public Application updateApplication(Application application) throws VonageResponseParseException, VonageClientExceptionUpdate an existing application.- Parameters:
application- The application properties for the application to be updated with.- Returns:
- The application which has been updated.
- Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request.
-
getApplication
public Application getApplication(java.lang.String id) throws VonageResponseParseException, VonageClientExceptionRetrieve an application.- Parameters:
id- The id of the application to retrieve.- Returns:
- The corresponding application.
- Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request.
-
deleteApplication
public void deleteApplication(java.lang.String id) throws VonageResponseParseException, VonageClientExceptionDelete an application.- Parameters:
id- The id of the application to delete.- Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request.
-
listApplications
public ApplicationList listApplications() throws VonageResponseParseException, VonageClientExceptionList the first page of available applications.- Returns:
- The list of available applications.
- Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request.
-
listApplications
public ApplicationList listApplications(ListApplicationRequest listApplicationRequest) throws VonageResponseParseException, VonageClientExceptionList the available applications.- Parameters:
listApplicationRequest- The page and number of applications per page to list.- Returns:
- The list of available applications.
- Throws:
VonageResponseParseException- if the response from the API could not be parsed.VonageClientException- if there was a problem with the Vonage request.
-