@paciolan/cybersource-sdk
Version:
CyberSource REST API Typescript SDK
526 lines (525 loc) • 32.9 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DecisionManagerApi = exports.DecisionManagerApiFactory = exports.DecisionManagerApiFp = exports.DecisionManagerApiAxiosParamCreator = void 0;
/* tslint:disable */
/* eslint-disable */
/**
* CyberSource Merged Spec
* All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
*
* OpenAPI spec version: 0.0.1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
const axios_1 = __importDefault(require("axios"));
const AuthenticationHeader_1 = require("../authentication/core/AuthenticationHeader");
// Some imports not used depending on template conditions
// @ts-ignore
const base_1 = require("../base");
/**
* DecisionManagerApi - axios parameter creator
* @export
*/
const DecisionManagerApiAxiosParamCreator = function (configuration) {
return {
/**
* Take action on a DM post-transactional case
* @summary Take action on a DM post-transactional case
* @param {IdActionsBody} body
* @param {string} id An unique identification number generated by Cybersource to identify the submitted request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
actionDecisionManagerCase: (body, id, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling actionDecisionManagerCase.');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling actionDecisionManagerCase.');
}
const localVarPath = `/risk/v1/decisions/{id}/actions`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
const authHeader = new AuthenticationHeader_1.AuthenticationHeader();
authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options));
localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers);
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
}),
/**
* This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be 'postiive', 'negative' or 'review'.
* @summary List Management
* @param {TypeEntriesBody} body
* @param {string} type The list to be updated. It can be 'positive', 'negative' or 'review'.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addNegative: (body, type, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling addNegative.');
}
// verify required parameter 'type' is not null or undefined
if (type === null || type === undefined) {
throw new base_1.RequiredError('type', 'Required parameter type was null or undefined when calling addNegative.');
}
const localVarPath = `/risk/v1/lists/{type}/entries`
.replace(`{${"type"}}`, encodeURIComponent(String(type)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json;charset=utf-8';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
const authHeader = new AuthenticationHeader_1.AuthenticationHeader();
authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options));
localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers);
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
}),
/**
* Add a comment to a DM post-transactional case
* @summary Add a comment to a DM post-transactional case
* @param {IdCommentsBody} body
* @param {string} id An unique identification number generated by Cybersource to identify the submitted request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
commentDecisionManagerCase: (body, id, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling commentDecisionManagerCase.');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling commentDecisionManagerCase.');
}
const localVarPath = `/risk/v1/decisions/{id}/comments`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
const authHeader = new AuthenticationHeader_1.AuthenticationHeader();
authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options));
localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers);
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
}),
/**
* Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values.
* @summary Create Decision Manager
* @param {V1DecisionsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createBundledDecisionManagerCase: (body, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling createBundledDecisionManagerCase.');
}
const localVarPath = `/risk/v1/decisions`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json;charset=utf-8';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
const authHeader = new AuthenticationHeader_1.AuthenticationHeader();
authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options));
localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers);
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
}),
/**
* This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request.
* @summary Fraud Marking
* @param {IdMarkingBody} body
* @param {string} id Request ID of the transaction that you want to mark as suspect or remove from history.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fraudUpdate: (body, id, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'body' is not null or undefined
if (body === null || body === undefined) {
throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling fraudUpdate.');
}
// verify required parameter 'id' is not null or undefined
if (id === null || id === undefined) {
throw new base_1.RequiredError('id', 'Required parameter id was null or undefined when calling fraudUpdate.');
}
const localVarPath = `/risk/v1/decisions/{id}/marking`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
localVarHeaderParameter['Content-Type'] = 'application/json;charset=utf-8';
const query = new URLSearchParams(localVarUrlObj.search);
for (const key in localVarQueryParameter) {
query.set(key, localVarQueryParameter[key]);
}
for (const key in options.params) {
query.set(key, options.params[key]);
}
localVarUrlObj.search = (new URLSearchParams(query)).toString();
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || "");
const authHeader = new AuthenticationHeader_1.AuthenticationHeader();
authHeader.setConfiguration(Object.assign(Object.assign({}, configuration), options));
localVarRequestOptions.headers = authHeader.callAuthenticationHeader(localVarRequestOptions.method, localVarPath, localVarRequestOptions.data, localVarRequestOptions.headers);
return {
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
options: localVarRequestOptions,
};
}),
};
};
exports.DecisionManagerApiAxiosParamCreator = DecisionManagerApiAxiosParamCreator;
/**
* DecisionManagerApi - functional programming interface
* @export
*/
const DecisionManagerApiFp = function (configuration) {
return {
/**
* Take action on a DM post-transactional case
* @summary Take action on a DM post-transactional case
* @param {IdActionsBody} body
* @param {string} id An unique identification number generated by Cybersource to identify the submitted request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
actionDecisionManagerCase(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield (0, exports.DecisionManagerApiAxiosParamCreator)(configuration).actionDecisionManagerCase(body, id, options);
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
};
});
},
/**
* This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be 'postiive', 'negative' or 'review'.
* @summary List Management
* @param {TypeEntriesBody} body
* @param {string} type The list to be updated. It can be 'positive', 'negative' or 'review'.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addNegative(body, type, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield (0, exports.DecisionManagerApiAxiosParamCreator)(configuration).addNegative(body, type, options);
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
};
});
},
/**
* Add a comment to a DM post-transactional case
* @summary Add a comment to a DM post-transactional case
* @param {IdCommentsBody} body
* @param {string} id An unique identification number generated by Cybersource to identify the submitted request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
commentDecisionManagerCase(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield (0, exports.DecisionManagerApiAxiosParamCreator)(configuration).commentDecisionManagerCase(body, id, options);
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
};
});
},
/**
* Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values.
* @summary Create Decision Manager
* @param {V1DecisionsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createBundledDecisionManagerCase(body, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield (0, exports.DecisionManagerApiAxiosParamCreator)(configuration).createBundledDecisionManagerCase(body, options);
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
};
});
},
/**
* This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request.
* @summary Fraud Marking
* @param {IdMarkingBody} body
* @param {string} id Request ID of the transaction that you want to mark as suspect or remove from history.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fraudUpdate(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield (0, exports.DecisionManagerApiAxiosParamCreator)(configuration).fraudUpdate(body, id, options);
return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
return axios.request(axiosRequestArgs);
};
});
},
};
};
exports.DecisionManagerApiFp = DecisionManagerApiFp;
/**
* DecisionManagerApi - factory interface
* @export
*/
const DecisionManagerApiFactory = function (configuration, basePath, axios) {
return {
/**
* Take action on a DM post-transactional case
* @summary Take action on a DM post-transactional case
* @param {IdActionsBody} body
* @param {string} id An unique identification number generated by Cybersource to identify the submitted request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
actionDecisionManagerCase(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(configuration).actionDecisionManagerCase(body, id, options).then((request) => request(axios, basePath));
});
},
/**
* This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be 'postiive', 'negative' or 'review'.
* @summary List Management
* @param {TypeEntriesBody} body
* @param {string} type The list to be updated. It can be 'positive', 'negative' or 'review'.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
addNegative(body, type, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(configuration).addNegative(body, type, options).then((request) => request(axios, basePath));
});
},
/**
* Add a comment to a DM post-transactional case
* @summary Add a comment to a DM post-transactional case
* @param {IdCommentsBody} body
* @param {string} id An unique identification number generated by Cybersource to identify the submitted request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
commentDecisionManagerCase(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(configuration).commentDecisionManagerCase(body, id, options).then((request) => request(axios, basePath));
});
},
/**
* Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values.
* @summary Create Decision Manager
* @param {V1DecisionsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createBundledDecisionManagerCase(body, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(configuration).createBundledDecisionManagerCase(body, options).then((request) => request(axios, basePath));
});
},
/**
* This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request.
* @summary Fraud Marking
* @param {IdMarkingBody} body
* @param {string} id Request ID of the transaction that you want to mark as suspect or remove from history.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
fraudUpdate(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(configuration).fraudUpdate(body, id, options).then((request) => request(axios, basePath));
});
},
};
};
exports.DecisionManagerApiFactory = DecisionManagerApiFactory;
/**
* DecisionManagerApi - object-oriented interface
* @export
* @class DecisionManagerApi
* @extends {BaseAPI}
*/
class DecisionManagerApi extends base_1.BaseAPI {
/**
* Take action on a DM post-transactional case
* @summary Take action on a DM post-transactional case
* @param {IdActionsBody} body
* @param {string} id An unique identification number generated by Cybersource to identify the submitted request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DecisionManagerApi
*/
actionDecisionManagerCase(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(this.configuration).actionDecisionManagerCase(body, id, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath));
});
}
/**
* This call adds/deletes/converts the request information in the negative list. Provide the list to be updated as the path parameter. This value can be 'postiive', 'negative' or 'review'.
* @summary List Management
* @param {TypeEntriesBody} body
* @param {string} type The list to be updated. It can be 'positive', 'negative' or 'review'.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DecisionManagerApi
*/
addNegative(body, type, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(this.configuration).addNegative(body, type, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath));
});
}
/**
* Add a comment to a DM post-transactional case
* @summary Add a comment to a DM post-transactional case
* @param {IdCommentsBody} body
* @param {string} id An unique identification number generated by Cybersource to identify the submitted request.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DecisionManagerApi
*/
commentDecisionManagerCase(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(this.configuration).commentDecisionManagerCase(body, id, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath));
});
}
/**
* Decision Manager can help you automate and streamline your fraud operations. Decision Manager will return a decision based on the request values.
* @summary Create Decision Manager
* @param {V1DecisionsBody} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DecisionManagerApi
*/
createBundledDecisionManagerCase(body, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(this.configuration).createBundledDecisionManagerCase(body, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath));
});
}
/**
* This can be used to - 1. Add known fraudulent data to the fraud history 2. Remove data added to history with Transaction Marking Tool or by uploading chargeback files 3. Remove chargeback data from history that was automatically added. For detailed information, contact your Cybersource representative Place the request ID of the transaction you want to mark as suspect (or remove from history) as the path parameter in this request.
* @summary Fraud Marking
* @param {IdMarkingBody} body
* @param {string} id Request ID of the transaction that you want to mark as suspect or remove from history.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof DecisionManagerApi
*/
fraudUpdate(body, id, options) {
return __awaiter(this, void 0, void 0, function* () {
return (0, exports.DecisionManagerApiFp)(this.configuration).fraudUpdate(body, id, options).then((request) => request(this.axios, options.runEnvironment != null ? `https://${options.runEnvironment}` : this.basePath));
});
}
}
exports.DecisionManagerApi = DecisionManagerApi;