@flexprice/sdk 2.1.47 → 2.1.48-dev.1
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/docs/sdk/models/billing-term-input.md +29 -0
- package/docs/sdk/models/billing-term-kind.md +17 -0
- package/docs/sdk/models/billing-term-owner-type.md +15 -0
- package/docs/sdk/models/billing-term-split.md +17 -0
- package/docs/sdk/models/billing-term-value-type.md +19 -0
- package/docs/sdk/models/billing-terms-response.md +16 -0
- package/docs/sdk/models/billingterm-instalment.md +40 -0
- package/docs/sdk/models/billingterm-term.md +36 -0
- package/docs/sdk/models/cancellation-fee-input.md +19 -0
- package/docs/sdk/models/cancellation-fee-type.md +17 -0
- package/docs/sdk/models/commitment-response.md +3 -1
- package/docs/sdk/models/create-commitment-request.md +3 -1
- package/docs/sdk/models/get-commitment-billing-terms-request.md +17 -0
- package/docs/sdk/models/instalment-bill-trigger.md +17 -0
- package/docs/sdk/models/instalment-delivery.md +17 -0
- package/docs/sdk/models/instalment-kind.md +17 -0
- package/docs/sdk/models/instalment-status.md +17 -0
- package/docs/sdk/models/invoice-billing-reason.md +1 -1
- package/docs/sdk/models/invoice-line-item-response.md +1 -0
- package/docs/sdk/models/list-commitment-instalments-request.md +18 -0
- package/docs/sdk/models/list-instalments-response.md +15 -0
- package/docs/sdk/models/preview-commitment-billing-terms-request.md +21 -0
- package/docs/sdk/models/replace-billing-terms-request.md +17 -0
- package/docs/sdk/models/replace-commitment-billing-terms-request.md +21 -0
- package/docs/sdk/models/terminate-commitment-request.md +2 -2
- package/docs/sdk/models/trigger-commitment-instalment-request.md +20 -0
- package/docs/sdk/models/trigger-instalment-request.md +15 -0
- package/docs/sdk/models/webhook-dto-billing-instalment-webhook-payload.md +16 -0
- package/docs/sdk/models/webhook-dto-billing-terms-webhook-payload.md +18 -0
- package/docs/sdk/models/webhook-dto-invoice-line-item.md +1 -0
- package/docs/sdk/models/webhook-event-name.md +1 -1
- package/docs/sdks/commitments/README.md +384 -1
- package/docs/sdks/webhookevents/README.md +414 -0
- package/esm/funcs/commitments-get-commitment-billing-terms.d.ts +17 -0
- package/esm/funcs/commitments-get-commitment-billing-terms.d.ts.map +1 -0
- package/esm/funcs/commitments-get-commitment-billing-terms.js +91 -0
- package/esm/funcs/commitments-get-commitment-billing-terms.js.map +1 -0
- package/esm/funcs/commitments-list-commitment-instalments.d.ts +17 -0
- package/esm/funcs/commitments-list-commitment-instalments.d.ts.map +1 -0
- package/esm/funcs/commitments-list-commitment-instalments.js +96 -0
- package/esm/funcs/commitments-list-commitment-instalments.js.map +1 -0
- package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts +17 -0
- package/esm/funcs/commitments-preview-commitment-billing-terms.d.ts.map +1 -0
- package/esm/funcs/commitments-preview-commitment-billing-terms.js +93 -0
- package/esm/funcs/commitments-preview-commitment-billing-terms.js.map +1 -0
- package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts +17 -0
- package/esm/funcs/commitments-replace-commitment-billing-terms.d.ts.map +1 -0
- package/esm/funcs/commitments-replace-commitment-billing-terms.js +93 -0
- package/esm/funcs/commitments-replace-commitment-billing-terms.js.map +1 -0
- package/esm/funcs/commitments-terminate-commitment.d.ts +1 -1
- package/esm/funcs/commitments-terminate-commitment.js +1 -1
- package/esm/funcs/commitments-trigger-commitment-instalment.d.ts +17 -0
- package/esm/funcs/commitments-trigger-commitment-instalment.d.ts.map +1 -0
- package/esm/funcs/commitments-trigger-commitment-instalment.js +98 -0
- package/esm/funcs/commitments-trigger-commitment-instalment.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-created.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-created.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-billing-terms-updated.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/sdk/commitments.d.ts +36 -1
- package/esm/sdk/commitments.d.ts.map +1 -1
- package/esm/sdk/commitments.js +51 -1
- package/esm/sdk/commitments.js.map +1 -1
- package/esm/sdk/models/billing-term-input.d.ts +61 -0
- package/esm/sdk/models/billing-term-input.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-input.js +40 -0
- package/esm/sdk/models/billing-term-input.js.map +1 -0
- package/esm/sdk/models/billing-term-kind.d.ts +12 -0
- package/esm/sdk/models/billing-term-kind.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-kind.js +13 -0
- package/esm/sdk/models/billing-term-kind.js.map +1 -0
- package/esm/sdk/models/billing-term-owner-type.d.ts +9 -0
- package/esm/sdk/models/billing-term-owner-type.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-owner-type.js +10 -0
- package/esm/sdk/models/billing-term-owner-type.js.map +1 -0
- package/esm/sdk/models/billing-term-split.d.ts +12 -0
- package/esm/sdk/models/billing-term-split.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-split.js +13 -0
- package/esm/sdk/models/billing-term-split.js.map +1 -0
- package/esm/sdk/models/billing-term-value-type.d.ts +19 -0
- package/esm/sdk/models/billing-term-value-type.d.ts.map +1 -0
- package/esm/sdk/models/billing-term-value-type.js +17 -0
- package/esm/sdk/models/billing-term-value-type.js.map +1 -0
- package/esm/sdk/models/billing-terms-response.d.ts +13 -0
- package/esm/sdk/models/billing-terms-response.d.ts.map +1 -0
- package/esm/sdk/models/billing-terms-response.js +22 -0
- package/esm/sdk/models/billing-terms-response.js.map +1 -0
- package/esm/sdk/models/billingterm-instalment.d.ts +43 -0
- package/esm/sdk/models/billingterm-instalment.d.ts.map +1 -0
- package/esm/sdk/models/billingterm-instalment.js +68 -0
- package/esm/sdk/models/billingterm-instalment.js.map +1 -0
- package/esm/sdk/models/billingterm-term.d.ts +55 -0
- package/esm/sdk/models/billingterm-term.d.ts.map +1 -0
- package/esm/sdk/models/billingterm-term.js +62 -0
- package/esm/sdk/models/billingterm-term.js.map +1 -0
- package/esm/sdk/models/cancellation-fee-input.d.ts +18 -0
- package/esm/sdk/models/cancellation-fee-input.d.ts.map +1 -0
- package/esm/sdk/models/cancellation-fee-input.js +14 -0
- package/esm/sdk/models/cancellation-fee-input.js.map +1 -0
- package/esm/sdk/models/cancellation-fee-type.d.ts +16 -0
- package/esm/sdk/models/cancellation-fee-type.d.ts.map +1 -0
- package/esm/sdk/models/cancellation-fee-type.js +14 -0
- package/esm/sdk/models/cancellation-fee-type.js.map +1 -0
- package/esm/sdk/models/commitment-response.d.ts +9 -1
- package/esm/sdk/models/commitment-response.d.ts.map +1 -1
- package/esm/sdk/models/commitment-response.js +7 -1
- package/esm/sdk/models/commitment-response.js.map +1 -1
- package/esm/sdk/models/create-commitment-request.d.ts +12 -0
- package/esm/sdk/models/create-commitment-request.d.ts.map +1 -1
- package/esm/sdk/models/create-commitment-request.js +6 -0
- package/esm/sdk/models/create-commitment-request.js.map +1 -1
- package/esm/sdk/models/get-commitment-billing-terms-op.d.ts +15 -0
- package/esm/sdk/models/get-commitment-billing-terms-op.d.ts.map +1 -0
- package/esm/sdk/models/get-commitment-billing-terms-op.js +12 -0
- package/esm/sdk/models/get-commitment-billing-terms-op.js.map +1 -0
- package/esm/sdk/models/index.d.ts +24 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +24 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/instalment-bill-trigger.d.ts +12 -0
- package/esm/sdk/models/instalment-bill-trigger.d.ts.map +1 -0
- package/esm/sdk/models/instalment-bill-trigger.js +13 -0
- package/esm/sdk/models/instalment-bill-trigger.js.map +1 -0
- package/esm/sdk/models/instalment-delivery.d.ts +12 -0
- package/esm/sdk/models/instalment-delivery.d.ts.map +1 -0
- package/esm/sdk/models/instalment-delivery.js +13 -0
- package/esm/sdk/models/instalment-delivery.js.map +1 -0
- package/esm/sdk/models/instalment-kind.d.ts +10 -0
- package/esm/sdk/models/instalment-kind.d.ts.map +1 -0
- package/esm/sdk/models/instalment-kind.js +11 -0
- package/esm/sdk/models/instalment-kind.js.map +1 -0
- package/esm/sdk/models/instalment-status.d.ts +11 -0
- package/esm/sdk/models/instalment-status.d.ts.map +1 -0
- package/esm/sdk/models/instalment-status.js +12 -0
- package/esm/sdk/models/instalment-status.js.map +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
- package/esm/sdk/models/invoice-billing-reason.js +1 -0
- package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.d.ts +4 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.js +2 -0
- package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
- package/esm/sdk/models/list-commitment-instalments-op.d.ts +20 -0
- package/esm/sdk/models/list-commitment-instalments-op.d.ts.map +1 -0
- package/esm/sdk/models/list-commitment-instalments-op.js +13 -0
- package/esm/sdk/models/list-commitment-instalments-op.js.map +1 -0
- package/esm/sdk/models/list-instalments-response.d.ts +11 -0
- package/esm/sdk/models/list-instalments-response.d.ts.map +1 -0
- package/esm/sdk/models/list-instalments-response.js +15 -0
- package/esm/sdk/models/list-instalments-response.js.map +1 -0
- package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts +21 -0
- package/esm/sdk/models/preview-commitment-billing-terms-op.d.ts.map +1 -0
- package/esm/sdk/models/preview-commitment-billing-terms-op.js +14 -0
- package/esm/sdk/models/preview-commitment-billing-terms-op.js.map +1 -0
- package/esm/sdk/models/replace-billing-terms-request.d.ts +13 -0
- package/esm/sdk/models/replace-billing-terms-request.d.ts.map +1 -0
- package/esm/sdk/models/replace-billing-terms-request.js +18 -0
- package/esm/sdk/models/replace-billing-terms-request.js.map +1 -0
- package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts +21 -0
- package/esm/sdk/models/replace-commitment-billing-terms-op.d.ts.map +1 -0
- package/esm/sdk/models/replace-commitment-billing-terms-op.js +14 -0
- package/esm/sdk/models/replace-commitment-billing-terms-op.js.map +1 -0
- package/esm/sdk/models/terminate-commitment-request.d.ts +6 -2
- package/esm/sdk/models/terminate-commitment-request.d.ts.map +1 -1
- package/esm/sdk/models/terminate-commitment-request.js +2 -1
- package/esm/sdk/models/terminate-commitment-request.js.map +1 -1
- package/esm/sdk/models/trigger-commitment-instalment-op.d.ts +26 -0
- package/esm/sdk/models/trigger-commitment-instalment-op.d.ts.map +1 -0
- package/esm/sdk/models/trigger-commitment-instalment-op.js +20 -0
- package/esm/sdk/models/trigger-commitment-instalment-op.js.map +1 -0
- package/esm/sdk/models/trigger-instalment-request.d.ts +15 -0
- package/esm/sdk/models/trigger-instalment-request.d.ts.map +1 -0
- package/esm/sdk/models/trigger-instalment-request.js +17 -0
- package/esm/sdk/models/trigger-instalment-request.js.map +1 -0
- package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts +13 -0
- package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js +22 -0
- package/esm/sdk/models/webhook-dto-billing-instalment-webhook-payload.js.map +1 -0
- package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts +16 -0
- package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js +28 -0
- package/esm/sdk/models/webhook-dto-billing-terms-webhook-payload.js.map +1 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts +1 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.d.ts.map +1 -1
- package/esm/sdk/models/webhook-dto-invoice-line-item.js +2 -0
- package/esm/sdk/models/webhook-dto-invoice-line-item.js.map +1 -1
- package/esm/sdk/models/webhook-event-name.d.ts +6 -0
- package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
- package/esm/sdk/models/webhook-event-name.js +6 -0
- package/esm/sdk/models/webhook-event-name.js.map +1 -1
- package/esm/sdk/webhook-events.d.ts +42 -0
- package/esm/sdk/webhook-events.d.ts.map +1 -1
- package/esm/sdk/webhook-events.js +60 -0
- package/esm/sdk/webhook-events.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/commitments-get-commitment-billing-terms.ts +182 -0
- package/src/funcs/commitments-list-commitment-instalments.ts +191 -0
- package/src/funcs/commitments-preview-commitment-billing-terms.ts +192 -0
- package/src/funcs/commitments-replace-commitment-billing-terms.ts +190 -0
- package/src/funcs/commitments-terminate-commitment.ts +1 -1
- package/src/funcs/commitments-trigger-commitment-instalment.ts +197 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-instalment-created.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-instalment-updated.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-terms-created.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-billing-terms-updated.ts +144 -0
- package/src/lib/config.ts +3 -3
- package/src/sdk/commitments.ts +101 -1
- package/src/sdk/models/billing-term-input.ts +116 -0
- package/src/sdk/models/billing-term-kind.ts +24 -0
- package/src/sdk/models/billing-term-owner-type.ts +16 -0
- package/src/sdk/models/billing-term-split.ts +24 -0
- package/src/sdk/models/billing-term-value-type.ts +31 -0
- package/src/sdk/models/billing-terms-response.ts +49 -0
- package/src/sdk/models/billingterm-instalment.ts +128 -0
- package/src/sdk/models/billingterm-term.ts +136 -0
- package/src/sdk/models/cancellation-fee-input.ts +40 -0
- package/src/sdk/models/cancellation-fee-type.ts +23 -0
- package/src/sdk/models/commitment-response.ts +22 -2
- package/src/sdk/models/create-commitment-request.ts +23 -0
- package/src/sdk/models/get-commitment-billing-terms-op.ts +35 -0
- package/src/sdk/models/index.ts +24 -0
- package/src/sdk/models/instalment-bill-trigger.ts +24 -0
- package/src/sdk/models/instalment-delivery.ts +24 -0
- package/src/sdk/models/instalment-kind.ts +19 -0
- package/src/sdk/models/instalment-status.ts +20 -0
- package/src/sdk/models/invoice-billing-reason.ts +1 -0
- package/src/sdk/models/invoice-line-item-response.ts +6 -0
- package/src/sdk/models/list-commitment-instalments-op.ts +41 -0
- package/src/sdk/models/list-instalments-response.ts +35 -0
- package/src/sdk/models/preview-commitment-billing-terms-op.ts +46 -0
- package/src/sdk/models/replace-billing-terms-request.ts +43 -0
- package/src/sdk/models/replace-commitment-billing-terms-op.ts +46 -0
- package/src/sdk/models/terminate-commitment-request.ts +11 -3
- package/src/sdk/models/trigger-commitment-instalment-op.ts +60 -0
- package/src/sdk/models/trigger-instalment-request.ts +41 -0
- package/src/sdk/models/webhook-dto-billing-instalment-webhook-payload.ts +53 -0
- package/src/sdk/models/webhook-dto-billing-terms-webhook-payload.ts +61 -0
- package/src/sdk/models/webhook-dto-invoice-line-item.ts +3 -0
- package/src/sdk/models/webhook-event-name.ts +6 -0
- package/src/sdk/webhook-events.ts +96 -0
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
### Available Operations
|
|
6
6
|
|
|
7
|
+
* [postWebhookEventsBillingInstalmentCancelled](#postwebhookeventsbillinginstalmentcancelled) - billing_instalment.cancelled
|
|
8
|
+
* [postWebhookEventsBillingInstalmentCreated](#postwebhookeventsbillinginstalmentcreated) - billing_instalment.created
|
|
9
|
+
* [postWebhookEventsBillingInstalmentInvoiced](#postwebhookeventsbillinginstalmentinvoiced) - billing_instalment.invoiced
|
|
10
|
+
* [postWebhookEventsBillingInstalmentUpdated](#postwebhookeventsbillinginstalmentupdated) - billing_instalment.updated
|
|
11
|
+
* [postWebhookEventsBillingTermsCreated](#postwebhookeventsbillingtermscreated) - billing_terms.created
|
|
12
|
+
* [postWebhookEventsBillingTermsUpdated](#postwebhookeventsbillingtermsupdated) - billing_terms.updated
|
|
7
13
|
* [postWebhookEventsCheckoutSessionCompleted](#postwebhookeventscheckoutsessioncompleted) - checkout.session.completed
|
|
8
14
|
* [postWebhookEventsCheckoutSessionExpired](#postwebhookeventscheckoutsessionexpired) - checkout.session.expired
|
|
9
15
|
* [postWebhookEventsCheckoutSessionFailed](#postwebhookeventscheckoutsessionfailed) - checkout.session.failed
|
|
@@ -71,6 +77,414 @@
|
|
|
71
77
|
* [postWebhookEventsWalletTransactionUpdated](#postwebhookeventswallettransactionupdated) - wallet.transaction.updated
|
|
72
78
|
* [postWebhookEventsWalletUpdated](#postwebhookeventswalletupdated) - wallet.updated
|
|
73
79
|
|
|
80
|
+
## postWebhookEventsBillingInstalmentCancelled
|
|
81
|
+
|
|
82
|
+
Fired when a billing instalment is cancelled. Doc-only for parsing.
|
|
83
|
+
|
|
84
|
+
### Example Usage
|
|
85
|
+
|
|
86
|
+
<!-- UsageSnippet language="typescript" operationID="post_/webhook-events/billing_instalment.cancelled" method="post" path="/webhook-events/billing_instalment.cancelled" -->
|
|
87
|
+
```typescript
|
|
88
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
89
|
+
|
|
90
|
+
const flexprice = new Flexprice({
|
|
91
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
async function run() {
|
|
95
|
+
const result = await flexprice.webhookEvents.postWebhookEventsBillingInstalmentCancelled();
|
|
96
|
+
|
|
97
|
+
console.log(result);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
run();
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Standalone function
|
|
104
|
+
|
|
105
|
+
The standalone function version of this method:
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
109
|
+
import { webhookEventsPostWebhookEventsBillingInstalmentCancelled } from "@flexprice/sdk/funcs/webhook-events-post-webhook-events-billing-instalment-cancelled.js";
|
|
110
|
+
|
|
111
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
112
|
+
// You can create one instance of it to use across an application.
|
|
113
|
+
const flexprice = new FlexpriceCore({
|
|
114
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
async function run() {
|
|
118
|
+
const res = await webhookEventsPostWebhookEventsBillingInstalmentCancelled(flexprice);
|
|
119
|
+
if (res.ok) {
|
|
120
|
+
const { value: result } = res;
|
|
121
|
+
console.log(result);
|
|
122
|
+
} else {
|
|
123
|
+
console.log("webhookEventsPostWebhookEventsBillingInstalmentCancelled failed:", res.error);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
run();
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Parameters
|
|
131
|
+
|
|
132
|
+
| Parameter | Type | Required | Description |
|
|
133
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
134
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
135
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
136
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
137
|
+
|
|
138
|
+
### Response
|
|
139
|
+
|
|
140
|
+
**Promise\<[models.WebhookDtoBillingInstalmentWebhookPayload](../../sdk/models/webhook-dto-billing-instalment-webhook-payload.md)\>**
|
|
141
|
+
|
|
142
|
+
### Errors
|
|
143
|
+
|
|
144
|
+
| Error Type | Status Code | Content Type |
|
|
145
|
+
| --------------- | --------------- | --------------- |
|
|
146
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
147
|
+
|
|
148
|
+
## postWebhookEventsBillingInstalmentCreated
|
|
149
|
+
|
|
150
|
+
Fired when a billing instalment is added to a commitment. Doc-only for parsing.
|
|
151
|
+
|
|
152
|
+
### Example Usage
|
|
153
|
+
|
|
154
|
+
<!-- UsageSnippet language="typescript" operationID="post_/webhook-events/billing_instalment.created" method="post" path="/webhook-events/billing_instalment.created" -->
|
|
155
|
+
```typescript
|
|
156
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
157
|
+
|
|
158
|
+
const flexprice = new Flexprice({
|
|
159
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
async function run() {
|
|
163
|
+
const result = await flexprice.webhookEvents.postWebhookEventsBillingInstalmentCreated();
|
|
164
|
+
|
|
165
|
+
console.log(result);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
run();
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Standalone function
|
|
172
|
+
|
|
173
|
+
The standalone function version of this method:
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
177
|
+
import { webhookEventsPostWebhookEventsBillingInstalmentCreated } from "@flexprice/sdk/funcs/webhook-events-post-webhook-events-billing-instalment-created.js";
|
|
178
|
+
|
|
179
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
180
|
+
// You can create one instance of it to use across an application.
|
|
181
|
+
const flexprice = new FlexpriceCore({
|
|
182
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
async function run() {
|
|
186
|
+
const res = await webhookEventsPostWebhookEventsBillingInstalmentCreated(flexprice);
|
|
187
|
+
if (res.ok) {
|
|
188
|
+
const { value: result } = res;
|
|
189
|
+
console.log(result);
|
|
190
|
+
} else {
|
|
191
|
+
console.log("webhookEventsPostWebhookEventsBillingInstalmentCreated failed:", res.error);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
run();
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Parameters
|
|
199
|
+
|
|
200
|
+
| Parameter | Type | Required | Description |
|
|
201
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
202
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
203
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
204
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
205
|
+
|
|
206
|
+
### Response
|
|
207
|
+
|
|
208
|
+
**Promise\<[models.WebhookDtoBillingInstalmentWebhookPayload](../../sdk/models/webhook-dto-billing-instalment-webhook-payload.md)\>**
|
|
209
|
+
|
|
210
|
+
### Errors
|
|
211
|
+
|
|
212
|
+
| Error Type | Status Code | Content Type |
|
|
213
|
+
| --------------- | --------------- | --------------- |
|
|
214
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
215
|
+
|
|
216
|
+
## postWebhookEventsBillingInstalmentInvoiced
|
|
217
|
+
|
|
218
|
+
Fired when the invoice carrying a billing instalment is finalized. Doc-only for parsing.
|
|
219
|
+
|
|
220
|
+
### Example Usage
|
|
221
|
+
|
|
222
|
+
<!-- UsageSnippet language="typescript" operationID="post_/webhook-events/billing_instalment.invoiced" method="post" path="/webhook-events/billing_instalment.invoiced" -->
|
|
223
|
+
```typescript
|
|
224
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
225
|
+
|
|
226
|
+
const flexprice = new Flexprice({
|
|
227
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
async function run() {
|
|
231
|
+
const result = await flexprice.webhookEvents.postWebhookEventsBillingInstalmentInvoiced();
|
|
232
|
+
|
|
233
|
+
console.log(result);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
run();
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
### Standalone function
|
|
240
|
+
|
|
241
|
+
The standalone function version of this method:
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
245
|
+
import { webhookEventsPostWebhookEventsBillingInstalmentInvoiced } from "@flexprice/sdk/funcs/webhook-events-post-webhook-events-billing-instalment-invoiced.js";
|
|
246
|
+
|
|
247
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
248
|
+
// You can create one instance of it to use across an application.
|
|
249
|
+
const flexprice = new FlexpriceCore({
|
|
250
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
async function run() {
|
|
254
|
+
const res = await webhookEventsPostWebhookEventsBillingInstalmentInvoiced(flexprice);
|
|
255
|
+
if (res.ok) {
|
|
256
|
+
const { value: result } = res;
|
|
257
|
+
console.log(result);
|
|
258
|
+
} else {
|
|
259
|
+
console.log("webhookEventsPostWebhookEventsBillingInstalmentInvoiced failed:", res.error);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
run();
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Parameters
|
|
267
|
+
|
|
268
|
+
| Parameter | Type | Required | Description |
|
|
269
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
270
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
271
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
272
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
273
|
+
|
|
274
|
+
### Response
|
|
275
|
+
|
|
276
|
+
**Promise\<[models.WebhookDtoBillingInstalmentWebhookPayload](../../sdk/models/webhook-dto-billing-instalment-webhook-payload.md)\>**
|
|
277
|
+
|
|
278
|
+
### Errors
|
|
279
|
+
|
|
280
|
+
| Error Type | Status Code | Content Type |
|
|
281
|
+
| --------------- | --------------- | --------------- |
|
|
282
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
283
|
+
|
|
284
|
+
## postWebhookEventsBillingInstalmentUpdated
|
|
285
|
+
|
|
286
|
+
Fired when a trigger moves a billing instalment's bill date, or a voided invoice puts it back on schedule. Doc-only for parsing.
|
|
287
|
+
|
|
288
|
+
### Example Usage
|
|
289
|
+
|
|
290
|
+
<!-- UsageSnippet language="typescript" operationID="post_/webhook-events/billing_instalment.updated" method="post" path="/webhook-events/billing_instalment.updated" -->
|
|
291
|
+
```typescript
|
|
292
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
293
|
+
|
|
294
|
+
const flexprice = new Flexprice({
|
|
295
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
async function run() {
|
|
299
|
+
const result = await flexprice.webhookEvents.postWebhookEventsBillingInstalmentUpdated();
|
|
300
|
+
|
|
301
|
+
console.log(result);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
run();
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Standalone function
|
|
308
|
+
|
|
309
|
+
The standalone function version of this method:
|
|
310
|
+
|
|
311
|
+
```typescript
|
|
312
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
313
|
+
import { webhookEventsPostWebhookEventsBillingInstalmentUpdated } from "@flexprice/sdk/funcs/webhook-events-post-webhook-events-billing-instalment-updated.js";
|
|
314
|
+
|
|
315
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
316
|
+
// You can create one instance of it to use across an application.
|
|
317
|
+
const flexprice = new FlexpriceCore({
|
|
318
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
async function run() {
|
|
322
|
+
const res = await webhookEventsPostWebhookEventsBillingInstalmentUpdated(flexprice);
|
|
323
|
+
if (res.ok) {
|
|
324
|
+
const { value: result } = res;
|
|
325
|
+
console.log(result);
|
|
326
|
+
} else {
|
|
327
|
+
console.log("webhookEventsPostWebhookEventsBillingInstalmentUpdated failed:", res.error);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
run();
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
### Parameters
|
|
335
|
+
|
|
336
|
+
| Parameter | Type | Required | Description |
|
|
337
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
338
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
339
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
340
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
341
|
+
|
|
342
|
+
### Response
|
|
343
|
+
|
|
344
|
+
**Promise\<[models.WebhookDtoBillingInstalmentWebhookPayload](../../sdk/models/webhook-dto-billing-instalment-webhook-payload.md)\>**
|
|
345
|
+
|
|
346
|
+
### Errors
|
|
347
|
+
|
|
348
|
+
| Error Type | Status Code | Content Type |
|
|
349
|
+
| --------------- | --------------- | --------------- |
|
|
350
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
351
|
+
|
|
352
|
+
## postWebhookEventsBillingTermsCreated
|
|
353
|
+
|
|
354
|
+
Fired when billing terms are saved with a new commitment. Doc-only for parsing.
|
|
355
|
+
|
|
356
|
+
### Example Usage
|
|
357
|
+
|
|
358
|
+
<!-- UsageSnippet language="typescript" operationID="post_/webhook-events/billing_terms.created" method="post" path="/webhook-events/billing_terms.created" -->
|
|
359
|
+
```typescript
|
|
360
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
361
|
+
|
|
362
|
+
const flexprice = new Flexprice({
|
|
363
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
async function run() {
|
|
367
|
+
const result = await flexprice.webhookEvents.postWebhookEventsBillingTermsCreated();
|
|
368
|
+
|
|
369
|
+
console.log(result);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
run();
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### Standalone function
|
|
376
|
+
|
|
377
|
+
The standalone function version of this method:
|
|
378
|
+
|
|
379
|
+
```typescript
|
|
380
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
381
|
+
import { webhookEventsPostWebhookEventsBillingTermsCreated } from "@flexprice/sdk/funcs/webhook-events-post-webhook-events-billing-terms-created.js";
|
|
382
|
+
|
|
383
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
384
|
+
// You can create one instance of it to use across an application.
|
|
385
|
+
const flexprice = new FlexpriceCore({
|
|
386
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
async function run() {
|
|
390
|
+
const res = await webhookEventsPostWebhookEventsBillingTermsCreated(flexprice);
|
|
391
|
+
if (res.ok) {
|
|
392
|
+
const { value: result } = res;
|
|
393
|
+
console.log(result);
|
|
394
|
+
} else {
|
|
395
|
+
console.log("webhookEventsPostWebhookEventsBillingTermsCreated failed:", res.error);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
run();
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Parameters
|
|
403
|
+
|
|
404
|
+
| Parameter | Type | Required | Description |
|
|
405
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
406
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
407
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
408
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
409
|
+
|
|
410
|
+
### Response
|
|
411
|
+
|
|
412
|
+
**Promise\<[models.WebhookDtoBillingTermsWebhookPayload](../../sdk/models/webhook-dto-billing-terms-webhook-payload.md)\>**
|
|
413
|
+
|
|
414
|
+
### Errors
|
|
415
|
+
|
|
416
|
+
| Error Type | Status Code | Content Type |
|
|
417
|
+
| --------------- | --------------- | --------------- |
|
|
418
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
419
|
+
|
|
420
|
+
## postWebhookEventsBillingTermsUpdated
|
|
421
|
+
|
|
422
|
+
Fired when an edit replaces a commitment's billing terms. Doc-only for parsing.
|
|
423
|
+
|
|
424
|
+
### Example Usage
|
|
425
|
+
|
|
426
|
+
<!-- UsageSnippet language="typescript" operationID="post_/webhook-events/billing_terms.updated" method="post" path="/webhook-events/billing_terms.updated" -->
|
|
427
|
+
```typescript
|
|
428
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
429
|
+
|
|
430
|
+
const flexprice = new Flexprice({
|
|
431
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
432
|
+
});
|
|
433
|
+
|
|
434
|
+
async function run() {
|
|
435
|
+
const result = await flexprice.webhookEvents.postWebhookEventsBillingTermsUpdated();
|
|
436
|
+
|
|
437
|
+
console.log(result);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
run();
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
### Standalone function
|
|
444
|
+
|
|
445
|
+
The standalone function version of this method:
|
|
446
|
+
|
|
447
|
+
```typescript
|
|
448
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
449
|
+
import { webhookEventsPostWebhookEventsBillingTermsUpdated } from "@flexprice/sdk/funcs/webhook-events-post-webhook-events-billing-terms-updated.js";
|
|
450
|
+
|
|
451
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
452
|
+
// You can create one instance of it to use across an application.
|
|
453
|
+
const flexprice = new FlexpriceCore({
|
|
454
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
455
|
+
});
|
|
456
|
+
|
|
457
|
+
async function run() {
|
|
458
|
+
const res = await webhookEventsPostWebhookEventsBillingTermsUpdated(flexprice);
|
|
459
|
+
if (res.ok) {
|
|
460
|
+
const { value: result } = res;
|
|
461
|
+
console.log(result);
|
|
462
|
+
} else {
|
|
463
|
+
console.log("webhookEventsPostWebhookEventsBillingTermsUpdated failed:", res.error);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
run();
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
### Parameters
|
|
471
|
+
|
|
472
|
+
| Parameter | Type | Required | Description |
|
|
473
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
474
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
475
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
476
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
477
|
+
|
|
478
|
+
### Response
|
|
479
|
+
|
|
480
|
+
**Promise\<[models.WebhookDtoBillingTermsWebhookPayload](../../sdk/models/webhook-dto-billing-terms-webhook-payload.md)\>**
|
|
481
|
+
|
|
482
|
+
### Errors
|
|
483
|
+
|
|
484
|
+
| Error Type | Status Code | Content Type |
|
|
485
|
+
| --------------- | --------------- | --------------- |
|
|
486
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
487
|
+
|
|
74
488
|
## postWebhookEventsCheckoutSessionCompleted
|
|
75
489
|
|
|
76
490
|
Fired when payment is confirmed; the subscription is now active and the invoice is finalized. Doc-only for parsing.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FlexpriceCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../sdk/models/http-client-errors.js";
|
|
5
|
+
import * as models from "../sdk/models/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
7
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
8
|
+
import { APIPromise } from "../types/async.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Get billing terms
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Returns the commitment's current billing terms with its scheduled and invoiced instalments in billing order. Invoiced instalments may come from terms an edit replaced. Cancelled instalments are listed by the instalments endpoint.
|
|
15
|
+
*/
|
|
16
|
+
export declare function commitmentsGetCommitmentBillingTerms(client: FlexpriceCore, id: string, options?: RequestOptions): APIPromise<Result<models.BillingTermsResponse, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=commitments-get-commitment-billing-terms.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commitments-get-commitment-billing-terms.d.ts","sourceRoot":"","sources":["../../src/funcs/commitments-get-commitment-billing-terms.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,oBAAoB,EACzB,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import * as models from "../sdk/models/index.js";
|
|
13
|
+
import { APIPromise } from "../types/async.js";
|
|
14
|
+
/**
|
|
15
|
+
* Get billing terms
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Returns the commitment's current billing terms with its scheduled and invoiced instalments in billing order. Invoiced instalments may come from terms an edit replaced. Cancelled instalments are listed by the instalments endpoint.
|
|
19
|
+
*/
|
|
20
|
+
export function commitmentsGetCommitmentBillingTerms(client, id, options) {
|
|
21
|
+
return new APIPromise($do(client, id, options));
|
|
22
|
+
}
|
|
23
|
+
async function $do(client, id, options) {
|
|
24
|
+
const input = {
|
|
25
|
+
id: id,
|
|
26
|
+
};
|
|
27
|
+
const parsed = safeParse(input, (value) => z.parse(models.GetCommitmentBillingTermsRequest$outboundSchema, value), "Input validation failed");
|
|
28
|
+
if (!parsed.ok) {
|
|
29
|
+
return [parsed, { status: "invalid" }];
|
|
30
|
+
}
|
|
31
|
+
const payload = parsed.value;
|
|
32
|
+
const body = null;
|
|
33
|
+
const pathParams = {
|
|
34
|
+
id: encodeSimple("id", payload.id, {
|
|
35
|
+
explode: false,
|
|
36
|
+
charEncoding: "percent",
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
const path = pathToFunc("/commitments/{id}/billing-terms")(pathParams);
|
|
40
|
+
const headers = new Headers(compactMap({
|
|
41
|
+
Accept: "application/json",
|
|
42
|
+
}));
|
|
43
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
44
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
45
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
46
|
+
const context = {
|
|
47
|
+
options: client._options,
|
|
48
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
49
|
+
operationID: "getCommitmentBillingTerms",
|
|
50
|
+
oAuth2Scopes: null,
|
|
51
|
+
resolvedSecurity: requestSecurity,
|
|
52
|
+
securitySource: client._options.apiKeyAuth,
|
|
53
|
+
retryConfig: options?.retries
|
|
54
|
+
|| client._options.retryConfig
|
|
55
|
+
|| { strategy: "none" },
|
|
56
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
57
|
+
};
|
|
58
|
+
const requestRes = client._createRequest(context, {
|
|
59
|
+
security: requestSecurity,
|
|
60
|
+
method: "GET",
|
|
61
|
+
baseURL: options?.serverURL,
|
|
62
|
+
path: path,
|
|
63
|
+
headers: headers,
|
|
64
|
+
body: body,
|
|
65
|
+
userAgent: client._options.userAgent,
|
|
66
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
67
|
+
}, options);
|
|
68
|
+
if (!requestRes.ok) {
|
|
69
|
+
return [requestRes, { status: "invalid" }];
|
|
70
|
+
}
|
|
71
|
+
const req = requestRes.value;
|
|
72
|
+
const doResult = await client._do(req, {
|
|
73
|
+
context,
|
|
74
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
75
|
+
retryConfig: context.retryConfig,
|
|
76
|
+
retryCodes: context.retryCodes,
|
|
77
|
+
});
|
|
78
|
+
if (!doResult.ok) {
|
|
79
|
+
return [doResult, { status: "request-error", request: req }];
|
|
80
|
+
}
|
|
81
|
+
const response = doResult.value;
|
|
82
|
+
const responseFields = {
|
|
83
|
+
HttpMeta: { Response: response, Request: req },
|
|
84
|
+
};
|
|
85
|
+
const [result] = await M.match(M.json(200, models.BillingTermsResponse$inboundSchema), M.jsonErr([400, 404], models.ErrorsErrorResponse$inboundSchema), M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
86
|
+
if (!result.ok) {
|
|
87
|
+
return [result, { status: "complete", request: req, response }];
|
|
88
|
+
}
|
|
89
|
+
return [result, { status: "complete", request: req, response }];
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=commitments-get-commitment-billing-terms.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commitments-get-commitment-billing-terms.js","sourceRoot":"","sources":["../../src/funcs/commitments-get-commitment-billing-terms.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAS3C,OAAO,KAA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OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAAA,CACjE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FlexpriceCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { FlexPriceError } from "../sdk/models/flex-price-error.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../sdk/models/http-client-errors.js";
|
|
5
|
+
import * as models from "../sdk/models/index.js";
|
|
6
|
+
import { ResponseValidationError } from "../sdk/models/response-validation-error.js";
|
|
7
|
+
import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
8
|
+
import { APIPromise } from "../types/async.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* List instalments
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Lists the instalments of the commitment in billing order. Without a status filter every instalment is listed, cancelled ones included.
|
|
15
|
+
*/
|
|
16
|
+
export declare function commitmentsListCommitmentInstalments(client: FlexpriceCore, id: string, status?: Array<string> | undefined, options?: RequestOptions): APIPromise<Result<models.ListInstalmentsResponse, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=commitments-list-commitment-instalments.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commitments-list-commitment-instalments.d.ts","sourceRoot":"","sources":["../../src/funcs/commitments-list-commitment-instalments.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAM3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,EAClC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,uBAAuB,EAC5B,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAOA"}
|