@flexprice/sdk 2.1.40 → 2.1.41
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/analytics-query-meta.md +5 -1
- package/docs/sdk/models/analytics-query-request.md +1 -1
- package/docs/sdk/models/analytics-view-definition-compare.md +17 -0
- package/docs/sdk/models/analytics-view-definition.md +15 -12
- package/docs/sdk/models/cancel-self-billing-checkout-request.md +17 -0
- package/docs/sdk/models/create-view-request.md +1 -1
- package/docs/sdk/models/default-shape.md +17 -0
- package/docs/sdk/models/delete-analytics-view-request.md +17 -0
- package/docs/sdk/models/dir.md +15 -0
- package/docs/sdk/models/display.md +17 -0
- package/docs/sdk/models/family.md +2 -2
- package/docs/sdk/models/get-analytics-view-request.md +17 -0
- package/docs/sdk/models/improvement-direction.md +17 -0
- package/docs/sdk/models/invoice-response.md +1 -0
- package/docs/sdk/models/list-analytics-views-request.md +15 -0
- package/docs/sdk/models/list-views-response.md +15 -0
- package/docs/sdk/models/metric.md +2 -2
- package/docs/sdk/models/op.md +15 -0
- package/docs/sdk/models/poll-self-billing-checkout-request.md +17 -0
- package/docs/sdk/models/report-catalog-entry-grain.md +17 -0
- package/docs/sdk/models/report-catalog-entry-shape.md +17 -0
- package/docs/sdk/models/report-catalog-entry.md +29 -0
- package/docs/sdk/models/report-catalog-response.md +15 -0
- package/docs/sdk/models/report-category.md +17 -0
- package/docs/sdk/models/report-dimension.md +16 -0
- package/docs/sdk/models/report-filter.md +17 -0
- package/docs/sdk/models/report-kind.md +17 -0
- package/docs/sdk/models/report-query-request-compare.md +15 -0
- package/docs/sdk/models/report-query-request-grain.md +15 -0
- package/docs/sdk/models/report-query-request-shape.md +15 -0
- package/docs/sdk/models/report-query-request.md +26 -0
- package/docs/sdk/models/report-sort.md +16 -0
- package/docs/sdk/models/report-value-type.md +17 -0
- package/docs/sdk/models/run-analytics-report-request.md +22 -0
- package/docs/sdk/models/self-billing-checkout-request.md +30 -0
- package/docs/sdk/models/self-billing-checkout-response.md +19 -0
- package/docs/sdk/models/self-billing-invoice.md +22 -0
- package/docs/sdk/models/self-billing-portal-response.md +16 -0
- package/docs/sdk/models/self-billing-status-response.md +16 -0
- package/docs/sdk/models/self-billing-summary-response.md +37 -0
- package/docs/sdk/models/tenant-internal-status.md +17 -0
- package/docs/sdk/models/top-up-wallet-request.md +1 -0
- package/docs/sdk/models/update-analytics-view-request.md +27 -0
- package/docs/sdk/models/view-response.md +9 -6
- package/docs/sdks/analytics/README.md +455 -4
- package/docs/sdks/selfbilling/README.md +517 -0
- package/docs/sdks/tenants/README.md +0 -71
- package/esm/funcs/{tenants-get-tenant-billing-usage.d.ts → analytics-delete-analytics-view.d.ts} +4 -4
- package/esm/funcs/analytics-delete-analytics-view.d.ts.map +1 -0
- package/esm/funcs/analytics-delete-analytics-view.js +91 -0
- package/esm/funcs/analytics-delete-analytics-view.js.map +1 -0
- package/esm/funcs/analytics-get-analytics-view.d.ts +17 -0
- package/esm/funcs/analytics-get-analytics-view.d.ts.map +1 -0
- package/esm/funcs/analytics-get-analytics-view.js +91 -0
- package/esm/funcs/analytics-get-analytics-view.js.map +1 -0
- package/esm/funcs/analytics-list-analytics-reports.d.ts +17 -0
- package/esm/funcs/{tenants-get-tenant-billing-usage.d.ts.map → analytics-list-analytics-reports.d.ts.map} +1 -1
- package/esm/funcs/analytics-list-analytics-reports.js +72 -0
- package/esm/funcs/{tenants-get-tenant-billing-usage.js.map → analytics-list-analytics-reports.js.map} +1 -1
- package/esm/funcs/analytics-list-analytics-views.d.ts +17 -0
- package/esm/funcs/analytics-list-analytics-views.d.ts.map +1 -0
- package/esm/funcs/analytics-list-analytics-views.js +89 -0
- package/esm/funcs/analytics-list-analytics-views.js.map +1 -0
- package/esm/funcs/analytics-run-analytics-report.d.ts +17 -0
- package/esm/funcs/analytics-run-analytics-report.d.ts.map +1 -0
- package/esm/funcs/analytics-run-analytics-report.js +93 -0
- package/esm/funcs/analytics-run-analytics-report.js.map +1 -0
- package/esm/funcs/analytics-update-analytics-view.d.ts +17 -0
- package/esm/funcs/analytics-update-analytics-view.d.ts.map +1 -0
- package/esm/funcs/analytics-update-analytics-view.js +93 -0
- package/esm/funcs/analytics-update-analytics-view.js.map +1 -0
- package/esm/funcs/self-billing-cancel-self-billing-checkout.d.ts +16 -0
- package/esm/funcs/self-billing-cancel-self-billing-checkout.d.ts.map +1 -0
- package/esm/funcs/self-billing-cancel-self-billing-checkout.js +88 -0
- package/esm/funcs/self-billing-cancel-self-billing-checkout.js.map +1 -0
- package/esm/funcs/self-billing-create-self-billing-portal-session.d.ts +17 -0
- package/esm/funcs/self-billing-create-self-billing-portal-session.d.ts.map +1 -0
- package/esm/funcs/{tenants-get-tenant-billing-usage.js → self-billing-create-self-billing-portal-session.js} +8 -8
- package/esm/funcs/self-billing-create-self-billing-portal-session.js.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-status.d.ts +17 -0
- package/esm/funcs/self-billing-get-self-billing-status.d.ts.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-status.js +72 -0
- package/esm/funcs/self-billing-get-self-billing-status.js.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-summary.d.ts +17 -0
- package/esm/funcs/self-billing-get-self-billing-summary.d.ts.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-summary.js +72 -0
- package/esm/funcs/self-billing-get-self-billing-summary.js.map +1 -0
- package/esm/funcs/self-billing-get-tenant-billing-summary.d.ts +17 -0
- package/esm/funcs/self-billing-get-tenant-billing-summary.d.ts.map +1 -0
- package/esm/funcs/self-billing-get-tenant-billing-summary.js +72 -0
- package/esm/funcs/self-billing-get-tenant-billing-summary.js.map +1 -0
- package/esm/funcs/self-billing-poll-self-billing-checkout.d.ts +17 -0
- package/esm/funcs/self-billing-poll-self-billing-checkout.d.ts.map +1 -0
- package/esm/funcs/self-billing-poll-self-billing-checkout.js +91 -0
- package/esm/funcs/self-billing-poll-self-billing-checkout.js.map +1 -0
- package/esm/funcs/self-billing-start-self-billing-checkout.d.ts +17 -0
- package/esm/funcs/self-billing-start-self-billing-checkout.d.ts.map +1 -0
- package/esm/funcs/self-billing-start-self-billing-checkout.js +83 -0
- package/esm/funcs/self-billing-start-self-billing-checkout.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/sdk/analytics.d.ts +42 -0
- package/esm/sdk/analytics.d.ts.map +1 -1
- package/esm/sdk/analytics.js +60 -0
- package/esm/sdk/analytics.js.map +1 -1
- package/esm/sdk/models/analytics-query-meta.d.ts +4 -0
- package/esm/sdk/models/analytics-query-meta.d.ts.map +1 -1
- package/esm/sdk/models/analytics-query-meta.js +6 -0
- package/esm/sdk/models/analytics-query-meta.js.map +1 -1
- package/esm/sdk/models/analytics-view-definition.d.ts +25 -0
- package/esm/sdk/models/analytics-view-definition.d.ts.map +1 -1
- package/esm/sdk/models/analytics-view-definition.js +25 -0
- package/esm/sdk/models/analytics-view-definition.js.map +1 -1
- package/esm/sdk/models/cancel-self-billing-checkout-op.d.ts +15 -0
- package/esm/sdk/models/cancel-self-billing-checkout-op.d.ts.map +1 -0
- package/esm/sdk/models/cancel-self-billing-checkout-op.js +12 -0
- package/esm/sdk/models/cancel-self-billing-checkout-op.js.map +1 -0
- package/esm/sdk/models/delete-analytics-view-op.d.ts +15 -0
- package/esm/sdk/models/delete-analytics-view-op.d.ts.map +1 -0
- package/esm/sdk/models/delete-analytics-view-op.js +12 -0
- package/esm/sdk/models/delete-analytics-view-op.js.map +1 -0
- package/esm/sdk/models/family.d.ts +1 -0
- package/esm/sdk/models/family.d.ts.map +1 -1
- package/esm/sdk/models/family.js +1 -0
- package/esm/sdk/models/family.js.map +1 -1
- package/esm/sdk/models/get-analytics-view-op.d.ts +15 -0
- package/esm/sdk/models/get-analytics-view-op.d.ts.map +1 -0
- package/esm/sdk/models/get-analytics-view-op.js +12 -0
- package/esm/sdk/models/get-analytics-view-op.js.map +1 -0
- package/esm/sdk/models/improvement-direction.d.ts +10 -0
- package/esm/sdk/models/improvement-direction.d.ts.map +1 -0
- package/esm/sdk/models/improvement-direction.js +11 -0
- package/esm/sdk/models/improvement-direction.js.map +1 -0
- package/esm/sdk/models/index.d.ts +25 -1
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +25 -1
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-response.d.ts +4 -0
- package/esm/sdk/models/invoice-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-response.js +2 -0
- package/esm/sdk/models/invoice-response.js.map +1 -1
- package/esm/sdk/models/list-analytics-views-op.d.ts +15 -0
- package/esm/sdk/models/list-analytics-views-op.d.ts.map +1 -0
- package/esm/sdk/models/list-analytics-views-op.js +12 -0
- package/esm/sdk/models/list-analytics-views-op.js.map +1 -0
- package/esm/sdk/models/list-views-response.d.ts +11 -0
- package/esm/sdk/models/list-views-response.d.ts.map +1 -0
- package/esm/sdk/models/list-views-response.js +15 -0
- package/esm/sdk/models/list-views-response.js.map +1 -0
- package/esm/sdk/models/metric.d.ts +12 -0
- package/esm/sdk/models/metric.d.ts.map +1 -1
- package/esm/sdk/models/metric.js +12 -0
- package/esm/sdk/models/metric.js.map +1 -1
- package/esm/sdk/models/poll-self-billing-checkout-op.d.ts +15 -0
- package/esm/sdk/models/poll-self-billing-checkout-op.d.ts.map +1 -0
- package/esm/sdk/models/poll-self-billing-checkout-op.js +12 -0
- package/esm/sdk/models/poll-self-billing-checkout-op.js.map +1 -0
- package/esm/sdk/models/report-catalog-entry.d.ts +54 -0
- package/esm/sdk/models/report-catalog-entry.d.ts.map +1 -0
- package/esm/sdk/models/report-catalog-entry.js +65 -0
- package/esm/sdk/models/report-catalog-entry.js.map +1 -0
- package/esm/sdk/models/report-catalog-response.d.ts +11 -0
- package/esm/sdk/models/report-catalog-response.d.ts.map +1 -0
- package/esm/sdk/models/report-catalog-response.js +15 -0
- package/esm/sdk/models/report-catalog-response.js.map +1 -0
- package/esm/sdk/models/report-category.d.ts +13 -0
- package/esm/sdk/models/report-category.d.ts.map +1 -0
- package/esm/sdk/models/report-category.js +14 -0
- package/esm/sdk/models/report-category.js.map +1 -0
- package/esm/sdk/models/report-dimension.d.ts +11 -0
- package/esm/sdk/models/report-dimension.d.ts.map +1 -0
- package/esm/sdk/models/report-dimension.js +15 -0
- package/esm/sdk/models/report-dimension.js.map +1 -0
- package/esm/sdk/models/report-filter.d.ts +24 -0
- package/esm/sdk/models/report-filter.d.ts.map +1 -0
- package/esm/sdk/models/report-filter.js +20 -0
- package/esm/sdk/models/report-filter.js.map +1 -0
- package/esm/sdk/models/report-kind.d.ts +11 -0
- package/esm/sdk/models/report-kind.d.ts.map +1 -0
- package/esm/sdk/models/report-kind.js +12 -0
- package/esm/sdk/models/report-kind.js.map +1 -0
- package/esm/sdk/models/report-query-request.d.ts +54 -0
- package/esm/sdk/models/report-query-request.d.ts.map +1 -0
- package/esm/sdk/models/report-query-request.js +42 -0
- package/esm/sdk/models/report-query-request.js.map +1 -0
- package/esm/sdk/models/report-sort.d.ts +22 -0
- package/esm/sdk/models/report-sort.d.ts.map +1 -0
- package/esm/sdk/models/report-sort.js +19 -0
- package/esm/sdk/models/report-sort.js.map +1 -0
- package/esm/sdk/models/report-value-type.d.ts +11 -0
- package/esm/sdk/models/report-value-type.d.ts.map +1 -0
- package/esm/sdk/models/report-value-type.js +12 -0
- package/esm/sdk/models/report-value-type.js.map +1 -0
- package/esm/sdk/models/run-analytics-report-op.d.ts +21 -0
- package/esm/sdk/models/run-analytics-report-op.d.ts.map +1 -0
- package/esm/sdk/models/run-analytics-report-op.js +14 -0
- package/esm/sdk/models/run-analytics-report-op.js.map +1 -0
- package/esm/sdk/models/self-billing-checkout-request.d.ts +28 -0
- package/esm/sdk/models/self-billing-checkout-request.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-checkout-request.js +31 -0
- package/esm/sdk/models/self-billing-checkout-request.js.map +1 -0
- package/esm/sdk/models/self-billing-checkout-response.d.ts +16 -0
- package/esm/sdk/models/self-billing-checkout-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-checkout-response.js +26 -0
- package/esm/sdk/models/self-billing-checkout-response.js.map +1 -0
- package/esm/sdk/models/self-billing-invoice.d.ts +19 -0
- package/esm/sdk/models/self-billing-invoice.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-invoice.js +30 -0
- package/esm/sdk/models/self-billing-invoice.js.map +1 -0
- package/esm/sdk/models/self-billing-portal-response.d.ts +11 -0
- package/esm/sdk/models/self-billing-portal-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-portal-response.js +20 -0
- package/esm/sdk/models/self-billing-portal-response.js.map +1 -0
- package/esm/sdk/models/self-billing-status-response.d.ts +12 -0
- package/esm/sdk/models/self-billing-status-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-status-response.js +16 -0
- package/esm/sdk/models/self-billing-status-response.js.map +1 -0
- package/esm/sdk/models/self-billing-summary-response.d.ts +18 -0
- package/esm/sdk/models/self-billing-summary-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-summary-response.js +28 -0
- package/esm/sdk/models/self-billing-summary-response.js.map +1 -0
- package/esm/sdk/models/tenant-internal-status.d.ts +11 -0
- package/esm/sdk/models/tenant-internal-status.d.ts.map +1 -0
- package/esm/sdk/models/tenant-internal-status.js +12 -0
- package/esm/sdk/models/tenant-internal-status.js.map +1 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts +8 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts.map +1 -1
- package/esm/sdk/models/top-up-wallet-request.js +2 -0
- package/esm/sdk/models/top-up-wallet-request.js.map +1 -1
- package/esm/sdk/models/update-analytics-view-op.d.ts +21 -0
- package/esm/sdk/models/update-analytics-view-op.d.ts.map +1 -0
- package/esm/sdk/models/update-analytics-view-op.js +14 -0
- package/esm/sdk/models/update-analytics-view-op.js.map +1 -0
- package/esm/sdk/models/view-response.d.ts +3 -0
- package/esm/sdk/models/view-response.d.ts.map +1 -1
- package/esm/sdk/models/view-response.js +12 -2
- package/esm/sdk/models/view-response.js.map +1 -1
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +5 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/self-billing.d.ts +54 -0
- package/esm/sdk/self-billing.d.ts.map +1 -0
- package/esm/sdk/self-billing.js +78 -0
- package/esm/sdk/self-billing.js.map +1 -0
- package/esm/sdk/tenants.d.ts +0 -7
- package/esm/sdk/tenants.d.ts.map +1 -1
- package/esm/sdk/tenants.js +0 -10
- package/esm/sdk/tenants.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analytics-delete-analytics-view.ts +181 -0
- package/src/funcs/analytics-get-analytics-view.ts +181 -0
- package/src/funcs/{tenants-get-tenant-billing-usage.ts → analytics-list-analytics-reports.ts} +10 -10
- package/src/funcs/analytics-list-analytics-views.ts +184 -0
- package/src/funcs/analytics-run-analytics-report.ts +186 -0
- package/src/funcs/analytics-update-analytics-view.ts +186 -0
- package/src/funcs/self-billing-cancel-self-billing-checkout.ts +173 -0
- package/src/funcs/self-billing-create-self-billing-portal-session.ts +153 -0
- package/src/funcs/self-billing-get-self-billing-status.ts +152 -0
- package/src/funcs/self-billing-get-self-billing-summary.ts +153 -0
- package/src/funcs/self-billing-get-tenant-billing-summary.ts +153 -0
- package/src/funcs/self-billing-poll-self-billing-checkout.ts +182 -0
- package/src/funcs/self-billing-start-self-billing-checkout.ts +172 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/analytics.ts +110 -0
- package/src/sdk/models/analytics-query-meta.ts +10 -0
- package/src/sdk/models/analytics-view-definition.ts +46 -0
- package/src/sdk/models/cancel-self-billing-checkout-op.ts +35 -0
- package/src/sdk/models/delete-analytics-view-op.ts +33 -0
- package/src/sdk/models/family.ts +1 -0
- package/src/sdk/models/get-analytics-view-op.ts +33 -0
- package/src/sdk/models/improvement-direction.ts +19 -0
- package/src/sdk/models/index.ts +25 -1
- package/src/sdk/models/invoice-response.ts +6 -0
- package/src/sdk/models/list-analytics-views-op.ts +33 -0
- package/src/sdk/models/list-views-response.ts +32 -0
- package/src/sdk/models/metric.ts +12 -0
- package/src/sdk/models/poll-self-billing-checkout-op.ts +35 -0
- package/src/sdk/models/report-catalog-entry.ts +128 -0
- package/src/sdk/models/report-catalog-response.ts +35 -0
- package/src/sdk/models/report-category.ts +22 -0
- package/src/sdk/models/report-dimension.ts +33 -0
- package/src/sdk/models/report-filter.ts +42 -0
- package/src/sdk/models/report-kind.ts +18 -0
- package/src/sdk/models/report-query-request.ts +106 -0
- package/src/sdk/models/report-sort.ts +39 -0
- package/src/sdk/models/report-value-type.ts +20 -0
- package/src/sdk/models/run-analytics-report-op.ts +44 -0
- package/src/sdk/models/self-billing-checkout-request.ts +68 -0
- package/src/sdk/models/self-billing-checkout-response.ts +56 -0
- package/src/sdk/models/self-billing-invoice.ts +63 -0
- package/src/sdk/models/self-billing-portal-response.ts +41 -0
- package/src/sdk/models/self-billing-status-response.ts +37 -0
- package/src/sdk/models/self-billing-summary-response.ts +64 -0
- package/src/sdk/models/tenant-internal-status.ts +20 -0
- package/src/sdk/models/top-up-wallet-request.ts +12 -0
- package/src/sdk/models/update-analytics-view-op.ts +44 -0
- package/src/sdk/models/view-response.ts +22 -6
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/self-billing.ts +127 -0
- package/src/sdk/tenants.ts +0 -16
- package/docs/sdk/models/tenant-billing-usage.md +0 -144
- package/esm/sdk/models/tenant-billing-usage.d.ts +0 -13
- package/esm/sdk/models/tenant-billing-usage.d.ts.map +0 -1
- package/esm/sdk/models/tenant-billing-usage.js +0 -17
- package/esm/sdk/models/tenant-billing-usage.js.map +0 -1
- package/src/sdk/models/tenant-billing-usage.ts +0 -41
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
# SelfBilling
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
### Available Operations
|
|
6
|
+
|
|
7
|
+
* [startSelfBillingCheckout](#startselfbillingcheckout) - Start self-billing checkout
|
|
8
|
+
* [pollSelfBillingCheckout](#pollselfbillingcheckout) - Poll self-billing checkout
|
|
9
|
+
* [cancelSelfBillingCheckout](#cancelselfbillingcheckout) - Cancel self-billing checkout
|
|
10
|
+
* [createSelfBillingPortalSession](#createselfbillingportalsession) - Create self-billing portal session
|
|
11
|
+
* [getSelfBillingStatus](#getselfbillingstatus) - Get self-billing status
|
|
12
|
+
* [getSelfBillingSummary](#getselfbillingsummary) - Get self-billing summary
|
|
13
|
+
* [getTenantBillingSummary](#gettenantbillingsummary) - Get tenant billing summary
|
|
14
|
+
|
|
15
|
+
## startSelfBillingCheckout
|
|
16
|
+
|
|
17
|
+
Saves the billing details and opens the checkout that ends the caller tenant's trial.
|
|
18
|
+
|
|
19
|
+
### Example Usage
|
|
20
|
+
|
|
21
|
+
<!-- UsageSnippet language="typescript" operationID="startSelfBillingCheckout" method="post" path="/portal/billing/checkout" -->
|
|
22
|
+
```typescript
|
|
23
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
24
|
+
|
|
25
|
+
const flexprice = new Flexprice({
|
|
26
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
async function run() {
|
|
30
|
+
const result = await flexprice.selfBilling.startSelfBillingCheckout({
|
|
31
|
+
addressCity: "<value>",
|
|
32
|
+
addressCountry: "<value>",
|
|
33
|
+
addressLine1: "856 Hammes Creek",
|
|
34
|
+
addressPostalCode: "<value>",
|
|
35
|
+
email: "Pamela.Rogahn3@gmail.com",
|
|
36
|
+
name: "<value>",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
console.log(result);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
run();
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Standalone function
|
|
46
|
+
|
|
47
|
+
The standalone function version of this method:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
51
|
+
import { selfBillingStartSelfBillingCheckout } from "@flexprice/sdk/funcs/self-billing-start-self-billing-checkout.js";
|
|
52
|
+
|
|
53
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
54
|
+
// You can create one instance of it to use across an application.
|
|
55
|
+
const flexprice = new FlexpriceCore({
|
|
56
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
async function run() {
|
|
60
|
+
const res = await selfBillingStartSelfBillingCheckout(flexprice, {
|
|
61
|
+
addressCity: "<value>",
|
|
62
|
+
addressCountry: "<value>",
|
|
63
|
+
addressLine1: "856 Hammes Creek",
|
|
64
|
+
addressPostalCode: "<value>",
|
|
65
|
+
email: "Pamela.Rogahn3@gmail.com",
|
|
66
|
+
name: "<value>",
|
|
67
|
+
});
|
|
68
|
+
if (res.ok) {
|
|
69
|
+
const { value: result } = res;
|
|
70
|
+
console.log(result);
|
|
71
|
+
} else {
|
|
72
|
+
console.log("selfBillingStartSelfBillingCheckout failed:", res.error);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
run();
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Parameters
|
|
80
|
+
|
|
81
|
+
| Parameter | Type | Required | Description |
|
|
82
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
83
|
+
| `request` | [models.SelfBillingCheckoutRequest](../../sdk/models/self-billing-checkout-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
84
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
85
|
+
| `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. |
|
|
86
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
87
|
+
|
|
88
|
+
### Response
|
|
89
|
+
|
|
90
|
+
**Promise\<[models.SelfBillingCheckoutResponse](../../sdk/models/self-billing-checkout-response.md)\>**
|
|
91
|
+
|
|
92
|
+
### Errors
|
|
93
|
+
|
|
94
|
+
| Error Type | Status Code | Content Type |
|
|
95
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
96
|
+
| models.ErrorsErrorResponse | 400, 404, 409 | application/json |
|
|
97
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
98
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
99
|
+
|
|
100
|
+
## pollSelfBillingCheckout
|
|
101
|
+
|
|
102
|
+
Reports the caller tenant's checkout and activates the tenant once it is paid.
|
|
103
|
+
|
|
104
|
+
### Example Usage
|
|
105
|
+
|
|
106
|
+
<!-- UsageSnippet language="typescript" operationID="pollSelfBillingCheckout" method="get" path="/portal/billing/checkout/{id}" -->
|
|
107
|
+
```typescript
|
|
108
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
109
|
+
|
|
110
|
+
const flexprice = new Flexprice({
|
|
111
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
async function run() {
|
|
115
|
+
const result = await flexprice.selfBilling.pollSelfBillingCheckout("<id>");
|
|
116
|
+
|
|
117
|
+
console.log(result);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
run();
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Standalone function
|
|
124
|
+
|
|
125
|
+
The standalone function version of this method:
|
|
126
|
+
|
|
127
|
+
```typescript
|
|
128
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
129
|
+
import { selfBillingPollSelfBillingCheckout } from "@flexprice/sdk/funcs/self-billing-poll-self-billing-checkout.js";
|
|
130
|
+
|
|
131
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
132
|
+
// You can create one instance of it to use across an application.
|
|
133
|
+
const flexprice = new FlexpriceCore({
|
|
134
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
async function run() {
|
|
138
|
+
const res = await selfBillingPollSelfBillingCheckout(flexprice, "<id>");
|
|
139
|
+
if (res.ok) {
|
|
140
|
+
const { value: result } = res;
|
|
141
|
+
console.log(result);
|
|
142
|
+
} else {
|
|
143
|
+
console.log("selfBillingPollSelfBillingCheckout failed:", res.error);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
run();
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Parameters
|
|
151
|
+
|
|
152
|
+
| Parameter | Type | Required | Description |
|
|
153
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
154
|
+
| `id` | *string* | :heavy_check_mark: | Checkout session ID |
|
|
155
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
156
|
+
| `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. |
|
|
157
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
158
|
+
|
|
159
|
+
### Response
|
|
160
|
+
|
|
161
|
+
**Promise\<[models.SelfBillingCheckoutResponse](../../sdk/models/self-billing-checkout-response.md)\>**
|
|
162
|
+
|
|
163
|
+
### Errors
|
|
164
|
+
|
|
165
|
+
| Error Type | Status Code | Content Type |
|
|
166
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
167
|
+
| models.ErrorsErrorResponse | 404 | application/json |
|
|
168
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
169
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
170
|
+
|
|
171
|
+
## cancelSelfBillingCheckout
|
|
172
|
+
|
|
173
|
+
Cancels the caller tenant's open checkout.
|
|
174
|
+
|
|
175
|
+
### Example Usage
|
|
176
|
+
|
|
177
|
+
<!-- UsageSnippet language="typescript" operationID="cancelSelfBillingCheckout" method="post" path="/portal/billing/checkout/{id}/cancel" -->
|
|
178
|
+
```typescript
|
|
179
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
180
|
+
|
|
181
|
+
const flexprice = new Flexprice({
|
|
182
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
async function run() {
|
|
186
|
+
await flexprice.selfBilling.cancelSelfBillingCheckout("<id>");
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
run();
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Standalone function
|
|
195
|
+
|
|
196
|
+
The standalone function version of this method:
|
|
197
|
+
|
|
198
|
+
```typescript
|
|
199
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
200
|
+
import { selfBillingCancelSelfBillingCheckout } from "@flexprice/sdk/funcs/self-billing-cancel-self-billing-checkout.js";
|
|
201
|
+
|
|
202
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
203
|
+
// You can create one instance of it to use across an application.
|
|
204
|
+
const flexprice = new FlexpriceCore({
|
|
205
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
async function run() {
|
|
209
|
+
const res = await selfBillingCancelSelfBillingCheckout(flexprice, "<id>");
|
|
210
|
+
if (res.ok) {
|
|
211
|
+
const { value: result } = res;
|
|
212
|
+
|
|
213
|
+
} else {
|
|
214
|
+
console.log("selfBillingCancelSelfBillingCheckout failed:", res.error);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
run();
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Parameters
|
|
222
|
+
|
|
223
|
+
| Parameter | Type | Required | Description |
|
|
224
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
225
|
+
| `id` | *string* | :heavy_check_mark: | Checkout session ID |
|
|
226
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
227
|
+
| `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. |
|
|
228
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
229
|
+
|
|
230
|
+
### Response
|
|
231
|
+
|
|
232
|
+
**Promise\<void\>**
|
|
233
|
+
|
|
234
|
+
### Errors
|
|
235
|
+
|
|
236
|
+
| Error Type | Status Code | Content Type |
|
|
237
|
+
| --------------- | --------------- | --------------- |
|
|
238
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
239
|
+
|
|
240
|
+
## createSelfBillingPortalSession
|
|
241
|
+
|
|
242
|
+
Opens a short-lived customer portal session for the caller tenant.
|
|
243
|
+
|
|
244
|
+
### Example Usage
|
|
245
|
+
|
|
246
|
+
<!-- UsageSnippet language="typescript" operationID="createSelfBillingPortalSession" method="post" path="/portal/billing/portal-session" -->
|
|
247
|
+
```typescript
|
|
248
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
249
|
+
|
|
250
|
+
const flexprice = new Flexprice({
|
|
251
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
async function run() {
|
|
255
|
+
const result = await flexprice.selfBilling.createSelfBillingPortalSession();
|
|
256
|
+
|
|
257
|
+
console.log(result);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
run();
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Standalone function
|
|
264
|
+
|
|
265
|
+
The standalone function version of this method:
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
269
|
+
import { selfBillingCreateSelfBillingPortalSession } from "@flexprice/sdk/funcs/self-billing-create-self-billing-portal-session.js";
|
|
270
|
+
|
|
271
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
272
|
+
// You can create one instance of it to use across an application.
|
|
273
|
+
const flexprice = new FlexpriceCore({
|
|
274
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
async function run() {
|
|
278
|
+
const res = await selfBillingCreateSelfBillingPortalSession(flexprice);
|
|
279
|
+
if (res.ok) {
|
|
280
|
+
const { value: result } = res;
|
|
281
|
+
console.log(result);
|
|
282
|
+
} else {
|
|
283
|
+
console.log("selfBillingCreateSelfBillingPortalSession failed:", res.error);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
run();
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Parameters
|
|
291
|
+
|
|
292
|
+
| Parameter | Type | Required | Description |
|
|
293
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
294
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
295
|
+
| `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. |
|
|
296
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
297
|
+
|
|
298
|
+
### Response
|
|
299
|
+
|
|
300
|
+
**Promise\<[models.SelfBillingPortalResponse](../../sdk/models/self-billing-portal-response.md)\>**
|
|
301
|
+
|
|
302
|
+
### Errors
|
|
303
|
+
|
|
304
|
+
| Error Type | Status Code | Content Type |
|
|
305
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
306
|
+
| models.ErrorsErrorResponse | 404 | application/json |
|
|
307
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
308
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
309
|
+
|
|
310
|
+
## getSelfBillingStatus
|
|
311
|
+
|
|
312
|
+
Reports whether self-billing is enabled and the caller tenant's billing status.
|
|
313
|
+
|
|
314
|
+
### Example Usage
|
|
315
|
+
|
|
316
|
+
<!-- UsageSnippet language="typescript" operationID="getSelfBillingStatus" method="get" path="/portal/billing/status" -->
|
|
317
|
+
```typescript
|
|
318
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
319
|
+
|
|
320
|
+
const flexprice = new Flexprice({
|
|
321
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
async function run() {
|
|
325
|
+
const result = await flexprice.selfBilling.getSelfBillingStatus();
|
|
326
|
+
|
|
327
|
+
console.log(result);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
run();
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### Standalone function
|
|
334
|
+
|
|
335
|
+
The standalone function version of this method:
|
|
336
|
+
|
|
337
|
+
```typescript
|
|
338
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
339
|
+
import { selfBillingGetSelfBillingStatus } from "@flexprice/sdk/funcs/self-billing-get-self-billing-status.js";
|
|
340
|
+
|
|
341
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
342
|
+
// You can create one instance of it to use across an application.
|
|
343
|
+
const flexprice = new FlexpriceCore({
|
|
344
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
async function run() {
|
|
348
|
+
const res = await selfBillingGetSelfBillingStatus(flexprice);
|
|
349
|
+
if (res.ok) {
|
|
350
|
+
const { value: result } = res;
|
|
351
|
+
console.log(result);
|
|
352
|
+
} else {
|
|
353
|
+
console.log("selfBillingGetSelfBillingStatus failed:", res.error);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
run();
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Parameters
|
|
361
|
+
|
|
362
|
+
| Parameter | Type | Required | Description |
|
|
363
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
364
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
365
|
+
| `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. |
|
|
366
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
367
|
+
|
|
368
|
+
### Response
|
|
369
|
+
|
|
370
|
+
**Promise\<[models.SelfBillingStatusResponse](../../sdk/models/self-billing-status-response.md)\>**
|
|
371
|
+
|
|
372
|
+
### Errors
|
|
373
|
+
|
|
374
|
+
| Error Type | Status Code | Content Type |
|
|
375
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
376
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
377
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
378
|
+
|
|
379
|
+
## getSelfBillingSummary
|
|
380
|
+
|
|
381
|
+
Returns the caller tenant's billing status, subscription, recent invoices and usage.
|
|
382
|
+
|
|
383
|
+
### Example Usage
|
|
384
|
+
|
|
385
|
+
<!-- UsageSnippet language="typescript" operationID="getSelfBillingSummary" method="get" path="/portal/billing/summary" -->
|
|
386
|
+
```typescript
|
|
387
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
388
|
+
|
|
389
|
+
const flexprice = new Flexprice({
|
|
390
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
391
|
+
});
|
|
392
|
+
|
|
393
|
+
async function run() {
|
|
394
|
+
const result = await flexprice.selfBilling.getSelfBillingSummary();
|
|
395
|
+
|
|
396
|
+
console.log(result);
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
run();
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Standalone function
|
|
403
|
+
|
|
404
|
+
The standalone function version of this method:
|
|
405
|
+
|
|
406
|
+
```typescript
|
|
407
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
408
|
+
import { selfBillingGetSelfBillingSummary } from "@flexprice/sdk/funcs/self-billing-get-self-billing-summary.js";
|
|
409
|
+
|
|
410
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
411
|
+
// You can create one instance of it to use across an application.
|
|
412
|
+
const flexprice = new FlexpriceCore({
|
|
413
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
async function run() {
|
|
417
|
+
const res = await selfBillingGetSelfBillingSummary(flexprice);
|
|
418
|
+
if (res.ok) {
|
|
419
|
+
const { value: result } = res;
|
|
420
|
+
console.log(result);
|
|
421
|
+
} else {
|
|
422
|
+
console.log("selfBillingGetSelfBillingSummary failed:", res.error);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
run();
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### Parameters
|
|
430
|
+
|
|
431
|
+
| Parameter | Type | Required | Description |
|
|
432
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
433
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
434
|
+
| `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. |
|
|
435
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
436
|
+
|
|
437
|
+
### Response
|
|
438
|
+
|
|
439
|
+
**Promise\<[models.SelfBillingSummaryResponse](../../sdk/models/self-billing-summary-response.md)\>**
|
|
440
|
+
|
|
441
|
+
### Errors
|
|
442
|
+
|
|
443
|
+
| Error Type | Status Code | Content Type |
|
|
444
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
445
|
+
| models.ErrorsErrorResponse | 404 | application/json |
|
|
446
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
447
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
448
|
+
|
|
449
|
+
## getTenantBillingSummary
|
|
450
|
+
|
|
451
|
+
Returns the caller tenant's billing summary; same as /portal/billing/summary.
|
|
452
|
+
|
|
453
|
+
### Example Usage
|
|
454
|
+
|
|
455
|
+
<!-- UsageSnippet language="typescript" operationID="getTenantBillingSummary" method="get" path="/tenants/billing" -->
|
|
456
|
+
```typescript
|
|
457
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
458
|
+
|
|
459
|
+
const flexprice = new Flexprice({
|
|
460
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
async function run() {
|
|
464
|
+
const result = await flexprice.selfBilling.getTenantBillingSummary();
|
|
465
|
+
|
|
466
|
+
console.log(result);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
run();
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
### Standalone function
|
|
473
|
+
|
|
474
|
+
The standalone function version of this method:
|
|
475
|
+
|
|
476
|
+
```typescript
|
|
477
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
478
|
+
import { selfBillingGetTenantBillingSummary } from "@flexprice/sdk/funcs/self-billing-get-tenant-billing-summary.js";
|
|
479
|
+
|
|
480
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
481
|
+
// You can create one instance of it to use across an application.
|
|
482
|
+
const flexprice = new FlexpriceCore({
|
|
483
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
async function run() {
|
|
487
|
+
const res = await selfBillingGetTenantBillingSummary(flexprice);
|
|
488
|
+
if (res.ok) {
|
|
489
|
+
const { value: result } = res;
|
|
490
|
+
console.log(result);
|
|
491
|
+
} else {
|
|
492
|
+
console.log("selfBillingGetTenantBillingSummary failed:", res.error);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
run();
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
### Parameters
|
|
500
|
+
|
|
501
|
+
| Parameter | Type | Required | Description |
|
|
502
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
503
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
504
|
+
| `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. |
|
|
505
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
506
|
+
|
|
507
|
+
### Response
|
|
508
|
+
|
|
509
|
+
**Promise\<[models.SelfBillingSummaryResponse](../../sdk/models/self-billing-summary-response.md)\>**
|
|
510
|
+
|
|
511
|
+
### Errors
|
|
512
|
+
|
|
513
|
+
| Error Type | Status Code | Content Type |
|
|
514
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
515
|
+
| models.ErrorsErrorResponse | 404 | application/json |
|
|
516
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
517
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
@@ -4,80 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
### Available Operations
|
|
6
6
|
|
|
7
|
-
* [getTenantBillingUsage](#gettenantbillingusage) - Get billing usage for the current tenant
|
|
8
7
|
* [updateTenant](#updatetenant) - Update a tenant
|
|
9
8
|
* [getTenantById](#gettenantbyid) - Get tenant by ID
|
|
10
9
|
|
|
11
|
-
## getTenantBillingUsage
|
|
12
|
-
|
|
13
|
-
Use when showing the current tenant's billing usage (e.g. admin billing page or usage caps). Returns subscription and usage for the tenant.
|
|
14
|
-
|
|
15
|
-
### Example Usage
|
|
16
|
-
|
|
17
|
-
<!-- UsageSnippet language="typescript" operationID="getTenantBillingUsage" method="get" path="/tenant/billing" -->
|
|
18
|
-
```typescript
|
|
19
|
-
import { Flexprice } from "@flexprice/sdk";
|
|
20
|
-
|
|
21
|
-
const flexprice = new Flexprice({
|
|
22
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
async function run() {
|
|
26
|
-
const result = await flexprice.tenants.getTenantBillingUsage();
|
|
27
|
-
|
|
28
|
-
console.log(result);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
run();
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
### Standalone function
|
|
35
|
-
|
|
36
|
-
The standalone function version of this method:
|
|
37
|
-
|
|
38
|
-
```typescript
|
|
39
|
-
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
40
|
-
import { tenantsGetTenantBillingUsage } from "@flexprice/sdk/funcs/tenants-get-tenant-billing-usage.js";
|
|
41
|
-
|
|
42
|
-
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
43
|
-
// You can create one instance of it to use across an application.
|
|
44
|
-
const flexprice = new FlexpriceCore({
|
|
45
|
-
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
async function run() {
|
|
49
|
-
const res = await tenantsGetTenantBillingUsage(flexprice);
|
|
50
|
-
if (res.ok) {
|
|
51
|
-
const { value: result } = res;
|
|
52
|
-
console.log(result);
|
|
53
|
-
} else {
|
|
54
|
-
console.log("tenantsGetTenantBillingUsage failed:", res.error);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
run();
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Parameters
|
|
62
|
-
|
|
63
|
-
| Parameter | Type | Required | Description |
|
|
64
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
65
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
66
|
-
| `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. |
|
|
67
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
68
|
-
|
|
69
|
-
### Response
|
|
70
|
-
|
|
71
|
-
**Promise\<[models.TenantBillingUsage](../../sdk/models/tenant-billing-usage.md)\>**
|
|
72
|
-
|
|
73
|
-
### Errors
|
|
74
|
-
|
|
75
|
-
| Error Type | Status Code | Content Type |
|
|
76
|
-
| -------------------------- | -------------------------- | -------------------------- |
|
|
77
|
-
| models.ErrorsErrorResponse | 400, 404 | application/json |
|
|
78
|
-
| models.ErrorsErrorResponse | 500 | application/json |
|
|
79
|
-
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
80
|
-
|
|
81
10
|
## updateTenant
|
|
82
11
|
|
|
83
12
|
Use when changing tenant details (e.g. name or billing info). Request body contains the fields to update.
|
package/esm/funcs/{tenants-get-tenant-billing-usage.d.ts → analytics-delete-analytics-view.d.ts}
RENAMED
|
@@ -8,10 +8,10 @@ import { SDKValidationError } from "../sdk/models/sdk-validation-error.js";
|
|
|
8
8
|
import { APIPromise } from "../types/async.js";
|
|
9
9
|
import { Result } from "../types/fp.js";
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Delete an analytics view
|
|
12
12
|
*
|
|
13
13
|
* @remarks
|
|
14
|
-
*
|
|
14
|
+
* Deletes a saved view by ID.
|
|
15
15
|
*/
|
|
16
|
-
export declare function
|
|
17
|
-
//# sourceMappingURL=
|
|
16
|
+
export declare function analyticsDeleteAnalyticsView(client: FlexpriceCore, id: string, options?: RequestOptions): APIPromise<Result<void, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=analytics-delete-analytics-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-delete-analytics-view.d.ts","sourceRoot":"","sources":["../../src/funcs/analytics-delete-analytics-view.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,4BAA4B,CAC1C,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,IAAI,EACF,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
|