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.
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.
/*
* 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.IPDTaxByAddressBatchRequest;
import com.precisely.apis.model.TaxAddressRequest;
import com.precisely.apis.model.TaxDistrictResponse;
import com.precisely.apis.model.TaxDistrictResponseList;
import com.precisely.apis.model.TaxLocationRequest;
import com.precisely.apis.model.TaxRateAddressRequest;
import com.precisely.apis.model.TaxRateLocationRequest;
import com.precisely.apis.model.TaxRateResponse;
import com.precisely.apis.model.TaxResponses;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class LocalTaxServiceApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public LocalTaxServiceApi() {
this(Configuration.getDefaultApiClient());
}
public LocalTaxServiceApi(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 getBatchTaxByAddress
* @param taxRateTypeId (required)
* @param taxAddressRequest (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 getBatchTaxByAddressCall(String taxRateTypeId, TaxAddressRequest taxAddressRequest, 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 = taxAddressRequest;
// create path and map variables
String localVarPath = "/localtax/v1/tax/{taxRateTypeId}/byaddress"
.replaceAll("\\{" + "taxRateTypeId" + "\\}", localVarApiClient.escapeString(taxRateTypeId.toString()));
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 getBatchTaxByAddressValidateBeforeCall(String taxRateTypeId, TaxAddressRequest taxAddressRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'taxRateTypeId' is set
if (taxRateTypeId == null) {
throw new ApiException("Missing the required parameter 'taxRateTypeId' when calling getBatchTaxByAddress(Async)");
}
// verify the required parameter 'taxAddressRequest' is set
if (taxAddressRequest == null) {
throw new ApiException("Missing the required parameter 'taxAddressRequest' when calling getBatchTaxByAddress(Async)");
}
okhttp3.Call localVarCall = getBatchTaxByAddressCall(taxRateTypeId, taxAddressRequest, _callback);
return localVarCall;
}
/**
* Post Tax By Address
* This is a Batch offering for 'Tax By Address' service. It accepts a single address, purchase amount or a list of addresses, purchase amounts and retrieve applicable taxes.
* @param taxRateTypeId (required)
* @param taxAddressRequest (required)
* @return TaxResponses
* @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 TaxResponses getBatchTaxByAddress(String taxRateTypeId, TaxAddressRequest taxAddressRequest) throws ApiException {
ApiResponse localVarResp = getBatchTaxByAddressWithHttpInfo(taxRateTypeId, taxAddressRequest);
return localVarResp.getData();
}
/**
* Post Tax By Address
* This is a Batch offering for 'Tax By Address' service. It accepts a single address, purchase amount or a list of addresses, purchase amounts and retrieve applicable taxes.
* @param taxRateTypeId (required)
* @param taxAddressRequest (required)
* @return ApiResponse<TaxResponses>
* @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 getBatchTaxByAddressWithHttpInfo(String taxRateTypeId, TaxAddressRequest taxAddressRequest) throws ApiException {
okhttp3.Call localVarCall = getBatchTaxByAddressValidateBeforeCall(taxRateTypeId, taxAddressRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Post Tax By Address (asynchronously)
* This is a Batch offering for 'Tax By Address' service. It accepts a single address, purchase amount or a list of addresses, purchase amounts and retrieve applicable taxes.
* @param taxRateTypeId (required)
* @param taxAddressRequest (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 getBatchTaxByAddressAsync(String taxRateTypeId, TaxAddressRequest taxAddressRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getBatchTaxByAddressValidateBeforeCall(taxRateTypeId, taxAddressRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getBatchTaxByLocation
* @param taxRateTypeId (required)
* @param taxLocationRequest (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 getBatchTaxByLocationCall(String taxRateTypeId, TaxLocationRequest taxLocationRequest, 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 = taxLocationRequest;
// create path and map variables
String localVarPath = "/localtax/v1/tax/{taxRateTypeId}/bylocation"
.replaceAll("\\{" + "taxRateTypeId" + "\\}", localVarApiClient.escapeString(taxRateTypeId.toString()));
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 getBatchTaxByLocationValidateBeforeCall(String taxRateTypeId, TaxLocationRequest taxLocationRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'taxRateTypeId' is set
if (taxRateTypeId == null) {
throw new ApiException("Missing the required parameter 'taxRateTypeId' when calling getBatchTaxByLocation(Async)");
}
// verify the required parameter 'taxLocationRequest' is set
if (taxLocationRequest == null) {
throw new ApiException("Missing the required parameter 'taxLocationRequest' when calling getBatchTaxByLocation(Async)");
}
okhttp3.Call localVarCall = getBatchTaxByLocationCall(taxRateTypeId, taxLocationRequest, _callback);
return localVarCall;
}
/**
* Post Tax By Location
* This is a Batch offering for 'Tax By Location' service. It accepts a single location coordinate, purchase amount or a list of location coordinates, purchase amounts and retrieve applicable tax.
* @param taxRateTypeId (required)
* @param taxLocationRequest (required)
* @return TaxResponses
* @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 TaxResponses getBatchTaxByLocation(String taxRateTypeId, TaxLocationRequest taxLocationRequest) throws ApiException {
ApiResponse localVarResp = getBatchTaxByLocationWithHttpInfo(taxRateTypeId, taxLocationRequest);
return localVarResp.getData();
}
/**
* Post Tax By Location
* This is a Batch offering for 'Tax By Location' service. It accepts a single location coordinate, purchase amount or a list of location coordinates, purchase amounts and retrieve applicable tax.
* @param taxRateTypeId (required)
* @param taxLocationRequest (required)
* @return ApiResponse<TaxResponses>
* @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 getBatchTaxByLocationWithHttpInfo(String taxRateTypeId, TaxLocationRequest taxLocationRequest) throws ApiException {
okhttp3.Call localVarCall = getBatchTaxByLocationValidateBeforeCall(taxRateTypeId, taxLocationRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Post Tax By Location (asynchronously)
* This is a Batch offering for 'Tax By Location' service. It accepts a single location coordinate, purchase amount or a list of location coordinates, purchase amounts and retrieve applicable tax.
* @param taxRateTypeId (required)
* @param taxLocationRequest (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 getBatchTaxByLocationAsync(String taxRateTypeId, TaxLocationRequest taxLocationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getBatchTaxByLocationValidateBeforeCall(taxRateTypeId, taxLocationRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getBatchTaxRateByAddress
* @param taxRateTypeId (required)
* @param taxRateAddressRequest (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 getBatchTaxRateByAddressCall(String taxRateTypeId, TaxRateAddressRequest taxRateAddressRequest, 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 = taxRateAddressRequest;
// create path and map variables
String localVarPath = "/localtax/v1/taxrate/{taxRateTypeId}/byaddress"
.replaceAll("\\{" + "taxRateTypeId" + "\\}", localVarApiClient.escapeString(taxRateTypeId.toString()));
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 getBatchTaxRateByAddressValidateBeforeCall(String taxRateTypeId, TaxRateAddressRequest taxRateAddressRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'taxRateTypeId' is set
if (taxRateTypeId == null) {
throw new ApiException("Missing the required parameter 'taxRateTypeId' when calling getBatchTaxRateByAddress(Async)");
}
// verify the required parameter 'taxRateAddressRequest' is set
if (taxRateAddressRequest == null) {
throw new ApiException("Missing the required parameter 'taxRateAddressRequest' when calling getBatchTaxRateByAddress(Async)");
}
okhttp3.Call localVarCall = getBatchTaxRateByAddressCall(taxRateTypeId, taxRateAddressRequest, _callback);
return localVarCall;
}
/**
* Post Taxrate By Address
* This is a Batch offering for 'Taxrate By Address' service. It accepts a single address or a list of addresses and retrieve applicable tax rates.
* @param taxRateTypeId (required)
* @param taxRateAddressRequest (required)
* @return TaxResponses
* @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 TaxResponses getBatchTaxRateByAddress(String taxRateTypeId, TaxRateAddressRequest taxRateAddressRequest) throws ApiException {
ApiResponse localVarResp = getBatchTaxRateByAddressWithHttpInfo(taxRateTypeId, taxRateAddressRequest);
return localVarResp.getData();
}
/**
* Post Taxrate By Address
* This is a Batch offering for 'Taxrate By Address' service. It accepts a single address or a list of addresses and retrieve applicable tax rates.
* @param taxRateTypeId (required)
* @param taxRateAddressRequest (required)
* @return ApiResponse<TaxResponses>
* @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 getBatchTaxRateByAddressWithHttpInfo(String taxRateTypeId, TaxRateAddressRequest taxRateAddressRequest) throws ApiException {
okhttp3.Call localVarCall = getBatchTaxRateByAddressValidateBeforeCall(taxRateTypeId, taxRateAddressRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Post Taxrate By Address (asynchronously)
* This is a Batch offering for 'Taxrate By Address' service. It accepts a single address or a list of addresses and retrieve applicable tax rates.
* @param taxRateTypeId (required)
* @param taxRateAddressRequest (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 getBatchTaxRateByAddressAsync(String taxRateTypeId, TaxRateAddressRequest taxRateAddressRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getBatchTaxRateByAddressValidateBeforeCall(taxRateTypeId, taxRateAddressRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getBatchTaxRateByLocation
* @param taxRateTypeId (required)
* @param taxRateLocationRequest (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 getBatchTaxRateByLocationCall(String taxRateTypeId, TaxRateLocationRequest taxRateLocationRequest, 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 = taxRateLocationRequest;
// create path and map variables
String localVarPath = "/localtax/v1/taxrate/{taxRateTypeId}/bylocation"
.replaceAll("\\{" + "taxRateTypeId" + "\\}", localVarApiClient.escapeString(taxRateTypeId.toString()));
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 getBatchTaxRateByLocationValidateBeforeCall(String taxRateTypeId, TaxRateLocationRequest taxRateLocationRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'taxRateTypeId' is set
if (taxRateTypeId == null) {
throw new ApiException("Missing the required parameter 'taxRateTypeId' when calling getBatchTaxRateByLocation(Async)");
}
// verify the required parameter 'taxRateLocationRequest' is set
if (taxRateLocationRequest == null) {
throw new ApiException("Missing the required parameter 'taxRateLocationRequest' when calling getBatchTaxRateByLocation(Async)");
}
okhttp3.Call localVarCall = getBatchTaxRateByLocationCall(taxRateTypeId, taxRateLocationRequest, _callback);
return localVarCall;
}
/**
* Post Taxrate By Location
* This is a Batch offering for 'Taxrate By Location' service. It accepts a single location coordinate or a list of location coordinates and retrieve applicable tax rates.
* @param taxRateTypeId (required)
* @param taxRateLocationRequest (required)
* @return TaxResponses
* @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 TaxResponses getBatchTaxRateByLocation(String taxRateTypeId, TaxRateLocationRequest taxRateLocationRequest) throws ApiException {
ApiResponse localVarResp = getBatchTaxRateByLocationWithHttpInfo(taxRateTypeId, taxRateLocationRequest);
return localVarResp.getData();
}
/**
* Post Taxrate By Location
* This is a Batch offering for 'Taxrate By Location' service. It accepts a single location coordinate or a list of location coordinates and retrieve applicable tax rates.
* @param taxRateTypeId (required)
* @param taxRateLocationRequest (required)
* @return ApiResponse<TaxResponses>
* @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 getBatchTaxRateByLocationWithHttpInfo(String taxRateTypeId, TaxRateLocationRequest taxRateLocationRequest) throws ApiException {
okhttp3.Call localVarCall = getBatchTaxRateByLocationValidateBeforeCall(taxRateTypeId, taxRateLocationRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Post Taxrate By Location (asynchronously)
* This is a Batch offering for 'Taxrate By Location' service. It accepts a single location coordinate or a list of location coordinates and retrieve applicable tax rates.
* @param taxRateTypeId (required)
* @param taxRateLocationRequest (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 getBatchTaxRateByLocationAsync(String taxRateTypeId, TaxRateLocationRequest taxRateLocationRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getBatchTaxRateByLocationValidateBeforeCall(taxRateTypeId, taxRateLocationRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getIPDTaxByAddress
* @param address The address to be searched. (required)
* @param returnLatLongFields Y or N (default is N) - Returns Latitude Longitude Fields. (optional)
* @param latLongFormat (default is Decimal) - Returns Desired Latitude Longitude Format. (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
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getIPDTaxByAddressCall(String address, String returnLatLongFields, String latLongFormat, 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 = null;
// create path and map variables
String localVarPath = "/localtax/v1/taxdistrict/ipd/byaddress";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (address != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("address", address));
}
if (returnLatLongFields != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("returnLatLongFields", returnLatLongFields));
}
if (latLongFormat != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("latLongFormat", latLongFormat));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getIPDTaxByAddressValidateBeforeCall(String address, String returnLatLongFields, String latLongFormat, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'address' is set
if (address == null) {
throw new ApiException("Missing the required parameter 'address' when calling getIPDTaxByAddress(Async)");
}
okhttp3.Call localVarCall = getIPDTaxByAddressCall(address, returnLatLongFields, latLongFormat, _callback);
return localVarCall;
}
/**
* Get IPD Tax by Address
* Retrieves IPD (Insurance Premium District) tax rates applicable to a specific address. This service accepts address as input and returns one or many IPD tax rate details for that region in which address falls.
* @param address The address to be searched. (required)
* @param returnLatLongFields Y or N (default is N) - Returns Latitude Longitude Fields. (optional)
* @param latLongFormat (default is Decimal) - Returns Desired Latitude Longitude Format. (optional)
* @return TaxDistrictResponse
* @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 TaxDistrictResponse getIPDTaxByAddress(String address, String returnLatLongFields, String latLongFormat) throws ApiException {
ApiResponse localVarResp = getIPDTaxByAddressWithHttpInfo(address, returnLatLongFields, latLongFormat);
return localVarResp.getData();
}
/**
* Get IPD Tax by Address
* Retrieves IPD (Insurance Premium District) tax rates applicable to a specific address. This service accepts address as input and returns one or many IPD tax rate details for that region in which address falls.
* @param address The address to be searched. (required)
* @param returnLatLongFields Y or N (default is N) - Returns Latitude Longitude Fields. (optional)
* @param latLongFormat (default is Decimal) - Returns Desired Latitude Longitude Format. (optional)
* @return ApiResponse<TaxDistrictResponse>
* @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 getIPDTaxByAddressWithHttpInfo(String address, String returnLatLongFields, String latLongFormat) throws ApiException {
okhttp3.Call localVarCall = getIPDTaxByAddressValidateBeforeCall(address, returnLatLongFields, latLongFormat, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get IPD Tax by Address (asynchronously)
* Retrieves IPD (Insurance Premium District) tax rates applicable to a specific address. This service accepts address as input and returns one or many IPD tax rate details for that region in which address falls.
* @param address The address to be searched. (required)
* @param returnLatLongFields Y or N (default is N) - Returns Latitude Longitude Fields. (optional)
* @param latLongFormat (default is Decimal) - Returns Desired Latitude Longitude Format. (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
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
500
Internal Server Error
-
*/
public okhttp3.Call getIPDTaxByAddressAsync(String address, String returnLatLongFields, String latLongFormat, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIPDTaxByAddressValidateBeforeCall(address, returnLatLongFields, latLongFormat, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getIPDTaxByAddressBatch
* @param ipDTaxByAddressBatchRequest (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 getIPDTaxByAddressBatchCall(IPDTaxByAddressBatchRequest ipDTaxByAddressBatchRequest, 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 = ipDTaxByAddressBatchRequest;
// create path and map variables
String localVarPath = "/localtax/v1/taxdistrict/ipd/byaddress";
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 getIPDTaxByAddressBatchValidateBeforeCall(IPDTaxByAddressBatchRequest ipDTaxByAddressBatchRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'ipDTaxByAddressBatchRequest' is set
if (ipDTaxByAddressBatchRequest == null) {
throw new ApiException("Missing the required parameter 'ipDTaxByAddressBatchRequest' when calling getIPDTaxByAddressBatch(Async)");
}
okhttp3.Call localVarCall = getIPDTaxByAddressBatchCall(ipDTaxByAddressBatchRequest, _callback);
return localVarCall;
}
/**
* Get IPD Tax for batch requests.
* This is a Batch offering for 'IPD Tax rates By Address'. It accepts multiple addresses as parameters along with geocoding and matching preferences and returns one or many IPD tax rate details for each address.
* @param ipDTaxByAddressBatchRequest (required)
* @return TaxDistrictResponseList
* @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 TaxDistrictResponseList getIPDTaxByAddressBatch(IPDTaxByAddressBatchRequest ipDTaxByAddressBatchRequest) throws ApiException {
ApiResponse localVarResp = getIPDTaxByAddressBatchWithHttpInfo(ipDTaxByAddressBatchRequest);
return localVarResp.getData();
}
/**
* Get IPD Tax for batch requests.
* This is a Batch offering for 'IPD Tax rates By Address'. It accepts multiple addresses as parameters along with geocoding and matching preferences and returns one or many IPD tax rate details for each address.
* @param ipDTaxByAddressBatchRequest (required)
* @return ApiResponse<TaxDistrictResponseList>
* @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 getIPDTaxByAddressBatchWithHttpInfo(IPDTaxByAddressBatchRequest ipDTaxByAddressBatchRequest) throws ApiException {
okhttp3.Call localVarCall = getIPDTaxByAddressBatchValidateBeforeCall(ipDTaxByAddressBatchRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get IPD Tax for batch requests. (asynchronously)
* This is a Batch offering for 'IPD Tax rates By Address'. It accepts multiple addresses as parameters along with geocoding and matching preferences and returns one or many IPD tax rate details for each address.
* @param ipDTaxByAddressBatchRequest (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 getIPDTaxByAddressBatchAsync(IPDTaxByAddressBatchRequest ipDTaxByAddressBatchRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getIPDTaxByAddressBatchValidateBeforeCall(ipDTaxByAddressBatchRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSpecificTaxByAddress
* @param taxRateTypeId The tax rate id (required)
* @param address The address to be searched. (required)
* @param purchaseAmount The amount on which tax to be calculated (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 getSpecificTaxByAddressCall(String taxRateTypeId, String address, String purchaseAmount, 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 = null;
// create path and map variables
String localVarPath = "/localtax/v1/tax/{taxRateTypeId}/byaddress"
.replaceAll("\\{" + "taxRateTypeId" + "\\}", localVarApiClient.escapeString(taxRateTypeId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (address != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("address", address));
}
if (purchaseAmount != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("purchaseAmount", purchaseAmount));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSpecificTaxByAddressValidateBeforeCall(String taxRateTypeId, String address, String purchaseAmount, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'taxRateTypeId' is set
if (taxRateTypeId == null) {
throw new ApiException("Missing the required parameter 'taxRateTypeId' when calling getSpecificTaxByAddress(Async)");
}
// verify the required parameter 'address' is set
if (address == null) {
throw new ApiException("Missing the required parameter 'address' when calling getSpecificTaxByAddress(Async)");
}
// verify the required parameter 'purchaseAmount' is set
if (purchaseAmount == null) {
throw new ApiException("Missing the required parameter 'purchaseAmount' when calling getSpecificTaxByAddress(Async)");
}
okhttp3.Call localVarCall = getSpecificTaxByAddressCall(taxRateTypeId, address, purchaseAmount, _callback);
return localVarCall;
}
/**
* Get Tax By Address
* This service calculates and returns taxes applicable at a specific address. Address, purchase amount and supported tax rate type are inputs to the service.
* @param taxRateTypeId The tax rate id (required)
* @param address The address to be searched. (required)
* @param purchaseAmount The amount on which tax to be calculated (required)
* @return TaxRateResponse
* @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 TaxRateResponse getSpecificTaxByAddress(String taxRateTypeId, String address, String purchaseAmount) throws ApiException {
ApiResponse localVarResp = getSpecificTaxByAddressWithHttpInfo(taxRateTypeId, address, purchaseAmount);
return localVarResp.getData();
}
/**
* Get Tax By Address
* This service calculates and returns taxes applicable at a specific address. Address, purchase amount and supported tax rate type are inputs to the service.
* @param taxRateTypeId The tax rate id (required)
* @param address The address to be searched. (required)
* @param purchaseAmount The amount on which tax to be calculated (required)
* @return ApiResponse<TaxRateResponse>
* @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 getSpecificTaxByAddressWithHttpInfo(String taxRateTypeId, String address, String purchaseAmount) throws ApiException {
okhttp3.Call localVarCall = getSpecificTaxByAddressValidateBeforeCall(taxRateTypeId, address, purchaseAmount, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Tax By Address (asynchronously)
* This service calculates and returns taxes applicable at a specific address. Address, purchase amount and supported tax rate type are inputs to the service.
* @param taxRateTypeId The tax rate id (required)
* @param address The address to be searched. (required)
* @param purchaseAmount The amount on which tax to be calculated (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 getSpecificTaxByAddressAsync(String taxRateTypeId, String address, String purchaseAmount, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSpecificTaxByAddressValidateBeforeCall(taxRateTypeId, address, purchaseAmount, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSpecificTaxByLocation
* @param taxRateTypeId The tax rate id (required)
* @param latitude Latitude of the location (required)
* @param longitude Longitude of the location (required)
* @param purchaseAmount The amount on which tax to be calculated (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 getSpecificTaxByLocationCall(String taxRateTypeId, String latitude, String longitude, String purchaseAmount, 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 = null;
// create path and map variables
String localVarPath = "/localtax/v1/tax/{taxRateTypeId}/bylocation"
.replaceAll("\\{" + "taxRateTypeId" + "\\}", localVarApiClient.escapeString(taxRateTypeId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (latitude != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("latitude", latitude));
}
if (longitude != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("longitude", longitude));
}
if (purchaseAmount != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("purchaseAmount", purchaseAmount));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSpecificTaxByLocationValidateBeforeCall(String taxRateTypeId, String latitude, String longitude, String purchaseAmount, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'taxRateTypeId' is set
if (taxRateTypeId == null) {
throw new ApiException("Missing the required parameter 'taxRateTypeId' when calling getSpecificTaxByLocation(Async)");
}
// verify the required parameter 'latitude' is set
if (latitude == null) {
throw new ApiException("Missing the required parameter 'latitude' when calling getSpecificTaxByLocation(Async)");
}
// verify the required parameter 'longitude' is set
if (longitude == null) {
throw new ApiException("Missing the required parameter 'longitude' when calling getSpecificTaxByLocation(Async)");
}
// verify the required parameter 'purchaseAmount' is set
if (purchaseAmount == null) {
throw new ApiException("Missing the required parameter 'purchaseAmount' when calling getSpecificTaxByLocation(Async)");
}
okhttp3.Call localVarCall = getSpecificTaxByLocationCall(taxRateTypeId, latitude, longitude, purchaseAmount, _callback);
return localVarCall;
}
/**
* Get Tax By Location
* This service calculates and returns tax applicable at a specific location. Longitude, latitude, purchase amount and supported tax rate type are inputs to the service.
* @param taxRateTypeId The tax rate id (required)
* @param latitude Latitude of the location (required)
* @param longitude Longitude of the location (required)
* @param purchaseAmount The amount on which tax to be calculated (required)
* @return TaxRateResponse
* @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 TaxRateResponse getSpecificTaxByLocation(String taxRateTypeId, String latitude, String longitude, String purchaseAmount) throws ApiException {
ApiResponse localVarResp = getSpecificTaxByLocationWithHttpInfo(taxRateTypeId, latitude, longitude, purchaseAmount);
return localVarResp.getData();
}
/**
* Get Tax By Location
* This service calculates and returns tax applicable at a specific location. Longitude, latitude, purchase amount and supported tax rate type are inputs to the service.
* @param taxRateTypeId The tax rate id (required)
* @param latitude Latitude of the location (required)
* @param longitude Longitude of the location (required)
* @param purchaseAmount The amount on which tax to be calculated (required)
* @return ApiResponse<TaxRateResponse>
* @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 getSpecificTaxByLocationWithHttpInfo(String taxRateTypeId, String latitude, String longitude, String purchaseAmount) throws ApiException {
okhttp3.Call localVarCall = getSpecificTaxByLocationValidateBeforeCall(taxRateTypeId, latitude, longitude, purchaseAmount, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Tax By Location (asynchronously)
* This service calculates and returns tax applicable at a specific location. Longitude, latitude, purchase amount and supported tax rate type are inputs to the service.
* @param taxRateTypeId The tax rate id (required)
* @param latitude Latitude of the location (required)
* @param longitude Longitude of the location (required)
* @param purchaseAmount The amount on which tax to be calculated (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 getSpecificTaxByLocationAsync(String taxRateTypeId, String latitude, String longitude, String purchaseAmount, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSpecificTaxByLocationValidateBeforeCall(taxRateTypeId, latitude, longitude, purchaseAmount, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSpecificTaxRateByAddress
* @param taxRateTypeId The tax rate id (required)
* @param address The address to be searched. (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 getSpecificTaxRateByAddressCall(String taxRateTypeId, String address, 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 = null;
// create path and map variables
String localVarPath = "/localtax/v1/taxrate/{taxRateTypeId}/byaddress"
.replaceAll("\\{" + "taxRateTypeId" + "\\}", localVarApiClient.escapeString(taxRateTypeId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (address != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("address", address));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSpecificTaxRateByAddressValidateBeforeCall(String taxRateTypeId, String address, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'taxRateTypeId' is set
if (taxRateTypeId == null) {
throw new ApiException("Missing the required parameter 'taxRateTypeId' when calling getSpecificTaxRateByAddress(Async)");
}
// verify the required parameter 'address' is set
if (address == null) {
throw new ApiException("Missing the required parameter 'address' when calling getSpecificTaxRateByAddress(Async)");
}
okhttp3.Call localVarCall = getSpecificTaxRateByAddressCall(taxRateTypeId, address, _callback);
return localVarCall;
}
/**
* Get Taxrate By Address
* Retrieves tax rates applicable to a specific address. This service accepts address and supported tax rate type as inputs to retrieve applicable tax rates.
* @param taxRateTypeId The tax rate id (required)
* @param address The address to be searched. (required)
* @return TaxRateResponse
* @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 TaxRateResponse getSpecificTaxRateByAddress(String taxRateTypeId, String address) throws ApiException {
ApiResponse localVarResp = getSpecificTaxRateByAddressWithHttpInfo(taxRateTypeId, address);
return localVarResp.getData();
}
/**
* Get Taxrate By Address
* Retrieves tax rates applicable to a specific address. This service accepts address and supported tax rate type as inputs to retrieve applicable tax rates.
* @param taxRateTypeId The tax rate id (required)
* @param address The address to be searched. (required)
* @return ApiResponse<TaxRateResponse>
* @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 getSpecificTaxRateByAddressWithHttpInfo(String taxRateTypeId, String address) throws ApiException {
okhttp3.Call localVarCall = getSpecificTaxRateByAddressValidateBeforeCall(taxRateTypeId, address, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Taxrate By Address (asynchronously)
* Retrieves tax rates applicable to a specific address. This service accepts address and supported tax rate type as inputs to retrieve applicable tax rates.
* @param taxRateTypeId The tax rate id (required)
* @param address The address to be searched. (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 getSpecificTaxRateByAddressAsync(String taxRateTypeId, String address, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSpecificTaxRateByAddressValidateBeforeCall(taxRateTypeId, address, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getSpecificTaxRateByLocation
* @param taxRateTypeId The tax rate id (required)
* @param latitude Latitude of the location (required)
* @param longitude Longitude of the location (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 getSpecificTaxRateByLocationCall(String taxRateTypeId, String latitude, String longitude, 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 = null;
// create path and map variables
String localVarPath = "/localtax/v1/taxrate/{taxRateTypeId}/bylocation"
.replaceAll("\\{" + "taxRateTypeId" + "\\}", localVarApiClient.escapeString(taxRateTypeId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (latitude != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("latitude", latitude));
}
if (longitude != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("longitude", longitude));
}
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
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, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSpecificTaxRateByLocationValidateBeforeCall(String taxRateTypeId, String latitude, String longitude, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'taxRateTypeId' is set
if (taxRateTypeId == null) {
throw new ApiException("Missing the required parameter 'taxRateTypeId' when calling getSpecificTaxRateByLocation(Async)");
}
// verify the required parameter 'latitude' is set
if (latitude == null) {
throw new ApiException("Missing the required parameter 'latitude' when calling getSpecificTaxRateByLocation(Async)");
}
// verify the required parameter 'longitude' is set
if (longitude == null) {
throw new ApiException("Missing the required parameter 'longitude' when calling getSpecificTaxRateByLocation(Async)");
}
okhttp3.Call localVarCall = getSpecificTaxRateByLocationCall(taxRateTypeId, latitude, longitude, _callback);
return localVarCall;
}
/**
* Get Taxrate By Location
* Retrieves tax rates applicable to a specific location. This service accepts longitude, latitude and supported tax rate type as inputs to retrieve applicable tax rates.
* @param taxRateTypeId The tax rate id (required)
* @param latitude Latitude of the location (required)
* @param longitude Longitude of the location (required)
* @return TaxRateResponse
* @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 TaxRateResponse getSpecificTaxRateByLocation(String taxRateTypeId, String latitude, String longitude) throws ApiException {
ApiResponse localVarResp = getSpecificTaxRateByLocationWithHttpInfo(taxRateTypeId, latitude, longitude);
return localVarResp.getData();
}
/**
* Get Taxrate By Location
* Retrieves tax rates applicable to a specific location. This service accepts longitude, latitude and supported tax rate type as inputs to retrieve applicable tax rates.
* @param taxRateTypeId The tax rate id (required)
* @param latitude Latitude of the location (required)
* @param longitude Longitude of the location (required)
* @return ApiResponse<TaxRateResponse>
* @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 getSpecificTaxRateByLocationWithHttpInfo(String taxRateTypeId, String latitude, String longitude) throws ApiException {
okhttp3.Call localVarCall = getSpecificTaxRateByLocationValidateBeforeCall(taxRateTypeId, latitude, longitude, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get Taxrate By Location (asynchronously)
* Retrieves tax rates applicable to a specific location. This service accepts longitude, latitude and supported tax rate type as inputs to retrieve applicable tax rates.
* @param taxRateTypeId The tax rate id (required)
* @param latitude Latitude of the location (required)
* @param longitude Longitude of the location (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 getSpecificTaxRateByLocationAsync(String taxRateTypeId, String latitude, String longitude, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSpecificTaxRateByLocationValidateBeforeCall(taxRateTypeId, latitude, longitude, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}