@flexprice/sdk 2.1.38 → 2.1.40
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-view-definition.md +1 -0
- package/docs/sdk/models/create-customer-portal-session-request.md +17 -0
- package/docs/sdk/models/family.md +17 -0
- package/docs/sdk/models/invoice-billing-reason.md +2 -2
- package/docs/sdk/models/metric.md +2 -2
- package/docs/sdk/models/modify-subscription-params.md +6 -5
- package/docs/sdk/models/modify-subscription-type.md +2 -2
- package/docs/sdk/models/pause-subscription-request-request.md +19 -0
- package/docs/sdk/models/pause-subscription-request.md +19 -0
- package/docs/sdk/models/pause-subscription-response.md +127 -0
- package/docs/sdk/models/portal-session-response.md +17 -0
- package/docs/sdk/models/resume-subscription-request-request.md +19 -0
- package/docs/sdk/models/resume-subscription-request.md +18 -0
- package/docs/sdk/models/resume-subscription-response.md +127 -0
- package/docs/sdk/models/shape.md +2 -2
- package/docs/sdk/models/subscription-pause-response.md +35 -0
- package/docs/sdks/analytics/README.md +6 -6
- package/docs/sdks/customers/README.md +72 -0
- package/docs/sdks/subscriptions/README.md +146 -0
- package/esm/funcs/customers-create-customer-portal-session.d.ts +17 -0
- package/esm/funcs/customers-create-customer-portal-session.d.ts.map +1 -0
- package/esm/funcs/customers-create-customer-portal-session.js +91 -0
- package/esm/funcs/customers-create-customer-portal-session.js.map +1 -0
- package/esm/funcs/subscriptions-pause-subscription.d.ts +17 -0
- package/esm/funcs/subscriptions-pause-subscription.d.ts.map +1 -0
- package/esm/funcs/subscriptions-pause-subscription.js +93 -0
- package/esm/funcs/subscriptions-pause-subscription.js.map +1 -0
- package/esm/funcs/subscriptions-resume-subscription.d.ts +17 -0
- package/esm/funcs/subscriptions-resume-subscription.d.ts.map +1 -0
- package/esm/funcs/subscriptions-resume-subscription.js +93 -0
- package/esm/funcs/subscriptions-resume-subscription.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/sdk/customers.d.ts +7 -0
- package/esm/sdk/customers.d.ts.map +1 -1
- package/esm/sdk/customers.js +10 -0
- package/esm/sdk/customers.js.map +1 -1
- package/esm/sdk/models/analytics-view-definition.d.ts +3 -0
- package/esm/sdk/models/analytics-view-definition.d.ts.map +1 -1
- package/esm/sdk/models/analytics-view-definition.js +3 -0
- package/esm/sdk/models/analytics-view-definition.js.map +1 -1
- package/esm/sdk/models/create-customer-portal-session-op.d.ts +15 -0
- package/esm/sdk/models/create-customer-portal-session-op.d.ts.map +1 -0
- package/esm/sdk/models/create-customer-portal-session-op.js +17 -0
- package/esm/sdk/models/create-customer-portal-session-op.js.map +1 -0
- package/esm/sdk/models/family.d.ts +12 -0
- package/esm/sdk/models/family.d.ts.map +1 -0
- package/esm/sdk/models/family.js +15 -0
- package/esm/sdk/models/family.js.map +1 -0
- package/esm/sdk/models/index.d.ts +10 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +10 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-billing-reason.d.ts +2 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
- package/esm/sdk/models/invoice-billing-reason.js +2 -0
- package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
- package/esm/sdk/models/metric.d.ts +1 -0
- package/esm/sdk/models/metric.d.ts.map +1 -1
- package/esm/sdk/models/metric.js +1 -0
- package/esm/sdk/models/metric.js.map +1 -1
- package/esm/sdk/models/modify-subscription-params.d.ts +5 -0
- package/esm/sdk/models/modify-subscription-params.d.ts.map +1 -1
- package/esm/sdk/models/modify-subscription-params.js +2 -0
- package/esm/sdk/models/modify-subscription-params.js.map +1 -1
- package/esm/sdk/models/modify-subscription-type.d.ts +1 -0
- package/esm/sdk/models/modify-subscription-type.d.ts.map +1 -1
- package/esm/sdk/models/modify-subscription-type.js +1 -0
- package/esm/sdk/models/modify-subscription-type.js.map +1 -1
- package/esm/sdk/models/pause-subscription-op.d.ts +21 -0
- package/esm/sdk/models/pause-subscription-op.d.ts.map +1 -0
- package/esm/sdk/models/pause-subscription-op.js +14 -0
- package/esm/sdk/models/pause-subscription-op.js.map +1 -0
- package/esm/sdk/models/pause-subscription-request.d.ts +37 -0
- package/esm/sdk/models/pause-subscription-request.d.ts.map +1 -0
- package/esm/sdk/models/pause-subscription-request.js +20 -0
- package/esm/sdk/models/pause-subscription-request.js.map +1 -0
- package/esm/sdk/models/pause-subscription-response.d.ts +19 -0
- package/esm/sdk/models/pause-subscription-response.d.ts.map +1 -0
- package/esm/sdk/models/pause-subscription-response.js +17 -0
- package/esm/sdk/models/pause-subscription-response.js.map +1 -0
- package/esm/sdk/models/portal-session-response.d.ts +12 -0
- package/esm/sdk/models/portal-session-response.d.ts.map +1 -0
- package/esm/sdk/models/portal-session-response.js +21 -0
- package/esm/sdk/models/portal-session-response.js.map +1 -0
- package/esm/sdk/models/resume-subscription-op.d.ts +21 -0
- package/esm/sdk/models/resume-subscription-op.d.ts.map +1 -0
- package/esm/sdk/models/resume-subscription-op.js +14 -0
- package/esm/sdk/models/resume-subscription-op.js.map +1 -0
- package/esm/sdk/models/resume-subscription-request.d.ts +28 -0
- package/esm/sdk/models/resume-subscription-request.d.ts.map +1 -0
- package/esm/sdk/models/resume-subscription-request.js +19 -0
- package/esm/sdk/models/resume-subscription-request.js.map +1 -0
- package/esm/sdk/models/resume-subscription-response.d.ts +19 -0
- package/esm/sdk/models/resume-subscription-response.d.ts.map +1 -0
- package/esm/sdk/models/resume-subscription-response.js +17 -0
- package/esm/sdk/models/resume-subscription-response.js.map +1 -0
- package/esm/sdk/models/shape.d.ts +1 -0
- package/esm/sdk/models/shape.d.ts.map +1 -1
- package/esm/sdk/models/shape.js +1 -0
- package/esm/sdk/models/shape.js.map +1 -1
- package/esm/sdk/models/subscription-pause-response.d.ts +64 -0
- package/esm/sdk/models/subscription-pause-response.d.ts.map +1 -0
- package/esm/sdk/models/subscription-pause-response.js +55 -0
- package/esm/sdk/models/subscription-pause-response.js.map +1 -0
- package/esm/sdk/subscriptions.d.ts +14 -0
- package/esm/sdk/subscriptions.d.ts.map +1 -1
- package/esm/sdk/subscriptions.js +20 -0
- package/esm/sdk/subscriptions.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/customers-create-customer-portal-session.ts +182 -0
- package/src/funcs/subscriptions-pause-subscription.ts +187 -0
- package/src/funcs/subscriptions-resume-subscription.ts +187 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/customers.ts +18 -0
- package/src/sdk/models/analytics-view-definition.ts +9 -0
- package/src/sdk/models/create-customer-portal-session-op.ts +43 -0
- package/src/sdk/models/family.ts +20 -0
- package/src/sdk/models/index.ts +10 -0
- package/src/sdk/models/invoice-billing-reason.ts +2 -0
- package/src/sdk/models/metric.ts +1 -0
- package/src/sdk/models/modify-subscription-params.ts +7 -0
- package/src/sdk/models/modify-subscription-type.ts +1 -0
- package/src/sdk/models/pause-subscription-op.ts +46 -0
- package/src/sdk/models/pause-subscription-request.ts +64 -0
- package/src/sdk/models/pause-subscription-response.ts +47 -0
- package/src/sdk/models/portal-session-response.ts +43 -0
- package/src/sdk/models/resume-subscription-op.ts +46 -0
- package/src/sdk/models/resume-subscription-request.ts +54 -0
- package/src/sdk/models/resume-subscription-response.ts +47 -0
- package/src/sdk/models/shape.ts +1 -0
- package/src/sdk/models/subscription-pause-response.ts +123 -0
- package/src/sdk/subscriptions.ts +40 -0
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* [getCustomerByExternalId](#getcustomerbyexternalid) - Get customer by external ID
|
|
10
10
|
* [getCustomerEntitlementsByExternalID](#getcustomerentitlementsbyexternalid) - Get customer entitlements by external ID
|
|
11
11
|
* [getSubscriptionsForCustomer](#getsubscriptionsforcustomer) - Get subscriptions for customer by external ID
|
|
12
|
+
* [createCustomerPortalSession](#createcustomerportalsession) - Create customer portal session
|
|
12
13
|
* [queryCustomer](#querycustomer) - Query customers
|
|
13
14
|
* [getCustomerUsageSummary](#getcustomerusagesummary) - Get customer usage summary
|
|
14
15
|
* [getCustomer](#getcustomer) - Get customer
|
|
@@ -381,6 +382,77 @@ run();
|
|
|
381
382
|
| models.ErrorsErrorResponse | 500 | application/json |
|
|
382
383
|
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
383
384
|
|
|
385
|
+
## createCustomerPortalSession
|
|
386
|
+
|
|
387
|
+
Use when sending a customer to their self-serve billing portal (invoices, usage, payment methods). Returns a short-lived URL and token scoped to that customer.
|
|
388
|
+
|
|
389
|
+
### Example Usage
|
|
390
|
+
|
|
391
|
+
<!-- UsageSnippet language="typescript" operationID="createCustomerPortalSession" method="get" path="/customers/portal/{external_id}" -->
|
|
392
|
+
```typescript
|
|
393
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
394
|
+
|
|
395
|
+
const flexprice = new Flexprice({
|
|
396
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
async function run() {
|
|
400
|
+
const result = await flexprice.customers.createCustomerPortalSession("<id>");
|
|
401
|
+
|
|
402
|
+
console.log(result);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
run();
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Standalone function
|
|
409
|
+
|
|
410
|
+
The standalone function version of this method:
|
|
411
|
+
|
|
412
|
+
```typescript
|
|
413
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
414
|
+
import { customersCreateCustomerPortalSession } from "@flexprice/sdk/funcs/customers-create-customer-portal-session.js";
|
|
415
|
+
|
|
416
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
417
|
+
// You can create one instance of it to use across an application.
|
|
418
|
+
const flexprice = new FlexpriceCore({
|
|
419
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
async function run() {
|
|
423
|
+
const res = await customersCreateCustomerPortalSession(flexprice, "<id>");
|
|
424
|
+
if (res.ok) {
|
|
425
|
+
const { value: result } = res;
|
|
426
|
+
console.log(result);
|
|
427
|
+
} else {
|
|
428
|
+
console.log("customersCreateCustomerPortalSession failed:", res.error);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
run();
|
|
433
|
+
```
|
|
434
|
+
|
|
435
|
+
### Parameters
|
|
436
|
+
|
|
437
|
+
| Parameter | Type | Required | Description |
|
|
438
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
439
|
+
| `externalId` | *string* | :heavy_check_mark: | Customer external ID |
|
|
440
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
441
|
+
| `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. |
|
|
442
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
443
|
+
|
|
444
|
+
### Response
|
|
445
|
+
|
|
446
|
+
**Promise\<[models.PortalSessionResponse](../../sdk/models/portal-session-response.md)\>**
|
|
447
|
+
|
|
448
|
+
### Errors
|
|
449
|
+
|
|
450
|
+
| Error Type | Status Code | Content Type |
|
|
451
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
452
|
+
| models.ErrorsErrorResponse | 400, 404 | application/json |
|
|
453
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
454
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
455
|
+
|
|
384
456
|
## queryCustomer
|
|
385
457
|
|
|
386
458
|
Use when listing or searching customers (e.g. admin CRM or reporting). Returns a paginated list; supports filtering and sorting.
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
* [createSubscriptionLineItem](#createsubscriptionlineitem) - Create subscription line item
|
|
30
30
|
* [executeSubscriptionModify](#executesubscriptionmodify) - Execute subscription modification
|
|
31
31
|
* [previewSubscriptionModify](#previewsubscriptionmodify) - Preview subscription modification
|
|
32
|
+
* [pauseSubscription](#pausesubscription) - Pause subscription
|
|
33
|
+
* [resumeSubscription](#resumesubscription) - Resume subscription
|
|
32
34
|
* [listSubscriptionSchedules](#listsubscriptionschedules) - List subscription schedules
|
|
33
35
|
* [getSubscriptionV2](#getsubscriptionv2) - Get subscription (V2)
|
|
34
36
|
|
|
@@ -1911,6 +1913,150 @@ run();
|
|
|
1911
1913
|
| models.ErrorsErrorResponse | 500 | application/json |
|
|
1912
1914
|
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
1913
1915
|
|
|
1916
|
+
## pauseSubscription
|
|
1917
|
+
|
|
1918
|
+
Use when a customer stops temporarily. Pauses an active subscription now: usage and arrear fixed charges up to the pause are billed on a closing invoice, and every paused period after it gets a $0 skipped invoice.
|
|
1919
|
+
|
|
1920
|
+
### Example Usage
|
|
1921
|
+
|
|
1922
|
+
<!-- UsageSnippet language="typescript" operationID="pauseSubscription" method="post" path="/subscriptions/{id}/pause" -->
|
|
1923
|
+
```typescript
|
|
1924
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
1925
|
+
|
|
1926
|
+
const flexprice = new Flexprice({
|
|
1927
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
1928
|
+
});
|
|
1929
|
+
|
|
1930
|
+
async function run() {
|
|
1931
|
+
const result = await flexprice.subscriptions.pauseSubscription("<id>", {});
|
|
1932
|
+
|
|
1933
|
+
console.log(result);
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
run();
|
|
1937
|
+
```
|
|
1938
|
+
|
|
1939
|
+
### Standalone function
|
|
1940
|
+
|
|
1941
|
+
The standalone function version of this method:
|
|
1942
|
+
|
|
1943
|
+
```typescript
|
|
1944
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
1945
|
+
import { subscriptionsPauseSubscription } from "@flexprice/sdk/funcs/subscriptions-pause-subscription.js";
|
|
1946
|
+
|
|
1947
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
1948
|
+
// You can create one instance of it to use across an application.
|
|
1949
|
+
const flexprice = new FlexpriceCore({
|
|
1950
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
1951
|
+
});
|
|
1952
|
+
|
|
1953
|
+
async function run() {
|
|
1954
|
+
const res = await subscriptionsPauseSubscription(flexprice, "<id>", {});
|
|
1955
|
+
if (res.ok) {
|
|
1956
|
+
const { value: result } = res;
|
|
1957
|
+
console.log(result);
|
|
1958
|
+
} else {
|
|
1959
|
+
console.log("subscriptionsPauseSubscription failed:", res.error);
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
run();
|
|
1964
|
+
```
|
|
1965
|
+
|
|
1966
|
+
### Parameters
|
|
1967
|
+
|
|
1968
|
+
| Parameter | Type | Required | Description |
|
|
1969
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1970
|
+
| `id` | *string* | :heavy_check_mark: | Subscription ID |
|
|
1971
|
+
| `body` | [models.PauseSubscriptionRequest](../../sdk/models/pause-subscription-request.md) | :heavy_check_mark: | Pause subscription request |
|
|
1972
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1973
|
+
| `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. |
|
|
1974
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1975
|
+
|
|
1976
|
+
### Response
|
|
1977
|
+
|
|
1978
|
+
**Promise\<[models.PauseSubscriptionResponse](../../sdk/models/pause-subscription-response.md)\>**
|
|
1979
|
+
|
|
1980
|
+
### Errors
|
|
1981
|
+
|
|
1982
|
+
| Error Type | Status Code | Content Type |
|
|
1983
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
1984
|
+
| models.ErrorsErrorResponse | 400, 404 | application/json |
|
|
1985
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
1986
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
1987
|
+
|
|
1988
|
+
## resumeSubscription
|
|
1989
|
+
|
|
1990
|
+
Use when a paused customer comes back. Resumes a paused subscription now on its existing billing anchor: the first period runs from the resume to the next billing date and its advance charges are invoiced at once.
|
|
1991
|
+
|
|
1992
|
+
### Example Usage
|
|
1993
|
+
|
|
1994
|
+
<!-- UsageSnippet language="typescript" operationID="resumeSubscription" method="post" path="/subscriptions/{id}/resume" -->
|
|
1995
|
+
```typescript
|
|
1996
|
+
import { Flexprice } from "@flexprice/sdk";
|
|
1997
|
+
|
|
1998
|
+
const flexprice = new Flexprice({
|
|
1999
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
2000
|
+
});
|
|
2001
|
+
|
|
2002
|
+
async function run() {
|
|
2003
|
+
const result = await flexprice.subscriptions.resumeSubscription("<id>", {});
|
|
2004
|
+
|
|
2005
|
+
console.log(result);
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
run();
|
|
2009
|
+
```
|
|
2010
|
+
|
|
2011
|
+
### Standalone function
|
|
2012
|
+
|
|
2013
|
+
The standalone function version of this method:
|
|
2014
|
+
|
|
2015
|
+
```typescript
|
|
2016
|
+
import { FlexpriceCore } from "@flexprice/sdk/core.js";
|
|
2017
|
+
import { subscriptionsResumeSubscription } from "@flexprice/sdk/funcs/subscriptions-resume-subscription.js";
|
|
2018
|
+
|
|
2019
|
+
// Use `FlexpriceCore` for best tree-shaking performance.
|
|
2020
|
+
// You can create one instance of it to use across an application.
|
|
2021
|
+
const flexprice = new FlexpriceCore({
|
|
2022
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
2023
|
+
});
|
|
2024
|
+
|
|
2025
|
+
async function run() {
|
|
2026
|
+
const res = await subscriptionsResumeSubscription(flexprice, "<id>", {});
|
|
2027
|
+
if (res.ok) {
|
|
2028
|
+
const { value: result } = res;
|
|
2029
|
+
console.log(result);
|
|
2030
|
+
} else {
|
|
2031
|
+
console.log("subscriptionsResumeSubscription failed:", res.error);
|
|
2032
|
+
}
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
run();
|
|
2036
|
+
```
|
|
2037
|
+
|
|
2038
|
+
### Parameters
|
|
2039
|
+
|
|
2040
|
+
| Parameter | Type | Required | Description |
|
|
2041
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2042
|
+
| `id` | *string* | :heavy_check_mark: | Subscription ID |
|
|
2043
|
+
| `body` | [models.ResumeSubscriptionRequest](../../sdk/models/resume-subscription-request.md) | :heavy_check_mark: | Resume subscription request |
|
|
2044
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
2045
|
+
| `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. |
|
|
2046
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
2047
|
+
|
|
2048
|
+
### Response
|
|
2049
|
+
|
|
2050
|
+
**Promise\<[models.ResumeSubscriptionResponse](../../sdk/models/resume-subscription-response.md)\>**
|
|
2051
|
+
|
|
2052
|
+
### Errors
|
|
2053
|
+
|
|
2054
|
+
| Error Type | Status Code | Content Type |
|
|
2055
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
2056
|
+
| models.ErrorsErrorResponse | 400, 404 | application/json |
|
|
2057
|
+
| models.ErrorsErrorResponse | 500 | application/json |
|
|
2058
|
+
| models.SDKError | 4XX, 5XX | \*/\* |
|
|
2059
|
+
|
|
1914
2060
|
## listSubscriptionSchedules
|
|
1915
2061
|
|
|
1916
2062
|
Use when listing scheduled changes for a subscription (e.g. upcoming plan change or renewal). Returns all schedules for that subscription.
|
|
@@ -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
|
+
* Create customer portal session
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Use when sending a customer to their self-serve billing portal (invoices, usage, payment methods). Returns a short-lived URL and token scoped to that customer.
|
|
15
|
+
*/
|
|
16
|
+
export declare function customersCreateCustomerPortalSession(client: FlexpriceCore, externalId: string, options?: RequestOptions): APIPromise<Result<models.PortalSessionResponse, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=customers-create-customer-portal-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customers-create-customer-portal-session.d.ts","sourceRoot":"","sources":["../../src/funcs/customers-create-customer-portal-session.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,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,qBAAqB,EAC1B,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
|
+
* Create customer portal session
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Use when sending a customer to their self-serve billing portal (invoices, usage, payment methods). Returns a short-lived URL and token scoped to that customer.
|
|
19
|
+
*/
|
|
20
|
+
export function customersCreateCustomerPortalSession(client, externalId, options) {
|
|
21
|
+
return new APIPromise($do(client, externalId, options));
|
|
22
|
+
}
|
|
23
|
+
async function $do(client, externalId, options) {
|
|
24
|
+
const input = {
|
|
25
|
+
externalId: externalId,
|
|
26
|
+
};
|
|
27
|
+
const parsed = safeParse(input, (value) => z.parse(models.CreateCustomerPortalSessionRequest$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
|
+
external_id: encodeSimple("external_id", payload.external_id, {
|
|
35
|
+
explode: false,
|
|
36
|
+
charEncoding: "percent",
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
const path = pathToFunc("/customers/portal/{external_id}")(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: "createCustomerPortalSession",
|
|
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.PortalSessionResponse$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=customers-create-customer-portal-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customers-create-customer-portal-session.js","sourceRoot":"","sources":["../../src/funcs/customers-create-customer-portal-session.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,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAGjD,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,UAAU,oCAAoC,CAClD,MAAqB,EACrB,UAAkB,EAClB,OAAwB,EAcxB;IACA,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,UAAU,EACV,OAAO,CACR,CAAC,CAAC;AAAA,CACJ;AAED,KAAK,UAAU,GAAG,CAChB,MAAqB,EACrB,UAAkB,EAClB,OAAwB,EAiBxB;IACA,MAAM,KAAK,GAA8C;QACvD,UAAU,EAAE,UAAU;KACvB,CAAC;IAEF,MAAM,MAAM,GAAG,SAAS,CACtB,KAAK,EACL,CAA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;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,mCAAmC,CAAC,EACvD,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,iCAAiC,CAAC,EAC/D,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,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
|
+
* Pause subscription
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Use when a customer stops temporarily. Pauses an active subscription now: usage and arrear fixed charges up to the pause are billed on a closing invoice, and every paused period after it gets a $0 skipped invoice.
|
|
15
|
+
*/
|
|
16
|
+
export declare function subscriptionsPauseSubscription(client: FlexpriceCore, id: string, body: models.PauseSubscriptionRequest, options?: RequestOptions): APIPromise<Result<models.PauseSubscriptionResponse, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=subscriptions-pause-subscription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions-pause-subscription.d.ts","sourceRoot":"","sources":["../../src/funcs/subscriptions-pause-subscription.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,8BAA8B,CAC5C,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,CAAC,wBAAwB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,yBAAyB,EAC9B,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAOA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { encodeJSON, 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
|
+
* Pause subscription
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Use when a customer stops temporarily. Pauses an active subscription now: usage and arrear fixed charges up to the pause are billed on a closing invoice, and every paused period after it gets a $0 skipped invoice.
|
|
19
|
+
*/
|
|
20
|
+
export function subscriptionsPauseSubscription(client, id, body, options) {
|
|
21
|
+
return new APIPromise($do(client, id, body, options));
|
|
22
|
+
}
|
|
23
|
+
async function $do(client, id, body, options) {
|
|
24
|
+
const input = {
|
|
25
|
+
id: id,
|
|
26
|
+
body: body,
|
|
27
|
+
};
|
|
28
|
+
const parsed = safeParse(input, (value) => z.parse(models.PauseSubscriptionRequestRequest$outboundSchema, value), "Input validation failed");
|
|
29
|
+
if (!parsed.ok) {
|
|
30
|
+
return [parsed, { status: "invalid" }];
|
|
31
|
+
}
|
|
32
|
+
const payload = parsed.value;
|
|
33
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
34
|
+
const pathParams = {
|
|
35
|
+
id: encodeSimple("id", payload.id, {
|
|
36
|
+
explode: false,
|
|
37
|
+
charEncoding: "percent",
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
const path = pathToFunc("/subscriptions/{id}/pause")(pathParams);
|
|
41
|
+
const headers = new Headers(compactMap({
|
|
42
|
+
"Content-Type": "application/json",
|
|
43
|
+
Accept: "application/json",
|
|
44
|
+
}));
|
|
45
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
46
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
47
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
48
|
+
const context = {
|
|
49
|
+
options: client._options,
|
|
50
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
51
|
+
operationID: "pauseSubscription",
|
|
52
|
+
oAuth2Scopes: null,
|
|
53
|
+
resolvedSecurity: requestSecurity,
|
|
54
|
+
securitySource: client._options.apiKeyAuth,
|
|
55
|
+
retryConfig: options?.retries
|
|
56
|
+
|| client._options.retryConfig
|
|
57
|
+
|| { strategy: "none" },
|
|
58
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
59
|
+
};
|
|
60
|
+
const requestRes = client._createRequest(context, {
|
|
61
|
+
security: requestSecurity,
|
|
62
|
+
method: "POST",
|
|
63
|
+
baseURL: options?.serverURL,
|
|
64
|
+
path: path,
|
|
65
|
+
headers: headers,
|
|
66
|
+
body: body$,
|
|
67
|
+
userAgent: client._options.userAgent,
|
|
68
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
69
|
+
}, options);
|
|
70
|
+
if (!requestRes.ok) {
|
|
71
|
+
return [requestRes, { status: "invalid" }];
|
|
72
|
+
}
|
|
73
|
+
const req = requestRes.value;
|
|
74
|
+
const doResult = await client._do(req, {
|
|
75
|
+
context,
|
|
76
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
77
|
+
retryConfig: context.retryConfig,
|
|
78
|
+
retryCodes: context.retryCodes,
|
|
79
|
+
});
|
|
80
|
+
if (!doResult.ok) {
|
|
81
|
+
return [doResult, { status: "request-error", request: req }];
|
|
82
|
+
}
|
|
83
|
+
const response = doResult.value;
|
|
84
|
+
const responseFields = {
|
|
85
|
+
HttpMeta: { Response: response, Request: req },
|
|
86
|
+
};
|
|
87
|
+
const [result] = await M.match(M.json(200, models.PauseSubscriptionResponse$inboundSchema), M.jsonErr([400, 404], models.ErrorsErrorResponse$inboundSchema), M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
88
|
+
if (!result.ok) {
|
|
89
|
+
return [result, { status: "complete", request: req, response }];
|
|
90
|
+
}
|
|
91
|
+
return [result, { status: "complete", request: req, response }];
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=subscriptions-pause-subscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions-pause-subscription.js","sourceRoot":"","sources":["../../src/funcs/subscriptions-pause-subscription.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,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,mBAAm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AAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,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
|
+
* Resume subscription
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Use when a paused customer comes back. Resumes a paused subscription now on its existing billing anchor: the first period runs from the resume to the next billing date and its advance charges are invoiced at once.
|
|
15
|
+
*/
|
|
16
|
+
export declare function subscriptionsResumeSubscription(client: FlexpriceCore, id: string, body: models.ResumeSubscriptionRequest, options?: RequestOptions): APIPromise<Result<models.ResumeSubscriptionResponse, models.ErrorsErrorResponse | FlexPriceError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
17
|
+
//# sourceMappingURL=subscriptions-resume-subscription.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions-resume-subscription.d.ts","sourceRoot":"","sources":["../../src/funcs/subscriptions-resume-subscription.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,+BAA+B,CAC7C,MAAM,EAAE,aAAa,EACrB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,MAAM,CAAC,yBAAyB,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,MAAM,CAAC,0BAA0B,EAC/B,MAAM,CAAC,mBAAmB,GAC1B,cAAc,GACd,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAOA"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4-mini";
|
|
5
|
+
import { encodeJSON, 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
|
+
* Resume subscription
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Use when a paused customer comes back. Resumes a paused subscription now on its existing billing anchor: the first period runs from the resume to the next billing date and its advance charges are invoiced at once.
|
|
19
|
+
*/
|
|
20
|
+
export function subscriptionsResumeSubscription(client, id, body, options) {
|
|
21
|
+
return new APIPromise($do(client, id, body, options));
|
|
22
|
+
}
|
|
23
|
+
async function $do(client, id, body, options) {
|
|
24
|
+
const input = {
|
|
25
|
+
id: id,
|
|
26
|
+
body: body,
|
|
27
|
+
};
|
|
28
|
+
const parsed = safeParse(input, (value) => z.parse(models.ResumeSubscriptionRequestRequest$outboundSchema, value), "Input validation failed");
|
|
29
|
+
if (!parsed.ok) {
|
|
30
|
+
return [parsed, { status: "invalid" }];
|
|
31
|
+
}
|
|
32
|
+
const payload = parsed.value;
|
|
33
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
34
|
+
const pathParams = {
|
|
35
|
+
id: encodeSimple("id", payload.id, {
|
|
36
|
+
explode: false,
|
|
37
|
+
charEncoding: "percent",
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
const path = pathToFunc("/subscriptions/{id}/resume")(pathParams);
|
|
41
|
+
const headers = new Headers(compactMap({
|
|
42
|
+
"Content-Type": "application/json",
|
|
43
|
+
Accept: "application/json",
|
|
44
|
+
}));
|
|
45
|
+
const secConfig = await extractSecurity(client._options.apiKeyAuth);
|
|
46
|
+
const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
|
|
47
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
48
|
+
const context = {
|
|
49
|
+
options: client._options,
|
|
50
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
51
|
+
operationID: "resumeSubscription",
|
|
52
|
+
oAuth2Scopes: null,
|
|
53
|
+
resolvedSecurity: requestSecurity,
|
|
54
|
+
securitySource: client._options.apiKeyAuth,
|
|
55
|
+
retryConfig: options?.retries
|
|
56
|
+
|| client._options.retryConfig
|
|
57
|
+
|| { strategy: "none" },
|
|
58
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
59
|
+
};
|
|
60
|
+
const requestRes = client._createRequest(context, {
|
|
61
|
+
security: requestSecurity,
|
|
62
|
+
method: "POST",
|
|
63
|
+
baseURL: options?.serverURL,
|
|
64
|
+
path: path,
|
|
65
|
+
headers: headers,
|
|
66
|
+
body: body$,
|
|
67
|
+
userAgent: client._options.userAgent,
|
|
68
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
69
|
+
}, options);
|
|
70
|
+
if (!requestRes.ok) {
|
|
71
|
+
return [requestRes, { status: "invalid" }];
|
|
72
|
+
}
|
|
73
|
+
const req = requestRes.value;
|
|
74
|
+
const doResult = await client._do(req, {
|
|
75
|
+
context,
|
|
76
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
77
|
+
retryConfig: context.retryConfig,
|
|
78
|
+
retryCodes: context.retryCodes,
|
|
79
|
+
});
|
|
80
|
+
if (!doResult.ok) {
|
|
81
|
+
return [doResult, { status: "request-error", request: req }];
|
|
82
|
+
}
|
|
83
|
+
const response = doResult.value;
|
|
84
|
+
const responseFields = {
|
|
85
|
+
HttpMeta: { Response: response, Request: req },
|
|
86
|
+
};
|
|
87
|
+
const [result] = await M.match(M.json(200, models.ResumeSubscriptionResponse$inboundSchema), M.jsonErr([400, 404], models.ErrorsErrorResponse$inboundSchema), M.jsonErr(500, models.ErrorsErrorResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
88
|
+
if (!result.ok) {
|
|
89
|
+
return [result, { status: "complete", request: req, response }];
|
|
90
|
+
}
|
|
91
|
+
return [result, { status: "complete", request: req, response }];
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=subscriptions-resume-subscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscriptions-resume-subscription.js","sourceRoot":"","sources":["../../src/funcs/subscriptions-resume-subscription.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC/D,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,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAGjD,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;GAKG;AACH,MAAM,UAAU,+BAA+B,CAC7C,MAAqB,EACrB,EAAU,EACV,IAAsC,EACtC,OAAwB,EAcxB;IACA,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,EAAE,EACF,IAAI,EACJ,OAAO,CACR,CAAC,CAAC;AAAA,CACJ;AAED,KAAK,UAAU,GAAG,CAChB,MAAqB,EACrB,EAAU,EACV,IAAsC,EACtC,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