orb-billing 6.0.2 → 6.1.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 +15 -0
- package/client.d.mts +5 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -10
- package/client.d.ts.map +1 -1
- package/client.js +140 -149
- package/client.js.map +1 -1
- package/client.mjs +138 -146
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/pagination.d.mts +4 -4
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +4 -4
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +4 -4
- package/resources/alerts.d.mts +18 -7
- package/resources/alerts.d.mts.map +1 -1
- package/resources/alerts.d.ts +18 -7
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +31 -14
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +31 -14
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.js +6 -6
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +6 -6
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.mts +2 -2
- package/resources/beta/external-plan-id.d.ts +2 -2
- package/resources/beta/external-plan-id.js +6 -6
- package/resources/beta/external-plan-id.js.map +1 -1
- package/resources/beta/external-plan-id.mjs +6 -6
- package/resources/beta/external-plan-id.mjs.map +1 -1
- package/resources/coupons/coupons.d.mts +2 -2
- package/resources/coupons/coupons.d.ts +2 -2
- package/resources/coupons/coupons.js +4 -4
- package/resources/coupons/coupons.mjs +4 -4
- package/resources/coupons/subscriptions.d.mts +1 -1
- package/resources/coupons/subscriptions.d.ts +1 -1
- package/resources/coupons/subscriptions.js +2 -2
- package/resources/coupons/subscriptions.mjs +2 -2
- package/resources/credit-blocks.d.mts +3 -3
- package/resources/credit-blocks.d.ts +3 -3
- package/resources/credit-blocks.js +6 -6
- package/resources/credit-blocks.mjs +6 -6
- package/resources/credit-notes.d.mts +1 -1
- package/resources/credit-notes.d.ts +1 -1
- package/resources/credit-notes.js +2 -2
- package/resources/credit-notes.mjs +2 -2
- package/resources/customers/balance-transactions.d.mts +2 -2
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.js +4 -4
- package/resources/customers/balance-transactions.mjs +4 -4
- package/resources/customers/costs.d.mts +2 -2
- package/resources/customers/costs.d.ts +2 -2
- package/resources/customers/costs.js +4 -4
- package/resources/customers/costs.mjs +4 -4
- package/resources/customers/credits/credits.d.mts +2 -2
- package/resources/customers/credits/credits.d.ts +2 -2
- package/resources/customers/credits/credits.js +4 -4
- package/resources/customers/credits/credits.mjs +4 -4
- package/resources/customers/credits/ledger.d.mts +4 -4
- package/resources/customers/credits/ledger.d.ts +4 -4
- package/resources/customers/credits/ledger.js +8 -8
- package/resources/customers/credits/ledger.mjs +8 -8
- package/resources/customers/credits/top-ups.d.mts +6 -6
- package/resources/customers/credits/top-ups.d.ts +6 -6
- package/resources/customers/credits/top-ups.js +14 -14
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +14 -14
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.mts +65 -7
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +65 -7
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +35 -12
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +35 -12
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +1 -1
- package/resources/customers/index.d.mts.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.mts +2 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +2 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.js +4 -4
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +4 -4
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +2 -2
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +2 -2
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +4 -4
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +4 -4
- package/resources/events/backfills.d.mts +3 -3
- package/resources/events/backfills.d.ts +3 -3
- package/resources/events/backfills.js +6 -6
- package/resources/events/backfills.mjs +6 -6
- package/resources/events/events.d.mts +2 -18
- package/resources/events/events.d.mts.map +1 -1
- package/resources/events/events.d.ts +2 -18
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +6 -6
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +6 -6
- package/resources/events/events.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +74 -8
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +74 -8
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +87 -17
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +87 -17
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.mts +3 -3
- package/resources/items.d.ts +3 -3
- package/resources/items.js +6 -6
- package/resources/items.mjs +6 -6
- package/resources/license-types.d.mts +1 -1
- package/resources/license-types.d.ts +1 -1
- package/resources/license-types.js +2 -2
- package/resources/license-types.mjs +2 -2
- package/resources/licenses/external-licenses.d.mts +1 -1
- package/resources/licenses/external-licenses.d.ts +1 -1
- package/resources/licenses/external-licenses.js +2 -2
- package/resources/licenses/external-licenses.mjs +2 -2
- package/resources/licenses/licenses.d.mts +3 -3
- package/resources/licenses/licenses.d.ts +3 -3
- package/resources/licenses/licenses.js +6 -6
- package/resources/licenses/licenses.mjs +6 -6
- package/resources/licenses/usage.d.mts +1 -1
- package/resources/licenses/usage.d.ts +1 -1
- package/resources/licenses/usage.js +2 -2
- package/resources/licenses/usage.mjs +2 -2
- package/resources/metrics.d.mts +2 -2
- package/resources/metrics.d.ts +2 -2
- package/resources/metrics.js +4 -4
- package/resources/metrics.mjs +4 -4
- package/resources/plans/external-plan-id.d.mts +2 -2
- package/resources/plans/external-plan-id.d.ts +2 -2
- package/resources/plans/external-plan-id.js +4 -4
- package/resources/plans/external-plan-id.mjs +4 -4
- package/resources/plans/migrations.d.mts +3 -3
- package/resources/plans/migrations.d.ts +3 -3
- package/resources/plans/migrations.js +8 -8
- package/resources/plans/migrations.js.map +1 -1
- package/resources/plans/migrations.mjs +8 -8
- package/resources/plans/migrations.mjs.map +1 -1
- package/resources/plans/plans.d.mts +2 -2
- package/resources/plans/plans.d.ts +2 -2
- package/resources/plans/plans.js +4 -4
- package/resources/plans/plans.mjs +4 -4
- package/resources/prices/external-price-id.d.mts +2 -2
- package/resources/prices/external-price-id.d.ts +2 -2
- package/resources/prices/external-price-id.js +4 -4
- package/resources/prices/external-price-id.mjs +4 -4
- package/resources/prices/prices.d.mts +3 -3
- package/resources/prices/prices.d.ts +3 -3
- package/resources/prices/prices.js +6 -6
- package/resources/prices/prices.mjs +6 -6
- package/resources/subscription-changes.d.mts +3 -3
- package/resources/subscription-changes.d.ts +3 -3
- package/resources/subscription-changes.js +6 -6
- package/resources/subscription-changes.mjs +6 -6
- package/resources/subscriptions.d.mts +15 -15
- package/resources/subscriptions.d.ts +15 -15
- package/resources/subscriptions.js +30 -30
- package/resources/subscriptions.mjs +30 -30
- package/src/client.ts +11 -8
- package/src/core/api-promise.ts +4 -7
- package/src/core/pagination.ts +5 -5
- package/src/core/resource.ts +3 -3
- package/src/index.ts +1 -1
- package/src/internal/parse.ts +2 -2
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/log.ts +3 -3
- package/src/resources/alerts.ts +32 -14
- package/src/resources/beta/beta.ts +6 -6
- package/src/resources/beta/external-plan-id.ts +6 -6
- package/src/resources/coupons/coupons.ts +4 -4
- package/src/resources/coupons/subscriptions.ts +2 -2
- package/src/resources/credit-blocks.ts +6 -6
- package/src/resources/credit-notes.ts +2 -2
- package/src/resources/customers/balance-transactions.ts +4 -4
- package/src/resources/customers/costs.ts +4 -4
- package/src/resources/customers/credits/credits.ts +4 -4
- package/src/resources/customers/credits/ledger.ts +8 -8
- package/src/resources/customers/credits/top-ups.ts +14 -14
- package/src/resources/customers/customers.ts +105 -12
- package/src/resources/customers/index.ts +4 -0
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +4 -4
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +4 -4
- package/src/resources/events/backfills.ts +6 -6
- package/src/resources/events/events.ts +6 -26
- package/src/resources/index.ts +4 -0
- package/src/resources/invoices.ts +89 -17
- package/src/resources/items.ts +6 -6
- package/src/resources/license-types.ts +2 -2
- package/src/resources/licenses/external-licenses.ts +2 -2
- package/src/resources/licenses/licenses.ts +6 -6
- package/src/resources/licenses/usage.ts +2 -2
- package/src/resources/metrics.ts +4 -4
- package/src/resources/plans/external-plan-id.ts +4 -4
- package/src/resources/plans/migrations.ts +8 -8
- package/src/resources/plans/plans.ts +4 -4
- package/src/resources/prices/external-price-id.ts +4 -4
- package/src/resources/prices/prices.ts +6 -6
- package/src/resources/subscription-changes.ts +6 -6
- package/src/resources/subscriptions.ts +30 -30
- 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
package/src/resources/metrics.ts
CHANGED
|
@@ -43,8 +43,8 @@ export class Metrics extends APIResource {
|
|
|
43
43
|
* );
|
|
44
44
|
* ```
|
|
45
45
|
*/
|
|
46
|
-
update(
|
|
47
|
-
return this._client.put(path`/metrics/${
|
|
46
|
+
update(metricID: string, body: MetricUpdateParams, options?: RequestOptions): APIPromise<BillableMetric> {
|
|
47
|
+
return this._client.put(path`/metrics/${metricID}`, { body, ...options });
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -78,8 +78,8 @@ export class Metrics extends APIResource {
|
|
|
78
78
|
* );
|
|
79
79
|
* ```
|
|
80
80
|
*/
|
|
81
|
-
fetch(
|
|
82
|
-
return this._client.get(path`/metrics/${
|
|
81
|
+
fetch(metricID: string, options?: RequestOptions): APIPromise<BillableMetric> {
|
|
82
|
+
return this._client.get(path`/metrics/${metricID}`, options);
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -19,11 +19,11 @@ export class ExternalPlanID extends APIResource {
|
|
|
19
19
|
* Other fields on a plan are currently immutable.
|
|
20
20
|
*/
|
|
21
21
|
update(
|
|
22
|
-
|
|
22
|
+
otherExternalPlanID: string,
|
|
23
23
|
body: ExternalPlanIDUpdateParams,
|
|
24
24
|
options?: RequestOptions,
|
|
25
25
|
): APIPromise<PlansAPI.Plan> {
|
|
26
|
-
return this._client.put(path`/plans/external_plan_id/${
|
|
26
|
+
return this._client.put(path`/plans/external_plan_id/${otherExternalPlanID}`, { body, ...options });
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -44,8 +44,8 @@ export class ExternalPlanID extends APIResource {
|
|
|
44
44
|
* that is present. A detailed explanation of price types can be found in the
|
|
45
45
|
* [Price schema](/core-concepts#plan-and-price). "
|
|
46
46
|
*/
|
|
47
|
-
fetch(
|
|
48
|
-
return this._client.get(path`/plans/external_plan_id/${
|
|
47
|
+
fetch(externalPlanID: string, options?: RequestOptions): APIPromise<PlansAPI.Plan> {
|
|
48
|
+
return this._client.get(path`/plans/external_plan_id/${externalPlanID}`, options);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -16,12 +16,12 @@ export class Migrations extends APIResource {
|
|
|
16
16
|
* Fetch migration
|
|
17
17
|
*/
|
|
18
18
|
retrieve(
|
|
19
|
-
|
|
19
|
+
migrationID: string,
|
|
20
20
|
params: MigrationRetrieveParams,
|
|
21
21
|
options?: RequestOptions,
|
|
22
22
|
): APIPromise<MigrationRetrieveResponse> {
|
|
23
|
-
const { plan_id
|
|
24
|
-
return this._client.get(path`/plans/${
|
|
23
|
+
const { plan_id } = params;
|
|
24
|
+
return this._client.get(path`/plans/${plan_id}/migrations/${migrationID}`, options);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -31,11 +31,11 @@ export class Migrations extends APIResource {
|
|
|
31
31
|
* next page of results if they exist.
|
|
32
32
|
*/
|
|
33
33
|
list(
|
|
34
|
-
|
|
34
|
+
planID: string,
|
|
35
35
|
query: MigrationListParams | null | undefined = {},
|
|
36
36
|
options?: RequestOptions,
|
|
37
37
|
): PagePromise<MigrationListResponsesPage, MigrationListResponse> {
|
|
38
|
-
return this._client.getAPIList(path`/plans/${
|
|
38
|
+
return this._client.getAPIList(path`/plans/${planID}/migrations`, Page<MigrationListResponse>, {
|
|
39
39
|
query,
|
|
40
40
|
...options,
|
|
41
41
|
});
|
|
@@ -45,12 +45,12 @@ export class Migrations extends APIResource {
|
|
|
45
45
|
* This endpoint cancels a migration.
|
|
46
46
|
*/
|
|
47
47
|
cancel(
|
|
48
|
-
|
|
48
|
+
migrationID: string,
|
|
49
49
|
params: MigrationCancelParams,
|
|
50
50
|
options?: RequestOptions,
|
|
51
51
|
): APIPromise<MigrationCancelResponse> {
|
|
52
|
-
const { plan_id
|
|
53
|
-
return this._client.post(path`/plans/${
|
|
52
|
+
const { plan_id } = params;
|
|
53
|
+
return this._client.post(path`/plans/${plan_id}/migrations/${migrationID}/cancel`, options);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -42,8 +42,8 @@ export class Plans extends APIResource {
|
|
|
42
42
|
*
|
|
43
43
|
* Other fields on a plan are currently immutable.
|
|
44
44
|
*/
|
|
45
|
-
update(
|
|
46
|
-
return this._client.put(path`/plans/${
|
|
45
|
+
update(planID: string, body: PlanUpdateParams, options?: RequestOptions): APIPromise<Plan> {
|
|
46
|
+
return this._client.put(path`/plans/${planID}`, { body, ...options });
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
@@ -79,8 +79,8 @@ export class Plans extends APIResource {
|
|
|
79
79
|
* Orb supports plan phases, also known as contract ramps. For plans with phases,
|
|
80
80
|
* the serialized prices refer to all prices across all phases.
|
|
81
81
|
*/
|
|
82
|
-
fetch(
|
|
83
|
-
return this._client.get(path`/plans/${
|
|
82
|
+
fetch(planID: string, options?: RequestOptions): APIPromise<Plan> {
|
|
83
|
+
return this._client.get(path`/plans/${planID}`, options);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
@@ -29,11 +29,11 @@ export class ExternalPriceID extends APIResource {
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
update(
|
|
32
|
-
|
|
32
|
+
externalPriceID: string,
|
|
33
33
|
body: ExternalPriceIDUpdateParams,
|
|
34
34
|
options?: RequestOptions,
|
|
35
35
|
): APIPromise<Shared.Price> {
|
|
36
|
-
return this._client.put(path`/prices/external_price_id/${
|
|
36
|
+
return this._client.put(path`/prices/external_price_id/${externalPriceID}`, { body, ...options });
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -48,8 +48,8 @@ export class ExternalPriceID extends APIResource {
|
|
|
48
48
|
* );
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
fetch(
|
|
52
|
-
return this._client.get(path`/prices/external_price_id/${
|
|
51
|
+
fetch(externalPriceID: string, options?: RequestOptions): APIPromise<Shared.Price> {
|
|
52
|
+
return this._client.get(path`/prices/external_price_id/${externalPriceID}`, options);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -61,8 +61,8 @@ export class Prices extends APIResource {
|
|
|
61
61
|
* const price = await client.prices.update('price_id');
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
|
-
update(
|
|
65
|
-
return this._client.put(path`/prices/${
|
|
64
|
+
update(priceID: string, body: PriceUpdateParams, options?: RequestOptions): APIPromise<Shared.Price> {
|
|
65
|
+
return this._client.put(path`/prices/${priceID}`, { body, ...options });
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
/**
|
|
@@ -120,11 +120,11 @@ export class Prices extends APIResource {
|
|
|
120
120
|
* ```
|
|
121
121
|
*/
|
|
122
122
|
evaluate(
|
|
123
|
-
|
|
123
|
+
priceID: string,
|
|
124
124
|
body: PriceEvaluateParams,
|
|
125
125
|
options?: RequestOptions,
|
|
126
126
|
): APIPromise<PriceEvaluateResponse> {
|
|
127
|
-
return this._client.post(path`/prices/${
|
|
127
|
+
return this._client.post(path`/prices/${priceID}/evaluate`, { body, ...options });
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/**
|
|
@@ -216,8 +216,8 @@ export class Prices extends APIResource {
|
|
|
216
216
|
* const price = await client.prices.fetch('price_id');
|
|
217
217
|
* ```
|
|
218
218
|
*/
|
|
219
|
-
fetch(
|
|
220
|
-
return this._client.get(path`/prices/${
|
|
219
|
+
fetch(priceID: string, options?: RequestOptions): APIPromise<Shared.Price> {
|
|
220
|
+
return this._client.get(path`/prices/${priceID}`, options);
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
|
@@ -22,10 +22,10 @@ export class SubscriptionChanges extends APIResource {
|
|
|
22
22
|
* `pending_subscription_change` field in the response.
|
|
23
23
|
*/
|
|
24
24
|
retrieve(
|
|
25
|
-
|
|
25
|
+
subscriptionChangeID: string,
|
|
26
26
|
options?: RequestOptions,
|
|
27
27
|
): APIPromise<SubscriptionChangeRetrieveResponse> {
|
|
28
|
-
return this._client.get(path`/subscription_changes/${
|
|
28
|
+
return this._client.get(path`/subscription_changes/${subscriptionChangeID}`, options);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -49,11 +49,11 @@ export class SubscriptionChanges extends APIResource {
|
|
|
49
49
|
* created will be issued immediately if they only contain in-advance fees.
|
|
50
50
|
*/
|
|
51
51
|
apply(
|
|
52
|
-
|
|
52
|
+
subscriptionChangeID: string,
|
|
53
53
|
body: SubscriptionChangeApplyParams | null | undefined = {},
|
|
54
54
|
options?: RequestOptions,
|
|
55
55
|
): APIPromise<SubscriptionChangeApplyResponse> {
|
|
56
|
-
return this._client.post(path`/subscription_changes/${
|
|
56
|
+
return this._client.post(path`/subscription_changes/${subscriptionChangeID}/apply`, { body, ...options });
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -62,10 +62,10 @@ export class SubscriptionChanges extends APIResource {
|
|
|
62
62
|
* cancel an existing change before creating a new one.
|
|
63
63
|
*/
|
|
64
64
|
cancel(
|
|
65
|
-
|
|
65
|
+
subscriptionChangeID: string,
|
|
66
66
|
options?: RequestOptions,
|
|
67
67
|
): APIPromise<SubscriptionChangeCancelResponse> {
|
|
68
|
-
return this._client.post(path`/subscription_changes/${
|
|
68
|
+
return this._client.post(path`/subscription_changes/${subscriptionChangeID}/cancel`, options);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -300,11 +300,11 @@ export class Subscriptions extends APIResource {
|
|
|
300
300
|
* ```
|
|
301
301
|
*/
|
|
302
302
|
update(
|
|
303
|
-
|
|
303
|
+
subscriptionID: string,
|
|
304
304
|
body: SubscriptionUpdateParams,
|
|
305
305
|
options?: RequestOptions,
|
|
306
306
|
): APIPromise<Subscription> {
|
|
307
|
-
return this._client.put(path`/subscriptions/${
|
|
307
|
+
return this._client.put(path`/subscriptions/${subscriptionID}`, { body, ...options });
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
/**
|
|
@@ -410,11 +410,11 @@ export class Subscriptions extends APIResource {
|
|
|
410
410
|
* ```
|
|
411
411
|
*/
|
|
412
412
|
cancel(
|
|
413
|
-
|
|
413
|
+
subscriptionID: string,
|
|
414
414
|
body: SubscriptionCancelParams,
|
|
415
415
|
options?: RequestOptions,
|
|
416
416
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
417
|
-
return this._client.post(path`/subscriptions/${
|
|
417
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/cancel`, { body, ...options });
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
/**
|
|
@@ -428,8 +428,8 @@ export class Subscriptions extends APIResource {
|
|
|
428
428
|
* );
|
|
429
429
|
* ```
|
|
430
430
|
*/
|
|
431
|
-
fetch(
|
|
432
|
-
return this._client.get(path`/subscriptions/${
|
|
431
|
+
fetch(subscriptionID: string, options?: RequestOptions): APIPromise<Subscription> {
|
|
432
|
+
return this._client.get(path`/subscriptions/${subscriptionID}`, options);
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
/**
|
|
@@ -452,11 +452,11 @@ export class Subscriptions extends APIResource {
|
|
|
452
452
|
* ```
|
|
453
453
|
*/
|
|
454
454
|
fetchCosts(
|
|
455
|
-
|
|
455
|
+
subscriptionID: string,
|
|
456
456
|
query: SubscriptionFetchCostsParams | null | undefined = {},
|
|
457
457
|
options?: RequestOptions,
|
|
458
458
|
): APIPromise<SubscriptionFetchCostsResponse> {
|
|
459
|
-
return this._client.get(path`/subscriptions/${
|
|
459
|
+
return this._client.get(path`/subscriptions/${subscriptionID}/costs`, { query, ...options });
|
|
460
460
|
}
|
|
461
461
|
|
|
462
462
|
/**
|
|
@@ -476,12 +476,12 @@ export class Subscriptions extends APIResource {
|
|
|
476
476
|
* ```
|
|
477
477
|
*/
|
|
478
478
|
fetchSchedule(
|
|
479
|
-
|
|
479
|
+
subscriptionID: string,
|
|
480
480
|
query: SubscriptionFetchScheduleParams | null | undefined = {},
|
|
481
481
|
options?: RequestOptions,
|
|
482
482
|
): PagePromise<SubscriptionFetchScheduleResponsesPage, SubscriptionFetchScheduleResponse> {
|
|
483
483
|
return this._client.getAPIList(
|
|
484
|
-
path`/subscriptions/${
|
|
484
|
+
path`/subscriptions/${subscriptionID}/schedule`,
|
|
485
485
|
Page<SubscriptionFetchScheduleResponse>,
|
|
486
486
|
{ query, ...options },
|
|
487
487
|
);
|
|
@@ -690,11 +690,11 @@ export class Subscriptions extends APIResource {
|
|
|
690
690
|
* ```
|
|
691
691
|
*/
|
|
692
692
|
fetchUsage(
|
|
693
|
-
|
|
693
|
+
subscriptionID: string,
|
|
694
694
|
query: SubscriptionFetchUsageParams | null | undefined = {},
|
|
695
695
|
options?: RequestOptions,
|
|
696
696
|
): APIPromise<SubscriptionUsage> {
|
|
697
|
-
return this._client.get(path`/subscriptions/${
|
|
697
|
+
return this._client.get(path`/subscriptions/${subscriptionID}/usage`, { query, ...options });
|
|
698
698
|
}
|
|
699
699
|
|
|
700
700
|
/**
|
|
@@ -780,11 +780,11 @@ export class Subscriptions extends APIResource {
|
|
|
780
780
|
* ```
|
|
781
781
|
*/
|
|
782
782
|
priceIntervals(
|
|
783
|
-
|
|
783
|
+
subscriptionID: string,
|
|
784
784
|
body: SubscriptionPriceIntervalsParams,
|
|
785
785
|
options?: RequestOptions,
|
|
786
786
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
787
|
-
return this._client.post(path`/subscriptions/${
|
|
787
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/price_intervals`, { body, ...options });
|
|
788
788
|
}
|
|
789
789
|
|
|
790
790
|
/**
|
|
@@ -800,11 +800,11 @@ export class Subscriptions extends APIResource {
|
|
|
800
800
|
* ```
|
|
801
801
|
*/
|
|
802
802
|
redeemCoupon(
|
|
803
|
-
|
|
803
|
+
subscriptionID: string,
|
|
804
804
|
body: SubscriptionRedeemCouponParams,
|
|
805
805
|
options?: RequestOptions,
|
|
806
806
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
807
|
-
return this._client.post(path`/subscriptions/${
|
|
807
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/redeem_coupon`, { body, ...options });
|
|
808
808
|
}
|
|
809
809
|
|
|
810
810
|
/**
|
|
@@ -1002,11 +1002,11 @@ export class Subscriptions extends APIResource {
|
|
|
1002
1002
|
* ```
|
|
1003
1003
|
*/
|
|
1004
1004
|
schedulePlanChange(
|
|
1005
|
-
|
|
1005
|
+
subscriptionID: string,
|
|
1006
1006
|
body: SubscriptionSchedulePlanChangeParams,
|
|
1007
1007
|
options?: RequestOptions,
|
|
1008
1008
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
1009
|
-
return this._client.post(path`/subscriptions/${
|
|
1009
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/schedule_plan_change`, {
|
|
1010
1010
|
body,
|
|
1011
1011
|
...options,
|
|
1012
1012
|
});
|
|
@@ -1025,11 +1025,11 @@ export class Subscriptions extends APIResource {
|
|
|
1025
1025
|
* ```
|
|
1026
1026
|
*/
|
|
1027
1027
|
triggerPhase(
|
|
1028
|
-
|
|
1028
|
+
subscriptionID: string,
|
|
1029
1029
|
body: SubscriptionTriggerPhaseParams,
|
|
1030
1030
|
options?: RequestOptions,
|
|
1031
1031
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
1032
|
-
return this._client.post(path`/subscriptions/${
|
|
1032
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/trigger_phase`, { body, ...options });
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
1035
|
/**
|
|
@@ -1055,10 +1055,10 @@ export class Subscriptions extends APIResource {
|
|
|
1055
1055
|
* ```
|
|
1056
1056
|
*/
|
|
1057
1057
|
unscheduleCancellation(
|
|
1058
|
-
|
|
1058
|
+
subscriptionID: string,
|
|
1059
1059
|
options?: RequestOptions,
|
|
1060
1060
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
1061
|
-
return this._client.post(path`/subscriptions/${
|
|
1061
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/unschedule_cancellation`, options);
|
|
1062
1062
|
}
|
|
1063
1063
|
|
|
1064
1064
|
/**
|
|
@@ -1078,11 +1078,11 @@ export class Subscriptions extends APIResource {
|
|
|
1078
1078
|
* ```
|
|
1079
1079
|
*/
|
|
1080
1080
|
unscheduleFixedFeeQuantityUpdates(
|
|
1081
|
-
|
|
1081
|
+
subscriptionID: string,
|
|
1082
1082
|
body: SubscriptionUnscheduleFixedFeeQuantityUpdatesParams,
|
|
1083
1083
|
options?: RequestOptions,
|
|
1084
1084
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
1085
|
-
return this._client.post(path`/subscriptions/${
|
|
1085
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/unschedule_fixed_fee_quantity_updates`, {
|
|
1086
1086
|
body,
|
|
1087
1087
|
...options,
|
|
1088
1088
|
});
|
|
@@ -1101,10 +1101,10 @@ export class Subscriptions extends APIResource {
|
|
|
1101
1101
|
* ```
|
|
1102
1102
|
*/
|
|
1103
1103
|
unschedulePendingPlanChanges(
|
|
1104
|
-
|
|
1104
|
+
subscriptionID: string,
|
|
1105
1105
|
options?: RequestOptions,
|
|
1106
1106
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
1107
|
-
return this._client.post(path`/subscriptions/${
|
|
1107
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/unschedule_pending_plan_changes`, options);
|
|
1108
1108
|
}
|
|
1109
1109
|
|
|
1110
1110
|
/**
|
|
@@ -1133,11 +1133,11 @@ export class Subscriptions extends APIResource {
|
|
|
1133
1133
|
* ```
|
|
1134
1134
|
*/
|
|
1135
1135
|
updateFixedFeeQuantity(
|
|
1136
|
-
|
|
1136
|
+
subscriptionID: string,
|
|
1137
1137
|
body: SubscriptionUpdateFixedFeeQuantityParams,
|
|
1138
1138
|
options?: RequestOptions,
|
|
1139
1139
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
1140
|
-
return this._client.post(path`/subscriptions/${
|
|
1140
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/update_fixed_fee_quantity`, {
|
|
1141
1141
|
body,
|
|
1142
1142
|
...options,
|
|
1143
1143
|
});
|
|
@@ -1173,11 +1173,11 @@ export class Subscriptions extends APIResource {
|
|
|
1173
1173
|
* ```
|
|
1174
1174
|
*/
|
|
1175
1175
|
updateTrial(
|
|
1176
|
-
|
|
1176
|
+
subscriptionID: string,
|
|
1177
1177
|
body: SubscriptionUpdateTrialParams,
|
|
1178
1178
|
options?: RequestOptions,
|
|
1179
1179
|
): APIPromise<SubscriptionChangesAPI.MutatedSubscription> {
|
|
1180
|
-
return this._client.post(path`/subscriptions/${
|
|
1180
|
+
return this._client.post(path`/subscriptions/${subscriptionID}/update_trial`, { body, ...options });
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '6.0
|
|
1
|
+
export const VERSION = '6.1.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.0
|
|
1
|
+
export declare const VERSION = "6.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "6.0
|
|
1
|
+
export declare const VERSION = "6.1.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '6.0
|
|
1
|
+
export const VERSION = '6.1.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|