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

com.precisely.apis.EmailVerificationServiceApi Maven / Gradle / Ivy

Go to download

Java SDK for accessing Precisely APIs which transform your business with new insights. Enrich and enhance your data, applications, business processes, and workflows with hundreds of Location and Identity datasets and APIs.

The newest version!
/*
 * Precisely APIs
 * Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs.
 *
 * The version of the OpenAPI document: 18.0.0
 * 
 *
 * 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.precisely.apis;

import com.precisely.ApiCallback;
import com.precisely.ApiClient;
import com.precisely.ApiException;
import com.precisely.ApiResponse;
import com.precisely.Configuration;
import com.precisely.Pair;
import com.precisely.ProgressRequestBody;
import com.precisely.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import com.precisely.apis.model.ErrorInfo;
import com.precisely.apis.model.ValidateEmailAddressAPIRequest;
import com.precisely.apis.model.ValidateEmailAddressAPIResponse;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class EmailVerificationServiceApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

    public EmailVerificationServiceApi() {
        this(Configuration.getDefaultApiClient());
    }

    public EmailVerificationServiceApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    /**
     * Build call for validateEmailAddress
     * @param inputEmailAddress  (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 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call validateEmailAddressCall(ValidateEmailAddressAPIRequest inputEmailAddress, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = inputEmailAddress; // create path and map variables String localVarPath = "/emailverification/v1/validateemailaddress/results.json"; 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", "application/xml" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarHeaderParams != null && localVarContentTypes != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "oAuth2Password" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call validateEmailAddressValidateBeforeCall(ValidateEmailAddressAPIRequest inputEmailAddress, final ApiCallback _callback) throws ApiException { // verify the required parameter 'inputEmailAddress' is set if (inputEmailAddress == null) { throw new ApiException("Missing the required parameter 'inputEmailAddress' when calling validateEmailAddress(Async)"); } okhttp3.Call localVarCall = validateEmailAddressCall(inputEmailAddress, _callback); return localVarCall; } /** * ValidateEmailAddress * Confirm that your customer’s mailing address exists and that mail and packages can be delivered to it. * @param inputEmailAddress (required) * @return ValidateEmailAddressAPIResponse * @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 OK -
400 Bad Request -
500 Internal Server Error -
*/ public ValidateEmailAddressAPIResponse validateEmailAddress(ValidateEmailAddressAPIRequest inputEmailAddress) throws ApiException { ApiResponse localVarResp = validateEmailAddressWithHttpInfo(inputEmailAddress); return localVarResp.getData(); } /** * ValidateEmailAddress * Confirm that your customer’s mailing address exists and that mail and packages can be delivered to it. * @param inputEmailAddress (required) * @return ApiResponse<ValidateEmailAddressAPIResponse> * @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 OK -
400 Bad Request -
500 Internal Server Error -
*/ public ApiResponse validateEmailAddressWithHttpInfo(ValidateEmailAddressAPIRequest inputEmailAddress) throws ApiException { okhttp3.Call localVarCall = validateEmailAddressValidateBeforeCall(inputEmailAddress, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * ValidateEmailAddress (asynchronously) * Confirm that your customer’s mailing address exists and that mail and packages can be delivered to it. * @param inputEmailAddress (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 OK -
400 Bad Request -
500 Internal Server Error -
*/ public okhttp3.Call validateEmailAddressAsync(ValidateEmailAddressAPIRequest inputEmailAddress, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = validateEmailAddressValidateBeforeCall(inputEmailAddress, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy