lark-billing 0.7.0 → 0.8.0
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/CHANGELOG.md +20 -0
- package/README.md +2 -2
- package/client.d.mts +5 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -2
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/package.json +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/rate-catalogs.d.mts +19 -74
- package/resources/rate-catalogs.d.mts.map +1 -1
- package/resources/rate-catalogs.d.ts +19 -74
- package/resources/rate-catalogs.d.ts.map +1 -1
- package/resources/rate-catalogs.js.map +1 -1
- package/resources/rate-catalogs.mjs.map +1 -1
- package/resources/subscription-timelines/index.d.mts +3 -0
- package/resources/subscription-timelines/index.d.mts.map +1 -0
- package/resources/subscription-timelines/index.d.ts +3 -0
- package/resources/subscription-timelines/index.d.ts.map +1 -0
- package/resources/subscription-timelines/index.js +9 -0
- package/resources/subscription-timelines/index.js.map +1 -0
- package/resources/subscription-timelines/index.mjs +4 -0
- package/resources/subscription-timelines/index.mjs.map +1 -0
- package/resources/subscription-timelines/items.d.mts +130 -0
- package/resources/subscription-timelines/items.d.mts.map +1 -0
- package/resources/subscription-timelines/items.d.ts +130 -0
- package/resources/subscription-timelines/items.d.ts.map +1 -0
- package/resources/subscription-timelines/items.js +28 -0
- package/resources/subscription-timelines/items.js.map +1 -0
- package/resources/subscription-timelines/items.mjs +24 -0
- package/resources/subscription-timelines/items.mjs.map +1 -0
- package/resources/subscription-timelines/subscription-timelines.d.mts +145 -0
- package/resources/subscription-timelines/subscription-timelines.d.mts.map +1 -0
- package/resources/subscription-timelines/subscription-timelines.d.ts +145 -0
- package/resources/subscription-timelines/subscription-timelines.d.ts.map +1 -0
- package/resources/subscription-timelines/subscription-timelines.js +45 -0
- package/resources/subscription-timelines/subscription-timelines.js.map +1 -0
- package/resources/subscription-timelines/subscription-timelines.mjs +40 -0
- package/resources/subscription-timelines/subscription-timelines.mjs.map +1 -0
- package/resources/subscription-timelines.d.mts +2 -0
- package/resources/subscription-timelines.d.mts.map +1 -0
- package/resources/subscription-timelines.d.ts +2 -0
- package/resources/subscription-timelines.d.ts.map +1 -0
- package/resources/subscription-timelines.js +6 -0
- package/resources/subscription-timelines.js.map +1 -0
- package/resources/subscription-timelines.mjs +3 -0
- package/resources/subscription-timelines.mjs.map +1 -0
- package/resources/subscriptions.d.mts +4 -0
- package/resources/subscriptions.d.mts.map +1 -1
- package/resources/subscriptions.d.ts +4 -0
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/usage-events.d.mts +2 -2
- package/resources/usage-events.d.ts +2 -2
- package/resources/usage-events.js +2 -2
- package/resources/usage-events.mjs +2 -2
- package/src/client.ts +29 -0
- package/src/resources/index.ts +13 -0
- package/src/resources/rate-catalogs.ts +29 -105
- package/src/resources/subscription-timelines/index.ts +19 -0
- package/src/resources/subscription-timelines/items.ts +187 -0
- package/src/resources/subscription-timelines/subscription-timelines.ts +240 -0
- package/src/resources/subscription-timelines.ts +3 -0
- package/src/resources/subscriptions.ts +5 -0
- package/src/resources/usage-events.ts +2 -2
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
4
|
+
export declare class Items extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create Subscription Timeline Items
|
|
7
|
+
*/
|
|
8
|
+
create(subscriptionTimelineID: string, body: ItemCreateParams, options?: RequestOptions): APIPromise<ItemCreateResponse>;
|
|
9
|
+
/**
|
|
10
|
+
* List Subscription Timeline Items
|
|
11
|
+
*/
|
|
12
|
+
list(subscriptionTimelineID: string, query?: ItemListParams | null | undefined, options?: RequestOptions): APIPromise<ItemListResponse>;
|
|
13
|
+
}
|
|
14
|
+
export type ItemCreateResponse = Array<ItemCreateResponse.ItemCreateResponseItem>;
|
|
15
|
+
export declare namespace ItemCreateResponse {
|
|
16
|
+
interface ItemCreateResponseItem {
|
|
17
|
+
id: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
period: ItemCreateResponseItem.Period;
|
|
20
|
+
subscription_input: ItemCreateResponseItem.SubscriptionInput;
|
|
21
|
+
subscription_timeline_id: string;
|
|
22
|
+
updated_at: string;
|
|
23
|
+
}
|
|
24
|
+
namespace ItemCreateResponseItem {
|
|
25
|
+
interface Period {
|
|
26
|
+
end: string | null;
|
|
27
|
+
start: string;
|
|
28
|
+
inclusive_end?: boolean;
|
|
29
|
+
inclusive_start?: boolean;
|
|
30
|
+
}
|
|
31
|
+
interface SubscriptionInput {
|
|
32
|
+
fixed_rate_quantities: {
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
};
|
|
35
|
+
rate_card_id: string;
|
|
36
|
+
rate_price_multipliers: {
|
|
37
|
+
[key: string]: string;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export interface ItemListResponse {
|
|
43
|
+
has_more: boolean;
|
|
44
|
+
items: Array<ItemListResponse.Item>;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace ItemListResponse {
|
|
47
|
+
interface Item {
|
|
48
|
+
id: string;
|
|
49
|
+
created_at: string;
|
|
50
|
+
period: Item.Period;
|
|
51
|
+
subscription_input: Item.SubscriptionInput;
|
|
52
|
+
subscription_timeline_id: string;
|
|
53
|
+
updated_at: string;
|
|
54
|
+
}
|
|
55
|
+
namespace Item {
|
|
56
|
+
interface Period {
|
|
57
|
+
end: string | null;
|
|
58
|
+
start: string;
|
|
59
|
+
inclusive_end?: boolean;
|
|
60
|
+
inclusive_start?: boolean;
|
|
61
|
+
}
|
|
62
|
+
interface SubscriptionInput {
|
|
63
|
+
fixed_rate_quantities: {
|
|
64
|
+
[key: string]: string;
|
|
65
|
+
};
|
|
66
|
+
rate_card_id: string;
|
|
67
|
+
rate_price_multipliers: {
|
|
68
|
+
[key: string]: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
export interface ItemCreateParams {
|
|
74
|
+
/**
|
|
75
|
+
* The items to create for the subscription timeline.
|
|
76
|
+
*/
|
|
77
|
+
items: Array<ItemCreateParams.Item>;
|
|
78
|
+
}
|
|
79
|
+
export declare namespace ItemCreateParams {
|
|
80
|
+
interface Item {
|
|
81
|
+
/**
|
|
82
|
+
* The period of the subscription timeline item.
|
|
83
|
+
*/
|
|
84
|
+
period: Item.Period;
|
|
85
|
+
/**
|
|
86
|
+
* The subscription input for the subscription timeline item.
|
|
87
|
+
*/
|
|
88
|
+
subscription_input: Item.SubscriptionInput;
|
|
89
|
+
}
|
|
90
|
+
namespace Item {
|
|
91
|
+
/**
|
|
92
|
+
* The period of the subscription timeline item.
|
|
93
|
+
*/
|
|
94
|
+
interface Period {
|
|
95
|
+
end: string | null;
|
|
96
|
+
start: string;
|
|
97
|
+
inclusive_end?: boolean;
|
|
98
|
+
inclusive_start?: boolean;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The subscription input for the subscription timeline item.
|
|
102
|
+
*/
|
|
103
|
+
interface SubscriptionInput {
|
|
104
|
+
/**
|
|
105
|
+
* The quantities of the fixed rates to use for the subscription timeline item.
|
|
106
|
+
*/
|
|
107
|
+
fixed_rate_quantities: {
|
|
108
|
+
[key: string]: number | string;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* The ID of the rate card to use for the subscription timeline item.
|
|
112
|
+
*/
|
|
113
|
+
rate_card_id: string;
|
|
114
|
+
/**
|
|
115
|
+
* The price multipliers to use for the subscription timeline item.
|
|
116
|
+
*/
|
|
117
|
+
rate_price_multipliers: {
|
|
118
|
+
[key: string]: number | string;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export interface ItemListParams {
|
|
124
|
+
limit?: number;
|
|
125
|
+
offset?: number;
|
|
126
|
+
}
|
|
127
|
+
export declare namespace Items {
|
|
128
|
+
export { type ItemCreateResponse as ItemCreateResponse, type ItemListResponse as ItemListResponse, type ItemCreateParams as ItemCreateParams, type ItemListParams as ItemListParams, };
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.d.ts","sourceRoot":"","sources":["../../src/resources/subscription-timelines/items.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CACJ,sBAAsB,EAAE,MAAM,EAC9B,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAOjC;;OAEG;IACH,IAAI,CACF,sBAAsB,EAAE,MAAM,EAC9B,KAAK,GAAE,cAAc,GAAG,IAAI,GAAG,SAAc,EAC7C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,gBAAgB,CAAC;CAMhC;AAED,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAElF,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,sBAAsB;QACrC,EAAE,EAAE,MAAM,CAAC;QAEX,UAAU,EAAE,MAAM,CAAC;QAEnB,MAAM,EAA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cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Items = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
7
|
+
class Items extends resource_1.APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create Subscription Timeline Items
|
|
10
|
+
*/
|
|
11
|
+
create(subscriptionTimelineID, body, options) {
|
|
12
|
+
return this._client.post((0, path_1.path) `/subscription-timelines/${subscriptionTimelineID}/items`, {
|
|
13
|
+
body,
|
|
14
|
+
...options,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* List Subscription Timeline Items
|
|
19
|
+
*/
|
|
20
|
+
list(subscriptionTimelineID, query = {}, options) {
|
|
21
|
+
return this._client.get((0, path_1.path) `/subscription-timelines/${subscriptionTimelineID}/items`, {
|
|
22
|
+
query,
|
|
23
|
+
...options,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.Items = Items;
|
|
28
|
+
//# sourceMappingURL=items.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.js","sourceRoot":"","sources":["../../src/resources/subscription-timelines/items.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAGlD,uDAAiD;AAEjD,MAAa,KAAM,SAAQ,sBAAW;IACpC;;OAEG;IACH,MAAM,CACJ,sBAA8B,EAC9B,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,2BAA2B,sBAAsB,QAAQ,EAAE;YACtF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CACF,sBAA8B,EAC9B,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,2BAA2B,sBAAsB,QAAQ,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA5BD,sBA4BC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
4
|
+
export class Items extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* Create Subscription Timeline Items
|
|
7
|
+
*/
|
|
8
|
+
create(subscriptionTimelineID, body, options) {
|
|
9
|
+
return this._client.post(path `/subscription-timelines/${subscriptionTimelineID}/items`, {
|
|
10
|
+
body,
|
|
11
|
+
...options,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* List Subscription Timeline Items
|
|
16
|
+
*/
|
|
17
|
+
list(subscriptionTimelineID, query = {}, options) {
|
|
18
|
+
return this._client.get(path `/subscription-timelines/${subscriptionTimelineID}/items`, {
|
|
19
|
+
query,
|
|
20
|
+
...options,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=items.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"items.mjs","sourceRoot":"","sources":["../../src/resources/subscription-timelines/items.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CACJ,sBAA8B,EAC9B,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,2BAA2B,sBAAsB,QAAQ,EAAE;YACtF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,IAAI,CACF,sBAA8B,EAC9B,QAA2C,EAAE,EAC7C,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,sBAAsB,QAAQ,EAAE;YACrF,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as SubscriptionsAPI from "../subscriptions.mjs";
|
|
3
|
+
import * as ItemsAPI from "./items.mjs";
|
|
4
|
+
import { ItemCreateParams, ItemCreateResponse, ItemListParams, ItemListResponse, Items } from "./items.mjs";
|
|
5
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
7
|
+
export declare class SubscriptionTimelines extends APIResource {
|
|
8
|
+
items: ItemsAPI.Items;
|
|
9
|
+
/**
|
|
10
|
+
* Create Subscription Timeline
|
|
11
|
+
*/
|
|
12
|
+
create(body: SubscriptionTimelineCreateParams, options?: RequestOptions): APIPromise<SubscriptionTimelineCreateResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Get Subscription Timeline
|
|
15
|
+
*/
|
|
16
|
+
retrieve(subscriptionTimelineID: string, options?: RequestOptions): APIPromise<SubscriptionTimelineRetrieveResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* List Subscription Timelines
|
|
19
|
+
*/
|
|
20
|
+
list(query?: SubscriptionTimelineListParams | null | undefined, options?: RequestOptions): APIPromise<SubscriptionTimelineListResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Start Subscription Timeline
|
|
23
|
+
*/
|
|
24
|
+
start(subscriptionTimelineID: string, body: SubscriptionTimelineStartParams, options?: RequestOptions): APIPromise<SubscriptionTimelineStartResponse>;
|
|
25
|
+
}
|
|
26
|
+
export interface SubscriptionTimelineCreateResponse {
|
|
27
|
+
id: string;
|
|
28
|
+
created_at: string;
|
|
29
|
+
rate_card_id: string;
|
|
30
|
+
status: 'draft' | 'pending' | 'active' | 'completed';
|
|
31
|
+
subject_id: string;
|
|
32
|
+
subscription_id: string | null;
|
|
33
|
+
updated_at: string;
|
|
34
|
+
}
|
|
35
|
+
export interface SubscriptionTimelineRetrieveResponse {
|
|
36
|
+
id: string;
|
|
37
|
+
created_at: string;
|
|
38
|
+
rate_card_id: string;
|
|
39
|
+
status: 'draft' | 'pending' | 'active' | 'completed';
|
|
40
|
+
subject_id: string;
|
|
41
|
+
subscription_id: string | null;
|
|
42
|
+
updated_at: string;
|
|
43
|
+
}
|
|
44
|
+
export interface SubscriptionTimelineListResponse {
|
|
45
|
+
has_more: boolean;
|
|
46
|
+
subscription_timelines: Array<SubscriptionTimelineListResponse.SubscriptionTimeline>;
|
|
47
|
+
}
|
|
48
|
+
export declare namespace SubscriptionTimelineListResponse {
|
|
49
|
+
interface SubscriptionTimeline {
|
|
50
|
+
id: string;
|
|
51
|
+
created_at: string;
|
|
52
|
+
rate_card_id: string;
|
|
53
|
+
status: 'draft' | 'pending' | 'active' | 'completed';
|
|
54
|
+
subject_id: string;
|
|
55
|
+
subscription_id: string | null;
|
|
56
|
+
updated_at: string;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export interface SubscriptionTimelineStartResponse {
|
|
60
|
+
/**
|
|
61
|
+
* The result of the request. If the request is successful, the subscription
|
|
62
|
+
* timeline resource will be returned. If the request is requires action, the
|
|
63
|
+
* action to take to complete the request will be returned.
|
|
64
|
+
*/
|
|
65
|
+
result: SubscriptionTimelineStartResponse.StartSubscriptionTimelineRequiresActionResponse | SubscriptionTimelineStartResponse.StartSubscriptionTimelineSuccessResponse;
|
|
66
|
+
}
|
|
67
|
+
export declare namespace SubscriptionTimelineStartResponse {
|
|
68
|
+
interface StartSubscriptionTimelineRequiresActionResponse {
|
|
69
|
+
/**
|
|
70
|
+
* The action to take to complete the request.
|
|
71
|
+
*/
|
|
72
|
+
action: StartSubscriptionTimelineRequiresActionResponse.Action;
|
|
73
|
+
result_type: 'requires_action';
|
|
74
|
+
}
|
|
75
|
+
namespace StartSubscriptionTimelineRequiresActionResponse {
|
|
76
|
+
/**
|
|
77
|
+
* The action to take to complete the request.
|
|
78
|
+
*/
|
|
79
|
+
interface Action {
|
|
80
|
+
/**
|
|
81
|
+
* The URL of the checkout page to redirect to in order to complete the request.
|
|
82
|
+
*/
|
|
83
|
+
checkout_url: string;
|
|
84
|
+
requires_action_type: 'checkout';
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
interface StartSubscriptionTimelineSuccessResponse {
|
|
88
|
+
result_type: 'success';
|
|
89
|
+
/**
|
|
90
|
+
* The subscription timeline resource.
|
|
91
|
+
*/
|
|
92
|
+
subscription_timeline: StartSubscriptionTimelineSuccessResponse.SubscriptionTimeline;
|
|
93
|
+
}
|
|
94
|
+
namespace StartSubscriptionTimelineSuccessResponse {
|
|
95
|
+
/**
|
|
96
|
+
* The subscription timeline resource.
|
|
97
|
+
*/
|
|
98
|
+
interface SubscriptionTimeline {
|
|
99
|
+
id: string;
|
|
100
|
+
created_at: string;
|
|
101
|
+
rate_card_id: string;
|
|
102
|
+
status: 'draft' | 'pending' | 'active' | 'completed';
|
|
103
|
+
subject_id: string;
|
|
104
|
+
subscription_id: string | null;
|
|
105
|
+
updated_at: string;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export interface SubscriptionTimelineCreateParams {
|
|
110
|
+
/**
|
|
111
|
+
* The ID of the rate card to create the subscription timeline for.
|
|
112
|
+
*/
|
|
113
|
+
rate_card_id: string;
|
|
114
|
+
/**
|
|
115
|
+
* The ID of the subject to create the subscription timeline for.
|
|
116
|
+
*/
|
|
117
|
+
subject_id: string;
|
|
118
|
+
}
|
|
119
|
+
export interface SubscriptionTimelineListParams {
|
|
120
|
+
limit?: number;
|
|
121
|
+
offset?: number;
|
|
122
|
+
}
|
|
123
|
+
export interface SubscriptionTimelineStartParams {
|
|
124
|
+
/**
|
|
125
|
+
* The URLs to redirect to after the checkout is completed or cancelled, if a
|
|
126
|
+
* checkout is required.
|
|
127
|
+
*/
|
|
128
|
+
checkout_callback_urls: SubscriptionsAPI.CheckoutCallback;
|
|
129
|
+
/**
|
|
130
|
+
* Determines whether a checkout session is always required even if the subject has
|
|
131
|
+
* a payment method on file. By default, if the subject has a payment method on
|
|
132
|
+
* file, the subscription will be created and billed for immediately.
|
|
133
|
+
*/
|
|
134
|
+
create_checkout_session: 'when_required' | 'always';
|
|
135
|
+
/**
|
|
136
|
+
* When the subscription should become active. If not provided, the current date
|
|
137
|
+
* and time will be used.
|
|
138
|
+
*/
|
|
139
|
+
effective_at?: string;
|
|
140
|
+
}
|
|
141
|
+
export declare namespace SubscriptionTimelines {
|
|
142
|
+
export { type SubscriptionTimelineCreateResponse as SubscriptionTimelineCreateResponse, type SubscriptionTimelineRetrieveResponse as SubscriptionTimelineRetrieveResponse, type SubscriptionTimelineListResponse as SubscriptionTimelineListResponse, type SubscriptionTimelineStartResponse as SubscriptionTimelineStartResponse, type SubscriptionTimelineCreateParams as SubscriptionTimelineCreateParams, type SubscriptionTimelineListParams as SubscriptionTimelineListParams, type SubscriptionTimelineStartParams as SubscriptionTimelineStartParams, };
|
|
143
|
+
export { Items as Items, type ItemCreateResponse as ItemCreateResponse, type ItemListResponse as ItemListResponse, type ItemCreateParams as ItemCreateParams, type ItemListParams as ItemListParams, };
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=subscription-timelines.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-timelines.d.mts","sourceRoot":"","sources":["../../src/resources/subscription-timelines/subscription-timelines.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,KAAK,QAA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AAE,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,CAAC;YAErD,UAAU,EAAE,MAAM,CAAC;YAEnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;YAE/B,UAAU,EAAE,MAAM,CAAC;SACpB;KACF;CACF;AAED,MAAM,WAAW,gCAAgC;IAC/C;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,8BAA8B;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,+BAA+B;IAC9C;;;OAGG;IACH,sBAAsB,EAAE,gBAAgB,CAAC,gBAAgB,CAAC;IAE1D;;;;OAIG;IACH,uBAAuB,EAAE,eAAe,GAAG,QAAQ,CAAC;IAEpD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C,OAAO,EACL,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as SubscriptionsAPI from "../subscriptions.js";
|
|
3
|
+
import * as ItemsAPI from "./items.js";
|
|
4
|
+
import { ItemCreateParams, ItemCreateResponse, ItemListParams, ItemListResponse, Items } from "./items.js";
|
|
5
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
6
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
7
|
+
export declare class SubscriptionTimelines extends APIResource {
|
|
8
|
+
items: ItemsAPI.Items;
|
|
9
|
+
/**
|
|
10
|
+
* Create Subscription Timeline
|
|
11
|
+
*/
|
|
12
|
+
create(body: SubscriptionTimelineCreateParams, options?: RequestOptions): APIPromise<SubscriptionTimelineCreateResponse>;
|
|
13
|
+
/**
|
|
14
|
+
* Get Subscription Timeline
|
|
15
|
+
*/
|
|
16
|
+
retrieve(subscriptionTimelineID: string, options?: RequestOptions): APIPromise<SubscriptionTimelineRetrieveResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* List Subscription Timelines
|
|
19
|
+
*/
|
|
20
|
+
list(query?: SubscriptionTimelineListParams | null | undefined, options?: RequestOptions): APIPromise<SubscriptionTimelineListResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Start Subscription Timeline
|
|
23
|
+
*/
|
|
24
|
+
start(subscriptionTimelineID: string, body: SubscriptionTimelineStartParams, options?: RequestOptions): APIPromise<SubscriptionTimelineStartResponse>;
|
|
25
|
+
}
|
|
26
|
+
export interface SubscriptionTimelineCreateResponse {
|
|
27
|
+
id: string;
|
|
28
|
+
created_at: string;
|
|
29
|
+
rate_card_id: string;
|
|
30
|
+
status: 'draft' | 'pending' | 'active' | 'completed';
|
|
31
|
+
subject_id: string;
|
|
32
|
+
subscription_id: string | null;
|
|
33
|
+
updated_at: string;
|
|
34
|
+
}
|
|
35
|
+
export interface SubscriptionTimelineRetrieveResponse {
|
|
36
|
+
id: string;
|
|
37
|
+
created_at: string;
|
|
38
|
+
rate_card_id: string;
|
|
39
|
+
status: 'draft' | 'pending' | 'active' | 'completed';
|
|
40
|
+
subject_id: string;
|
|
41
|
+
subscription_id: string | null;
|
|
42
|
+
updated_at: string;
|
|
43
|
+
}
|
|
44
|
+
export interface SubscriptionTimelineListResponse {
|
|
45
|
+
has_more: boolean;
|
|
46
|
+
subscription_timelines: Array<SubscriptionTimelineListResponse.SubscriptionTimeline>;
|
|
47
|
+
}
|
|
48
|
+
export declare namespace SubscriptionTimelineListResponse {
|
|
49
|
+
interface SubscriptionTimeline {
|
|
50
|
+
id: string;
|
|
51
|
+
created_at: string;
|
|
52
|
+
rate_card_id: string;
|
|
53
|
+
status: 'draft' | 'pending' | 'active' | 'completed';
|
|
54
|
+
subject_id: string;
|
|
55
|
+
subscription_id: string | null;
|
|
56
|
+
updated_at: string;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
export interface SubscriptionTimelineStartResponse {
|
|
60
|
+
/**
|
|
61
|
+
* The result of the request. If the request is successful, the subscription
|
|
62
|
+
* timeline resource will be returned. If the request is requires action, the
|
|
63
|
+
* action to take to complete the request will be returned.
|
|
64
|
+
*/
|
|
65
|
+
result: SubscriptionTimelineStartResponse.StartSubscriptionTimelineRequiresActionResponse | SubscriptionTimelineStartResponse.StartSubscriptionTimelineSuccessResponse;
|
|
66
|
+
}
|
|
67
|
+
export declare namespace SubscriptionTimelineStartResponse {
|
|
68
|
+
interface StartSubscriptionTimelineRequiresActionResponse {
|
|
69
|
+
/**
|
|
70
|
+
* The action to take to complete the request.
|
|
71
|
+
*/
|
|
72
|
+
action: StartSubscriptionTimelineRequiresActionResponse.Action;
|
|
73
|
+
result_type: 'requires_action';
|
|
74
|
+
}
|
|
75
|
+
namespace StartSubscriptionTimelineRequiresActionResponse {
|
|
76
|
+
/**
|
|
77
|
+
* The action to take to complete the request.
|
|
78
|
+
*/
|
|
79
|
+
interface Action {
|
|
80
|
+
/**
|
|
81
|
+
* The URL of the checkout page to redirect to in order to complete the request.
|
|
82
|
+
*/
|
|
83
|
+
checkout_url: string;
|
|
84
|
+
requires_action_type: 'checkout';
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
interface StartSubscriptionTimelineSuccessResponse {
|
|
88
|
+
result_type: 'success';
|
|
89
|
+
/**
|
|
90
|
+
* The subscription timeline resource.
|
|
91
|
+
*/
|
|
92
|
+
subscription_timeline: StartSubscriptionTimelineSuccessResponse.SubscriptionTimeline;
|
|
93
|
+
}
|
|
94
|
+
namespace StartSubscriptionTimelineSuccessResponse {
|
|
95
|
+
/**
|
|
96
|
+
* The subscription timeline resource.
|
|
97
|
+
*/
|
|
98
|
+
interface SubscriptionTimeline {
|
|
99
|
+
id: string;
|
|
100
|
+
created_at: string;
|
|
101
|
+
rate_card_id: string;
|
|
102
|
+
status: 'draft' | 'pending' | 'active' | 'completed';
|
|
103
|
+
subject_id: string;
|
|
104
|
+
subscription_id: string | null;
|
|
105
|
+
updated_at: string;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export interface SubscriptionTimelineCreateParams {
|
|
110
|
+
/**
|
|
111
|
+
* The ID of the rate card to create the subscription timeline for.
|
|
112
|
+
*/
|
|
113
|
+
rate_card_id: string;
|
|
114
|
+
/**
|
|
115
|
+
* The ID of the subject to create the subscription timeline for.
|
|
116
|
+
*/
|
|
117
|
+
subject_id: string;
|
|
118
|
+
}
|
|
119
|
+
export interface SubscriptionTimelineListParams {
|
|
120
|
+
limit?: number;
|
|
121
|
+
offset?: number;
|
|
122
|
+
}
|
|
123
|
+
export interface SubscriptionTimelineStartParams {
|
|
124
|
+
/**
|
|
125
|
+
* The URLs to redirect to after the checkout is completed or cancelled, if a
|
|
126
|
+
* checkout is required.
|
|
127
|
+
*/
|
|
128
|
+
checkout_callback_urls: SubscriptionsAPI.CheckoutCallback;
|
|
129
|
+
/**
|
|
130
|
+
* Determines whether a checkout session is always required even if the subject has
|
|
131
|
+
* a payment method on file. By default, if the subject has a payment method on
|
|
132
|
+
* file, the subscription will be created and billed for immediately.
|
|
133
|
+
*/
|
|
134
|
+
create_checkout_session: 'when_required' | 'always';
|
|
135
|
+
/**
|
|
136
|
+
* When the subscription should become active. If not provided, the current date
|
|
137
|
+
* and time will be used.
|
|
138
|
+
*/
|
|
139
|
+
effective_at?: string;
|
|
140
|
+
}
|
|
141
|
+
export declare namespace SubscriptionTimelines {
|
|
142
|
+
export { type SubscriptionTimelineCreateResponse as SubscriptionTimelineCreateResponse, type SubscriptionTimelineRetrieveResponse as SubscriptionTimelineRetrieveResponse, type SubscriptionTimelineListResponse as SubscriptionTimelineListResponse, type SubscriptionTimelineStartResponse as SubscriptionTimelineStartResponse, type SubscriptionTimelineCreateParams as SubscriptionTimelineCreateParams, type SubscriptionTimelineListParams as SubscriptionTimelineListParams, type SubscriptionTimelineStartParams as SubscriptionTimelineStartParams, };
|
|
143
|
+
export { Items as Items, type ItemCreateResponse as ItemCreateResponse, type ItemListResponse as ItemListResponse, type ItemCreateParams as ItemCreateParams, type ItemListParams as ItemListParams, };
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=subscription-timelines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-timelines.d.ts","sourceRoot":"","sources":["../../src/resources/subscription-timelines/subscription-timelines.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,gBAAgB;OACrB,KAAK,QAAQ;OACb,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,EAAE;OACjF,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAoC;IAEzD;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,gCAAgC,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kCAAkC,CAAC;IAIjD;;OAEG;IACH,QAAQ,CACN,sBAAsB,EAAE,MAAM,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,oCAAoC,CAAC;IAInD;;OAEG;IACH,IAAI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B,CAAC,gBAAgB,CAAC;IAE1D;;;;OAIG;IACH,uBAAuB,EAAE,eAAe,GAAG,QAAQ,CAAC;IAEpD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,MAAM,CAAC,OAAO,WAAW,qBAAqB,CAAC;IAC7C,OAAO,EACL,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,KAAK,IAAI,KAAK,EACd,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SubscriptionTimelines = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const ItemsAPI = tslib_1.__importStar(require("./items.js"));
|
|
8
|
+
const items_1 = require("./items.js");
|
|
9
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
10
|
+
class SubscriptionTimelines extends resource_1.APIResource {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.items = new ItemsAPI.Items(this._client);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Create Subscription Timeline
|
|
17
|
+
*/
|
|
18
|
+
create(body, options) {
|
|
19
|
+
return this._client.post('/subscription-timelines', { body, ...options });
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get Subscription Timeline
|
|
23
|
+
*/
|
|
24
|
+
retrieve(subscriptionTimelineID, options) {
|
|
25
|
+
return this._client.get((0, path_1.path) `/subscription-timelines/${subscriptionTimelineID}`, options);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* List Subscription Timelines
|
|
29
|
+
*/
|
|
30
|
+
list(query = {}, options) {
|
|
31
|
+
return this._client.get('/subscription-timelines', { query, ...options });
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Start Subscription Timeline
|
|
35
|
+
*/
|
|
36
|
+
start(subscriptionTimelineID, body, options) {
|
|
37
|
+
return this._client.post((0, path_1.path) `/subscription-timelines/${subscriptionTimelineID}/start`, {
|
|
38
|
+
body,
|
|
39
|
+
...options,
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.SubscriptionTimelines = SubscriptionTimelines;
|
|
44
|
+
SubscriptionTimelines.Items = items_1.Items;
|
|
45
|
+
//# sourceMappingURL=subscription-timelines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-timelines.js","sourceRoot":"","sources":["../../src/resources/subscription-timelines/subscription-timelines.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAElD,6DAAoC;AACpC,sCAAwG;AAGxG,uDAAiD;AAEjD,MAAa,qBAAsB,SAAQ,sBAAW;IAAtD;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6C3D,CAAC;IA3CC;;OAEG;IACH,MAAM,CACJ,IAAsC,EACtC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,sBAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,2BAA2B,sBAAsB,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,KAAK,CACH,sBAA8B,EAC9B,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,2BAA2B,sBAAsB,QAAQ,EAAE;YACtF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AA9CD,sDA8CC;AAmKD,qBAAqB,CAAC,KAAK,GAAG,aAAK,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as ItemsAPI from "./items.mjs";
|
|
4
|
+
import { Items } from "./items.mjs";
|
|
5
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
6
|
+
export class SubscriptionTimelines extends APIResource {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.items = new ItemsAPI.Items(this._client);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Create Subscription Timeline
|
|
13
|
+
*/
|
|
14
|
+
create(body, options) {
|
|
15
|
+
return this._client.post('/subscription-timelines', { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get Subscription Timeline
|
|
19
|
+
*/
|
|
20
|
+
retrieve(subscriptionTimelineID, options) {
|
|
21
|
+
return this._client.get(path `/subscription-timelines/${subscriptionTimelineID}`, options);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* List Subscription Timelines
|
|
25
|
+
*/
|
|
26
|
+
list(query = {}, options) {
|
|
27
|
+
return this._client.get('/subscription-timelines', { query, ...options });
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Start Subscription Timeline
|
|
31
|
+
*/
|
|
32
|
+
start(subscriptionTimelineID, body, options) {
|
|
33
|
+
return this._client.post(path `/subscription-timelines/${subscriptionTimelineID}/start`, {
|
|
34
|
+
body,
|
|
35
|
+
...options,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
SubscriptionTimelines.Items = Items;
|
|
40
|
+
//# sourceMappingURL=subscription-timelines.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-timelines.mjs","sourceRoot":"","sources":["../../src/resources/subscription-timelines/subscription-timelines.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,QAAQ;OACb,EAA0E,KAAK,EAAE;OAGjF,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,qBAAsB,SAAQ,WAAW;IAAtD;;QACE,UAAK,GAAmB,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA6C3D,CAAC;IA3CC;;OAEG;IACH,MAAM,CACJ,IAAsC,EACtC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,QAAQ,CACN,sBAA8B,EAC9B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,2BAA2B,sBAAsB,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;OAEG;IACH,KAAK,CACH,sBAA8B,EAC9B,IAAqC,EACrC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA,2BAA2B,sBAAsB,QAAQ,EAAE;YACtF,IAAI;YACJ,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;CACF;AAmKD,qBAAqB,CAAC,KAAK,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-timelines.d.mts","sourceRoot":"","sources":["../src/resources/subscription-timelines.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-timelines.d.ts","sourceRoot":"","sources":["../src/resources/subscription-timelines.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./subscription-timelines/index.js"), exports);
|
|
6
|
+
//# sourceMappingURL=subscription-timelines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-timelines.js","sourceRoot":"","sources":["../src/resources/subscription-timelines.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4EAA+C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-timelines.mjs","sourceRoot":"","sources":["../src/resources/subscription-timelines.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
@@ -267,6 +267,10 @@ export interface SubscriptionCreateParams {
|
|
|
267
267
|
rate_price_multipliers?: {
|
|
268
268
|
[key: string]: number | string;
|
|
269
269
|
};
|
|
270
|
+
/**
|
|
271
|
+
* The ID of the subscription timeline to use for the subscription.
|
|
272
|
+
*/
|
|
273
|
+
subscription_timeline_id?: string | null;
|
|
270
274
|
}
|
|
271
275
|
export interface SubscriptionListParams {
|
|
272
276
|
limit?: number;
|