orb-billing 2.2.0 → 2.3.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 +33 -0
- package/index.d.mts +8 -4
- package/index.d.ts +8 -4
- package/index.d.ts.map +1 -1
- package/index.js +2 -5
- package/index.js.map +1 -1
- package/index.mjs +2 -5
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- 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 +6 -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/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/plans/plans.d.ts +65 -0
- 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 +154 -0
- 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 +47 -16
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +6 -0
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +6 -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/index.ts +9 -7
- package/src/resources/coupons/coupons.ts +3 -26
- package/src/resources/customers/costs.ts +6 -6
- package/src/resources/customers/credits/credits.ts +10 -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/index.ts +11 -2
- package/src/resources/plans/plans.ts +78 -0
- package/src/resources/prices/index.ts +10 -1
- package/src/resources/prices/prices.ts +219 -0
- package/src/resources/shared.ts +8 -0
- package/src/resources/subscriptions.ts +67 -20
- 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/src/index.ts
CHANGED
|
@@ -141,7 +141,6 @@ export class Orb extends Core.APIClient {
|
|
|
141
141
|
plans: API.Plans = new API.Plans(this);
|
|
142
142
|
prices: API.Prices = new API.Prices(this);
|
|
143
143
|
subscriptions: API.Subscriptions = new API.Subscriptions(this);
|
|
144
|
-
beta: API.Beta = new API.Beta(this);
|
|
145
144
|
webhooks: API.Webhooks = new API.Webhooks(this);
|
|
146
145
|
|
|
147
146
|
protected override defaultQuery(): Core.DefaultQuery | undefined {
|
|
@@ -190,6 +189,9 @@ export class Orb extends Core.APIClient {
|
|
|
190
189
|
static OrbInternalServerError = Errors.OrbInternalServerError;
|
|
191
190
|
static UnprocessableEntityError = Errors.UnprocessableEntityError;
|
|
192
191
|
static DuplicateResourceCreation = Errors.DuplicateResourceCreation;
|
|
192
|
+
|
|
193
|
+
static toFile = Uploads.toFile;
|
|
194
|
+
static fileFromPath = Uploads.fileFromPath;
|
|
193
195
|
}
|
|
194
196
|
|
|
195
197
|
export const {
|
|
@@ -224,10 +226,6 @@ export import toFile = Uploads.toFile;
|
|
|
224
226
|
export import fileFromPath = Uploads.fileFromPath;
|
|
225
227
|
|
|
226
228
|
export namespace Orb {
|
|
227
|
-
// Helper functions
|
|
228
|
-
export import toFile = Uploads.toFile;
|
|
229
|
-
export import fileFromPath = Uploads.fileFromPath;
|
|
230
|
-
|
|
231
229
|
export import RequestOptions = Core.RequestOptions;
|
|
232
230
|
|
|
233
231
|
export import Page = Pagination.Page;
|
|
@@ -300,10 +298,13 @@ export namespace Orb {
|
|
|
300
298
|
export import PlanListParams = API.PlanListParams;
|
|
301
299
|
|
|
302
300
|
export import Prices = API.Prices;
|
|
301
|
+
export import EvaluatePriceGroup = API.EvaluatePriceGroup;
|
|
303
302
|
export import Price = API.Price;
|
|
303
|
+
export import PriceEvaluateResponse = API.PriceEvaluateResponse;
|
|
304
304
|
export import PricesPage = API.PricesPage;
|
|
305
305
|
export import PriceCreateParams = API.PriceCreateParams;
|
|
306
306
|
export import PriceListParams = API.PriceListParams;
|
|
307
|
+
export import PriceEvaluateParams = API.PriceEvaluateParams;
|
|
307
308
|
|
|
308
309
|
export import Subscriptions = API.Subscriptions;
|
|
309
310
|
export import Subscription = API.Subscription;
|
|
@@ -313,6 +314,7 @@ export namespace Orb {
|
|
|
313
314
|
export import SubscriptionsPage = API.SubscriptionsPage;
|
|
314
315
|
export import SubscriptionFetchScheduleResponsesPage = API.SubscriptionFetchScheduleResponsesPage;
|
|
315
316
|
export import SubscriptionCreateParams = API.SubscriptionCreateParams;
|
|
317
|
+
export import SubscriptionUpdateParams = API.SubscriptionUpdateParams;
|
|
316
318
|
export import SubscriptionListParams = API.SubscriptionListParams;
|
|
317
319
|
export import SubscriptionCancelParams = API.SubscriptionCancelParams;
|
|
318
320
|
export import SubscriptionFetchCostsParams = API.SubscriptionFetchCostsParams;
|
|
@@ -324,9 +326,9 @@ export namespace Orb {
|
|
|
324
326
|
export import SubscriptionUnscheduleFixedFeeQuantityUpdatesParams = API.SubscriptionUnscheduleFixedFeeQuantityUpdatesParams;
|
|
325
327
|
export import SubscriptionUpdateFixedFeeQuantityParams = API.SubscriptionUpdateFixedFeeQuantityParams;
|
|
326
328
|
|
|
327
|
-
export import
|
|
328
|
-
|
|
329
|
+
export import BillingCycleRelativeDate = API.BillingCycleRelativeDate;
|
|
329
330
|
export import Discount = API.Discount;
|
|
331
|
+
export import PaginationMetadata = API.PaginationMetadata;
|
|
330
332
|
}
|
|
331
333
|
|
|
332
334
|
export default Orb;
|
|
@@ -144,7 +144,7 @@ export namespace Coupon {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
export interface CouponCreateParams {
|
|
147
|
-
discount: CouponCreateParams.
|
|
147
|
+
discount: CouponCreateParams.NewCouponPercentageDiscount | CouponCreateParams.NewCouponAmountDiscount;
|
|
148
148
|
|
|
149
149
|
/**
|
|
150
150
|
* This string can be used to redeem this coupon for a given subscription.
|
|
@@ -165,39 +165,16 @@ export interface CouponCreateParams {
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
export namespace CouponCreateParams {
|
|
168
|
-
export interface
|
|
169
|
-
/**
|
|
170
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
171
|
-
* this can be a subset of prices.
|
|
172
|
-
*/
|
|
173
|
-
applies_to_price_ids: Array<string>;
|
|
174
|
-
|
|
168
|
+
export interface NewCouponPercentageDiscount {
|
|
175
169
|
discount_type: 'percentage';
|
|
176
170
|
|
|
177
|
-
/**
|
|
178
|
-
* Only available if discount_type is `percentage`. This is a number between 0
|
|
179
|
-
* and 1.
|
|
180
|
-
*/
|
|
181
171
|
percentage_discount: number;
|
|
182
|
-
|
|
183
|
-
reason?: string | null;
|
|
184
172
|
}
|
|
185
173
|
|
|
186
|
-
export interface
|
|
187
|
-
/**
|
|
188
|
-
* Only available if discount_type is `amount`.
|
|
189
|
-
*/
|
|
174
|
+
export interface NewCouponAmountDiscount {
|
|
190
175
|
amount_discount: string;
|
|
191
176
|
|
|
192
|
-
/**
|
|
193
|
-
* List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
194
|
-
* this can be a subset of prices.
|
|
195
|
-
*/
|
|
196
|
-
applies_to_price_ids: Array<string>;
|
|
197
|
-
|
|
198
177
|
discount_type: 'amount';
|
|
199
|
-
|
|
200
|
-
reason?: string | null;
|
|
201
178
|
}
|
|
202
179
|
}
|
|
203
180
|
|
|
@@ -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> {
|
|
@@ -16,16 +16,16 @@ export class Credits extends APIResource {
|
|
|
16
16
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
17
17
|
*/
|
|
18
18
|
list(
|
|
19
|
-
customerId: string
|
|
19
|
+
customerId: string,
|
|
20
20
|
query?: CreditListParams,
|
|
21
21
|
options?: Core.RequestOptions,
|
|
22
22
|
): Core.PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
23
23
|
list(
|
|
24
|
-
customerId: string
|
|
24
|
+
customerId: string,
|
|
25
25
|
options?: Core.RequestOptions,
|
|
26
26
|
): Core.PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
27
27
|
list(
|
|
28
|
-
customerId: string
|
|
28
|
+
customerId: string,
|
|
29
29
|
query: CreditListParams | Core.RequestOptions = {},
|
|
30
30
|
options?: Core.RequestOptions,
|
|
31
31
|
): Core.PagePromise<CreditListResponsesPage, CreditListResponse> {
|
|
@@ -42,16 +42,16 @@ export class Credits extends APIResource {
|
|
|
42
42
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
43
43
|
*/
|
|
44
44
|
listByExternalId(
|
|
45
|
-
externalCustomerId: string
|
|
45
|
+
externalCustomerId: string,
|
|
46
46
|
query?: CreditListByExternalIDParams,
|
|
47
47
|
options?: Core.RequestOptions,
|
|
48
48
|
): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
49
49
|
listByExternalId(
|
|
50
|
-
externalCustomerId: string
|
|
50
|
+
externalCustomerId: string,
|
|
51
51
|
options?: Core.RequestOptions,
|
|
52
52
|
): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
53
53
|
listByExternalId(
|
|
54
|
-
externalCustomerId: string
|
|
54
|
+
externalCustomerId: string,
|
|
55
55
|
query: CreditListByExternalIDParams | Core.RequestOptions = {},
|
|
56
56
|
options?: Core.RequestOptions,
|
|
57
57
|
): Core.PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse> {
|
|
@@ -75,6 +75,8 @@ export interface CreditListResponse {
|
|
|
75
75
|
|
|
76
76
|
balance: number;
|
|
77
77
|
|
|
78
|
+
effective_date: string | null;
|
|
79
|
+
|
|
78
80
|
expiry_date: string | null;
|
|
79
81
|
|
|
80
82
|
per_unit_cost_basis: string | null;
|
|
@@ -87,6 +89,8 @@ export interface CreditListByExternalIDResponse {
|
|
|
87
89
|
|
|
88
90
|
balance: number;
|
|
89
91
|
|
|
92
|
+
effective_date: string | null;
|
|
93
|
+
|
|
90
94
|
expiry_date: string | null;
|
|
91
95
|
|
|
92
96
|
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> {
|
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,
|
|
@@ -373,6 +373,12 @@ export namespace PlanCreateParams {
|
|
|
373
373
|
*/
|
|
374
374
|
billed_in_advance?: boolean | null;
|
|
375
375
|
|
|
376
|
+
/**
|
|
377
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
378
|
+
* price is billed.
|
|
379
|
+
*/
|
|
380
|
+
currency?: string | null;
|
|
381
|
+
|
|
376
382
|
/**
|
|
377
383
|
* An alias for the price.
|
|
378
384
|
*/
|
|
@@ -431,6 +437,12 @@ export namespace PlanCreateParams {
|
|
|
431
437
|
*/
|
|
432
438
|
billed_in_advance?: boolean | null;
|
|
433
439
|
|
|
440
|
+
/**
|
|
441
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
442
|
+
* price is billed.
|
|
443
|
+
*/
|
|
444
|
+
currency?: string | null;
|
|
445
|
+
|
|
434
446
|
/**
|
|
435
447
|
* An alias for the price.
|
|
436
448
|
*/
|
|
@@ -495,6 +507,12 @@ export namespace PlanCreateParams {
|
|
|
495
507
|
*/
|
|
496
508
|
billed_in_advance?: boolean | null;
|
|
497
509
|
|
|
510
|
+
/**
|
|
511
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
512
|
+
* price is billed.
|
|
513
|
+
*/
|
|
514
|
+
currency?: string | null;
|
|
515
|
+
|
|
498
516
|
/**
|
|
499
517
|
* An alias for the price.
|
|
500
518
|
*/
|
|
@@ -579,6 +597,12 @@ export namespace PlanCreateParams {
|
|
|
579
597
|
*/
|
|
580
598
|
billed_in_advance?: boolean | null;
|
|
581
599
|
|
|
600
|
+
/**
|
|
601
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
602
|
+
* price is billed.
|
|
603
|
+
*/
|
|
604
|
+
currency?: string | null;
|
|
605
|
+
|
|
582
606
|
/**
|
|
583
607
|
* An alias for the price.
|
|
584
608
|
*/
|
|
@@ -656,6 +680,12 @@ export namespace PlanCreateParams {
|
|
|
656
680
|
*/
|
|
657
681
|
billed_in_advance?: boolean | null;
|
|
658
682
|
|
|
683
|
+
/**
|
|
684
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
685
|
+
* price is billed.
|
|
686
|
+
*/
|
|
687
|
+
currency?: string | null;
|
|
688
|
+
|
|
659
689
|
/**
|
|
660
690
|
* An alias for the price.
|
|
661
691
|
*/
|
|
@@ -739,6 +769,12 @@ export namespace PlanCreateParams {
|
|
|
739
769
|
*/
|
|
740
770
|
billed_in_advance?: boolean | null;
|
|
741
771
|
|
|
772
|
+
/**
|
|
773
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
774
|
+
* price is billed.
|
|
775
|
+
*/
|
|
776
|
+
currency?: string | null;
|
|
777
|
+
|
|
742
778
|
/**
|
|
743
779
|
* An alias for the price.
|
|
744
780
|
*/
|
|
@@ -802,6 +838,12 @@ export namespace PlanCreateParams {
|
|
|
802
838
|
*/
|
|
803
839
|
billed_in_advance?: boolean | null;
|
|
804
840
|
|
|
841
|
+
/**
|
|
842
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
843
|
+
* price is billed.
|
|
844
|
+
*/
|
|
845
|
+
currency?: string | null;
|
|
846
|
+
|
|
805
847
|
/**
|
|
806
848
|
* An alias for the price.
|
|
807
849
|
*/
|
|
@@ -880,6 +922,12 @@ export namespace PlanCreateParams {
|
|
|
880
922
|
*/
|
|
881
923
|
billed_in_advance?: boolean | null;
|
|
882
924
|
|
|
925
|
+
/**
|
|
926
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
927
|
+
* price is billed.
|
|
928
|
+
*/
|
|
929
|
+
currency?: string | null;
|
|
930
|
+
|
|
883
931
|
/**
|
|
884
932
|
* An alias for the price.
|
|
885
933
|
*/
|
|
@@ -952,6 +1000,12 @@ export namespace PlanCreateParams {
|
|
|
952
1000
|
*/
|
|
953
1001
|
billed_in_advance?: boolean | null;
|
|
954
1002
|
|
|
1003
|
+
/**
|
|
1004
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1005
|
+
* price is billed.
|
|
1006
|
+
*/
|
|
1007
|
+
currency?: string | null;
|
|
1008
|
+
|
|
955
1009
|
/**
|
|
956
1010
|
* An alias for the price.
|
|
957
1011
|
*/
|
|
@@ -1001,6 +1055,12 @@ export namespace PlanCreateParams {
|
|
|
1001
1055
|
*/
|
|
1002
1056
|
billed_in_advance?: boolean | null;
|
|
1003
1057
|
|
|
1058
|
+
/**
|
|
1059
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1060
|
+
* price is billed.
|
|
1061
|
+
*/
|
|
1062
|
+
currency?: string | null;
|
|
1063
|
+
|
|
1004
1064
|
/**
|
|
1005
1065
|
* An alias for the price.
|
|
1006
1066
|
*/
|
|
@@ -1050,6 +1110,12 @@ export namespace PlanCreateParams {
|
|
|
1050
1110
|
*/
|
|
1051
1111
|
billed_in_advance?: boolean | null;
|
|
1052
1112
|
|
|
1113
|
+
/**
|
|
1114
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1115
|
+
* price is billed.
|
|
1116
|
+
*/
|
|
1117
|
+
currency?: string | null;
|
|
1118
|
+
|
|
1053
1119
|
/**
|
|
1054
1120
|
* An alias for the price.
|
|
1055
1121
|
*/
|
|
@@ -1099,6 +1165,12 @@ export namespace PlanCreateParams {
|
|
|
1099
1165
|
*/
|
|
1100
1166
|
billed_in_advance?: boolean | null;
|
|
1101
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
|
+
|
|
1102
1174
|
/**
|
|
1103
1175
|
* An alias for the price.
|
|
1104
1176
|
*/
|
|
@@ -1148,6 +1220,12 @@ export namespace PlanCreateParams {
|
|
|
1148
1220
|
*/
|
|
1149
1221
|
billed_in_advance?: boolean | null;
|
|
1150
1222
|
|
|
1223
|
+
/**
|
|
1224
|
+
* An ISO 4217 currency string, or custom pricing unit identifier, in which this
|
|
1225
|
+
* price is billed.
|
|
1226
|
+
*/
|
|
1227
|
+
currency?: string | null;
|
|
1228
|
+
|
|
1151
1229
|
/**
|
|
1152
1230
|
* An alias for the price.
|
|
1153
1231
|
*/
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
+
export {
|
|
4
|
+
EvaluatePriceGroup,
|
|
5
|
+
Price,
|
|
6
|
+
PriceEvaluateResponse,
|
|
7
|
+
PriceCreateParams,
|
|
8
|
+
PriceListParams,
|
|
9
|
+
PriceEvaluateParams,
|
|
10
|
+
PricesPage,
|
|
11
|
+
Prices,
|
|
12
|
+
} from './prices';
|
|
3
13
|
export { ExternalPriceID } from './external-price-id';
|
|
4
|
-
export { Price, PriceCreateParams, PriceListParams, PricesPage, Prices } from './prices';
|