@airwallex/node-sdk
Version:
Airwallex Node.js SDK
26 lines • 1.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AuthenticationEmbeddedComponentsApi = void 0;
const apiClient_1 = require("../../client/apiClient");
const dataParser_1 = require("../../utils/dataParser");
const dropInSDKAuthorizeResDTO_1 = require("../../model/dropInSDKAuthorizeResDTO");
class AuthenticationEmbeddedComponentsApi {
async authorize(request, x_on_behalf_of, options = {}) {
const localVarPath = '/api/v1/authentication/authorize';
const { headers, timeout, responseType } = options;
let localVarHeaderParams = Object.assign({}, headers ? headers : {});
if (request === null || request === undefined) {
throw new Error('Required parameter request was null or undefined when calling authorize.');
}
localVarHeaderParams['x-on-behalf-of'] = x_on_behalf_of;
const data = await apiClient_1.apiClient.post(localVarPath, {
headers: localVarHeaderParams,
timeout,
responseType,
}, request);
const typeName = dropInSDKAuthorizeResDTO_1.DropInSDKAuthorizeResDTO.discriminator;
return (0, dataParser_1.parseDataToType)(data, typeName);
}
}
exports.AuthenticationEmbeddedComponentsApi = AuthenticationEmbeddedComponentsApi;
//# sourceMappingURL=authenticationEmbeddedComponentsApi.js.map