UNPKG

@simpleapps-com/augur-api

Version:

TypeScript client library for Augur microservices API endpoints

49 lines 1.72 kB
import { ElementPaymentParamsSchema, ElementPaymentResponseSchema } from '../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. */ export 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: ElementPaymentParamsSchema, responseSchema: ElementPaymentResponseSchema, }, params); }, }, }; } /** * Creates the elementData resource methods (data-only versions) */ export function createElementDataResource(element) { return { payment: { create: async (params) => { const response = await element.payment.create(params); return response.data; }, }, }; } //# sourceMappingURL=element.js.map