@paygentic/sdk 0.9.15 → 0.9.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -6
- package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.d.ts +18 -0
- package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.js +125 -0
- package/dist/commonjs/funcs/invoicesV2ListProjectedInvoices.js.map +1 -0
- package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.d.ts +27 -0
- package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.js +133 -0
- package/dist/commonjs/funcs/invoicesV2RecordInvoicePayment.js.map +1 -0
- package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.d.ts +40 -0
- package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.d.ts.map +1 -0
- package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.js +157 -0
- package/dist/commonjs/funcs/invoicesV2RetryInvoicePayment.js.map +1 -0
- package/dist/commonjs/funcs/merchantsReset.d.ts +22 -0
- package/dist/commonjs/funcs/merchantsReset.d.ts.map +1 -0
- package/dist/commonjs/funcs/merchantsReset.js +129 -0
- package/dist/commonjs/funcs/merchantsReset.js.map +1 -0
- package/dist/commonjs/funcs/profitabilityGetProfitability.d.ts +1 -1
- package/dist/commonjs/funcs/profitabilityGetProfitability.js +1 -1
- package/dist/commonjs/funcs/revenueGet.d.ts +1 -1
- package/dist/commonjs/funcs/revenueGet.js +1 -1
- package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.d.ts +19 -0
- package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.d.ts.map +1 -0
- package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.js +127 -0
- package/dist/commonjs/funcs/subscriptionsMigrateSubscriptionVersion.js.map +1 -0
- package/dist/commonjs/funcs/webhooksDisable.d.ts +18 -0
- package/dist/commonjs/funcs/webhooksDisable.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksDisable.js +122 -0
- package/dist/commonjs/funcs/webhooksDisable.js.map +1 -0
- package/dist/commonjs/funcs/webhooksEnable.d.ts +19 -0
- package/dist/commonjs/funcs/webhooksEnable.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksEnable.js +122 -0
- package/dist/commonjs/funcs/webhooksEnable.js.map +1 -0
- package/dist/commonjs/funcs/webhooksGet.d.ts +19 -0
- package/dist/commonjs/funcs/webhooksGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksGet.js +122 -0
- package/dist/commonjs/funcs/webhooksGet.js.map +1 -0
- package/dist/commonjs/funcs/webhooksGetPortal.d.ts +19 -0
- package/dist/commonjs/funcs/webhooksGetPortal.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksGetPortal.js +122 -0
- package/dist/commonjs/funcs/webhooksGetPortal.js.map +1 -0
- package/dist/commonjs/funcs/webhooksUpdate.d.ts +19 -0
- package/dist/commonjs/funcs/webhooksUpdate.d.ts.map +1 -0
- package/dist/commonjs/funcs/webhooksUpdate.js +123 -0
- package/dist/commonjs/funcs/webhooksUpdate.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/currencybreakdownentry.d.ts +1 -1
- package/dist/commonjs/models/elapsedperiodbilling.d.ts +16 -0
- package/dist/commonjs/models/elapsedperiodbilling.d.ts.map +1 -0
- package/dist/commonjs/models/elapsedperiodbilling.js +50 -0
- package/dist/commonjs/models/elapsedperiodbilling.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +2 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +2 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/recordinvoicepayment.d.ts +55 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.d.ts.map +1 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.js +76 -0
- package/dist/commonjs/models/errors/recordinvoicepayment.js.map +1 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.d.ts +63 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.js +81 -0
- package/dist/commonjs/models/errors/retrypaymentresponseerror.js.map +1 -0
- package/dist/commonjs/models/grouptrendentry.d.ts +5 -1
- package/dist/commonjs/models/grouptrendentry.d.ts.map +1 -1
- package/dist/commonjs/models/grouptrendentry.js +1 -0
- package/dist/commonjs/models/grouptrendentry.js.map +1 -1
- package/dist/commonjs/models/hostedlinkpaymentresult.d.ts +28 -0
- package/dist/commonjs/models/hostedlinkpaymentresult.d.ts.map +1 -0
- package/dist/commonjs/models/hostedlinkpaymentresult.js +56 -0
- package/dist/commonjs/models/hostedlinkpaymentresult.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +14 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +14 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/invoice.d.ts +4 -3
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +2 -1
- package/dist/commonjs/models/invoice.js.map +1 -1
- package/dist/commonjs/models/invoicepaymentlinkerrorcode.d.ts +17 -0
- package/dist/commonjs/models/invoicepaymentlinkerrorcode.d.ts.map +1 -0
- package/dist/commonjs/models/invoicepaymentlinkerrorcode.js +51 -0
- package/dist/commonjs/models/invoicepaymentlinkerrorcode.js.map +1 -0
- package/dist/commonjs/models/invoicepaymentmethod.d.ts +16 -0
- package/dist/commonjs/models/invoicepaymentmethod.d.ts.map +1 -0
- package/dist/commonjs/models/invoicepaymentmethod.js +50 -0
- package/dist/commonjs/models/invoicepaymentmethod.js.map +1 -0
- package/dist/commonjs/models/invoicepaymentprovider.d.ts +16 -0
- package/dist/commonjs/models/invoicepaymentprovider.d.ts.map +1 -0
- package/dist/commonjs/models/invoicepaymentprovider.js +50 -0
- package/dist/commonjs/models/invoicepaymentprovider.js.map +1 -0
- package/dist/commonjs/models/merchantreset.d.ts +41 -0
- package/dist/commonjs/models/merchantreset.d.ts.map +1 -0
- package/dist/commonjs/models/merchantreset.js +68 -0
- package/dist/commonjs/models/merchantreset.js.map +1 -0
- package/dist/commonjs/models/migratesubscriptionversionrequest.d.ts +37 -0
- package/dist/commonjs/models/migratesubscriptionversionrequest.d.ts.map +1 -0
- package/dist/commonjs/models/migratesubscriptionversionrequest.js +60 -0
- package/dist/commonjs/models/migratesubscriptionversionrequest.js.map +1 -0
- package/dist/commonjs/models/migratesubscriptionversionresponse.d.ts +47 -0
- package/dist/commonjs/models/migratesubscriptionversionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/migratesubscriptionversionresponse.js +73 -0
- package/dist/commonjs/models/migratesubscriptionversionresponse.js.map +1 -0
- package/dist/commonjs/models/operations/createplan.d.ts +5 -0
- package/dist/commonjs/models/operations/createplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createplan.js +1 -0
- package/dist/commonjs/models/operations/createplan.js.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.d.ts +5 -0
- package/dist/commonjs/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.js +1 -0
- package/dist/commonjs/models/operations/createsubscription.js.map +1 -1
- package/dist/commonjs/models/operations/createwebhooks.d.ts +15 -0
- package/dist/commonjs/models/operations/createwebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/createwebhooks.js +49 -0
- package/dist/commonjs/models/operations/createwebhooks.js.map +1 -0
- package/dist/commonjs/models/operations/deletewebhooks.d.ts +15 -0
- package/dist/commonjs/models/operations/deletewebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletewebhooks.js +49 -0
- package/dist/commonjs/models/operations/deletewebhooks.js.map +1 -0
- package/dist/commonjs/models/operations/getwebhookportal.d.ts +15 -0
- package/dist/commonjs/models/operations/getwebhookportal.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getwebhookportal.js +49 -0
- package/dist/commonjs/models/operations/getwebhookportal.js.map +1 -0
- package/dist/commonjs/models/operations/getwebhooks.d.ts +15 -0
- package/dist/commonjs/models/operations/getwebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getwebhooks.js +49 -0
- package/dist/commonjs/models/operations/getwebhooks.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +10 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +10 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listprojectedinvoices.d.ts +59 -0
- package/dist/commonjs/models/operations/listprojectedinvoices.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listprojectedinvoices.js +70 -0
- package/dist/commonjs/models/operations/listprojectedinvoices.js.map +1 -0
- package/dist/commonjs/models/operations/migratesubscriptionversion.d.ts +18 -0
- package/dist/commonjs/models/operations/migratesubscriptionversion.d.ts.map +1 -0
- package/dist/commonjs/models/operations/migratesubscriptionversion.js +56 -0
- package/dist/commonjs/models/operations/migratesubscriptionversion.js.map +1 -0
- package/dist/commonjs/models/operations/recordinvoicepayment.d.ts +45 -0
- package/dist/commonjs/models/operations/recordinvoicepayment.d.ts.map +1 -0
- package/dist/commonjs/models/operations/recordinvoicepayment.js +75 -0
- package/dist/commonjs/models/operations/recordinvoicepayment.js.map +1 -0
- package/dist/commonjs/models/operations/resetmerchant.d.ts +15 -0
- package/dist/commonjs/models/operations/resetmerchant.d.ts.map +1 -0
- package/dist/commonjs/models/operations/resetmerchant.js +56 -0
- package/dist/commonjs/models/operations/resetmerchant.js.map +1 -0
- package/dist/commonjs/models/operations/retryinvoicepayment.d.ts +30 -0
- package/dist/commonjs/models/operations/retryinvoicepayment.d.ts.map +1 -0
- package/dist/commonjs/models/operations/retryinvoicepayment.js +64 -0
- package/dist/commonjs/models/operations/retryinvoicepayment.js.map +1 -0
- package/dist/commonjs/models/operations/updateplan.d.ts +5 -0
- package/dist/commonjs/models/operations/updateplan.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateplan.js +1 -0
- package/dist/commonjs/models/operations/updateplan.js.map +1 -1
- package/dist/commonjs/models/operations/updatewebhooks.d.ts +30 -0
- package/dist/commonjs/models/operations/updatewebhooks.d.ts.map +1 -0
- package/dist/commonjs/models/operations/updatewebhooks.js +63 -0
- package/dist/commonjs/models/operations/updatewebhooks.js.map +1 -0
- package/dist/commonjs/models/outofbandpaymentresult.d.ts +15 -0
- package/dist/commonjs/models/outofbandpaymentresult.d.ts.map +1 -0
- package/dist/commonjs/models/outofbandpaymentresult.js +52 -0
- package/dist/commonjs/models/outofbandpaymentresult.js.map +1 -0
- package/dist/commonjs/models/plan.d.ts +5 -0
- package/dist/commonjs/models/plan.d.ts.map +1 -1
- package/dist/commonjs/models/plan.js +2 -0
- package/dist/commonjs/models/plan.js.map +1 -1
- package/dist/commonjs/models/profitabilityrow.d.ts +23 -4
- package/dist/commonjs/models/profitabilityrow.d.ts.map +1 -1
- package/dist/commonjs/models/profitabilityrow.js +13 -1
- package/dist/commonjs/models/profitabilityrow.js.map +1 -1
- package/dist/commonjs/models/profitabilitysummaryresponse.d.ts +1 -1
- package/dist/commonjs/models/retrypaymenterror.d.ts +28 -0
- package/dist/commonjs/models/retrypaymenterror.d.ts.map +1 -0
- package/dist/commonjs/models/retrypaymenterror.js +53 -0
- package/dist/commonjs/models/retrypaymenterror.js.map +1 -0
- package/dist/commonjs/models/retrypaymentresponse.d.ts +46 -0
- package/dist/commonjs/models/retrypaymentresponse.d.ts.map +1 -0
- package/dist/commonjs/models/retrypaymentresponse.js +63 -0
- package/dist/commonjs/models/retrypaymentresponse.js.map +1 -0
- package/dist/commonjs/models/revenuesummaryresponse.d.ts +1 -1
- package/dist/commonjs/models/revenuetrendbucket.d.ts +6 -2
- package/dist/commonjs/models/revenuetrendbucket.d.ts.map +1 -1
- package/dist/commonjs/models/revenuetrendbucket.js +1 -0
- package/dist/commonjs/models/revenuetrendbucket.js.map +1 -1
- package/dist/commonjs/models/subscription.d.ts +29 -0
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js +14 -1
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/models/subscriptionintervaladdop.d.ts +1 -1
- package/dist/commonjs/models/versiontransition.d.ts +58 -0
- package/dist/commonjs/models/versiontransition.d.ts.map +1 -0
- package/dist/commonjs/models/versiontransition.js +82 -0
- package/dist/commonjs/models/versiontransition.js.map +1 -0
- package/dist/commonjs/models/webhookportal.d.ts +34 -0
- package/dist/commonjs/models/webhookportal.d.ts.map +1 -0
- package/dist/commonjs/models/webhookportal.js +60 -0
- package/dist/commonjs/models/webhookportal.js.map +1 -0
- package/dist/commonjs/models/webhooks.d.ts +46 -0
- package/dist/commonjs/models/webhooks.d.ts.map +1 -0
- package/dist/commonjs/models/webhooks.js +63 -0
- package/dist/commonjs/models/webhooks.js.map +1 -0
- package/dist/commonjs/sdk/invoicesv2.d.ts +51 -0
- package/dist/commonjs/sdk/invoicesv2.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoicesv2.js +60 -0
- package/dist/commonjs/sdk/invoicesv2.js.map +1 -1
- package/dist/commonjs/sdk/merchants.d.ts +16 -0
- package/dist/commonjs/sdk/merchants.d.ts.map +1 -0
- package/dist/commonjs/sdk/merchants.js +26 -0
- package/dist/commonjs/sdk/merchants.js.map +1 -0
- package/dist/commonjs/sdk/profitability.d.ts +1 -1
- package/dist/commonjs/sdk/profitability.js +1 -1
- package/dist/commonjs/sdk/revenue.d.ts +1 -1
- package/dist/commonjs/sdk/revenue.js +1 -1
- package/dist/commonjs/sdk/sdk.d.ts +6 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +8 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/subscriptions.d.ts +7 -0
- package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
- package/dist/commonjs/sdk/subscriptions.js +10 -0
- package/dist/commonjs/sdk/subscriptions.js.map +1 -1
- package/dist/commonjs/sdk/webhooks.d.ts +41 -0
- package/dist/commonjs/sdk/webhooks.d.ts.map +1 -0
- package/dist/commonjs/sdk/webhooks.js +62 -0
- package/dist/commonjs/sdk/webhooks.js.map +1 -0
- package/dist/esm/funcs/invoicesV2ListProjectedInvoices.d.ts +18 -0
- package/dist/esm/funcs/invoicesV2ListProjectedInvoices.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesV2ListProjectedInvoices.js +89 -0
- package/dist/esm/funcs/invoicesV2ListProjectedInvoices.js.map +1 -0
- package/dist/esm/funcs/invoicesV2RecordInvoicePayment.d.ts +27 -0
- package/dist/esm/funcs/invoicesV2RecordInvoicePayment.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesV2RecordInvoicePayment.js +97 -0
- package/dist/esm/funcs/invoicesV2RecordInvoicePayment.js.map +1 -0
- package/dist/esm/funcs/invoicesV2RetryInvoicePayment.d.ts +40 -0
- package/dist/esm/funcs/invoicesV2RetryInvoicePayment.d.ts.map +1 -0
- package/dist/esm/funcs/invoicesV2RetryInvoicePayment.js +121 -0
- package/dist/esm/funcs/invoicesV2RetryInvoicePayment.js.map +1 -0
- package/dist/esm/funcs/merchantsReset.d.ts +22 -0
- package/dist/esm/funcs/merchantsReset.d.ts.map +1 -0
- package/dist/esm/funcs/merchantsReset.js +93 -0
- package/dist/esm/funcs/merchantsReset.js.map +1 -0
- package/dist/esm/funcs/profitabilityGetProfitability.d.ts +1 -1
- package/dist/esm/funcs/profitabilityGetProfitability.js +1 -1
- package/dist/esm/funcs/revenueGet.d.ts +1 -1
- package/dist/esm/funcs/revenueGet.js +1 -1
- package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.d.ts +19 -0
- package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.d.ts.map +1 -0
- package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.js +91 -0
- package/dist/esm/funcs/subscriptionsMigrateSubscriptionVersion.js.map +1 -0
- package/dist/esm/funcs/webhooksDisable.d.ts +18 -0
- package/dist/esm/funcs/webhooksDisable.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksDisable.js +86 -0
- package/dist/esm/funcs/webhooksDisable.js.map +1 -0
- package/dist/esm/funcs/webhooksEnable.d.ts +19 -0
- package/dist/esm/funcs/webhooksEnable.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksEnable.js +86 -0
- package/dist/esm/funcs/webhooksEnable.js.map +1 -0
- package/dist/esm/funcs/webhooksGet.d.ts +19 -0
- package/dist/esm/funcs/webhooksGet.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksGet.js +86 -0
- package/dist/esm/funcs/webhooksGet.js.map +1 -0
- package/dist/esm/funcs/webhooksGetPortal.d.ts +19 -0
- package/dist/esm/funcs/webhooksGetPortal.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksGetPortal.js +86 -0
- package/dist/esm/funcs/webhooksGetPortal.js.map +1 -0
- package/dist/esm/funcs/webhooksUpdate.d.ts +19 -0
- package/dist/esm/funcs/webhooksUpdate.d.ts.map +1 -0
- package/dist/esm/funcs/webhooksUpdate.js +87 -0
- package/dist/esm/funcs/webhooksUpdate.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/currencybreakdownentry.d.ts +1 -1
- package/dist/esm/models/elapsedperiodbilling.d.ts +16 -0
- package/dist/esm/models/elapsedperiodbilling.d.ts.map +1 -0
- package/dist/esm/models/elapsedperiodbilling.js +14 -0
- package/dist/esm/models/elapsedperiodbilling.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +2 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +2 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/recordinvoicepayment.d.ts +55 -0
- package/dist/esm/models/errors/recordinvoicepayment.d.ts.map +1 -0
- package/dist/esm/models/errors/recordinvoicepayment.js +39 -0
- package/dist/esm/models/errors/recordinvoicepayment.js.map +1 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.d.ts +63 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.d.ts.map +1 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.js +44 -0
- package/dist/esm/models/errors/retrypaymentresponseerror.js.map +1 -0
- package/dist/esm/models/grouptrendentry.d.ts +5 -1
- package/dist/esm/models/grouptrendentry.d.ts.map +1 -1
- package/dist/esm/models/grouptrendentry.js +1 -0
- package/dist/esm/models/grouptrendentry.js.map +1 -1
- package/dist/esm/models/hostedlinkpaymentresult.d.ts +28 -0
- package/dist/esm/models/hostedlinkpaymentresult.d.ts.map +1 -0
- package/dist/esm/models/hostedlinkpaymentresult.js +19 -0
- package/dist/esm/models/hostedlinkpaymentresult.js.map +1 -0
- package/dist/esm/models/index.d.ts +14 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +14 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/invoice.d.ts +4 -3
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +2 -1
- package/dist/esm/models/invoice.js.map +1 -1
- package/dist/esm/models/invoicepaymentlinkerrorcode.d.ts +17 -0
- package/dist/esm/models/invoicepaymentlinkerrorcode.d.ts.map +1 -0
- package/dist/esm/models/invoicepaymentlinkerrorcode.js +15 -0
- package/dist/esm/models/invoicepaymentlinkerrorcode.js.map +1 -0
- package/dist/esm/models/invoicepaymentmethod.d.ts +16 -0
- package/dist/esm/models/invoicepaymentmethod.d.ts.map +1 -0
- package/dist/esm/models/invoicepaymentmethod.js +14 -0
- package/dist/esm/models/invoicepaymentmethod.js.map +1 -0
- package/dist/esm/models/invoicepaymentprovider.d.ts +16 -0
- package/dist/esm/models/invoicepaymentprovider.d.ts.map +1 -0
- package/dist/esm/models/invoicepaymentprovider.js +14 -0
- package/dist/esm/models/invoicepaymentprovider.js.map +1 -0
- package/dist/esm/models/merchantreset.d.ts +41 -0
- package/dist/esm/models/merchantreset.d.ts.map +1 -0
- package/dist/esm/models/merchantreset.js +29 -0
- package/dist/esm/models/merchantreset.js.map +1 -0
- package/dist/esm/models/migratesubscriptionversionrequest.d.ts +37 -0
- package/dist/esm/models/migratesubscriptionversionrequest.d.ts.map +1 -0
- package/dist/esm/models/migratesubscriptionversionrequest.js +23 -0
- package/dist/esm/models/migratesubscriptionversionrequest.js.map +1 -0
- package/dist/esm/models/migratesubscriptionversionresponse.d.ts +47 -0
- package/dist/esm/models/migratesubscriptionversionresponse.d.ts.map +1 -0
- package/dist/esm/models/migratesubscriptionversionresponse.js +34 -0
- package/dist/esm/models/migratesubscriptionversionresponse.js.map +1 -0
- package/dist/esm/models/operations/createplan.d.ts +5 -0
- package/dist/esm/models/operations/createplan.d.ts.map +1 -1
- package/dist/esm/models/operations/createplan.js +1 -0
- package/dist/esm/models/operations/createplan.js.map +1 -1
- package/dist/esm/models/operations/createsubscription.d.ts +5 -0
- package/dist/esm/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/createsubscription.js +1 -0
- package/dist/esm/models/operations/createsubscription.js.map +1 -1
- package/dist/esm/models/operations/createwebhooks.d.ts +15 -0
- package/dist/esm/models/operations/createwebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/createwebhooks.js +12 -0
- package/dist/esm/models/operations/createwebhooks.js.map +1 -0
- package/dist/esm/models/operations/deletewebhooks.d.ts +15 -0
- package/dist/esm/models/operations/deletewebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/deletewebhooks.js +12 -0
- package/dist/esm/models/operations/deletewebhooks.js.map +1 -0
- package/dist/esm/models/operations/getwebhookportal.d.ts +15 -0
- package/dist/esm/models/operations/getwebhookportal.d.ts.map +1 -0
- package/dist/esm/models/operations/getwebhookportal.js +12 -0
- package/dist/esm/models/operations/getwebhookportal.js.map +1 -0
- package/dist/esm/models/operations/getwebhooks.d.ts +15 -0
- package/dist/esm/models/operations/getwebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/getwebhooks.js +12 -0
- package/dist/esm/models/operations/getwebhooks.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +10 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +10 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listprojectedinvoices.d.ts +59 -0
- package/dist/esm/models/operations/listprojectedinvoices.d.ts.map +1 -0
- package/dist/esm/models/operations/listprojectedinvoices.js +32 -0
- package/dist/esm/models/operations/listprojectedinvoices.js.map +1 -0
- package/dist/esm/models/operations/migratesubscriptionversion.d.ts +18 -0
- package/dist/esm/models/operations/migratesubscriptionversion.d.ts.map +1 -0
- package/dist/esm/models/operations/migratesubscriptionversion.js +19 -0
- package/dist/esm/models/operations/migratesubscriptionversion.js.map +1 -0
- package/dist/esm/models/operations/recordinvoicepayment.d.ts +45 -0
- package/dist/esm/models/operations/recordinvoicepayment.d.ts.map +1 -0
- package/dist/esm/models/operations/recordinvoicepayment.js +36 -0
- package/dist/esm/models/operations/recordinvoicepayment.js.map +1 -0
- package/dist/esm/models/operations/resetmerchant.d.ts +15 -0
- package/dist/esm/models/operations/resetmerchant.d.ts.map +1 -0
- package/dist/esm/models/operations/resetmerchant.js +19 -0
- package/dist/esm/models/operations/resetmerchant.js.map +1 -0
- package/dist/esm/models/operations/retryinvoicepayment.d.ts +30 -0
- package/dist/esm/models/operations/retryinvoicepayment.d.ts.map +1 -0
- package/dist/esm/models/operations/retryinvoicepayment.js +26 -0
- package/dist/esm/models/operations/retryinvoicepayment.js.map +1 -0
- package/dist/esm/models/operations/updateplan.d.ts +5 -0
- package/dist/esm/models/operations/updateplan.d.ts.map +1 -1
- package/dist/esm/models/operations/updateplan.js +1 -0
- package/dist/esm/models/operations/updateplan.js.map +1 -1
- package/dist/esm/models/operations/updatewebhooks.d.ts +30 -0
- package/dist/esm/models/operations/updatewebhooks.d.ts.map +1 -0
- package/dist/esm/models/operations/updatewebhooks.js +25 -0
- package/dist/esm/models/operations/updatewebhooks.js.map +1 -0
- package/dist/esm/models/outofbandpaymentresult.d.ts +15 -0
- package/dist/esm/models/outofbandpaymentresult.d.ts.map +1 -0
- package/dist/esm/models/outofbandpaymentresult.js +15 -0
- package/dist/esm/models/outofbandpaymentresult.js.map +1 -0
- package/dist/esm/models/plan.d.ts +5 -0
- package/dist/esm/models/plan.d.ts.map +1 -1
- package/dist/esm/models/plan.js +2 -0
- package/dist/esm/models/plan.js.map +1 -1
- package/dist/esm/models/profitabilityrow.d.ts +23 -4
- package/dist/esm/models/profitabilityrow.d.ts.map +1 -1
- package/dist/esm/models/profitabilityrow.js +12 -0
- package/dist/esm/models/profitabilityrow.js.map +1 -1
- package/dist/esm/models/profitabilitysummaryresponse.d.ts +1 -1
- package/dist/esm/models/retrypaymenterror.d.ts +28 -0
- package/dist/esm/models/retrypaymenterror.d.ts.map +1 -0
- package/dist/esm/models/retrypaymenterror.js +16 -0
- package/dist/esm/models/retrypaymenterror.js.map +1 -0
- package/dist/esm/models/retrypaymentresponse.d.ts +46 -0
- package/dist/esm/models/retrypaymentresponse.d.ts.map +1 -0
- package/dist/esm/models/retrypaymentresponse.js +26 -0
- package/dist/esm/models/retrypaymentresponse.js.map +1 -0
- package/dist/esm/models/revenuesummaryresponse.d.ts +1 -1
- package/dist/esm/models/revenuetrendbucket.d.ts +6 -2
- package/dist/esm/models/revenuetrendbucket.d.ts.map +1 -1
- package/dist/esm/models/revenuetrendbucket.js +1 -0
- package/dist/esm/models/revenuetrendbucket.js.map +1 -1
- package/dist/esm/models/subscription.d.ts +29 -0
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js +13 -0
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/models/subscriptionintervaladdop.d.ts +1 -1
- package/dist/esm/models/versiontransition.d.ts +58 -0
- package/dist/esm/models/versiontransition.d.ts.map +1 -0
- package/dist/esm/models/versiontransition.js +44 -0
- package/dist/esm/models/versiontransition.js.map +1 -0
- package/dist/esm/models/webhookportal.d.ts +34 -0
- package/dist/esm/models/webhookportal.d.ts.map +1 -0
- package/dist/esm/models/webhookportal.js +23 -0
- package/dist/esm/models/webhookportal.js.map +1 -0
- package/dist/esm/models/webhooks.d.ts +46 -0
- package/dist/esm/models/webhooks.d.ts.map +1 -0
- package/dist/esm/models/webhooks.js +26 -0
- package/dist/esm/models/webhooks.js.map +1 -0
- package/dist/esm/sdk/invoicesv2.d.ts +51 -0
- package/dist/esm/sdk/invoicesv2.d.ts.map +1 -1
- package/dist/esm/sdk/invoicesv2.js +60 -0
- package/dist/esm/sdk/invoicesv2.js.map +1 -1
- package/dist/esm/sdk/merchants.d.ts +16 -0
- package/dist/esm/sdk/merchants.d.ts.map +1 -0
- package/dist/esm/sdk/merchants.js +22 -0
- package/dist/esm/sdk/merchants.js.map +1 -0
- package/dist/esm/sdk/profitability.d.ts +1 -1
- package/dist/esm/sdk/profitability.js +1 -1
- package/dist/esm/sdk/revenue.d.ts +1 -1
- package/dist/esm/sdk/revenue.js +1 -1
- package/dist/esm/sdk/sdk.d.ts +6 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +8 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/subscriptions.d.ts +7 -0
- package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
- package/dist/esm/sdk/subscriptions.js +10 -0
- package/dist/esm/sdk/subscriptions.js.map +1 -1
- package/dist/esm/sdk/webhooks.d.ts +41 -0
- package/dist/esm/sdk/webhooks.d.ts.map +1 -0
- package/dist/esm/sdk/webhooks.js +58 -0
- package/dist/esm/sdk/webhooks.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/invoicesV2ListProjectedInvoices.ts +183 -0
- package/src/funcs/invoicesV2RecordInvoicePayment.ts +194 -0
- package/src/funcs/invoicesV2RetryInvoicePayment.ts +219 -0
- package/src/funcs/merchantsReset.ts +185 -0
- package/src/funcs/profitabilityGetProfitability.ts +1 -1
- package/src/funcs/revenueGet.ts +1 -1
- package/src/funcs/subscriptionsMigrateSubscriptionVersion.ts +186 -0
- package/src/funcs/webhooksDisable.ts +175 -0
- package/src/funcs/webhooksEnable.ts +179 -0
- package/src/funcs/webhooksGet.ts +175 -0
- package/src/funcs/webhooksGetPortal.ts +175 -0
- package/src/funcs/webhooksUpdate.ts +179 -0
- package/src/lib/config.ts +2 -2
- package/src/models/currencybreakdownentry.ts +1 -1
- package/src/models/elapsedperiodbilling.ts +23 -0
- package/src/models/errors/index.ts +2 -0
- package/src/models/errors/recordinvoicepayment.ts +86 -0
- package/src/models/errors/retrypaymentresponseerror.ts +102 -0
- package/src/models/grouptrendentry.ts +6 -1
- package/src/models/hostedlinkpaymentresult.ts +56 -0
- package/src/models/index.ts +14 -0
- package/src/models/invoice.ts +4 -3
- package/src/models/invoicepaymentlinkerrorcode.ts +26 -0
- package/src/models/invoicepaymentmethod.ts +23 -0
- package/src/models/invoicepaymentprovider.ts +23 -0
- package/src/models/merchantreset.ts +85 -0
- package/src/models/migratesubscriptionversionrequest.ts +62 -0
- package/src/models/migratesubscriptionversionresponse.ts +122 -0
- package/src/models/operations/createplan.ts +6 -0
- package/src/models/operations/createsubscription.ts +8 -0
- package/src/models/operations/createwebhooks.ts +34 -0
- package/src/models/operations/deletewebhooks.ts +34 -0
- package/src/models/operations/getwebhookportal.ts +34 -0
- package/src/models/operations/getwebhooks.ts +34 -0
- package/src/models/operations/index.ts +10 -0
- package/src/models/operations/listprojectedinvoices.ts +110 -0
- package/src/models/operations/migratesubscriptionversion.ts +47 -0
- package/src/models/operations/recordinvoicepayment.ts +112 -0
- package/src/models/operations/resetmerchant.ts +40 -0
- package/src/models/operations/retryinvoicepayment.ts +74 -0
- package/src/models/operations/updateplan.ts +6 -0
- package/src/models/operations/updatewebhooks.ts +71 -0
- package/src/models/outofbandpaymentresult.ts +37 -0
- package/src/models/plan.ts +9 -0
- package/src/models/profitabilityrow.ts +27 -4
- package/src/models/profitabilitysummaryresponse.ts +1 -1
- package/src/models/retrypaymenterror.ts +52 -0
- package/src/models/retrypaymentresponse.ts +80 -0
- package/src/models/revenuesummaryresponse.ts +1 -1
- package/src/models/revenuetrendbucket.ts +7 -2
- package/src/models/subscription.ts +45 -0
- package/src/models/subscriptionintervaladdop.ts +1 -1
- package/src/models/versiontransition.ts +104 -0
- package/src/models/webhookportal.ts +61 -0
- package/src/models/webhooks.ts +76 -0
- package/src/sdk/invoicesv2.ts +84 -0
- package/src/sdk/merchants.ts +31 -0
- package/src/sdk/profitability.ts +1 -1
- package/src/sdk/revenue.ts +1 -1
- package/src/sdk/sdk.ts +12 -0
- package/src/sdk/subscriptions.ts +18 -0
- package/src/sdk/webhooks.ts +100 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import * as models from "../index.js";
|
|
11
|
+
|
|
12
|
+
export type RecordInvoicePaymentRequestBody = {
|
|
13
|
+
/**
|
|
14
|
+
* How an invoice payment is settled.
|
|
15
|
+
*/
|
|
16
|
+
method: models.InvoicePaymentMethod;
|
|
17
|
+
/**
|
|
18
|
+
* Optional note for `out_of_band` that describes how you received the payment (for example, 'Wire transfer received 2026-03-25'). Ignored for `hosted_link`.
|
|
19
|
+
*/
|
|
20
|
+
reason?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type RecordInvoicePaymentRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The invoice ID
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
requestBody: RecordInvoicePaymentRequestBody;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The invoice is settled, or a new payment link exists. The `method` field identifies the shape: `out_of_band` returns the `PAID` invoice; `hosted_link` returns the provider and the new payment link.
|
|
33
|
+
*/
|
|
34
|
+
export type RecordInvoicePaymentResponse =
|
|
35
|
+
| models.OutOfBandPaymentResult
|
|
36
|
+
| models.HostedLinkPaymentResult;
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type RecordInvoicePaymentRequestBody$Outbound = {
|
|
40
|
+
method: string;
|
|
41
|
+
reason?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const RecordInvoicePaymentRequestBody$outboundSchema: z.ZodType<
|
|
46
|
+
RecordInvoicePaymentRequestBody$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
RecordInvoicePaymentRequestBody
|
|
49
|
+
> = z.object({
|
|
50
|
+
method: models.InvoicePaymentMethod$outboundSchema,
|
|
51
|
+
reason: z.string().optional(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export function recordInvoicePaymentRequestBodyToJSON(
|
|
55
|
+
recordInvoicePaymentRequestBody: RecordInvoicePaymentRequestBody,
|
|
56
|
+
): string {
|
|
57
|
+
return JSON.stringify(
|
|
58
|
+
RecordInvoicePaymentRequestBody$outboundSchema.parse(
|
|
59
|
+
recordInvoicePaymentRequestBody,
|
|
60
|
+
),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export type RecordInvoicePaymentRequest$Outbound = {
|
|
66
|
+
id: string;
|
|
67
|
+
RequestBody: RecordInvoicePaymentRequestBody$Outbound;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/** @internal */
|
|
71
|
+
export const RecordInvoicePaymentRequest$outboundSchema: z.ZodType<
|
|
72
|
+
RecordInvoicePaymentRequest$Outbound,
|
|
73
|
+
z.ZodTypeDef,
|
|
74
|
+
RecordInvoicePaymentRequest
|
|
75
|
+
> = z.object({
|
|
76
|
+
id: z.string(),
|
|
77
|
+
requestBody: z.lazy(() => RecordInvoicePaymentRequestBody$outboundSchema),
|
|
78
|
+
}).transform((v) => {
|
|
79
|
+
return remap$(v, {
|
|
80
|
+
requestBody: "RequestBody",
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export function recordInvoicePaymentRequestToJSON(
|
|
85
|
+
recordInvoicePaymentRequest: RecordInvoicePaymentRequest,
|
|
86
|
+
): string {
|
|
87
|
+
return JSON.stringify(
|
|
88
|
+
RecordInvoicePaymentRequest$outboundSchema.parse(
|
|
89
|
+
recordInvoicePaymentRequest,
|
|
90
|
+
),
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const RecordInvoicePaymentResponse$inboundSchema: z.ZodType<
|
|
96
|
+
RecordInvoicePaymentResponse,
|
|
97
|
+
z.ZodTypeDef,
|
|
98
|
+
unknown
|
|
99
|
+
> = z.union([
|
|
100
|
+
models.OutOfBandPaymentResult$inboundSchema,
|
|
101
|
+
models.HostedLinkPaymentResult$inboundSchema,
|
|
102
|
+
]);
|
|
103
|
+
|
|
104
|
+
export function recordInvoicePaymentResponseFromJSON(
|
|
105
|
+
jsonString: string,
|
|
106
|
+
): SafeParseResult<RecordInvoicePaymentResponse, SDKValidationError> {
|
|
107
|
+
return safeParse(
|
|
108
|
+
jsonString,
|
|
109
|
+
(x) => RecordInvoicePaymentResponse$inboundSchema.parse(JSON.parse(x)),
|
|
110
|
+
`Failed to parse 'RecordInvoicePaymentResponse' from JSON`,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
|
|
9
|
+
export type ResetMerchantRequest = {
|
|
10
|
+
merchantId: string;
|
|
11
|
+
merchantReset: models.MerchantReset;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type ResetMerchantRequest$Outbound = {
|
|
16
|
+
merchantId: string;
|
|
17
|
+
MerchantReset: models.MerchantReset$Outbound;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ResetMerchantRequest$outboundSchema: z.ZodType<
|
|
22
|
+
ResetMerchantRequest$Outbound,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
ResetMerchantRequest
|
|
25
|
+
> = z.object({
|
|
26
|
+
merchantId: z.string(),
|
|
27
|
+
merchantReset: models.MerchantReset$outboundSchema,
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
merchantReset: "MerchantReset",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export function resetMerchantRequestToJSON(
|
|
35
|
+
resetMerchantRequest: ResetMerchantRequest,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
ResetMerchantRequest$outboundSchema.parse(resetMerchantRequest),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type RetryInvoicePaymentRequestBody = {
|
|
9
|
+
/**
|
|
10
|
+
* Optional reason for the manual retry (for audit logging)
|
|
11
|
+
*/
|
|
12
|
+
reason?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type RetryInvoicePaymentRequest = {
|
|
16
|
+
/**
|
|
17
|
+
* The invoice ID
|
|
18
|
+
*/
|
|
19
|
+
id: string;
|
|
20
|
+
requestBody?: RetryInvoicePaymentRequestBody | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type RetryInvoicePaymentRequestBody$Outbound = {
|
|
25
|
+
reason?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const RetryInvoicePaymentRequestBody$outboundSchema: z.ZodType<
|
|
30
|
+
RetryInvoicePaymentRequestBody$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
RetryInvoicePaymentRequestBody
|
|
33
|
+
> = z.object({
|
|
34
|
+
reason: z.string().optional(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function retryInvoicePaymentRequestBodyToJSON(
|
|
38
|
+
retryInvoicePaymentRequestBody: RetryInvoicePaymentRequestBody,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
RetryInvoicePaymentRequestBody$outboundSchema.parse(
|
|
42
|
+
retryInvoicePaymentRequestBody,
|
|
43
|
+
),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type RetryInvoicePaymentRequest$Outbound = {
|
|
49
|
+
id: string;
|
|
50
|
+
RequestBody?: RetryInvoicePaymentRequestBody$Outbound | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const RetryInvoicePaymentRequest$outboundSchema: z.ZodType<
|
|
55
|
+
RetryInvoicePaymentRequest$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
RetryInvoicePaymentRequest
|
|
58
|
+
> = z.object({
|
|
59
|
+
id: z.string(),
|
|
60
|
+
requestBody: z.lazy(() => RetryInvoicePaymentRequestBody$outboundSchema)
|
|
61
|
+
.optional(),
|
|
62
|
+
}).transform((v) => {
|
|
63
|
+
return remap$(v, {
|
|
64
|
+
requestBody: "RequestBody",
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export function retryInvoicePaymentRequestToJSON(
|
|
69
|
+
retryInvoicePaymentRequest: RetryInvoicePaymentRequest,
|
|
70
|
+
): string {
|
|
71
|
+
return JSON.stringify(
|
|
72
|
+
RetryInvoicePaymentRequest$outboundSchema.parse(retryInvoicePaymentRequest),
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -107,6 +107,10 @@ export type UpdatePlanRequestBody = {
|
|
|
107
107
|
* Governs price identity when a price is replaced by minting a new plan version and making it default. When true (default), replacing a price at make-default keeps the original price id live (its value changes) and the superseded value is preserved under a new id. When false, the replacement price's id goes live instead and the superseded value stays under the original id. Has no effect on this request's own prices field: prices carried over keep their ids, but swapping one price for another there moves the plan to the new price's id rather than keeping the original live.
|
|
108
108
|
*/
|
|
109
109
|
stablePriceIds?: boolean | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* When a move to a new plan version takes effect for this plan's subscriptions. `end_of_current_period` (the default) moves everything at the end of the current billing period. `immediate` changes entitlements at the move, in-arrears prices for the whole current period, and in-advance prices from the next period. Neither prorates.
|
|
112
|
+
*/
|
|
113
|
+
versionTransition?: models.VersionTransition | undefined;
|
|
110
114
|
};
|
|
111
115
|
|
|
112
116
|
export type UpdatePlanRequest = {
|
|
@@ -148,6 +152,7 @@ export type UpdatePlanRequestBody$Outbound = {
|
|
|
148
152
|
billingAnchor?: string | null | undefined;
|
|
149
153
|
creditAllocations?: Array<models.PlanCreditAllocation$Outbound> | undefined;
|
|
150
154
|
stablePriceIds?: boolean | undefined;
|
|
155
|
+
versionTransition?: models.VersionTransition$Outbound | undefined;
|
|
151
156
|
};
|
|
152
157
|
|
|
153
158
|
/** @internal */
|
|
@@ -172,6 +177,7 @@ export const UpdatePlanRequestBody$outboundSchema: z.ZodType<
|
|
|
172
177
|
creditAllocations: z.array(models.PlanCreditAllocation$outboundSchema)
|
|
173
178
|
.optional(),
|
|
174
179
|
stablePriceIds: z.boolean().optional(),
|
|
180
|
+
versionTransition: models.VersionTransition$outboundSchema.optional(),
|
|
175
181
|
});
|
|
176
182
|
|
|
177
183
|
export function updatePlanRequestBodyToJSON(
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type UpdateWebhooksRequestBody = {
|
|
9
|
+
/**
|
|
10
|
+
* Whether webhooks are enabled
|
|
11
|
+
*/
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type UpdateWebhooksRequest = {
|
|
16
|
+
/**
|
|
17
|
+
* The merchant organization ID. If omitted, defaults to the merchant associated with the authenticated API key.
|
|
18
|
+
*/
|
|
19
|
+
merchantId?: string | undefined;
|
|
20
|
+
requestBody: UpdateWebhooksRequestBody;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type UpdateWebhooksRequestBody$Outbound = {
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const UpdateWebhooksRequestBody$outboundSchema: z.ZodType<
|
|
30
|
+
UpdateWebhooksRequestBody$Outbound,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
UpdateWebhooksRequestBody
|
|
33
|
+
> = z.object({
|
|
34
|
+
enabled: z.boolean(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function updateWebhooksRequestBodyToJSON(
|
|
38
|
+
updateWebhooksRequestBody: UpdateWebhooksRequestBody,
|
|
39
|
+
): string {
|
|
40
|
+
return JSON.stringify(
|
|
41
|
+
UpdateWebhooksRequestBody$outboundSchema.parse(updateWebhooksRequestBody),
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type UpdateWebhooksRequest$Outbound = {
|
|
47
|
+
merchantId?: string | undefined;
|
|
48
|
+
RequestBody: UpdateWebhooksRequestBody$Outbound;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const UpdateWebhooksRequest$outboundSchema: z.ZodType<
|
|
53
|
+
UpdateWebhooksRequest$Outbound,
|
|
54
|
+
z.ZodTypeDef,
|
|
55
|
+
UpdateWebhooksRequest
|
|
56
|
+
> = z.object({
|
|
57
|
+
merchantId: z.string().optional(),
|
|
58
|
+
requestBody: z.lazy(() => UpdateWebhooksRequestBody$outboundSchema),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
requestBody: "RequestBody",
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export function updateWebhooksRequestToJSON(
|
|
66
|
+
updateWebhooksRequest: UpdateWebhooksRequest,
|
|
67
|
+
): string {
|
|
68
|
+
return JSON.stringify(
|
|
69
|
+
UpdateWebhooksRequest$outboundSchema.parse(updateWebhooksRequest),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
import { Invoice, Invoice$inboundSchema } from "./invoice.js";
|
|
10
|
+
|
|
11
|
+
export type OutOfBandPaymentResult = {
|
|
12
|
+
/**
|
|
13
|
+
* Discriminator: an out-of-band payment was recorded.
|
|
14
|
+
*/
|
|
15
|
+
method: "out_of_band";
|
|
16
|
+
invoice: Invoice;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const OutOfBandPaymentResult$inboundSchema: z.ZodType<
|
|
21
|
+
OutOfBandPaymentResult,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
method: z.literal("out_of_band"),
|
|
26
|
+
invoice: Invoice$inboundSchema,
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function outOfBandPaymentResultFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<OutOfBandPaymentResult, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => OutOfBandPaymentResult$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'OutOfBandPaymentResult' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
package/src/models/plan.ts
CHANGED
|
@@ -13,6 +13,10 @@ import {
|
|
|
13
13
|
PlanCreditAllocation$inboundSchema,
|
|
14
14
|
} from "./plancreditallocation.js";
|
|
15
15
|
import { PlanPrice, PlanPrice$inboundSchema } from "./planprice.js";
|
|
16
|
+
import {
|
|
17
|
+
VersionTransition,
|
|
18
|
+
VersionTransition$inboundSchema,
|
|
19
|
+
} from "./versiontransition.js";
|
|
16
20
|
|
|
17
21
|
export const PlanObject = {
|
|
18
22
|
Plan: "plan",
|
|
@@ -126,6 +130,10 @@ export type Plan = {
|
|
|
126
130
|
* Governs price identity when a price on this plan's default version is replaced. When true (default), replacing a price at make-default keeps the original price id live (its value changes) and the superseded value is preserved under a new id. When false, the replacement price's id goes live instead and the superseded value stays under the original id.
|
|
127
131
|
*/
|
|
128
132
|
stablePriceIds: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* When a move to a new plan version takes effect for this plan's subscriptions. `end_of_current_period` (the default) moves everything at the end of the current billing period. `immediate` changes entitlements at the move, in-arrears prices for the whole current period, and in-advance prices from the next period. Neither prorates.
|
|
135
|
+
*/
|
|
136
|
+
versionTransition: VersionTransition;
|
|
129
137
|
};
|
|
130
138
|
|
|
131
139
|
/** @internal */
|
|
@@ -202,6 +210,7 @@ export const Plan$inboundSchema: z.ZodType<Plan, z.ZodTypeDef, unknown> = z
|
|
|
202
210
|
creditAllocations: z.array(PlanCreditAllocation$inboundSchema).optional(),
|
|
203
211
|
defaultVersionId: z.string().optional(),
|
|
204
212
|
stablePriceIds: z.boolean().default(true),
|
|
213
|
+
versionTransition: VersionTransition$inboundSchema,
|
|
205
214
|
});
|
|
206
215
|
|
|
207
216
|
export function planFromJSON(
|
|
@@ -4,20 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
9
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Whether metering recorded usage against a cost for every customer the row covers (`recorded`), some of them (`partial`, only on the 'Other' and 'deleted' rows) or none (`none`). Usage that prices at zero is recorded, so `recorded` with a zero `totalCost` is a measured zero. `none` means no cost data, not a zero cost.
|
|
13
|
+
*/
|
|
14
|
+
export const CostData = {
|
|
15
|
+
Recorded: "recorded",
|
|
16
|
+
Partial: "partial",
|
|
17
|
+
None: "none",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* Whether metering recorded usage against a cost for every customer the row covers (`recorded`), some of them (`partial`, only on the 'Other' and 'deleted' rows) or none (`none`). Usage that prices at zero is recorded, so `recorded` with a zero `totalCost` is a measured zero. `none` means no cost data, not a zero cost.
|
|
21
|
+
*/
|
|
22
|
+
export type CostData = ClosedEnum<typeof CostData>;
|
|
23
|
+
|
|
10
24
|
export type ProfitabilityRow = {
|
|
11
25
|
/**
|
|
12
|
-
* Customer ID,
|
|
26
|
+
* Customer ID, the literal 'other' for the overflow row, or the literal 'deleted' for the row that folds every soft-deleted customer with revenue or cost in the period.
|
|
13
27
|
*/
|
|
14
28
|
customerId: string;
|
|
15
29
|
/**
|
|
16
|
-
* Display name for the row. 'Other' for the overflow row.
|
|
30
|
+
* Display name for the row. 'Other' for the overflow row, 'Deleted customers' for the deleted row.
|
|
17
31
|
*/
|
|
18
32
|
customerName: string;
|
|
19
33
|
/**
|
|
20
|
-
* Revenue excluding tax
|
|
34
|
+
* Revenue excluding tax, in units of the currency, with two decimals: what was billed in the period, recognised when each invoice is issued. Every invoice issued in the period counts, whether it was since paid, is still outstanding, failed payment or was written off, less non-voided refunds issued in the period. It is billings, not cash collected, and the same figure /v0/revenue reports.
|
|
21
35
|
*/
|
|
22
36
|
netRevenue: string;
|
|
23
37
|
/**
|
|
@@ -29,11 +43,19 @@ export type ProfitabilityRow = {
|
|
|
29
43
|
*/
|
|
30
44
|
profit: string;
|
|
31
45
|
/**
|
|
32
|
-
* Margin percent (profit / revenue × 100), with two decimals. Null when revenue is zero.
|
|
46
|
+
* Margin percent (profit / revenue × 100), with two decimals. Null when revenue is zero or negative, and when `costData` is not `recorded`: a cost nobody recorded reads as zero, and a margin over it would claim the row costs nothing.
|
|
33
47
|
*/
|
|
34
48
|
marginPct: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Whether metering recorded usage against a cost for every customer the row covers (`recorded`), some of them (`partial`, only on the 'Other' and 'deleted' rows) or none (`none`). Usage that prices at zero is recorded, so `recorded` with a zero `totalCost` is a measured zero. `none` means no cost data, not a zero cost.
|
|
51
|
+
*/
|
|
52
|
+
costData?: CostData | undefined;
|
|
35
53
|
};
|
|
36
54
|
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const CostData$inboundSchema: z.ZodNativeEnum<typeof CostData> = z
|
|
57
|
+
.nativeEnum(CostData);
|
|
58
|
+
|
|
37
59
|
/** @internal */
|
|
38
60
|
export const ProfitabilityRow$inboundSchema: z.ZodType<
|
|
39
61
|
ProfitabilityRow,
|
|
@@ -46,6 +68,7 @@ export const ProfitabilityRow$inboundSchema: z.ZodType<
|
|
|
46
68
|
totalCost: z.string(),
|
|
47
69
|
profit: z.string(),
|
|
48
70
|
marginPct: z.nullable(z.string()),
|
|
71
|
+
costData: CostData$inboundSchema.optional(),
|
|
49
72
|
});
|
|
50
73
|
|
|
51
74
|
export function profitabilityRowFromJSON(
|
|
@@ -49,7 +49,7 @@ export type ProfitabilitySummaryResponse = {
|
|
|
49
49
|
*/
|
|
50
50
|
currency: string;
|
|
51
51
|
/**
|
|
52
|
-
* Top-N customer rows by profit descending, optionally followed by a single 'Other' row when more than topN customers contributed. With `excludeEmpty=true`, customers with neither revenue nor cost in the period are left out.
|
|
52
|
+
* Top-N customer rows by profit descending, optionally followed by a single 'Other' row when more than topN customers contributed. Soft-deleted customers appear only through the 'deleted' row, which comes last, never by name. With `excludeEmpty=true`, customers with neither revenue nor cost in the period are left out.
|
|
53
53
|
*/
|
|
54
54
|
rows: Array<ProfitabilityRow>;
|
|
55
55
|
/**
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Why a payment retry did not collect the money.
|
|
12
|
+
*/
|
|
13
|
+
export type RetryPaymentError = {
|
|
14
|
+
/**
|
|
15
|
+
* Human-readable message. Do not parse it; use `code`.
|
|
16
|
+
*/
|
|
17
|
+
message: string;
|
|
18
|
+
/**
|
|
19
|
+
* Error category, for example `card_error` or `processing`.
|
|
20
|
+
*/
|
|
21
|
+
type?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Machine-readable reason. See the operation description for the values.
|
|
24
|
+
*/
|
|
25
|
+
code?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The card decline code from the provider, when one is available.
|
|
28
|
+
*/
|
|
29
|
+
declineCode?: string | undefined;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const RetryPaymentError$inboundSchema: z.ZodType<
|
|
34
|
+
RetryPaymentError,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.object({
|
|
38
|
+
message: z.string(),
|
|
39
|
+
type: z.string().optional(),
|
|
40
|
+
code: z.string().optional(),
|
|
41
|
+
declineCode: z.string().optional(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export function retryPaymentErrorFromJSON(
|
|
45
|
+
jsonString: string,
|
|
46
|
+
): SafeParseResult<RetryPaymentError, SDKValidationError> {
|
|
47
|
+
return safeParse(
|
|
48
|
+
jsonString,
|
|
49
|
+
(x) => RetryPaymentError$inboundSchema.parse(JSON.parse(x)),
|
|
50
|
+
`Failed to parse 'RetryPaymentError' from JSON`,
|
|
51
|
+
);
|
|
52
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
RetryPaymentError,
|
|
12
|
+
RetryPaymentError$inboundSchema,
|
|
13
|
+
} from "./retrypaymenterror.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The object type
|
|
17
|
+
*/
|
|
18
|
+
export const RetryPaymentResponseObject = {
|
|
19
|
+
RetryPaymentResult: "retry_payment_result",
|
|
20
|
+
} as const;
|
|
21
|
+
/**
|
|
22
|
+
* The object type
|
|
23
|
+
*/
|
|
24
|
+
export type RetryPaymentResponseObject = ClosedEnum<
|
|
25
|
+
typeof RetryPaymentResponseObject
|
|
26
|
+
>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The result of a payment retry. Every response status of the retry operation that is not an error envelope uses this shape.
|
|
30
|
+
*/
|
|
31
|
+
export type RetryPaymentResponse = {
|
|
32
|
+
/**
|
|
33
|
+
* The object type
|
|
34
|
+
*/
|
|
35
|
+
object: RetryPaymentResponseObject;
|
|
36
|
+
/**
|
|
37
|
+
* True only when the charge succeeded or no amount is unpaid. The response status is 200 only when this is true.
|
|
38
|
+
*/
|
|
39
|
+
success: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The invoice ID
|
|
42
|
+
*/
|
|
43
|
+
invoiceId: string;
|
|
44
|
+
/**
|
|
45
|
+
* The provider's payment reference for the charge, when the provider has one.
|
|
46
|
+
*/
|
|
47
|
+
paymentIntentId?: string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Why a payment retry did not collect the money.
|
|
50
|
+
*/
|
|
51
|
+
error?: RetryPaymentError | undefined;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const RetryPaymentResponseObject$inboundSchema: z.ZodNativeEnum<
|
|
56
|
+
typeof RetryPaymentResponseObject
|
|
57
|
+
> = z.nativeEnum(RetryPaymentResponseObject);
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const RetryPaymentResponse$inboundSchema: z.ZodType<
|
|
61
|
+
RetryPaymentResponse,
|
|
62
|
+
z.ZodTypeDef,
|
|
63
|
+
unknown
|
|
64
|
+
> = z.object({
|
|
65
|
+
object: RetryPaymentResponseObject$inboundSchema,
|
|
66
|
+
success: z.boolean(),
|
|
67
|
+
invoiceId: z.string(),
|
|
68
|
+
paymentIntentId: z.string().optional(),
|
|
69
|
+
error: RetryPaymentError$inboundSchema.optional(),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export function retryPaymentResponseFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<RetryPaymentResponse, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => RetryPaymentResponse$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'RetryPaymentResponse' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -47,7 +47,7 @@ export type RevenueSummaryResponse = {
|
|
|
47
47
|
*/
|
|
48
48
|
object: "revenue_summary";
|
|
49
49
|
/**
|
|
50
|
-
* Revenue in
|
|
50
|
+
* Revenue: what was billed in the period, excluding tax, in units of the currency. On the default issue-date basis it is recognised when each invoice is issued; with periodBasis=billingPeriod, each invoice line counts in the period it bills, and a refund splits across its invoice's lines. An invoice counts whether it was since paid, is still outstanding, failed payment or was written off, less non-voided refunds. It is billings, not cash collected: what customers still owe is invoices.outstanding, including tax, and payment-link collections are under payments. Omitted when groupBy=currency is active.
|
|
51
51
|
*/
|
|
52
52
|
netRevenue?: string | undefined;
|
|
53
53
|
/**
|
|
@@ -17,7 +17,11 @@ export type RevenueTrendBucket = {
|
|
|
17
17
|
*/
|
|
18
18
|
timestamp: Date;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Revenue for this bucket, computed exactly as netRevenue: invoices issued in the bucket (on periodBasis=billingPeriod, lines billing it), excluding tax, less refunds issued in it, excluding tax. The buckets sum to netRevenue.
|
|
21
|
+
*/
|
|
22
|
+
revenue: string;
|
|
23
|
+
/**
|
|
24
|
+
* Total amount of all invoices issued in this bucket (all statuses, by issuedAt), excluding tax, before refunds. Revenue is the revenue field.
|
|
21
25
|
*/
|
|
22
26
|
issuedInvoices: string;
|
|
23
27
|
/**
|
|
@@ -25,7 +29,7 @@ export type RevenueTrendBucket = {
|
|
|
25
29
|
*/
|
|
26
30
|
writtenOffInvoices: string;
|
|
27
31
|
/**
|
|
28
|
-
*
|
|
32
|
+
* Completed payment-link payments in dollars for this bucket, reported beside revenue, not in it
|
|
29
33
|
*/
|
|
30
34
|
completedPayments: string;
|
|
31
35
|
/**
|
|
@@ -45,6 +49,7 @@ export const RevenueTrendBucket$inboundSchema: z.ZodType<
|
|
|
45
49
|
unknown
|
|
46
50
|
> = z.object({
|
|
47
51
|
timestamp: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
52
|
+
revenue: z.string(),
|
|
48
53
|
issuedInvoices: z.string(),
|
|
49
54
|
writtenOffInvoices: z.string(),
|
|
50
55
|
completedPayments: z.string(),
|