orb-billing 4.31.0 → 4.33.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 +17 -0
- package/README.md +2 -2
- package/core.d.ts.map +1 -1
- package/core.js +5 -3
- package/core.js.map +1 -1
- package/core.mjs +5 -3
- package/core.mjs.map +1 -1
- package/package.json +2 -2
- package/resources/customers/customers.d.ts +2 -4
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +15 -8
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +15 -8
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/events/volume.d.ts +8 -9
- package/resources/events/volume.d.ts.map +1 -1
- package/resources/events/volume.js +16 -5
- package/resources/events/volume.js.map +1 -1
- package/resources/events/volume.mjs +16 -5
- package/resources/events/volume.mjs.map +1 -1
- package/resources/invoices.d.ts +5 -7
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +14 -8
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +14 -8
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +1 -2
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +4 -4
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +4 -4
- package/resources/items.mjs.map +1 -1
- package/resources/metrics.d.ts +1 -2
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +6 -4
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +6 -4
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +1 -2
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +7 -5
- package/resources/plans/external-plan-id.js.map +1 -1
- package/resources/plans/external-plan-id.mjs +7 -5
- package/resources/plans/external-plan-id.mjs.map +1 -1
- package/resources/plans/plans.d.ts +1 -2
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +7 -4
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +7 -4
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +1 -2
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +6 -5
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +6 -5
- package/resources/prices/external-price-id.mjs.map +1 -1
- package/resources/prices/prices.d.ts +1 -2
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +6 -4
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +6 -4
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/subscriptions.d.ts +8939 -2963
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +497 -34
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +497 -34
- package/resources/subscriptions.mjs.map +1 -1
- package/src/core.ts +7 -3
- package/src/resources/customers/customers.ts +2 -20
- package/src/resources/events/volume.ts +9 -18
- package/src/resources/invoices.ts +5 -22
- package/src/resources/items.ts +1 -10
- package/src/resources/metrics.ts +1 -10
- package/src/resources/plans/external-plan-id.ts +1 -11
- package/src/resources/plans/plans.ts +1 -10
- package/src/resources/prices/external-price-id.ts +1 -11
- package/src/resources/prices/prices.ts +1 -10
- package/src/resources/subscriptions.ts +10251 -3124
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
|
-
import { isRequestOptions } from '../../core';
|
|
5
4
|
import * as Core from '../../core';
|
|
6
5
|
import * as VolumeAPI from './volume';
|
|
7
6
|
|
|
@@ -21,15 +20,7 @@ export class Volume extends APIResource {
|
|
|
21
20
|
* timestamp is passed in for either start or end time, the response includes the
|
|
22
21
|
* hours the timestamp falls in.
|
|
23
22
|
*/
|
|
24
|
-
list(query
|
|
25
|
-
list(options?: Core.RequestOptions): Core.APIPromise<EventVolumes>;
|
|
26
|
-
list(
|
|
27
|
-
query: VolumeListParams | Core.RequestOptions = {},
|
|
28
|
-
options?: Core.RequestOptions,
|
|
29
|
-
): Core.APIPromise<EventVolumes> {
|
|
30
|
-
if (isRequestOptions(query)) {
|
|
31
|
-
return this.list({}, query);
|
|
32
|
-
}
|
|
23
|
+
list(query: VolumeListParams, options?: Core.RequestOptions): Core.APIPromise<EventVolumes> {
|
|
33
24
|
return this._client.get('/events/volume', { query, ...options });
|
|
34
25
|
}
|
|
35
26
|
}
|
|
@@ -56,6 +47,14 @@ export namespace EventVolumes {
|
|
|
56
47
|
}
|
|
57
48
|
|
|
58
49
|
export interface VolumeListParams {
|
|
50
|
+
/**
|
|
51
|
+
* The start of the timeframe, inclusive, in which to return event volume. All
|
|
52
|
+
* datetime values are converted to UTC time. If the specified time isn't
|
|
53
|
+
* hour-aligned, the response includes the event volume count for the hour the time
|
|
54
|
+
* falls in.
|
|
55
|
+
*/
|
|
56
|
+
timeframe_start: string;
|
|
57
|
+
|
|
59
58
|
/**
|
|
60
59
|
* Cursor for pagination. This can be populated by the `next_cursor` value returned
|
|
61
60
|
* from the initial request.
|
|
@@ -74,14 +73,6 @@ export interface VolumeListParams {
|
|
|
74
73
|
* volumecount for the hour the time falls in.
|
|
75
74
|
*/
|
|
76
75
|
timeframe_end?: string;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* The start of the timeframe, inclusive, in which to return event volume. All
|
|
80
|
-
* datetime values are converted to UTC time. If the specified time isn't
|
|
81
|
-
* hour-aligned, the response includes the event volume count for the hour the time
|
|
82
|
-
* falls in.
|
|
83
|
-
*/
|
|
84
|
-
timeframe_start?: string;
|
|
85
76
|
}
|
|
86
77
|
|
|
87
78
|
export namespace Volume {
|
|
@@ -25,18 +25,9 @@ export class Invoices extends APIResource {
|
|
|
25
25
|
*/
|
|
26
26
|
update(
|
|
27
27
|
invoiceId: string,
|
|
28
|
-
body
|
|
29
|
-
options?: Core.RequestOptions,
|
|
30
|
-
): Core.APIPromise<Invoice>;
|
|
31
|
-
update(invoiceId: string, options?: Core.RequestOptions): Core.APIPromise<Invoice>;
|
|
32
|
-
update(
|
|
33
|
-
invoiceId: string,
|
|
34
|
-
body: InvoiceUpdateParams | Core.RequestOptions = {},
|
|
28
|
+
body: InvoiceUpdateParams,
|
|
35
29
|
options?: Core.RequestOptions,
|
|
36
30
|
): Core.APIPromise<Invoice> {
|
|
37
|
-
if (isRequestOptions(body)) {
|
|
38
|
-
return this.update(invoiceId, {}, body);
|
|
39
|
-
}
|
|
40
31
|
return this._client.put(`/invoices/${invoiceId}`, { body, ...options });
|
|
41
32
|
}
|
|
42
33
|
|
|
@@ -81,17 +72,9 @@ export class Invoices extends APIResource {
|
|
|
81
72
|
* subscription.
|
|
82
73
|
*/
|
|
83
74
|
fetchUpcoming(
|
|
84
|
-
query
|
|
85
|
-
options?: Core.RequestOptions,
|
|
86
|
-
): Core.APIPromise<InvoiceFetchUpcomingResponse>;
|
|
87
|
-
fetchUpcoming(options?: Core.RequestOptions): Core.APIPromise<InvoiceFetchUpcomingResponse>;
|
|
88
|
-
fetchUpcoming(
|
|
89
|
-
query: InvoiceFetchUpcomingParams | Core.RequestOptions = {},
|
|
75
|
+
query: InvoiceFetchUpcomingParams,
|
|
90
76
|
options?: Core.RequestOptions,
|
|
91
77
|
): Core.APIPromise<InvoiceFetchUpcomingResponse> {
|
|
92
|
-
if (isRequestOptions(query)) {
|
|
93
|
-
return this.fetchUpcoming({}, query);
|
|
94
|
-
}
|
|
95
78
|
return this._client.get('/invoices/upcoming', { query, ...options });
|
|
96
79
|
}
|
|
97
80
|
|
|
@@ -301,7 +284,7 @@ export interface Invoice {
|
|
|
301
284
|
* list is provided, the first discount in the list will be returned. If the list
|
|
302
285
|
* is empty, `None` will be returned.
|
|
303
286
|
*/
|
|
304
|
-
discount:
|
|
287
|
+
discount: unknown | null;
|
|
305
288
|
|
|
306
289
|
discounts: Array<Shared.InvoiceLevelDiscount>;
|
|
307
290
|
|
|
@@ -1475,7 +1458,7 @@ export interface InvoiceFetchUpcomingResponse {
|
|
|
1475
1458
|
* list is provided, the first discount in the list will be returned. If the list
|
|
1476
1459
|
* is empty, `None` will be returned.
|
|
1477
1460
|
*/
|
|
1478
|
-
discount:
|
|
1461
|
+
discount: unknown | null;
|
|
1479
1462
|
|
|
1480
1463
|
discounts: Array<Shared.InvoiceLevelDiscount>;
|
|
1481
1464
|
|
|
@@ -2647,7 +2630,7 @@ export interface InvoiceListParams extends PageParams {
|
|
|
2647
2630
|
}
|
|
2648
2631
|
|
|
2649
2632
|
export interface InvoiceFetchUpcomingParams {
|
|
2650
|
-
subscription_id
|
|
2633
|
+
subscription_id: string;
|
|
2651
2634
|
}
|
|
2652
2635
|
|
|
2653
2636
|
export interface InvoiceIssueParams {
|
package/src/resources/items.ts
CHANGED
|
@@ -17,16 +17,7 @@ export class Items extends APIResource {
|
|
|
17
17
|
/**
|
|
18
18
|
* This endpoint can be used to update properties on the Item.
|
|
19
19
|
*/
|
|
20
|
-
update(itemId: string, body
|
|
21
|
-
update(itemId: string, options?: Core.RequestOptions): Core.APIPromise<Item>;
|
|
22
|
-
update(
|
|
23
|
-
itemId: string,
|
|
24
|
-
body: ItemUpdateParams | Core.RequestOptions = {},
|
|
25
|
-
options?: Core.RequestOptions,
|
|
26
|
-
): Core.APIPromise<Item> {
|
|
27
|
-
if (isRequestOptions(body)) {
|
|
28
|
-
return this.update(itemId, {}, body);
|
|
29
|
-
}
|
|
20
|
+
update(itemId: string, body: ItemUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Item> {
|
|
30
21
|
return this._client.put(`/items/${itemId}`, { body, ...options });
|
|
31
22
|
}
|
|
32
23
|
|
package/src/resources/metrics.ts
CHANGED
|
@@ -25,18 +25,9 @@ export class Metrics extends APIResource {
|
|
|
25
25
|
*/
|
|
26
26
|
update(
|
|
27
27
|
metricId: string,
|
|
28
|
-
body
|
|
29
|
-
options?: Core.RequestOptions,
|
|
30
|
-
): Core.APIPromise<BillableMetric>;
|
|
31
|
-
update(metricId: string, options?: Core.RequestOptions): Core.APIPromise<BillableMetric>;
|
|
32
|
-
update(
|
|
33
|
-
metricId: string,
|
|
34
|
-
body: MetricUpdateParams | Core.RequestOptions = {},
|
|
28
|
+
body: MetricUpdateParams,
|
|
35
29
|
options?: Core.RequestOptions,
|
|
36
30
|
): Core.APIPromise<BillableMetric> {
|
|
37
|
-
if (isRequestOptions(body)) {
|
|
38
|
-
return this.update(metricId, {}, body);
|
|
39
|
-
}
|
|
40
31
|
return this._client.put(`/metrics/${metricId}`, { body, ...options });
|
|
41
32
|
}
|
|
42
33
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
|
-
import { isRequestOptions } from '../../core';
|
|
5
4
|
import * as Core from '../../core';
|
|
6
5
|
import * as ExternalPlanIDAPI from './external-plan-id';
|
|
7
6
|
import * as PlansAPI from './plans';
|
|
@@ -15,18 +14,9 @@ export class ExternalPlanID extends APIResource {
|
|
|
15
14
|
*/
|
|
16
15
|
update(
|
|
17
16
|
otherExternalPlanId: string,
|
|
18
|
-
body
|
|
19
|
-
options?: Core.RequestOptions,
|
|
20
|
-
): Core.APIPromise<PlansAPI.Plan>;
|
|
21
|
-
update(otherExternalPlanId: string, options?: Core.RequestOptions): Core.APIPromise<PlansAPI.Plan>;
|
|
22
|
-
update(
|
|
23
|
-
otherExternalPlanId: string,
|
|
24
|
-
body: ExternalPlanIDUpdateParams | Core.RequestOptions = {},
|
|
17
|
+
body: ExternalPlanIDUpdateParams,
|
|
25
18
|
options?: Core.RequestOptions,
|
|
26
19
|
): Core.APIPromise<PlansAPI.Plan> {
|
|
27
|
-
if (isRequestOptions(body)) {
|
|
28
|
-
return this.update(otherExternalPlanId, {}, body);
|
|
29
|
-
}
|
|
30
20
|
return this._client.put(`/plans/external_plan_id/${otherExternalPlanId}`, { body, ...options });
|
|
31
21
|
}
|
|
32
22
|
|
|
@@ -25,16 +25,7 @@ export class Plans extends APIResource {
|
|
|
25
25
|
*
|
|
26
26
|
* Other fields on a customer are currently immutable.
|
|
27
27
|
*/
|
|
28
|
-
update(planId: string, body
|
|
29
|
-
update(planId: string, options?: Core.RequestOptions): Core.APIPromise<Plan>;
|
|
30
|
-
update(
|
|
31
|
-
planId: string,
|
|
32
|
-
body: PlanUpdateParams | Core.RequestOptions = {},
|
|
33
|
-
options?: Core.RequestOptions,
|
|
34
|
-
): Core.APIPromise<Plan> {
|
|
35
|
-
if (isRequestOptions(body)) {
|
|
36
|
-
return this.update(planId, {}, body);
|
|
37
|
-
}
|
|
28
|
+
update(planId: string, body: PlanUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Plan> {
|
|
38
29
|
return this._client.put(`/plans/${planId}`, { body, ...options });
|
|
39
30
|
}
|
|
40
31
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
|
-
import { isRequestOptions } from '../../core';
|
|
5
4
|
import * as Core from '../../core';
|
|
6
5
|
import * as ExternalPriceIDAPI from './external-price-id';
|
|
7
6
|
import * as PricesAPI from './prices';
|
|
@@ -14,18 +13,9 @@ export class ExternalPriceID extends APIResource {
|
|
|
14
13
|
*/
|
|
15
14
|
update(
|
|
16
15
|
externalPriceId: string,
|
|
17
|
-
body
|
|
18
|
-
options?: Core.RequestOptions,
|
|
19
|
-
): Core.APIPromise<PricesAPI.Price>;
|
|
20
|
-
update(externalPriceId: string, options?: Core.RequestOptions): Core.APIPromise<PricesAPI.Price>;
|
|
21
|
-
update(
|
|
22
|
-
externalPriceId: string,
|
|
23
|
-
body: ExternalPriceIDUpdateParams | Core.RequestOptions = {},
|
|
16
|
+
body: ExternalPriceIDUpdateParams,
|
|
24
17
|
options?: Core.RequestOptions,
|
|
25
18
|
): Core.APIPromise<PricesAPI.Price> {
|
|
26
|
-
if (isRequestOptions(body)) {
|
|
27
|
-
return this.update(externalPriceId, {}, body);
|
|
28
|
-
}
|
|
29
19
|
return this._client.put(`/prices/external_price_id/${externalPriceId}`, { body, ...options });
|
|
30
20
|
}
|
|
31
21
|
|
|
@@ -32,16 +32,7 @@ export class Prices extends APIResource {
|
|
|
32
32
|
* pass null for the metadata value, it will clear any existing metadata for that
|
|
33
33
|
* price.
|
|
34
34
|
*/
|
|
35
|
-
update(priceId: string, body
|
|
36
|
-
update(priceId: string, options?: Core.RequestOptions): Core.APIPromise<Price>;
|
|
37
|
-
update(
|
|
38
|
-
priceId: string,
|
|
39
|
-
body: PriceUpdateParams | Core.RequestOptions = {},
|
|
40
|
-
options?: Core.RequestOptions,
|
|
41
|
-
): Core.APIPromise<Price> {
|
|
42
|
-
if (isRequestOptions(body)) {
|
|
43
|
-
return this.update(priceId, {}, body);
|
|
44
|
-
}
|
|
35
|
+
update(priceId: string, body: PriceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Price> {
|
|
45
36
|
return this._client.put(`/prices/${priceId}`, { body, ...options });
|
|
46
37
|
}
|
|
47
38
|
|