UNPKG

autumn-js

Version:
52 lines (48 loc) 1.28 kB
"use client"; // src/libraries/react/client/clientGenMethods.ts async function checkoutMethod(params) { const res = await this.post(`${this.prefix}/checkout`, params); return res; } async function attachMethod(params) { const res = await this.post(`${this.prefix}/attach`, params); return res; } async function setupPaymentMethod(params) { const res = await this.post(`${this.prefix}/setup_payment`, params); return res; } async function cancelMethod(params) { const res = await this.post(`${this.prefix}/cancel`, params); return res; } async function checkMethod(params) { const noDialogParams = { ...params, dialog: void 0 }; const res = await this.post(`${this.prefix}/check`, noDialogParams); return res; } async function trackMethod(params) { const res = await this.post(`${this.prefix}/track`, params); return res; } async function openBillingPortalMethod(params) { const res = await this.post(`${this.prefix}/billing_portal`, params || {}); return res; } async function queryMethod(params) { const res = await this.post(`${this.prefix}/query`, params); return res; } export { checkoutMethod, attachMethod, setupPaymentMethod, cancelMethod, checkMethod, trackMethod, openBillingPortalMethod, queryMethod };