@paygentic/sdk 0.9.15 → 0.9.17
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 +7 -6
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +3 -2
- 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 +7 -6
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +3 -2
- 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 +7 -6
- 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,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* How an invoice payment is settled.
|
|
10
|
+
*/
|
|
11
|
+
export const InvoicePaymentMethod = {
|
|
12
|
+
OutOfBand: "out_of_band",
|
|
13
|
+
HostedLink: "hosted_link",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* How an invoice payment is settled.
|
|
17
|
+
*/
|
|
18
|
+
export type InvoicePaymentMethod = ClosedEnum<typeof InvoicePaymentMethod>;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const InvoicePaymentMethod$outboundSchema: z.ZodNativeEnum<
|
|
22
|
+
typeof InvoicePaymentMethod
|
|
23
|
+
> = z.nativeEnum(InvoicePaymentMethod);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The payment provider that a hosted payment link routes to.
|
|
10
|
+
*/
|
|
11
|
+
export const InvoicePaymentProvider = {
|
|
12
|
+
Stripe: "stripe",
|
|
13
|
+
Airwallex: "airwallex",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* The payment provider that a hosted payment link routes to.
|
|
17
|
+
*/
|
|
18
|
+
export type InvoicePaymentProvider = ClosedEnum<typeof InvoicePaymentProvider>;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const InvoicePaymentProvider$inboundSchema: z.ZodNativeEnum<
|
|
22
|
+
typeof InvoicePaymentProvider
|
|
23
|
+
> = z.nativeEnum(InvoicePaymentProvider);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type CustomerScope = {
|
|
8
|
+
scope: "customer";
|
|
9
|
+
/**
|
|
10
|
+
* Unique identifier for a customer
|
|
11
|
+
*/
|
|
12
|
+
customerId: string;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export type MerchantScope = {
|
|
16
|
+
scope: "merchant";
|
|
17
|
+
/**
|
|
18
|
+
* `false` also deletes the catalog: products, plans, plan versions, prices, fees, features, billable metrics, pricing units, items, costs and sources, back to an empty account.
|
|
19
|
+
*/
|
|
20
|
+
keepCatalog: boolean;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* What the reset deletes. Every field of the chosen shape is required, so each call says what goes.
|
|
25
|
+
*/
|
|
26
|
+
export type MerchantReset = MerchantScope | CustomerScope;
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type CustomerScope$Outbound = {
|
|
30
|
+
scope: "customer";
|
|
31
|
+
customerId: string;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const CustomerScope$outboundSchema: z.ZodType<
|
|
36
|
+
CustomerScope$Outbound,
|
|
37
|
+
z.ZodTypeDef,
|
|
38
|
+
CustomerScope
|
|
39
|
+
> = z.object({
|
|
40
|
+
scope: z.literal("customer"),
|
|
41
|
+
customerId: z.string(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export function customerScopeToJSON(customerScope: CustomerScope): string {
|
|
45
|
+
return JSON.stringify(CustomerScope$outboundSchema.parse(customerScope));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type MerchantScope$Outbound = {
|
|
50
|
+
scope: "merchant";
|
|
51
|
+
keepCatalog: boolean;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const MerchantScope$outboundSchema: z.ZodType<
|
|
56
|
+
MerchantScope$Outbound,
|
|
57
|
+
z.ZodTypeDef,
|
|
58
|
+
MerchantScope
|
|
59
|
+
> = z.object({
|
|
60
|
+
scope: z.literal("merchant"),
|
|
61
|
+
keepCatalog: z.boolean(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function merchantScopeToJSON(merchantScope: MerchantScope): string {
|
|
65
|
+
return JSON.stringify(MerchantScope$outboundSchema.parse(merchantScope));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type MerchantReset$Outbound =
|
|
70
|
+
| MerchantScope$Outbound
|
|
71
|
+
| CustomerScope$Outbound;
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const MerchantReset$outboundSchema: z.ZodType<
|
|
75
|
+
MerchantReset$Outbound,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
MerchantReset
|
|
78
|
+
> = z.union([
|
|
79
|
+
z.lazy(() => MerchantScope$outboundSchema),
|
|
80
|
+
z.lazy(() => CustomerScope$outboundSchema),
|
|
81
|
+
]);
|
|
82
|
+
|
|
83
|
+
export function merchantResetToJSON(merchantReset: MerchantReset): string {
|
|
84
|
+
return JSON.stringify(MerchantReset$outboundSchema.parse(merchantReset));
|
|
85
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* When the migration takes effect. `next_period` moves everything at the end of the current billing period. `immediate` changes entitlements at once, bills in-arrears prices for the whole current period at the target version, and changes in-advance prices at the end of the current period. Neither prorates. If absent, the plan's versionTransition applies.
|
|
10
|
+
*/
|
|
11
|
+
export const Timing = {
|
|
12
|
+
NextPeriod: "next_period",
|
|
13
|
+
Immediate: "immediate",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* When the migration takes effect. `next_period` moves everything at the end of the current billing period. `immediate` changes entitlements at once, bills in-arrears prices for the whole current period at the target version, and changes in-advance prices at the end of the current period. Neither prorates. If absent, the plan's versionTransition applies.
|
|
17
|
+
*/
|
|
18
|
+
export type Timing = ClosedEnum<typeof Timing>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The plan version to move the subscription to.
|
|
22
|
+
*/
|
|
23
|
+
export type MigrateSubscriptionVersionRequest = {
|
|
24
|
+
/**
|
|
25
|
+
* The number of a published version of the subscription's plan.
|
|
26
|
+
*/
|
|
27
|
+
targetVersionNumber: number;
|
|
28
|
+
/**
|
|
29
|
+
* When the migration takes effect. `next_period` moves everything at the end of the current billing period. `immediate` changes entitlements at once, bills in-arrears prices for the whole current period at the target version, and changes in-advance prices at the end of the current period. Neither prorates. If absent, the plan's versionTransition applies.
|
|
30
|
+
*/
|
|
31
|
+
timing?: Timing | undefined;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export const Timing$outboundSchema: z.ZodNativeEnum<typeof Timing> = z
|
|
36
|
+
.nativeEnum(Timing);
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type MigrateSubscriptionVersionRequest$Outbound = {
|
|
40
|
+
targetVersionNumber: number;
|
|
41
|
+
timing?: string | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export const MigrateSubscriptionVersionRequest$outboundSchema: z.ZodType<
|
|
46
|
+
MigrateSubscriptionVersionRequest$Outbound,
|
|
47
|
+
z.ZodTypeDef,
|
|
48
|
+
MigrateSubscriptionVersionRequest
|
|
49
|
+
> = z.object({
|
|
50
|
+
targetVersionNumber: z.number().int(),
|
|
51
|
+
timing: Timing$outboundSchema.optional(),
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export function migrateSubscriptionVersionRequestToJSON(
|
|
55
|
+
migrateSubscriptionVersionRequest: MigrateSubscriptionVersionRequest,
|
|
56
|
+
): string {
|
|
57
|
+
return JSON.stringify(
|
|
58
|
+
MigrateSubscriptionVersionRequest$outboundSchema.parse(
|
|
59
|
+
migrateSubscriptionVersionRequest,
|
|
60
|
+
),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
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 { Subscription, Subscription$inboundSchema } from "./subscription.js";
|
|
10
|
+
|
|
11
|
+
export type Migration = {
|
|
12
|
+
/**
|
|
13
|
+
* The version the subscription was on. Null for a legacy subscription with no version pin.
|
|
14
|
+
*/
|
|
15
|
+
fromVersionNumber: number | null;
|
|
16
|
+
/**
|
|
17
|
+
* The version the subscription is now pinned to.
|
|
18
|
+
*/
|
|
19
|
+
toVersionNumber: number;
|
|
20
|
+
/**
|
|
21
|
+
* When in-advance prices start to bill from the target version: the end of the current billing period. Null when nothing moved.
|
|
22
|
+
*/
|
|
23
|
+
effectiveAt: Date | null;
|
|
24
|
+
/**
|
|
25
|
+
* When the subscription's entitlements change. Equal to effectiveAt for a next_period migration; the time of the call for an immediate one. Null when nothing moved.
|
|
26
|
+
*/
|
|
27
|
+
entitlementsEffectiveAt: Date | null;
|
|
28
|
+
/**
|
|
29
|
+
* False when the subscription was already on the target and already pinned.
|
|
30
|
+
*/
|
|
31
|
+
changed: boolean;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type MigrateSubscriptionVersionResponseLineItems = {
|
|
35
|
+
/**
|
|
36
|
+
* True when the migration was saved but the line-item re-derive failed. The migration is not rolled back, and the re-derive is retried automatically.
|
|
37
|
+
*/
|
|
38
|
+
syncFailed: boolean;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type MigrateSubscriptionVersionResponse = {
|
|
42
|
+
subscription: Subscription;
|
|
43
|
+
migration: Migration;
|
|
44
|
+
lineItems: MigrateSubscriptionVersionResponseLineItems;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const Migration$inboundSchema: z.ZodType<
|
|
49
|
+
Migration,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
unknown
|
|
52
|
+
> = z.object({
|
|
53
|
+
fromVersionNumber: z.nullable(z.number().int()),
|
|
54
|
+
toVersionNumber: z.number().int(),
|
|
55
|
+
effectiveAt: z.nullable(
|
|
56
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
57
|
+
),
|
|
58
|
+
entitlementsEffectiveAt: z.nullable(
|
|
59
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
60
|
+
),
|
|
61
|
+
changed: z.boolean(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export function migrationFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<Migration, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => Migration$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'Migration' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const MigrateSubscriptionVersionResponseLineItems$inboundSchema:
|
|
76
|
+
z.ZodType<
|
|
77
|
+
MigrateSubscriptionVersionResponseLineItems,
|
|
78
|
+
z.ZodTypeDef,
|
|
79
|
+
unknown
|
|
80
|
+
> = z.object({
|
|
81
|
+
syncFailed: z.boolean(),
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export function migrateSubscriptionVersionResponseLineItemsFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<
|
|
87
|
+
MigrateSubscriptionVersionResponseLineItems,
|
|
88
|
+
SDKValidationError
|
|
89
|
+
> {
|
|
90
|
+
return safeParse(
|
|
91
|
+
jsonString,
|
|
92
|
+
(x) =>
|
|
93
|
+
MigrateSubscriptionVersionResponseLineItems$inboundSchema.parse(
|
|
94
|
+
JSON.parse(x),
|
|
95
|
+
),
|
|
96
|
+
`Failed to parse 'MigrateSubscriptionVersionResponseLineItems' from JSON`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const MigrateSubscriptionVersionResponse$inboundSchema: z.ZodType<
|
|
102
|
+
MigrateSubscriptionVersionResponse,
|
|
103
|
+
z.ZodTypeDef,
|
|
104
|
+
unknown
|
|
105
|
+
> = z.object({
|
|
106
|
+
subscription: Subscription$inboundSchema,
|
|
107
|
+
migration: z.lazy(() => Migration$inboundSchema),
|
|
108
|
+
lineItems: z.lazy(() =>
|
|
109
|
+
MigrateSubscriptionVersionResponseLineItems$inboundSchema
|
|
110
|
+
),
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export function migrateSubscriptionVersionResponseFromJSON(
|
|
114
|
+
jsonString: string,
|
|
115
|
+
): SafeParseResult<MigrateSubscriptionVersionResponse, SDKValidationError> {
|
|
116
|
+
return safeParse(
|
|
117
|
+
jsonString,
|
|
118
|
+
(x) =>
|
|
119
|
+
MigrateSubscriptionVersionResponse$inboundSchema.parse(JSON.parse(x)),
|
|
120
|
+
`Failed to parse 'MigrateSubscriptionVersionResponse' from JSON`,
|
|
121
|
+
);
|
|
122
|
+
}
|
|
@@ -134,6 +134,10 @@ export type CreatePlanRequest = {
|
|
|
134
134
|
* 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.
|
|
135
135
|
*/
|
|
136
136
|
stablePriceIds?: boolean | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* 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.
|
|
139
|
+
*/
|
|
140
|
+
versionTransition?: models.VersionTransition | undefined;
|
|
137
141
|
};
|
|
138
142
|
|
|
139
143
|
/** @internal */
|
|
@@ -176,6 +180,7 @@ export type CreatePlanRequest$Outbound = {
|
|
|
176
180
|
billingAnchor?: string | null | undefined;
|
|
177
181
|
creditAllocations?: Array<models.PlanCreditAllocation$Outbound> | undefined;
|
|
178
182
|
stablePriceIds: boolean;
|
|
183
|
+
versionTransition?: models.VersionTransition$Outbound | undefined;
|
|
179
184
|
};
|
|
180
185
|
|
|
181
186
|
/** @internal */
|
|
@@ -204,6 +209,7 @@ export const CreatePlanRequest$outboundSchema: z.ZodType<
|
|
|
204
209
|
creditAllocations: z.array(models.PlanCreditAllocation$outboundSchema)
|
|
205
210
|
.optional(),
|
|
206
211
|
stablePriceIds: z.boolean().default(true),
|
|
212
|
+
versionTransition: models.VersionTransition$outboundSchema.optional(),
|
|
207
213
|
});
|
|
208
214
|
|
|
209
215
|
export function createPlanRequestToJSON(
|
|
@@ -97,6 +97,10 @@ export type CreateSubscriptionRequest = {
|
|
|
97
97
|
* Subscription activation timestamp in ISO 8601 format. Sample values: '2024-01-15T10:30:00Z', '2024-02-01T00:00:00Z'
|
|
98
98
|
*/
|
|
99
99
|
startedAt: Date;
|
|
100
|
+
/**
|
|
101
|
+
* Whether a backdated start bills its elapsed periods. A start is backdated when `startedAt` is more than 24 hours before the subscription is created. `none` bills only charges that fall due from the moment of creation, for a customer whose earlier periods another system already billed. `per_period` bills every charge that fell due from `startedAt`, on one first invoice; it refuses a `startedAt` more than 12 months back. Has no effect on a start that is not backdated. Defaults to `none`.
|
|
102
|
+
*/
|
|
103
|
+
elapsedPeriodBilling?: models.ElapsedPeriodBilling | undefined;
|
|
100
104
|
/**
|
|
101
105
|
* Test clock identifier for simulating time-based billing scenarios. Sample values: 'tc_abc123xyz', 'tc_789def456'. Restricted to non-production environments (local, dev, sandbox). Must belong to the same merchant organization.
|
|
102
106
|
*/
|
|
@@ -226,6 +230,7 @@ export type CreateSubscriptionRequest$Outbound = {
|
|
|
226
230
|
minimumAccountBalance?: string | undefined;
|
|
227
231
|
redirectUrls?: RedirectUrls$Outbound | undefined;
|
|
228
232
|
startedAt: string;
|
|
233
|
+
elapsedPeriodBilling: string;
|
|
229
234
|
testClockId?: string | undefined;
|
|
230
235
|
renewalReminderEnabled?: boolean | null | undefined;
|
|
231
236
|
renewalReminderDays?: number | null | undefined;
|
|
@@ -257,6 +262,9 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodType<
|
|
|
257
262
|
minimumAccountBalance: z.string().optional(),
|
|
258
263
|
redirectUrls: z.lazy(() => RedirectUrls$outboundSchema).optional(),
|
|
259
264
|
startedAt: z.date().transform(v => v.toISOString()),
|
|
265
|
+
elapsedPeriodBilling: models.ElapsedPeriodBilling$outboundSchema.default(
|
|
266
|
+
"none",
|
|
267
|
+
),
|
|
260
268
|
testClockId: z.string().optional(),
|
|
261
269
|
renewalReminderEnabled: z.nullable(z.boolean()).optional(),
|
|
262
270
|
renewalReminderDays: z.nullable(z.number().int()).optional(),
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type CreateWebhooksRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The merchant organization ID. If omitted, defaults to the merchant associated with the authenticated API key.
|
|
10
|
+
*/
|
|
11
|
+
merchantId?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type CreateWebhooksRequest$Outbound = {
|
|
16
|
+
merchantId?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const CreateWebhooksRequest$outboundSchema: z.ZodType<
|
|
21
|
+
CreateWebhooksRequest$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
CreateWebhooksRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
merchantId: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function createWebhooksRequestToJSON(
|
|
29
|
+
createWebhooksRequest: CreateWebhooksRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
CreateWebhooksRequest$outboundSchema.parse(createWebhooksRequest),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type DeleteWebhooksRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The merchant organization ID. If omitted, defaults to the merchant associated with the authenticated API key.
|
|
10
|
+
*/
|
|
11
|
+
merchantId?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type DeleteWebhooksRequest$Outbound = {
|
|
16
|
+
merchantId?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const DeleteWebhooksRequest$outboundSchema: z.ZodType<
|
|
21
|
+
DeleteWebhooksRequest$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
DeleteWebhooksRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
merchantId: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function deleteWebhooksRequestToJSON(
|
|
29
|
+
deleteWebhooksRequest: DeleteWebhooksRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
DeleteWebhooksRequest$outboundSchema.parse(deleteWebhooksRequest),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type GetWebhookPortalRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The merchant organization ID. If omitted, defaults to the merchant associated with the authenticated API key.
|
|
10
|
+
*/
|
|
11
|
+
merchantId?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type GetWebhookPortalRequest$Outbound = {
|
|
16
|
+
merchantId?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const GetWebhookPortalRequest$outboundSchema: z.ZodType<
|
|
21
|
+
GetWebhookPortalRequest$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
GetWebhookPortalRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
merchantId: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function getWebhookPortalRequestToJSON(
|
|
29
|
+
getWebhookPortalRequest: GetWebhookPortalRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
GetWebhookPortalRequest$outboundSchema.parse(getWebhookPortalRequest),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type GetWebhooksRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The merchant organization ID. If omitted, defaults to the merchant associated with the authenticated API key.
|
|
10
|
+
*/
|
|
11
|
+
merchantId?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type GetWebhooksRequest$Outbound = {
|
|
16
|
+
merchantId?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const GetWebhooksRequest$outboundSchema: z.ZodType<
|
|
21
|
+
GetWebhooksRequest$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
GetWebhooksRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
merchantId: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function getWebhooksRequestToJSON(
|
|
29
|
+
getWebhooksRequest: GetWebhooksRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
GetWebhooksRequest$outboundSchema.parse(getWebhooksRequest),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
@@ -27,6 +27,7 @@ export * from "./createsource.js";
|
|
|
27
27
|
export * from "./createsubscription.js";
|
|
28
28
|
export * from "./createsubscriptionadjustment.js";
|
|
29
29
|
export * from "./createtestclock.js";
|
|
30
|
+
export * from "./createwebhooks.js";
|
|
30
31
|
export * from "./deletebillingschedule.js";
|
|
31
32
|
export * from "./deletecost.js";
|
|
32
33
|
export * from "./deletecustomer.js";
|
|
@@ -39,6 +40,7 @@ export * from "./deleteprice.js";
|
|
|
39
40
|
export * from "./deletesourcerule.js";
|
|
40
41
|
export * from "./deletesubscriptionadjustment.js";
|
|
41
42
|
export * from "./deletetestclock.js";
|
|
43
|
+
export * from "./deletewebhooks.js";
|
|
42
44
|
export * from "./disconnectmerchantintegration.js";
|
|
43
45
|
export * from "./downloadinvoicepdf.js";
|
|
44
46
|
export * from "./editsubscriptionintervals.js";
|
|
@@ -75,6 +77,8 @@ export * from "./getsubscription.js";
|
|
|
75
77
|
export * from "./getsubscriptionintervals.js";
|
|
76
78
|
export * from "./gettestclock.js";
|
|
77
79
|
export * from "./getuser.js";
|
|
80
|
+
export * from "./getwebhookportal.js";
|
|
81
|
+
export * from "./getwebhooks.js";
|
|
78
82
|
export * from "./ingestevent.js";
|
|
79
83
|
export * from "./listapprovals.js";
|
|
80
84
|
export * from "./listavailableplans.js";
|
|
@@ -102,6 +106,7 @@ export * from "./listplans.js";
|
|
|
102
106
|
export * from "./listplanversions.js";
|
|
103
107
|
export * from "./listprices.js";
|
|
104
108
|
export * from "./listproducts.js";
|
|
109
|
+
export * from "./listprojectedinvoices.js";
|
|
105
110
|
export * from "./listsalesforceaccounts.js";
|
|
106
111
|
export * from "./listscheduleintervals.js";
|
|
107
112
|
export * from "./listscheduleinvoices.js";
|
|
@@ -112,11 +117,15 @@ export * from "./listsubscriptionadjustments.js";
|
|
|
112
117
|
export * from "./listsubscriptionintervalchanges.js";
|
|
113
118
|
export * from "./listsubscriptions.js";
|
|
114
119
|
export * from "./listtestclocks.js";
|
|
120
|
+
export * from "./migratesubscriptionversion.js";
|
|
115
121
|
export * from "./mintplanversion.js";
|
|
116
122
|
export * from "./purchaseentitlementgrant.js";
|
|
117
123
|
export * from "./reconcilesubscriptionfeatures.js";
|
|
124
|
+
export * from "./recordinvoicepayment.js";
|
|
118
125
|
export * from "./rejectsourceevent.js";
|
|
119
126
|
export * from "./replacescheduleintervals.js";
|
|
127
|
+
export * from "./resetmerchant.js";
|
|
128
|
+
export * from "./retryinvoicepayment.js";
|
|
120
129
|
export * from "./terminatesubscription.js";
|
|
121
130
|
export * from "./transitionplanversion.js";
|
|
122
131
|
export * from "./updateapproval.js";
|
|
@@ -137,6 +146,7 @@ export * from "./updatesource.js";
|
|
|
137
146
|
export * from "./updatesourcerule.js";
|
|
138
147
|
export * from "./updatesubscription.js";
|
|
139
148
|
export * from "./updateuser.js";
|
|
149
|
+
export * from "./updatewebhooks.js";
|
|
140
150
|
export * from "./upsertmerchantintegration.js";
|
|
141
151
|
export * from "./voidentitlementgrant.js";
|
|
142
152
|
export * from "./voidinvoicerefund.js";
|
|
@@ -0,0 +1,110 @@
|
|
|
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 * as models from "../index.js";
|
|
11
|
+
|
|
12
|
+
export type ListProjectedInvoicesRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* The subscription to project invoices for
|
|
15
|
+
*/
|
|
16
|
+
subscriptionId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Start of the range of invoice moments, inclusive. Defaults to now. A value before now is treated as now.
|
|
19
|
+
*/
|
|
20
|
+
from?: Date | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* End of the range of invoice moments, exclusive. Defaults to one month after from. Must be after from and at most one year after now.
|
|
23
|
+
*/
|
|
24
|
+
to?: Date | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Maximum number of invoices to return
|
|
27
|
+
*/
|
|
28
|
+
limit?: number | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Number of invoices to skip for pagination
|
|
31
|
+
*/
|
|
32
|
+
offset?: number | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const ListProjectedInvoicesObject = {
|
|
36
|
+
List: "list",
|
|
37
|
+
} as const;
|
|
38
|
+
export type ListProjectedInvoicesObject = ClosedEnum<
|
|
39
|
+
typeof ListProjectedInvoicesObject
|
|
40
|
+
>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Projected invoices ordered by invoice moment, earliest first
|
|
44
|
+
*/
|
|
45
|
+
export type ListProjectedInvoicesResponse = {
|
|
46
|
+
object: ListProjectedInvoicesObject;
|
|
47
|
+
data: Array<models.Invoice>;
|
|
48
|
+
/**
|
|
49
|
+
* Offset-based pagination response.
|
|
50
|
+
*/
|
|
51
|
+
pagination: models.OffsetPagination;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type ListProjectedInvoicesRequest$Outbound = {
|
|
56
|
+
subscriptionId: string;
|
|
57
|
+
from?: string | undefined;
|
|
58
|
+
to?: string | undefined;
|
|
59
|
+
limit: number;
|
|
60
|
+
offset: number;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const ListProjectedInvoicesRequest$outboundSchema: z.ZodType<
|
|
65
|
+
ListProjectedInvoicesRequest$Outbound,
|
|
66
|
+
z.ZodTypeDef,
|
|
67
|
+
ListProjectedInvoicesRequest
|
|
68
|
+
> = z.object({
|
|
69
|
+
subscriptionId: z.string(),
|
|
70
|
+
from: z.date().transform(v => v.toISOString()).optional(),
|
|
71
|
+
to: z.date().transform(v => v.toISOString()).optional(),
|
|
72
|
+
limit: z.number().int().default(10),
|
|
73
|
+
offset: z.number().int().default(0),
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function listProjectedInvoicesRequestToJSON(
|
|
77
|
+
listProjectedInvoicesRequest: ListProjectedInvoicesRequest,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
ListProjectedInvoicesRequest$outboundSchema.parse(
|
|
81
|
+
listProjectedInvoicesRequest,
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const ListProjectedInvoicesObject$inboundSchema: z.ZodNativeEnum<
|
|
88
|
+
typeof ListProjectedInvoicesObject
|
|
89
|
+
> = z.nativeEnum(ListProjectedInvoicesObject);
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const ListProjectedInvoicesResponse$inboundSchema: z.ZodType<
|
|
93
|
+
ListProjectedInvoicesResponse,
|
|
94
|
+
z.ZodTypeDef,
|
|
95
|
+
unknown
|
|
96
|
+
> = z.object({
|
|
97
|
+
object: ListProjectedInvoicesObject$inboundSchema,
|
|
98
|
+
data: z.array(models.Invoice$inboundSchema),
|
|
99
|
+
pagination: models.OffsetPagination$inboundSchema,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
export function listProjectedInvoicesResponseFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<ListProjectedInvoicesResponse, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => ListProjectedInvoicesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'ListProjectedInvoicesResponse' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|