@airwallex/node-sdk
Version:
Airwallex Node.js SDK
28 lines • 1.61 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SimulationDemoOnlyAccountsApi = void 0;
const apiClient_1 = require("../../client/apiClient");
const dataParser_1 = require("../../utils/dataParser");
const simulationAccountResApiDto_1 = require("../../model/simulationAccountResApiDto");
class SimulationDemoOnlyAccountsApi {
async updateConnectedAccountStatus(account_id, payload, options = {}) {
if (account_id === null || account_id === undefined) {
throw new Error('Required parameter account_id was null or undefined when calling updateConnectedAccountStatus.');
}
const localVarPath = '/api/v1/simulation/accounts/{account_id}/update_status'.replace('{' + 'account_id' + '}', encodeURIComponent(String(account_id)));
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 updateConnectedAccountStatus.');
}
const data = await apiClient_1.apiClient.post(localVarPath, {
headers: localVarHeaderParams,
timeout,
responseType,
}, payload);
const typeName = simulationAccountResApiDto_1.SimulationAccountResApiDto.discriminator;
return (0, dataParser_1.parseDataToType)(data, typeName);
}
}
exports.SimulationDemoOnlyAccountsApi = SimulationDemoOnlyAccountsApi;
//# sourceMappingURL=simulationDemoOnlyAccountsApi.js.map