@simpleapps-com/augur-api
Version:
TypeScript client library for Augur microservices API endpoints
53 lines • 1.88 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.createElementResource = createElementResource;
exports.createElementDataResource = createElementDataResource;
const schemas_1 = require("../schemas");
/**
* Creates the element resource methods
* OpenAPI Path: /element → element.*
* @description Legacy Element Express payment processing
* @deprecated This endpoint appears to be a legacy Element Express integration
* and may be deprecated in favor of the unified endpoints.
*/
function createElementResource(executeRequest) {
return {
/**
* Payment Operations
*/
payment: {
/**
* Create payment account token from card data
* @fullPath api.payments.element.payment.create
* @service payments
* @domain payment-processing
* @dataMethod elementData.payment.create
* @discoverable true
* @deprecated This endpoint appears to be a legacy Element Express integration
* and may be deprecated in favor of the unified endpoints.
*/
create: async (params) => {
return executeRequest({
method: 'POST',
path: '/element/payment',
paramsSchema: schemas_1.ElementPaymentParamsSchema,
responseSchema: schemas_1.ElementPaymentResponseSchema,
}, params);
},
},
};
}
/**
* Creates the elementData resource methods (data-only versions)
*/
function createElementDataResource(element) {
return {
payment: {
create: async (params) => {
const response = await element.payment.create(params);
return response.data;
},
},
};
}
//# sourceMappingURL=element.js.map