public class VerifyEndpoint extends AbstractMethod<VerifyRequest,VerifyResult>
| Constructor and Description |
|---|
VerifyEndpoint(HttpWrapper httpWrapper)
Create a new VerifyEndpoint.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Class[] |
getAcceptableAuthMethods() |
org.apache.http.client.methods.RequestBuilder |
makeRequest(VerifyRequest request)
Construct and return a RequestBuilder instance from the provided request.
|
VerifyResult |
parseResponse(org.apache.http.HttpResponse response)
Construct a ResultT representing the contents of the HTTP response returned from the Nexmo Voice API.
|
protected VerifyResult |
parseVerifyResponse(java.lang.String response) |
VerifyResult |
verify(java.lang.String number,
java.lang.String brand) |
VerifyResult |
verify(java.lang.String number,
java.lang.String brand,
java.lang.String from) |
VerifyResult |
verify(java.lang.String number,
java.lang.String brand,
java.lang.String from,
int length,
java.util.Locale locale) |
VerifyResult |
verify(java.lang.String number,
java.lang.String brand,
java.lang.String from,
int length,
java.util.Locale locale,
VerifyRequest.LineType type) |
VerifyResult |
verify(VerifyRequest request) |
applyAuth, execute, getAuthMethod, setHttpClientpublic VerifyEndpoint(HttpWrapper httpWrapper)
This client is used for calling the verify API's verify endpoint.
protected java.lang.Class[] getAcceptableAuthMethods()
getAcceptableAuthMethods in class AbstractMethod<VerifyRequest,VerifyResult>public org.apache.http.client.methods.RequestBuilder makeRequest(VerifyRequest request) throws NexmoClientException, java.io.UnsupportedEncodingException
AbstractMethodmakeRequest in class AbstractMethod<VerifyRequest,VerifyResult>request - A RequestT representing input to the REST call to be madeNexmoClientException - if a problem is encountered constructing the request or response.java.io.UnsupportedEncodingException - if UTF-8 encoding is not supported by the JVMpublic VerifyResult parseResponse(org.apache.http.HttpResponse response) throws java.io.IOException
AbstractMethodparseResponse in class AbstractMethod<VerifyRequest,VerifyResult>response - An HttpResponse returned from the Nexmo Voice APIjava.io.IOException - if a problem occurs parsing the responsepublic VerifyResult verify(java.lang.String number, java.lang.String brand) throws java.io.IOException, NexmoClientException
java.io.IOExceptionNexmoClientExceptionpublic VerifyResult verify(java.lang.String number, java.lang.String brand, java.lang.String from) throws java.io.IOException, NexmoClientException
java.io.IOExceptionNexmoClientExceptionpublic VerifyResult verify(java.lang.String number, java.lang.String brand, java.lang.String from, int length, java.util.Locale locale) throws java.io.IOException, NexmoClientException
java.io.IOExceptionNexmoClientExceptionpublic VerifyResult verify(java.lang.String number, java.lang.String brand, java.lang.String from, int length, java.util.Locale locale, VerifyRequest.LineType type) throws java.io.IOException, NexmoClientException
java.io.IOExceptionNexmoClientExceptionpublic VerifyResult verify(VerifyRequest request) throws java.io.IOException, NexmoClientException
java.io.IOExceptionNexmoClientExceptionprotected VerifyResult parseVerifyResponse(java.lang.String response) throws NexmoResponseParseException
NexmoResponseParseException