orb-billing 2.2.0 → 2.4.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 +75 -0
- package/client.d.ts +222 -0
- package/client.d.ts.map +1 -0
- package/client.js +156 -0
- package/client.js.map +1 -0
- package/client.mjs +129 -0
- package/client.mjs.map +1 -0
- package/index.d.mts +5 -217
- package/index.d.ts +5 -217
- package/index.d.ts.map +1 -1
- package/index.js +10 -133
- package/index.js.map +1 -1
- package/index.mjs +5 -130
- package/index.mjs.map +1 -1
- package/package.json +4 -4
- package/resources/coupons/coupons.d.ts +3 -22
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/customers/costs.d.ts +4 -4
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +12 -4
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +16 -6
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +38 -8
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/usage.d.ts +2 -2
- package/resources/customers/usage.d.ts.map +1 -1
- package/resources/customers/usage.js.map +1 -1
- package/resources/customers/usage.mjs.map +1 -1
- package/resources/events/backfills.d.ts +20 -0
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/index.d.ts +2 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -6
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -2
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.ts +1 -1
- package/resources/invoices.js +1 -1
- package/resources/invoices.mjs +1 -1
- package/resources/plans/plans.d.ts +118 -1
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/index.d.ts +1 -1
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +3 -3
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +236 -2
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +26 -0
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +26 -0
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +5 -0
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +353 -19
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +11 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +11 -0
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +4 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +5 -3
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +301 -0
- package/src/index.ts +6 -297
- package/src/resources/coupons/coupons.ts +3 -26
- package/src/resources/customers/costs.ts +6 -6
- package/src/resources/customers/credits/credits.ts +16 -6
- package/src/resources/customers/credits/ledger.ts +20 -8
- package/src/resources/customers/credits/top-ups.ts +46 -10
- package/src/resources/customers/usage.ts +2 -2
- package/src/resources/events/backfills.ts +25 -0
- package/src/resources/index.ts +11 -2
- package/src/resources/invoices.ts +1 -1
- package/src/resources/plans/plans.ts +144 -1
- package/src/resources/prices/index.ts +10 -1
- package/src/resources/prices/prices.ts +333 -2
- package/src/resources/shared.ts +8 -0
- package/src/resources/subscriptions.ts +441 -23
- package/src/resources/webhooks.ts +5 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/beta/beta.d.ts +0 -12
- package/resources/beta/beta.d.ts.map +0 -1
- package/resources/beta/beta.js +0 -40
- package/resources/beta/beta.js.map +0 -1
- package/resources/beta/beta.mjs +0 -13
- package/resources/beta/beta.mjs.map +0 -1
- package/resources/beta/index.d.ts +0 -3
- package/resources/beta/index.d.ts.map +0 -1
- package/resources/beta/index.js +0 -9
- package/resources/beta/index.js.map +0 -1
- package/resources/beta/index.mjs +0 -4
- package/resources/beta/index.mjs.map +0 -1
- package/resources/beta/price.d.ts +0 -82
- package/resources/beta/price.d.ts.map +0 -1
- package/resources/beta/price.js +0 -37
- package/resources/beta/price.js.map +0 -1
- package/resources/beta/price.mjs +0 -33
- package/resources/beta/price.mjs.map +0 -1
- package/src/resources/beta/beta.ts +0 -15
- package/src/resources/beta/index.ts +0 -4
- package/src/resources/beta/price.ts +0 -101
|
@@ -144,13 +144,13 @@ export class Costs extends APIResource {
|
|
|
144
144
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
145
145
|
*/
|
|
146
146
|
list(
|
|
147
|
-
customerId: string
|
|
147
|
+
customerId: string,
|
|
148
148
|
query?: CostListParams,
|
|
149
149
|
options?: Core.RequestOptions,
|
|
150
150
|
): Core.APIPromise<CostListResponse>;
|
|
151
|
-
list(customerId: string
|
|
151
|
+
list(customerId: string, options?: Core.RequestOptions): Core.APIPromise<CostListResponse>;
|
|
152
152
|
list(
|
|
153
|
-
customerId: string
|
|
153
|
+
customerId: string,
|
|
154
154
|
query: CostListParams | Core.RequestOptions = {},
|
|
155
155
|
options?: Core.RequestOptions,
|
|
156
156
|
): Core.APIPromise<CostListResponse> {
|
|
@@ -297,16 +297,16 @@ export class Costs extends APIResource {
|
|
|
297
297
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
298
298
|
*/
|
|
299
299
|
listByExternalId(
|
|
300
|
-
externalCustomerId: string
|
|
300
|
+
externalCustomerId: string,
|
|
301
301
|
query?: CostListByExternalIDParams,
|
|
302
302
|
options?: Core.RequestOptions,
|
|
303
303
|
): Core.APIPromise<CostListByExternalIDResponse>;
|
|
304
304
|
listByExternalId(
|
|
305
|
-
externalCustomerId: string
|
|
305
|
+
externalCustomerId: string,
|
|
306
306
|
options?: Core.RequestOptions,
|
|
307
307
|
): Core.APIPromise<CostListByExternalIDResponse>;
|
|
308
308
|
listByExternalId(
|
|
309
|
-
externalCustomerId: string
|
|
309
|
+
externalCustomerId: string,
|
|
310
310
|
query: CostListByExternalIDParams | Core.RequestOptions = {},
|
|
311
311
|
options?: Core.RequestOptions,
|
|
312
312
|
): Core.APIPromise<CostListByExternalIDResponse> {
|
|
@@ -14,18 +14,21 @@ export class Credits extends APIResource {
|
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
17
|
+
*
|
|
18
|
+
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
19
|
+
* currency, set `currency` to an ISO 4217 string.
|
|
17
20
|
*/
|
|
18
21
|
list(
|
|
19
|
-
customerId: string
|
|
22
|
+
customerId: string,
|
|
20
23
|
query?: CreditListParams,
|
|
21
24
|
options?: Core.RequestOptions,
|
|
22
25
|
): Core.PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
23
26
|
list(
|
|
24
|
-
customerId: string
|
|
27
|
+
customerId: string,
|
|
25
28
|
options?: Core.RequestOptions,
|
|
26
29
|
): Core.PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
27
30
|
list(
|
|
28
|
-
customerId: string
|
|
31
|
+
customerId: string,
|
|
29
32
|
query: CreditListParams | Core.RequestOptions = {},
|
|
30
33
|
options?: Core.RequestOptions,
|
|
31
34
|
): Core.PagePromise<CreditListResponsesPage, CreditListResponse> {
|
|
@@ -40,18 +43,21 @@ export class Credits extends APIResource {
|
|
|
40
43
|
|
|
41
44
|
/**
|
|
42
45
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
46
|
+
*
|
|
47
|
+
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
48
|
+
* currency, set `currency` to an ISO 4217 string.
|
|
43
49
|
*/
|
|
44
50
|
listByExternalId(
|
|
45
|
-
externalCustomerId: string
|
|
51
|
+
externalCustomerId: string,
|
|
46
52
|
query?: CreditListByExternalIDParams,
|
|
47
53
|
options?: Core.RequestOptions,
|
|
48
54
|
): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
49
55
|
listByExternalId(
|
|
50
|
-
externalCustomerId: string
|
|
56
|
+
externalCustomerId: string,
|
|
51
57
|
options?: Core.RequestOptions,
|
|
52
58
|
): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
53
59
|
listByExternalId(
|
|
54
|
-
externalCustomerId: string
|
|
60
|
+
externalCustomerId: string,
|
|
55
61
|
query: CreditListByExternalIDParams | Core.RequestOptions = {},
|
|
56
62
|
options?: Core.RequestOptions,
|
|
57
63
|
): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse> {
|
|
@@ -75,6 +81,8 @@ export interface CreditListResponse {
|
|
|
75
81
|
|
|
76
82
|
balance: number;
|
|
77
83
|
|
|
84
|
+
effective_date: string | null;
|
|
85
|
+
|
|
78
86
|
expiry_date: string | null;
|
|
79
87
|
|
|
80
88
|
per_unit_cost_basis: string | null;
|
|
@@ -87,6 +95,8 @@ export interface CreditListByExternalIDResponse {
|
|
|
87
95
|
|
|
88
96
|
balance: number;
|
|
89
97
|
|
|
98
|
+
effective_date: string | null;
|
|
99
|
+
|
|
90
100
|
expiry_date: string | null;
|
|
91
101
|
|
|
92
102
|
per_unit_cost_basis: string | null;
|
|
@@ -91,16 +91,16 @@ export class Ledger extends APIResource {
|
|
|
91
91
|
* entry will be added to the ledger to indicate the adjustment of credits.
|
|
92
92
|
*/
|
|
93
93
|
list(
|
|
94
|
-
customerId: string
|
|
94
|
+
customerId: string,
|
|
95
95
|
query?: LedgerListParams,
|
|
96
96
|
options?: Core.RequestOptions,
|
|
97
97
|
): Core.PagePromise<LedgerListResponsesPage, LedgerListResponse>;
|
|
98
98
|
list(
|
|
99
|
-
customerId: string
|
|
99
|
+
customerId: string,
|
|
100
100
|
options?: Core.RequestOptions,
|
|
101
101
|
): Core.PagePromise<LedgerListResponsesPage, LedgerListResponse>;
|
|
102
102
|
list(
|
|
103
|
-
customerId: string
|
|
103
|
+
customerId: string,
|
|
104
104
|
query: LedgerListParams | Core.RequestOptions = {},
|
|
105
105
|
options?: Core.RequestOptions,
|
|
106
106
|
): Core.PagePromise<LedgerListResponsesPage, LedgerListResponse> {
|
|
@@ -225,7 +225,7 @@ export class Ledger extends APIResource {
|
|
|
225
225
|
* return to the customer, up to the block's initial balance.
|
|
226
226
|
*/
|
|
227
227
|
createEntry(
|
|
228
|
-
customerId: string
|
|
228
|
+
customerId: string,
|
|
229
229
|
body: LedgerCreateEntryParams,
|
|
230
230
|
options?: Core.RequestOptions,
|
|
231
231
|
): Core.APIPromise<LedgerCreateEntryResponse> {
|
|
@@ -344,7 +344,7 @@ export class Ledger extends APIResource {
|
|
|
344
344
|
* return to the customer, up to the block's initial balance.
|
|
345
345
|
*/
|
|
346
346
|
createEntryByExternalId(
|
|
347
|
-
externalCustomerId: string
|
|
347
|
+
externalCustomerId: string,
|
|
348
348
|
body: LedgerCreateEntryByExternalIDParams,
|
|
349
349
|
options?: Core.RequestOptions,
|
|
350
350
|
): Core.APIPromise<LedgerCreateEntryByExternalIDResponse> {
|
|
@@ -438,16 +438,16 @@ export class Ledger extends APIResource {
|
|
|
438
438
|
* entry will be added to the ledger to indicate the adjustment of credits.
|
|
439
439
|
*/
|
|
440
440
|
listByExternalId(
|
|
441
|
-
externalCustomerId: string
|
|
441
|
+
externalCustomerId: string,
|
|
442
442
|
query?: LedgerListByExternalIDParams,
|
|
443
443
|
options?: Core.RequestOptions,
|
|
444
444
|
): Core.PagePromise<LedgerListByExternalIDResponsesPage, LedgerListByExternalIDResponse>;
|
|
445
445
|
listByExternalId(
|
|
446
|
-
externalCustomerId: string
|
|
446
|
+
externalCustomerId: string,
|
|
447
447
|
options?: Core.RequestOptions,
|
|
448
448
|
): Core.PagePromise<LedgerListByExternalIDResponsesPage, LedgerListByExternalIDResponse>;
|
|
449
449
|
listByExternalId(
|
|
450
|
-
externalCustomerId: string
|
|
450
|
+
externalCustomerId: string,
|
|
451
451
|
query: LedgerListByExternalIDParams | Core.RequestOptions = {},
|
|
452
452
|
options?: Core.RequestOptions,
|
|
453
453
|
): Core.PagePromise<LedgerListByExternalIDResponsesPage, LedgerListByExternalIDResponse> {
|
|
@@ -2115,6 +2115,12 @@ export namespace LedgerCreateEntryParams {
|
|
|
2115
2115
|
* An optional memo to display on the invoice.
|
|
2116
2116
|
*/
|
|
2117
2117
|
memo?: string | null;
|
|
2118
|
+
|
|
2119
|
+
/**
|
|
2120
|
+
* If true, the new credit block will require that the corresponding invoice is
|
|
2121
|
+
* paid before it can be drawn down from.
|
|
2122
|
+
*/
|
|
2123
|
+
require_successful_payment?: boolean;
|
|
2118
2124
|
}
|
|
2119
2125
|
}
|
|
2120
2126
|
|
|
@@ -2360,6 +2366,12 @@ export namespace LedgerCreateEntryByExternalIDParams {
|
|
|
2360
2366
|
* An optional memo to display on the invoice.
|
|
2361
2367
|
*/
|
|
2362
2368
|
memo?: string | null;
|
|
2369
|
+
|
|
2370
|
+
/**
|
|
2371
|
+
* If true, the new credit block will require that the corresponding invoice is
|
|
2372
|
+
* paid before it can be drawn down from.
|
|
2373
|
+
*/
|
|
2374
|
+
require_successful_payment?: boolean;
|
|
2363
2375
|
}
|
|
2364
2376
|
}
|
|
2365
2377
|
|
|
@@ -17,7 +17,7 @@ export class TopUps extends APIResource {
|
|
|
17
17
|
* top-up will be replaced.
|
|
18
18
|
*/
|
|
19
19
|
create(
|
|
20
|
-
customerId: string
|
|
20
|
+
customerId: string,
|
|
21
21
|
body: TopUpCreateParams,
|
|
22
22
|
options?: Core.RequestOptions,
|
|
23
23
|
): Core.APIPromise<TopUpCreateResponse> {
|
|
@@ -28,16 +28,16 @@ export class TopUps extends APIResource {
|
|
|
28
28
|
* List top-ups
|
|
29
29
|
*/
|
|
30
30
|
list(
|
|
31
|
-
customerId: string
|
|
31
|
+
customerId: string,
|
|
32
32
|
query?: TopUpListParams,
|
|
33
33
|
options?: Core.RequestOptions,
|
|
34
34
|
): Core.PagePromise<TopUpListResponsesPage, TopUpListResponse>;
|
|
35
35
|
list(
|
|
36
|
-
customerId: string
|
|
36
|
+
customerId: string,
|
|
37
37
|
options?: Core.RequestOptions,
|
|
38
38
|
): Core.PagePromise<TopUpListResponsesPage, TopUpListResponse>;
|
|
39
39
|
list(
|
|
40
|
-
customerId: string
|
|
40
|
+
customerId: string,
|
|
41
41
|
query: TopUpListParams | Core.RequestOptions = {},
|
|
42
42
|
options?: Core.RequestOptions,
|
|
43
43
|
): Core.PagePromise<TopUpListResponsesPage, TopUpListResponse> {
|
|
@@ -53,7 +53,7 @@ export class TopUps extends APIResource {
|
|
|
53
53
|
/**
|
|
54
54
|
* Delete top-up
|
|
55
55
|
*/
|
|
56
|
-
delete(customerId: string
|
|
56
|
+
delete(customerId: string, topUpId: string, options?: Core.RequestOptions): Core.APIPromise<void> {
|
|
57
57
|
return this._client.delete(`/customers/${customerId}/credits/top_ups/${topUpId}`, {
|
|
58
58
|
...options,
|
|
59
59
|
headers: { Accept: '*/*', ...options?.headers },
|
|
@@ -70,7 +70,7 @@ export class TopUps extends APIResource {
|
|
|
70
70
|
* top-up will be replaced.
|
|
71
71
|
*/
|
|
72
72
|
createByExternalId(
|
|
73
|
-
externalCustomerId: string
|
|
73
|
+
externalCustomerId: string,
|
|
74
74
|
body: TopUpCreateByExternalIDParams,
|
|
75
75
|
options?: Core.RequestOptions,
|
|
76
76
|
): Core.APIPromise<TopUpCreateByExternalIDResponse> {
|
|
@@ -84,7 +84,7 @@ export class TopUps extends APIResource {
|
|
|
84
84
|
* Delete top-up by external ID
|
|
85
85
|
*/
|
|
86
86
|
deleteByExternalId(
|
|
87
|
-
externalCustomerId: string
|
|
87
|
+
externalCustomerId: string,
|
|
88
88
|
topUpId: string,
|
|
89
89
|
options?: Core.RequestOptions,
|
|
90
90
|
): Core.APIPromise<void> {
|
|
@@ -98,16 +98,16 @@ export class TopUps extends APIResource {
|
|
|
98
98
|
* List top-ups by external ID
|
|
99
99
|
*/
|
|
100
100
|
listByExternalId(
|
|
101
|
-
externalCustomerId: string
|
|
101
|
+
externalCustomerId: string,
|
|
102
102
|
query?: TopUpListByExternalIDParams,
|
|
103
103
|
options?: Core.RequestOptions,
|
|
104
104
|
): Core.PagePromise<TopUpListByExternalIDResponsesPage, TopUpListByExternalIDResponse>;
|
|
105
105
|
listByExternalId(
|
|
106
|
-
externalCustomerId: string
|
|
106
|
+
externalCustomerId: string,
|
|
107
107
|
options?: Core.RequestOptions,
|
|
108
108
|
): Core.PagePromise<TopUpListByExternalIDResponsesPage, TopUpListByExternalIDResponse>;
|
|
109
109
|
listByExternalId(
|
|
110
|
-
externalCustomerId: string
|
|
110
|
+
externalCustomerId: string,
|
|
111
111
|
query: TopUpListByExternalIDParams | Core.RequestOptions = {},
|
|
112
112
|
options?: Core.RequestOptions,
|
|
113
113
|
): Core.PagePromise<TopUpListByExternalIDResponsesPage, TopUpListByExternalIDResponse> {
|
|
@@ -190,6 +190,12 @@ export namespace TopUpCreateResponse {
|
|
|
190
190
|
* An optional memo to display on the invoice.
|
|
191
191
|
*/
|
|
192
192
|
memo?: string | null;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* If true, new credit blocks created by this top-up will require that the
|
|
196
|
+
* corresponding invoice is paid before they can be drawn down from.
|
|
197
|
+
*/
|
|
198
|
+
require_successful_payment?: boolean;
|
|
193
199
|
}
|
|
194
200
|
}
|
|
195
201
|
|
|
@@ -257,6 +263,12 @@ export namespace TopUpListResponse {
|
|
|
257
263
|
* An optional memo to display on the invoice.
|
|
258
264
|
*/
|
|
259
265
|
memo?: string | null;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* If true, new credit blocks created by this top-up will require that the
|
|
269
|
+
* corresponding invoice is paid before they can be drawn down from.
|
|
270
|
+
*/
|
|
271
|
+
require_successful_payment?: boolean;
|
|
260
272
|
}
|
|
261
273
|
}
|
|
262
274
|
|
|
@@ -324,6 +336,12 @@ export namespace TopUpCreateByExternalIDResponse {
|
|
|
324
336
|
* An optional memo to display on the invoice.
|
|
325
337
|
*/
|
|
326
338
|
memo?: string | null;
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* If true, new credit blocks created by this top-up will require that the
|
|
342
|
+
* corresponding invoice is paid before they can be drawn down from.
|
|
343
|
+
*/
|
|
344
|
+
require_successful_payment?: boolean;
|
|
327
345
|
}
|
|
328
346
|
}
|
|
329
347
|
|
|
@@ -391,6 +409,12 @@ export namespace TopUpListByExternalIDResponse {
|
|
|
391
409
|
* An optional memo to display on the invoice.
|
|
392
410
|
*/
|
|
393
411
|
memo?: string | null;
|
|
412
|
+
|
|
413
|
+
/**
|
|
414
|
+
* If true, new credit blocks created by this top-up will require that the
|
|
415
|
+
* corresponding invoice is paid before they can be drawn down from.
|
|
416
|
+
*/
|
|
417
|
+
require_successful_payment?: boolean;
|
|
394
418
|
}
|
|
395
419
|
}
|
|
396
420
|
|
|
@@ -456,6 +480,12 @@ export namespace TopUpCreateParams {
|
|
|
456
480
|
* An optional memo to display on the invoice.
|
|
457
481
|
*/
|
|
458
482
|
memo?: string | null;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* If true, new credit blocks created by this top-up will require that the
|
|
486
|
+
* corresponding invoice is paid before they can be drawn down from.
|
|
487
|
+
*/
|
|
488
|
+
require_successful_payment?: boolean;
|
|
459
489
|
}
|
|
460
490
|
}
|
|
461
491
|
|
|
@@ -523,6 +553,12 @@ export namespace TopUpCreateByExternalIDParams {
|
|
|
523
553
|
* An optional memo to display on the invoice.
|
|
524
554
|
*/
|
|
525
555
|
memo?: string | null;
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* If true, new credit blocks created by this top-up will require that the
|
|
559
|
+
* corresponding invoice is paid before they can be drawn down from.
|
|
560
|
+
*/
|
|
561
|
+
require_successful_payment?: boolean;
|
|
526
562
|
}
|
|
527
563
|
}
|
|
528
564
|
|
|
@@ -104,7 +104,7 @@ export class Usage extends APIResource {
|
|
|
104
104
|
* using multiple calls with small adjacent (e.g. every hour) timeframes.
|
|
105
105
|
*/
|
|
106
106
|
update(
|
|
107
|
-
id: string
|
|
107
|
+
id: string,
|
|
108
108
|
params: UsageUpdateParams,
|
|
109
109
|
options?: Core.RequestOptions,
|
|
110
110
|
): Core.APIPromise<UsageUpdateResponse> {
|
|
@@ -215,7 +215,7 @@ export class Usage extends APIResource {
|
|
|
215
215
|
* using multiple calls with small adjacent (e.g. every hour) timeframes.
|
|
216
216
|
*/
|
|
217
217
|
updateByExternalId(
|
|
218
|
-
id: string
|
|
218
|
+
id: string,
|
|
219
219
|
params: UsageUpdateByExternalIDParams,
|
|
220
220
|
options?: Core.RequestOptions,
|
|
221
221
|
): Core.APIPromise<UsageUpdateByExternalIDResponse> {
|
|
@@ -116,6 +116,11 @@ export interface BackfillCreateResponse {
|
|
|
116
116
|
*/
|
|
117
117
|
customer_id: string | null;
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* The number of events ingested in this backfill.
|
|
121
|
+
*/
|
|
122
|
+
events_ingested: number;
|
|
123
|
+
|
|
119
124
|
/**
|
|
120
125
|
* The time at which this backfill was reverted.
|
|
121
126
|
*/
|
|
@@ -152,6 +157,11 @@ export interface BackfillListResponse {
|
|
|
152
157
|
*/
|
|
153
158
|
customer_id: string | null;
|
|
154
159
|
|
|
160
|
+
/**
|
|
161
|
+
* The number of events ingested in this backfill.
|
|
162
|
+
*/
|
|
163
|
+
events_ingested: number;
|
|
164
|
+
|
|
155
165
|
/**
|
|
156
166
|
* The time at which this backfill was reverted.
|
|
157
167
|
*/
|
|
@@ -188,6 +198,11 @@ export interface BackfillCloseResponse {
|
|
|
188
198
|
*/
|
|
189
199
|
customer_id: string | null;
|
|
190
200
|
|
|
201
|
+
/**
|
|
202
|
+
* The number of events ingested in this backfill.
|
|
203
|
+
*/
|
|
204
|
+
events_ingested: number;
|
|
205
|
+
|
|
191
206
|
/**
|
|
192
207
|
* The time at which this backfill was reverted.
|
|
193
208
|
*/
|
|
@@ -224,6 +239,11 @@ export interface BackfillFetchResponse {
|
|
|
224
239
|
*/
|
|
225
240
|
customer_id: string | null;
|
|
226
241
|
|
|
242
|
+
/**
|
|
243
|
+
* The number of events ingested in this backfill.
|
|
244
|
+
*/
|
|
245
|
+
events_ingested: number;
|
|
246
|
+
|
|
227
247
|
/**
|
|
228
248
|
* The time at which this backfill was reverted.
|
|
229
249
|
*/
|
|
@@ -260,6 +280,11 @@ export interface BackfillRevertResponse {
|
|
|
260
280
|
*/
|
|
261
281
|
customer_id: string | null;
|
|
262
282
|
|
|
283
|
+
/**
|
|
284
|
+
* The number of events ingested in this backfill.
|
|
285
|
+
*/
|
|
286
|
+
events_ingested: number;
|
|
287
|
+
|
|
263
288
|
/**
|
|
264
289
|
* The time at which this backfill was reverted.
|
|
265
290
|
*/
|
package/src/resources/index.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export * from './shared';
|
|
4
|
-
export { Beta } from './beta/beta';
|
|
5
4
|
export { Coupon, CouponCreateParams, CouponListParams, CouponsPage, Coupons } from './coupons/coupons';
|
|
6
5
|
export { CreditNote, CreditNoteListParams, CreditNotesPage, CreditNotes } from './credit-notes';
|
|
7
6
|
export {
|
|
@@ -13,6 +12,16 @@ export {
|
|
|
13
12
|
CustomersPage,
|
|
14
13
|
Customers,
|
|
15
14
|
} from './customers/customers';
|
|
15
|
+
export {
|
|
16
|
+
EvaluatePriceGroup,
|
|
17
|
+
Price,
|
|
18
|
+
PriceEvaluateResponse,
|
|
19
|
+
PriceCreateParams,
|
|
20
|
+
PriceListParams,
|
|
21
|
+
PriceEvaluateParams,
|
|
22
|
+
PricesPage,
|
|
23
|
+
Prices,
|
|
24
|
+
} from './prices/prices';
|
|
16
25
|
export {
|
|
17
26
|
EventUpdateResponse,
|
|
18
27
|
EventDeprecateResponse,
|
|
@@ -49,7 +58,6 @@ export {
|
|
|
49
58
|
Metrics,
|
|
50
59
|
} from './metrics';
|
|
51
60
|
export { Plan, PlanCreateParams, PlanUpdateParams, PlanListParams, PlansPage, Plans } from './plans/plans';
|
|
52
|
-
export { Price, PriceCreateParams, PriceListParams, PricesPage, Prices } from './prices/prices';
|
|
53
61
|
export {
|
|
54
62
|
Subscription,
|
|
55
63
|
SubscriptionUsage,
|
|
@@ -57,6 +65,7 @@ export {
|
|
|
57
65
|
SubscriptionFetchCostsResponse,
|
|
58
66
|
SubscriptionFetchScheduleResponse,
|
|
59
67
|
SubscriptionCreateParams,
|
|
68
|
+
SubscriptionUpdateParams,
|
|
60
69
|
SubscriptionListParams,
|
|
61
70
|
SubscriptionCancelParams,
|
|
62
71
|
SubscriptionFetchCostsParams,
|
|
@@ -69,7 +69,7 @@ export class Invoices extends APIResource {
|
|
|
69
69
|
|
|
70
70
|
/**
|
|
71
71
|
* This endpoint allows an eligible invoice to be issued manually. This is only
|
|
72
|
-
* possible with invoices where status is `draft`, `will_auto_issue` is
|
|
72
|
+
* possible with invoices where status is `draft`, `will_auto_issue` is false, and
|
|
73
73
|
* an `eligible_to_issue_at` is a time in the past. Issuing an invoice could
|
|
74
74
|
* possibly trigger side effects, some of which could be customer-visible (e.g.
|
|
75
75
|
* sending emails, auto-collecting payment, syncing the invoice to external
|
|
@@ -373,6 +373,17 @@ export namespace PlanCreateParams {
|
|
|
373
373
|
*/
|
|
374
374
|
billed_in_advance?: boolean | null;
|
|
375
375
|
|
|
376
|
+
/**
|
|
377
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
378
|
+
*/
|
|
379
|
+
conversion_rate?: number | null;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
383
|
+
* price is billed.
|
|
384
|
+
*/
|
|
385
|
+
currency?: string | null;
|
|
386
|
+
|
|
376
387
|
/**
|
|
377
388
|
* An alias for the price.
|
|
378
389
|
*/
|
|
@@ -431,6 +442,17 @@ export namespace PlanCreateParams {
|
|
|
431
442
|
*/
|
|
432
443
|
billed_in_advance?: boolean | null;
|
|
433
444
|
|
|
445
|
+
/**
|
|
446
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
447
|
+
*/
|
|
448
|
+
conversion_rate?: number | null;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
452
|
+
* price is billed.
|
|
453
|
+
*/
|
|
454
|
+
currency?: string | null;
|
|
455
|
+
|
|
434
456
|
/**
|
|
435
457
|
* An alias for the price.
|
|
436
458
|
*/
|
|
@@ -459,7 +481,7 @@ export namespace PlanCreateParams {
|
|
|
459
481
|
* An integer amount to represent package size. For example, 1000 here would divide
|
|
460
482
|
* usage by 1000 before multiplying by package_amount in rating
|
|
461
483
|
*/
|
|
462
|
-
package_size
|
|
484
|
+
package_size: number;
|
|
463
485
|
}
|
|
464
486
|
}
|
|
465
487
|
|
|
@@ -495,6 +517,17 @@ export namespace PlanCreateParams {
|
|
|
495
517
|
*/
|
|
496
518
|
billed_in_advance?: boolean | null;
|
|
497
519
|
|
|
520
|
+
/**
|
|
521
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
522
|
+
*/
|
|
523
|
+
conversion_rate?: number | null;
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
527
|
+
* price is billed.
|
|
528
|
+
*/
|
|
529
|
+
currency?: string | null;
|
|
530
|
+
|
|
498
531
|
/**
|
|
499
532
|
* An alias for the price.
|
|
500
533
|
*/
|
|
@@ -579,6 +612,17 @@ export namespace PlanCreateParams {
|
|
|
579
612
|
*/
|
|
580
613
|
billed_in_advance?: boolean | null;
|
|
581
614
|
|
|
615
|
+
/**
|
|
616
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
617
|
+
*/
|
|
618
|
+
conversion_rate?: number | null;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
622
|
+
* price is billed.
|
|
623
|
+
*/
|
|
624
|
+
currency?: string | null;
|
|
625
|
+
|
|
582
626
|
/**
|
|
583
627
|
* An alias for the price.
|
|
584
628
|
*/
|
|
@@ -656,6 +700,17 @@ export namespace PlanCreateParams {
|
|
|
656
700
|
*/
|
|
657
701
|
billed_in_advance?: boolean | null;
|
|
658
702
|
|
|
703
|
+
/**
|
|
704
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
705
|
+
*/
|
|
706
|
+
conversion_rate?: number | null;
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
710
|
+
* price is billed.
|
|
711
|
+
*/
|
|
712
|
+
currency?: string | null;
|
|
713
|
+
|
|
659
714
|
/**
|
|
660
715
|
* An alias for the price.
|
|
661
716
|
*/
|
|
@@ -739,6 +794,17 @@ export namespace PlanCreateParams {
|
|
|
739
794
|
*/
|
|
740
795
|
billed_in_advance?: boolean | null;
|
|
741
796
|
|
|
797
|
+
/**
|
|
798
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
799
|
+
*/
|
|
800
|
+
conversion_rate?: number | null;
|
|
801
|
+
|
|
802
|
+
/**
|
|
803
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
804
|
+
* price is billed.
|
|
805
|
+
*/
|
|
806
|
+
currency?: string | null;
|
|
807
|
+
|
|
742
808
|
/**
|
|
743
809
|
* An alias for the price.
|
|
744
810
|
*/
|
|
@@ -802,6 +868,17 @@ export namespace PlanCreateParams {
|
|
|
802
868
|
*/
|
|
803
869
|
billed_in_advance?: boolean | null;
|
|
804
870
|
|
|
871
|
+
/**
|
|
872
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
873
|
+
*/
|
|
874
|
+
conversion_rate?: number | null;
|
|
875
|
+
|
|
876
|
+
/**
|
|
877
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
878
|
+
* price is billed.
|
|
879
|
+
*/
|
|
880
|
+
currency?: string | null;
|
|
881
|
+
|
|
805
882
|
/**
|
|
806
883
|
* An alias for the price.
|
|
807
884
|
*/
|
|
@@ -880,6 +957,17 @@ export namespace PlanCreateParams {
|
|
|
880
957
|
*/
|
|
881
958
|
billed_in_advance?: boolean | null;
|
|
882
959
|
|
|
960
|
+
/**
|
|
961
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
962
|
+
*/
|
|
963
|
+
conversion_rate?: number | null;
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
967
|
+
* price is billed.
|
|
968
|
+
*/
|
|
969
|
+
currency?: string | null;
|
|
970
|
+
|
|
883
971
|
/**
|
|
884
972
|
* An alias for the price.
|
|
885
973
|
*/
|
|
@@ -952,6 +1040,17 @@ export namespace PlanCreateParams {
|
|
|
952
1040
|
*/
|
|
953
1041
|
billed_in_advance?: boolean | null;
|
|
954
1042
|
|
|
1043
|
+
/**
|
|
1044
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1045
|
+
*/
|
|
1046
|
+
conversion_rate?: number | null;
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1050
|
+
* price is billed.
|
|
1051
|
+
*/
|
|
1052
|
+
currency?: string | null;
|
|
1053
|
+
|
|
955
1054
|
/**
|
|
956
1055
|
* An alias for the price.
|
|
957
1056
|
*/
|
|
@@ -1001,6 +1100,17 @@ export namespace PlanCreateParams {
|
|
|
1001
1100
|
*/
|
|
1002
1101
|
billed_in_advance?: boolean | null;
|
|
1003
1102
|
|
|
1103
|
+
/**
|
|
1104
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1105
|
+
*/
|
|
1106
|
+
conversion_rate?: number | null;
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1110
|
+
* price is billed.
|
|
1111
|
+
*/
|
|
1112
|
+
currency?: string | null;
|
|
1113
|
+
|
|
1004
1114
|
/**
|
|
1005
1115
|
* An alias for the price.
|
|
1006
1116
|
*/
|
|
@@ -1050,6 +1160,17 @@ export namespace PlanCreateParams {
|
|
|
1050
1160
|
*/
|
|
1051
1161
|
billed_in_advance?: boolean | null;
|
|
1052
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1165
|
+
*/
|
|
1166
|
+
conversion_rate?: number | null;
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1170
|
+
* price is billed.
|
|
1171
|
+
*/
|
|
1172
|
+
currency?: string | null;
|
|
1173
|
+
|
|
1053
1174
|
/**
|
|
1054
1175
|
* An alias for the price.
|
|
1055
1176
|
*/
|
|
@@ -1099,6 +1220,17 @@ export namespace PlanCreateParams {
|
|
|
1099
1220
|
*/
|
|
1100
1221
|
billed_in_advance?: boolean | null;
|
|
1101
1222
|
|
|
1223
|
+
/**
|
|
1224
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1225
|
+
*/
|
|
1226
|
+
conversion_rate?: number | null;
|
|
1227
|
+
|
|
1228
|
+
/**
|
|
1229
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1230
|
+
* price is billed.
|
|
1231
|
+
*/
|
|
1232
|
+
currency?: string | null;
|
|
1233
|
+
|
|
1102
1234
|
/**
|
|
1103
1235
|
* An alias for the price.
|
|
1104
1236
|
*/
|
|
@@ -1148,6 +1280,17 @@ export namespace PlanCreateParams {
|
|
|
1148
1280
|
*/
|
|
1149
1281
|
billed_in_advance?: boolean | null;
|
|
1150
1282
|
|
|
1283
|
+
/**
|
|
1284
|
+
* The per unit conversion rate of the price currency to the invoicing currency.
|
|
1285
|
+
*/
|
|
1286
|
+
conversion_rate?: number | null;
|
|
1287
|
+
|
|
1288
|
+
/**
|
|
1289
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1290
|
+
* price is billed.
|
|
1291
|
+
*/
|
|
1292
|
+
currency?: string | null;
|
|
1293
|
+
|
|
1151
1294
|
/**
|
|
1152
1295
|
* An alias for the price.
|
|
1153
1296
|
*/
|