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.
package com.conekta;
import com.conekta.ApiException;
import com.conekta.ApiClient;
import com.conekta.ApiResponse;
import com.conekta.Configuration;
import com.conekta.Pair;
import javax.ws.rs.core.GenericType;
import com.conekta.model.BlacklistRuleResponse;
import com.conekta.model.CreateRiskRulesData;
import com.conekta.model.DeletedBlacklistRuleResponse;
import com.conekta.model.DeletedWhitelistRuleResponse;
import com.conekta.model.Error;
import com.conekta.model.RiskRulesList;
import com.conekta.model.WhitelistlistRuleResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.5.0")
public class AntifraudApi {
private ApiClient apiClient;
public AntifraudApi() {
this(Configuration.getDefaultApiClient());
}
public AntifraudApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get the API client
*
* @return API client
*/
public ApiClient getApiClient() {
return apiClient;
}
/**
* Set the API client
*
* @param apiClient an instance of API client
*/
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create blacklisted rule
*
* @param createRiskRulesData requested field for blacklist rule (required)
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @return BlacklistRuleResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
successfully registered rule
-
401
authentication error
-
500
internal server error
-
*/
public BlacklistRuleResponse createRuleBlacklist(CreateRiskRulesData createRiskRulesData, String acceptLanguage) throws ApiException {
return createRuleBlacklistWithHttpInfo(createRiskRulesData, acceptLanguage).getData();
}
/**
* Create blacklisted rule
*
* @param createRiskRulesData requested field for blacklist rule (required)
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @return ApiResponse<BlacklistRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
successfully registered rule
-
401
authentication error
-
500
internal server error
-
*/
public ApiResponse createRuleBlacklistWithHttpInfo(CreateRiskRulesData createRiskRulesData, String acceptLanguage) throws ApiException {
// Check required parameters
if (createRiskRulesData == null) {
throw new ApiException(400, "Missing the required parameter 'createRiskRulesData' when calling createRuleBlacklist");
}
// Header parameters
Map localVarHeaderParams = new LinkedHashMap<>();
if (acceptLanguage != null) {
localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage));
}
String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json");
String localVarContentType = apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("AntifraudApi.createRuleBlacklist", "/antifraud/blacklists", "POST", new ArrayList<>(), createRiskRulesData,
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Create whitelisted rule
*
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @param createRiskRulesData (optional)
* @return WhitelistlistRuleResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
successfully registered rule
-
401
authentication error
-
403
forbidden error
-
500
internal server error
-
*/
public WhitelistlistRuleResponse createRuleWhitelist(String acceptLanguage, CreateRiskRulesData createRiskRulesData) throws ApiException {
return createRuleWhitelistWithHttpInfo(acceptLanguage, createRiskRulesData).getData();
}
/**
* Create whitelisted rule
*
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @param createRiskRulesData (optional)
* @return ApiResponse<WhitelistlistRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
successfully registered rule
-
401
authentication error
-
403
forbidden error
-
500
internal server error
-
*/
public ApiResponse createRuleWhitelistWithHttpInfo(String acceptLanguage, CreateRiskRulesData createRiskRulesData) throws ApiException {
// Header parameters
Map localVarHeaderParams = new LinkedHashMap<>();
if (acceptLanguage != null) {
localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage));
}
String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json");
String localVarContentType = apiClient.selectHeaderContentType("application/json");
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("AntifraudApi.createRuleWhitelist", "/antifraud/whitelists", "POST", new ArrayList<>(), createRiskRulesData,
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Delete blacklisted rule
*
* @param id Identifier of the resource (required)
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional)
* @return DeletedBlacklistRuleResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
successfully deleted rule
-
401
authentication error
-
404
not found entity
-
500
internal server error
-
*/
public DeletedBlacklistRuleResponse deleteRuleBlacklist(String id, String acceptLanguage, String xChildCompanyId) throws ApiException {
return deleteRuleBlacklistWithHttpInfo(id, acceptLanguage, xChildCompanyId).getData();
}
/**
* Delete blacklisted rule
*
* @param id Identifier of the resource (required)
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional)
* @return ApiResponse<DeletedBlacklistRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
successfully deleted rule
-
401
authentication error
-
404
not found entity
-
500
internal server error
-
*/
public ApiResponse deleteRuleBlacklistWithHttpInfo(String id, String acceptLanguage, String xChildCompanyId) throws ApiException {
// Check required parameters
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling deleteRuleBlacklist");
}
// Path parameters
String localVarPath = "/antifraud/blacklists/{id}"
.replaceAll("\\{id}", apiClient.escapeString(id));
// Header parameters
Map localVarHeaderParams = new LinkedHashMap<>();
if (acceptLanguage != null) {
localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage));
}
if (xChildCompanyId != null) {
localVarHeaderParams.put("X-Child-Company-Id", apiClient.parameterToString(xChildCompanyId));
}
String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("AntifraudApi.deleteRuleBlacklist", localVarPath, "DELETE", new ArrayList<>(), null,
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Delete whitelisted rule
*
* @param id Identifier of the resource (required)
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional)
* @return DeletedWhitelistRuleResponse
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
successfully deleted rule
-
401
authentication error
-
403
forbidden error
-
404
not found entity
-
500
internal server error
-
*/
public DeletedWhitelistRuleResponse deleteRuleWhitelist(String id, String acceptLanguage, String xChildCompanyId) throws ApiException {
return deleteRuleWhitelistWithHttpInfo(id, acceptLanguage, xChildCompanyId).getData();
}
/**
* Delete whitelisted rule
*
* @param id Identifier of the resource (required)
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @param xChildCompanyId In the case of a holding company, the company id of the child company to which will process the request. (optional)
* @return ApiResponse<DeletedWhitelistRuleResponse>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
successfully deleted rule
-
401
authentication error
-
403
forbidden error
-
404
not found entity
-
500
internal server error
-
*/
public ApiResponse deleteRuleWhitelistWithHttpInfo(String id, String acceptLanguage, String xChildCompanyId) throws ApiException {
// Check required parameters
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling deleteRuleWhitelist");
}
// Path parameters
String localVarPath = "/antifraud/whitelists/{id}"
.replaceAll("\\{id}", apiClient.escapeString(id));
// Header parameters
Map localVarHeaderParams = new LinkedHashMap<>();
if (acceptLanguage != null) {
localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage));
}
if (xChildCompanyId != null) {
localVarHeaderParams.put("X-Child-Company-Id", apiClient.parameterToString(xChildCompanyId));
}
String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("AntifraudApi.deleteRuleWhitelist", localVarPath, "DELETE", new ArrayList<>(), null,
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Get list of blacklisted rules
* Return all rules
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @return RiskRulesList
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
All the rules
-
401
authentication error
-
500
internal server error
-
*/
public RiskRulesList getRuleBlacklist(String acceptLanguage) throws ApiException {
return getRuleBlacklistWithHttpInfo(acceptLanguage).getData();
}
/**
* Get list of blacklisted rules
* Return all rules
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @return ApiResponse<RiskRulesList>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
All the rules
-
401
authentication error
-
500
internal server error
-
*/
public ApiResponse getRuleBlacklistWithHttpInfo(String acceptLanguage) throws ApiException {
// Header parameters
Map localVarHeaderParams = new LinkedHashMap<>();
if (acceptLanguage != null) {
localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage));
}
String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("AntifraudApi.getRuleBlacklist", "/antifraud/blacklists", "GET", new ArrayList<>(), null,
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
/**
* Get a list of whitelisted rules
* Return all rules
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @return RiskRulesList
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
All the rules
-
401
authentication error
-
403
forbidden error
-
500
internal server error
-
*/
public RiskRulesList getRuleWhitelist(String acceptLanguage) throws ApiException {
return getRuleWhitelistWithHttpInfo(acceptLanguage).getData();
}
/**
* Get a list of whitelisted rules
* Return all rules
* @param acceptLanguage Use for knowing which language to use (optional, default to es)
* @return ApiResponse<RiskRulesList>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
All the rules
-
401
authentication error
-
403
forbidden error
-
500
internal server error
-
*/
public ApiResponse getRuleWhitelistWithHttpInfo(String acceptLanguage) throws ApiException {
// Header parameters
Map localVarHeaderParams = new LinkedHashMap<>();
if (acceptLanguage != null) {
localVarHeaderParams.put("Accept-Language", apiClient.parameterToString(acceptLanguage));
}
String localVarAccept = apiClient.selectHeaderAccept("application/vnd.conekta-v2.1.0+json");
String localVarContentType = apiClient.selectHeaderContentType();
String[] localVarAuthNames = new String[] {"bearerAuth"};
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPI("AntifraudApi.getRuleWhitelist", "/antifraud/whitelists", "GET", new ArrayList<>(), null,
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
localVarAuthNames, localVarReturnType, false);
}
}