UNPKG

@airwallex/node-sdk

Version:

Airwallex Node.js SDK

27 lines 1.45 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SimulationDemoOnlyPaymentAcceptanceApi = void 0; const apiClient_1 = require("../../client/apiClient"); const dataParser_1 = require("../../utils/dataParser"); class SimulationDemoOnlyPaymentAcceptanceApi { async simulateShopperAction(action, payload, options = {}) { if (action === null || action === undefined) { throw new Error('Required parameter action was null or undefined when calling simulateShopperAction.'); } const localVarPath = '/api/v1/simulation/pa/shopper_actions/{action}'.replace('{' + 'action' + '}', encodeURIComponent(String(action))); const { headers, timeout, responseType } = options; let localVarHeaderParams = Object.assign({}, headers ? headers : {}); if (payload === null || payload === undefined) { throw new Error('Required parameter payload was null or undefined when calling simulateShopperAction.'); } const data = await apiClient_1.apiClient.post(localVarPath, { headers: localVarHeaderParams, timeout, responseType, }, payload); const typeName = 'any'; return (0, dataParser_1.parseDataToType)(data, typeName); } } exports.SimulationDemoOnlyPaymentAcceptanceApi = SimulationDemoOnlyPaymentAcceptanceApi; //# sourceMappingURL=simulationDemoOnlyPaymentAcceptanceApi.js.map