All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.lob.api.client.UsVerificationsApi Maven / Gradle / Ivy

The newest version!
/*
 * Lob
 * The Lob API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and uses HTTP response codes to indicate any API errors. 

Looking for our [previous documentation](https://lob.github.io/legacy-docs/)? * * The version of the OpenAPI document: 1.3.0 * Contact: [email protected] * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package com.lob.api.client; import com.lob.api.ApiCallback; import com.lob.api.ApiClient; import com.lob.api.ApiException; import com.lob.api.ApiResponse; import com.lob.api.Configuration; import com.lob.api.Pair; import com.lob.api.ProgressRequestBody; import com.lob.api.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.File; import java.io.IOException; import java.nio.file.Files; import com.lob.model.LobError; import com.lob.model.MultipleComponentsList; import com.lob.model.UsVerification; import com.lob.model.UsVerifications; import com.lob.model.UsVerificationsWritable; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class UsVerificationsApi { private ApiClient localVarApiClient; public UsVerificationsApi() { this(Configuration.getDefaultApiClient()); } public UsVerificationsApi(ApiClient apiClient) { this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } /** * Build call for verifyBulk * @param multipleComponentsList (required) * @param _case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional, default to upper) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details

Status Code Description Response Headers
200 Returns a list of US verification objects. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call verifyBulkCall(MultipleComponentsList multipleComponentsList, String _case, final ApiCallback _callback) throws ApiException { Object localVarPostBody = multipleComponentsList; // create path and map variables String localVarPath = "/bulk/us_verifications"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (_case != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("case", _case)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json", "application/x-www-form-urlencoded", "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "basicAuth" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call verifyBulkValidateBeforeCall(MultipleComponentsList multipleComponentsList, String _case, final ApiCallback _callback) throws ApiException { // verify the required parameter 'multipleComponentsList' is set if (multipleComponentsList == null) { throw new ApiException("Missing the required parameter 'multipleComponentsList' when calling verifyBulk(Async)"); } okhttp3.Call localVarCall = verifyBulkCall(multipleComponentsList, _case, _callback); return localVarCall; } /** * verifyBulk * Verify a list of US or US territory addresses with a live API key. * @param multipleComponentsList (required) * @param _case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional, default to upper) * @return UsVerifications * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returns a list of US verification objects. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public UsVerifications verifyBulk(MultipleComponentsList multipleComponentsList, String _case) throws ApiException { try { ApiResponse localVarResp = verifyBulkWithHttpInfo(multipleComponentsList, _case); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * verifyBulk * Verify a list of US or US territory addresses with a live API key. * @param multipleComponentsList (required) * @param _case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional, default to upper) * @return ApiResponse<UsVerifications> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returns a list of US verification objects. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse verifyBulkWithHttpInfo(MultipleComponentsList multipleComponentsList, String _case) throws ApiException { try { okhttp3.Call localVarCall = verifyBulkValidateBeforeCall(multipleComponentsList, _case, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * verifyBulk (asynchronously) * Verify a list of US or US territory addresses with a live API key. * @param multipleComponentsList (required) * @param _case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional, default to upper) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returns a list of US verification objects. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call verifyBulkAsync(MultipleComponentsList multipleComponentsList, String _case, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verifyBulkValidateBeforeCall(multipleComponentsList, _case, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for verifySingle * @param usVerificationsWritable (required) * @param _case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional, default to upper) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Returns a US verification object. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call verifySingleCall(UsVerificationsWritable usVerificationsWritable, String _case, final ApiCallback _callback) throws ApiException { Object localVarPostBody = usVerificationsWritable; // create path and map variables String localVarPath = "/us_verifications"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (_case != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("case", _case)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json", "application/x-www-form-urlencoded", "multipart/form-data" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "basicAuth" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call verifySingleValidateBeforeCall(UsVerificationsWritable usVerificationsWritable, String _case, final ApiCallback _callback) throws ApiException { // verify the required parameter 'usVerificationsWritable' is set if (usVerificationsWritable == null) { throw new ApiException("Missing the required parameter 'usVerificationsWritable' when calling verifySingle(Async)"); } okhttp3.Call localVarCall = verifySingleCall(usVerificationsWritable, _case, _callback); return localVarCall; } /** * verifySingle * Verify a US or US territory address with a live API key. * @param usVerificationsWritable (required) * @param _case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional, default to upper) * @return UsVerification * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returns a US verification object. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public UsVerification verifySingle(UsVerificationsWritable usVerificationsWritable, String _case) throws ApiException { try { ApiResponse localVarResp = verifySingleWithHttpInfo(usVerificationsWritable, _case); return localVarResp.getData(); } catch (ApiException e) { throw e; } } /** * verifySingle * Verify a US or US territory address with a live API key. * @param usVerificationsWritable (required) * @param _case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional, default to upper) * @return ApiResponse<UsVerification> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Returns a US verification object. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public ApiResponse verifySingleWithHttpInfo(UsVerificationsWritable usVerificationsWritable, String _case) throws ApiException { try { okhttp3.Call localVarCall = verifySingleValidateBeforeCall(usVerificationsWritable, _case, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } catch (ApiException e) { throw e; } } /** * verifySingle (asynchronously) * Verify a US or US territory address with a live API key. * @param usVerificationsWritable (required) * @param _case Casing of the verified address. Possible values are `upper` and `proper` for uppercased (e.g. \"PO BOX\") and proper-cased (e.g. \"PO Box\"), respectively. (optional, default to upper) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Returns a US verification object. * ratelimit-limit -
* ratelimit-remaining -
* ratelimit-reset -
0 Lob uses RESTful HTTP response codes to indicate success or failure of an API request. -
*/ public okhttp3.Call verifySingleAsync(UsVerificationsWritable usVerificationsWritable, String _case, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = verifySingleValidateBeforeCall(usVerificationsWritable, _case, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy