Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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.IntlVerification;
import com.lob.model.IntlVerificationWritable;
import com.lob.model.IntlVerifications;
import com.lob.model.IntlVerificationsPayload;
import com.lob.model.LobError;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class IntlVerificationsApi {
private ApiClient localVarApiClient;
public IntlVerificationsApi() {
this(Configuration.getDefaultApiClient());
}
public IntlVerificationsApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for verifyBulk
* @param intlVerificationsPayload (required)
* @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 an array of international verification objects.
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public okhttp3.Call verifyBulkCall(IntlVerificationsPayload intlVerificationsPayload, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = intlVerificationsPayload;
// create path and map variables
String localVarPath = "/bulk/intl_verifications";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "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(IntlVerificationsPayload intlVerificationsPayload, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'intlVerificationsPayload' is set
if (intlVerificationsPayload == null) {
throw new ApiException("Missing the required parameter 'intlVerificationsPayload' when calling verifyBulk(Async)");
}
okhttp3.Call localVarCall = verifyBulkCall(intlVerificationsPayload, _callback);
return localVarCall;
}
/**
* verifyBulk
* Verify a list of international (except US or US territories) address with a live API key.
* @param intlVerificationsPayload (required)
* @return IntlVerifications
* @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 an array of international verification objects.
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public IntlVerifications verifyBulk(IntlVerificationsPayload intlVerificationsPayload) throws ApiException {
try {
ApiResponse localVarResp = verifyBulkWithHttpInfo(intlVerificationsPayload);
return localVarResp.getData();
} catch (ApiException e) {
throw e;
}
}
/**
* verifyBulk
* Verify a list of international (except US or US territories) address with a live API key.
* @param intlVerificationsPayload (required)
* @return ApiResponse<IntlVerifications>
* @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 an array of international verification objects.
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public ApiResponse verifyBulkWithHttpInfo(IntlVerificationsPayload intlVerificationsPayload) throws ApiException {
try {
okhttp3.Call localVarCall = verifyBulkValidateBeforeCall(intlVerificationsPayload, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
throw e;
}
}
/**
* verifyBulk (asynchronously)
* Verify a list of international (except US or US territories) address with a live API key.
* @param intlVerificationsPayload (required)
* @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 an array of international verification objects.
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public okhttp3.Call verifyBulkAsync(IntlVerificationsPayload intlVerificationsPayload, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = verifyBulkValidateBeforeCall(intlVerificationsPayload, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for verifySingle
* @param intlVerificationWritable (required)
* @param xLangOutput * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public okhttp3.Call verifySingleCall(IntlVerificationWritable intlVerificationWritable, String xLangOutput, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = intlVerificationWritable;
// create path and map variables
String localVarPath = "/intl_verifications";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (xLangOutput != null) {
localVarHeaderParams.put("x-lang-output", localVarApiClient.parameterToString(xLangOutput));
}
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(IntlVerificationWritable intlVerificationWritable, String xLangOutput, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'intlVerificationWritable' is set
if (intlVerificationWritable == null) {
throw new ApiException("Missing the required parameter 'intlVerificationWritable' when calling verifySingle(Async)");
}
okhttp3.Call localVarCall = verifySingleCall(intlVerificationWritable, xLangOutput, _callback);
return localVarCall;
}
/**
* verifySingle
* Verify an international (except US or US territories) address with a live API key.
* @param intlVerificationWritable (required)
* @param xLangOutput * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional)
* @return IntlVerification
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public IntlVerification verifySingle(IntlVerificationWritable intlVerificationWritable, String xLangOutput) throws ApiException {
try {
ApiResponse localVarResp = verifySingleWithHttpInfo(intlVerificationWritable, xLangOutput);
return localVarResp.getData();
} catch (ApiException e) {
throw e;
}
}
/**
* verifySingle
* Verify an international (except US or US territories) address with a live API key.
* @param intlVerificationWritable (required)
* @param xLangOutput * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional)
* @return ApiResponse<IntlVerification>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Lob uses RESTful HTTP response codes to indicate success or failure of an API request.
-
*/
public ApiResponse verifySingleWithHttpInfo(IntlVerificationWritable intlVerificationWritable, String xLangOutput) throws ApiException {
try {
okhttp3.Call localVarCall = verifySingleValidateBeforeCall(intlVerificationWritable, xLangOutput, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
throw e;
}
}
/**
* verifySingle (asynchronously)
* Verify an international (except US or US territories) address with a live API key.
* @param intlVerificationWritable (required)
* @param xLangOutput * `native` - Translate response to the native language of the country in the request * `match` - match the response to the language in the request Default response is in English. (optional)
* @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