Package com.nexmo.client.application
Class ApplicationClient
- java.lang.Object
-
- com.nexmo.client.AbstractClient
-
- com.nexmo.client.application.ApplicationClient
-
public class ApplicationClient extends AbstractClient
A client for talking to the Nexmo Application API. The standard way to obtain an instance of this class is to useNexmoClient.getApplicationClient()
-
-
Field Summary
-
Fields inherited from class com.nexmo.client.AbstractClient
httpWrapper
-
-
Constructor Summary
Constructors Constructor Description ApplicationClient(HttpWrapper httpWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods 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 Detail
-
ApplicationClient
public ApplicationClient(HttpWrapper httpWrapper)
-
-
Method Detail
-
createApplication
public Application createApplication(Application application) throws NexmoResponseParseException, NexmoClientException
Create a new application.- Parameters:
application- The application properties for the application to be created with.- Returns:
- The application which has been created.
- Throws:
NexmoResponseParseException- if the response from the API could not be parsed.NexmoClientException- if there was a problem with the Nexmo request.
-
updateApplication
public Application updateApplication(Application application) throws NexmoResponseParseException, NexmoClientException
Update an existing application.- Parameters:
application- The application properties for the application to be updated with.- Returns:
- The application which has been updated.
- Throws:
NexmoResponseParseException- if the response from the API could not be parsed.NexmoClientException- if there was a problem with the Nexmo request.
-
getApplication
public Application getApplication(java.lang.String id) throws NexmoResponseParseException, NexmoClientException
Retrieve an application.- Parameters:
id- The id of the application to retrieve.- Returns:
- The corresponding application.
- Throws:
NexmoResponseParseException- if the response from the API could not be parsed.NexmoClientException- if there was a problem with the Nexmo request.
-
deleteApplication
public void deleteApplication(java.lang.String id) throws NexmoResponseParseException, NexmoClientException
Delete an application.- Parameters:
id- The id of the application to delete.- Throws:
NexmoResponseParseException- if the response from the API could not be parsed.NexmoClientException- if there was a problem with the Nexmo request.
-
listApplications
public ApplicationList listApplications() throws NexmoResponseParseException, NexmoClientException
List the first page of available applications.- Returns:
- The list of available applications.
- Throws:
NexmoResponseParseException- if the response from the API could not be parsed.NexmoClientException- if there was a problem with the Nexmo request.
-
listApplications
public ApplicationList listApplications(ListApplicationRequest listApplicationRequest) throws NexmoResponseParseException, NexmoClientException
List the available applications.- Parameters:
listApplicationRequest- The page and number of applications per page to list.- Returns:
- The list of available applications.
- Throws:
NexmoResponseParseException- if the response from the API could not be parsed.NexmoClientException- if there was a problem with the Nexmo request.
-
-