@adyen/api-library
Version:
The Adyen API Library for NodeJS enables you to work with Adyen APIs.
43 lines • 2.06 kB
JavaScript
;
/*
* The version of the OpenAPI document: v3
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TerminalActionsTerminalLevelApi = void 0;
const getJsonResponse_1 = __importDefault(require("../../helpers/getJsonResponse"));
const service_1 = __importDefault(require("../../service"));
const resource_1 = __importDefault(require("../resource"));
const objectSerializer_1 = require("../../typings/management/objectSerializer");
/**
* API handler for TerminalActionsTerminalLevelApi
*/
class TerminalActionsTerminalLevelApi extends service_1.default {
constructor(client) {
super(client);
this.API_BASEPATH = "https://management-test.adyen.com/v3";
this.baseUrl = this.createBaseUrl(this.API_BASEPATH);
}
/**
* @summary Create a terminal action
* @param scheduleTerminalActionsRequest {@link ScheduleTerminalActionsRequest }
* @param requestOptions {@link IRequest.Options }
* @return {@link ScheduleTerminalActionsResponse }
*/
async createTerminalAction(scheduleTerminalActionsRequest, requestOptions) {
const endpoint = `${this.baseUrl}/terminals/scheduleActions`;
const resource = new resource_1.default(this, endpoint);
const request = objectSerializer_1.ObjectSerializer.serialize(scheduleTerminalActionsRequest, "ScheduleTerminalActionsRequest");
const response = await (0, getJsonResponse_1.default)(resource, request, { ...requestOptions, method: "POST" });
return objectSerializer_1.ObjectSerializer.deserialize(response, "ScheduleTerminalActionsResponse");
}
}
exports.TerminalActionsTerminalLevelApi = TerminalActionsTerminalLevelApi;
//# sourceMappingURL=terminalActionsTerminalLevelApi.js.map