@metronome/sdk 0.1.0-beta.9 → 0.2.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 +194 -0
- package/README.md +30 -46
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +23 -14
- package/core.js.map +1 -1
- package/core.mjs +24 -15
- package/core.mjs.map +1 -1
- package/index.d.mts +3 -2
- package/index.d.ts +3 -2
- package/index.d.ts.map +1 -1
- package/index.js +6 -3
- package/index.js.map +1 -1
- package/index.mjs +6 -3
- package/index.mjs.map +1 -1
- package/package.json +1 -5
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -0
- package/pagination.js.map +1 -1
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/shared.d.ts +521 -37
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.ts +30 -10
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +19 -0
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +19 -0
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.ts +8 -0
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.js.map +1 -1
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.ts +58 -3
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.js +41 -0
- package/resources/v1/billable-metrics.js.map +1 -1
- package/resources/v1/billable-metrics.mjs +41 -0
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +1556 -122
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +180 -3
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +180 -3
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.ts +2 -2
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.js.map +1 -1
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/named-schedules.d.ts +21 -0
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.js +21 -0
- package/resources/v1/contracts/named-schedules.js.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs +21 -0
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.ts +51 -3
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.js +33 -0
- package/resources/v1/contracts/products.js.map +1 -1
- package/resources/v1/contracts/products.mjs +33 -0
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.js.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.js +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.ts +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.js +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts +107 -10
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.js +71 -0
- package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.mjs +71 -0
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts +102 -14
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.js +68 -0
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs +68 -0
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/credit-grants.d.ts +77 -2
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.js +39 -2
- package/resources/v1/credit-grants.js.map +1 -1
- package/resources/v1/credit-grants.mjs +39 -2
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.ts +51 -7
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.js +35 -0
- package/resources/v1/custom-fields.js.map +1 -1
- package/resources/v1/custom-fields.mjs +35 -0
- package/resources/v1/custom-fields.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.ts +37 -0
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +23 -0
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +23 -0
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.ts +31 -0
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.js +27 -0
- package/resources/v1/customers/billing-config.js.map +1 -1
- package/resources/v1/customers/billing-config.mjs +27 -0
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.ts +94 -7
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.js +56 -1
- package/resources/v1/customers/commits.js.map +1 -1
- package/resources/v1/customers/commits.mjs +56 -1
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.ts +73 -3
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.js +41 -1
- package/resources/v1/customers/credits.js.map +1 -1
- package/resources/v1/customers/credits.mjs +41 -1
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.ts +186 -9
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +106 -1
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +106 -1
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.ts +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.ts +144 -52
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +49 -0
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +49 -0
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/named-schedules.d.ts +21 -0
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.js +21 -0
- package/resources/v1/customers/named-schedules.js.map +1 -1
- package/resources/v1/customers/named-schedules.mjs +21 -0
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.ts +46 -1
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.js +43 -0
- package/resources/v1/customers/plans.js.map +1 -1
- package/resources/v1/customers/plans.mjs +43 -0
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/dashboards.d.ts +31 -3
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.js +26 -0
- package/resources/v1/dashboards.js.map +1 -1
- package/resources/v1/dashboards.mjs +26 -0
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.ts +3 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.ts +14 -0
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.js +14 -0
- package/resources/v1/invoices.js.map +1 -1
- package/resources/v1/invoices.mjs +14 -0
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/plans.d.ts +47 -4
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.js +27 -0
- package/resources/v1/plans.js.map +1 -1
- package/resources/v1/plans.mjs +27 -0
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.ts +8 -0
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.js.map +1 -1
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.ts +5 -0
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.js +5 -0
- package/resources/v1/services.js.map +1 -1
- package/resources/v1/services.mjs +5 -0
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/usage.d.ts +161 -3
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +46 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +46 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.ts +6 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.ts +3241 -205
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.js +90 -2
- package/resources/v2/contracts.js.map +1 -1
- package/resources/v2/contracts.mjs +90 -2
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/webhooks.js +5 -5
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +5 -5
- package/resources/webhooks.mjs.map +1 -1
- package/src/_shims/auto/runtime-bun.ts +1 -1
- package/src/_shims/auto/runtime-node.ts +1 -1
- package/src/_shims/auto/runtime.ts +1 -1
- package/src/_shims/auto/types-node.ts +1 -1
- package/src/_shims/bun-runtime.ts +2 -2
- package/src/_shims/index.d.ts +5 -3
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +6 -2
- package/src/_shims/node-runtime.ts +3 -3
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +3 -3
- package/src/core.ts +46 -18
- package/src/error.ts +1 -1
- package/src/index.ts +22 -16
- package/src/internal/qs/formats.ts +1 -1
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +3 -3
- package/src/internal/qs/utils.ts +2 -2
- package/src/pagination.ts +5 -1
- package/src/resource.ts +2 -2
- package/src/resources/index.ts +4 -4
- package/src/resources/shared.ts +605 -40
- package/src/resources/v1/alerts.ts +33 -13
- package/src/resources/v1/audit-logs.ts +12 -4
- package/src/resources/v1/billable-metrics.ts +57 -8
- package/src/resources/v1/contracts/contracts.ts +1723 -135
- package/src/resources/v1/contracts/index.ts +8 -4
- package/src/resources/v1/contracts/named-schedules.ts +23 -2
- package/src/resources/v1/contracts/products.ts +53 -9
- package/src/resources/v1/contracts/rate-cards/index.ts +6 -4
- package/src/resources/v1/contracts/rate-cards/named-schedules.ts +27 -2
- package/src/resources/v1/contracts/rate-cards/product-orders.ts +33 -3
- package/src/resources/v1/contracts/rate-cards/rate-cards.ts +113 -20
- package/src/resources/v1/contracts/rate-cards/rates.ts +86 -18
- package/src/resources/v1/contracts/rate-cards.ts +1 -1
- package/src/resources/v1/contracts.ts +1 -1
- package/src/resources/v1/credit-grants.ts +82 -10
- package/src/resources/v1/custom-fields.ts +57 -9
- package/src/resources/v1/customers/alerts.ts +44 -3
- package/src/resources/v1/customers/billing-config.ts +34 -2
- package/src/resources/v1/customers/commits.ts +97 -10
- package/src/resources/v1/customers/credits.ts +76 -6
- package/src/resources/v1/customers/customers.ts +208 -27
- package/src/resources/v1/customers/index.ts +10 -8
- package/src/resources/v1/customers/invoices.ts +123 -57
- package/src/resources/v1/customers/named-schedules.ts +23 -2
- package/src/resources/v1/customers/plans.ts +48 -5
- package/src/resources/v1/customers.ts +1 -1
- package/src/resources/v1/dashboards.ts +33 -5
- package/src/resources/v1/index.ts +20 -14
- package/src/resources/v1/invoices.ts +16 -2
- package/src/resources/v1/plans.ts +45 -10
- package/src/resources/v1/pricing-units.ts +12 -4
- package/src/resources/v1/services.ts +7 -2
- package/src/resources/v1/usage.ts +187 -6
- package/src/resources/v1/v1.ts +39 -27
- package/src/resources/v1.ts +1 -1
- package/src/resources/v2/contracts.ts +3838 -261
- package/src/resources/v2/index.ts +2 -2
- package/src/resources/v2/v2.ts +3 -3
- package/src/resources/v2.ts +1 -1
- package/src/resources/webhooks.ts +7 -7
- package/src/resources.ts +1 -1
- package/src/shims/node.ts +3 -3
- package/src/shims/web.ts +3 -3
- package/src/uploads.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -7,58 +7,233 @@ import * as ProductsAPI from "./products.js";
|
|
|
7
7
|
import { ProductArchiveParams, ProductArchiveResponse, ProductCreateParams, ProductCreateResponse, ProductListItemState, ProductListParams, ProductListResponse, ProductListResponsesCursorPage, ProductRetrieveParams, ProductRetrieveResponse, ProductUpdateParams, ProductUpdateResponse, Products, QuantityConversion, QuantityRounding } from "./products.js";
|
|
8
8
|
import * as InvoicesAPI from "../customers/invoices.js";
|
|
9
9
|
import * as RateCardsAPI from "./rate-cards/rate-cards.js";
|
|
10
|
-
import { RateCardCreateParams, RateCardCreateResponse, RateCardListParams, RateCardListResponse, RateCardListResponsesCursorPage, RateCardRetrieveParams, RateCardRetrieveRateScheduleParams, RateCardRetrieveRateScheduleResponse, RateCardRetrieveResponse, RateCardUpdateParams, RateCardUpdateResponse, RateCards } from "./rate-cards/rate-cards.js";
|
|
10
|
+
import { RateCardArchiveParams, RateCardArchiveResponse, RateCardCreateParams, RateCardCreateResponse, RateCardListParams, RateCardListResponse, RateCardListResponsesCursorPage, RateCardRetrieveParams, RateCardRetrieveRateScheduleParams, RateCardRetrieveRateScheduleResponse, RateCardRetrieveResponse, RateCardUpdateParams, RateCardUpdateResponse, RateCards } from "./rate-cards/rate-cards.js";
|
|
11
11
|
export declare class Contracts extends APIResource {
|
|
12
12
|
products: ProductsAPI.Products;
|
|
13
13
|
rateCards: RateCardsAPI.RateCards;
|
|
14
14
|
namedSchedules: NamedSchedulesAPI.NamedSchedules;
|
|
15
15
|
/**
|
|
16
16
|
* Create a new contract
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const contract = await client.v1.contracts.create({
|
|
21
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
22
|
+
* starting_at: '2020-01-01T00:00:00.000Z',
|
|
23
|
+
* billing_provider_configuration: {
|
|
24
|
+
* billing_provider: 'stripe',
|
|
25
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
26
|
+
* },
|
|
27
|
+
* rate_card_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
17
30
|
*/
|
|
18
31
|
create(body: ContractCreateParams, options?: Core.RequestOptions): Core.APIPromise<ContractCreateResponse>;
|
|
19
32
|
/**
|
|
20
|
-
*
|
|
33
|
+
* This is the v1 endpoint to get a contract. New clients should implement using
|
|
34
|
+
* the v2 endpoint.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const contract = await client.v1.contracts.retrieve({
|
|
39
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
40
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
21
43
|
*/
|
|
22
44
|
retrieve(body: ContractRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<ContractRetrieveResponse>;
|
|
23
45
|
/**
|
|
24
|
-
*
|
|
46
|
+
* This is the v1 endpoint to list all contracts for a customer. New clients should
|
|
47
|
+
* implement using the v2 endpoint.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const contracts = await client.v1.contracts.list({
|
|
52
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
25
55
|
*/
|
|
26
56
|
list(body: ContractListParams, options?: Core.RequestOptions): Core.APIPromise<ContractListResponse>;
|
|
27
57
|
/**
|
|
28
58
|
* Add a manual balance entry
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* await client.v1.contracts.addManualBalanceEntry({
|
|
63
|
+
* id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
|
|
64
|
+
* amount: -1000,
|
|
65
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
66
|
+
* reason: 'Reason for entry',
|
|
67
|
+
* segment_id: '66368e29-3f97-4d15-a6e9-120897f0070a',
|
|
68
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
69
|
+
* });
|
|
70
|
+
* ```
|
|
29
71
|
*/
|
|
30
72
|
addManualBalanceEntry(body: ContractAddManualBalanceEntryParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
31
73
|
/**
|
|
32
|
-
*
|
|
74
|
+
* Amendments will be replaced by Contract editing. New clients should implement
|
|
75
|
+
* using the editContract endpoint. Read more about the migration to contract
|
|
76
|
+
* editing [here](https://docs.metronome.com/migrate-amendments-to-edits/) and
|
|
77
|
+
* reach out to your Metronome representative for more details. Once contract
|
|
78
|
+
* editing is enabled, access to this endpoint will be removed.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const response = await client.v1.contracts.amend({
|
|
83
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
84
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
85
|
+
* starting_at: '2020-01-01T00:00:00.000Z',
|
|
86
|
+
* });
|
|
87
|
+
* ```
|
|
33
88
|
*/
|
|
34
89
|
amend(body: ContractAmendParams, options?: Core.RequestOptions): Core.APIPromise<ContractAmendResponse>;
|
|
35
90
|
/**
|
|
36
91
|
* Archive a contract
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* const response = await client.v1.contracts.archive({
|
|
96
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
97
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
98
|
+
* void_invoices: true,
|
|
99
|
+
* });
|
|
100
|
+
* ```
|
|
37
101
|
*/
|
|
38
102
|
archive(body: ContractArchiveParams, options?: Core.RequestOptions): Core.APIPromise<ContractArchiveResponse>;
|
|
39
103
|
/**
|
|
40
104
|
* Creates historical usage invoices for a contract
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* ```ts
|
|
108
|
+
* const response =
|
|
109
|
+
* await client.v1.contracts.createHistoricalInvoices({
|
|
110
|
+
* invoices: [
|
|
111
|
+
* {
|
|
112
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
113
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
114
|
+
* credit_type_id:
|
|
115
|
+
* '2714e483-4ff1-48e4-9e25-ac732e8f24f2',
|
|
116
|
+
* inclusive_start_date: '2020-01-01T00:00:00.000Z',
|
|
117
|
+
* exclusive_end_date: '2020-02-01T00:00:00.000Z',
|
|
118
|
+
* issue_date: '2020-02-01T00:00:00.000Z',
|
|
119
|
+
* usage_line_items: [
|
|
120
|
+
* {
|
|
121
|
+
* product_id:
|
|
122
|
+
* 'f14d6729-6a44-4b13-9908-9387f1918790',
|
|
123
|
+
* inclusive_start_date:
|
|
124
|
+
* '2020-01-01T00:00:00.000Z',
|
|
125
|
+
* exclusive_end_date: '2020-02-01T00:00:00.000Z',
|
|
126
|
+
* quantity: 100,
|
|
127
|
+
* },
|
|
128
|
+
* ],
|
|
129
|
+
* },
|
|
130
|
+
* ],
|
|
131
|
+
* preview: false,
|
|
132
|
+
* });
|
|
133
|
+
* ```
|
|
41
134
|
*/
|
|
42
135
|
createHistoricalInvoices(body: ContractCreateHistoricalInvoicesParams, options?: Core.RequestOptions): Core.APIPromise<ContractCreateHistoricalInvoicesResponse>;
|
|
43
136
|
/**
|
|
44
137
|
* List balances (commits and credits).
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const response = await client.v1.contracts.listBalances({
|
|
142
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
143
|
+
* id: '6162d87b-e5db-4a33-b7f2-76ce6ead4e85',
|
|
144
|
+
* include_ledgers: true,
|
|
145
|
+
* });
|
|
146
|
+
* ```
|
|
45
147
|
*/
|
|
46
148
|
listBalances(body: ContractListBalancesParams, options?: Core.RequestOptions): Core.APIPromise<ContractListBalancesResponse>;
|
|
47
149
|
/**
|
|
48
150
|
* Get the rate schedule for the rate card on a given contract.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```ts
|
|
154
|
+
* const response =
|
|
155
|
+
* await client.v1.contracts.retrieveRateSchedule({
|
|
156
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
157
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
158
|
+
* at: '2020-01-01T00:00:00.000Z',
|
|
159
|
+
* selectors: [
|
|
160
|
+
* {
|
|
161
|
+
* product_id: 'd6300dbb-882e-4d2d-8dec-5125d16b65d0',
|
|
162
|
+
* partial_pricing_group_values: {
|
|
163
|
+
* region: 'us-west-2',
|
|
164
|
+
* cloud: 'aws',
|
|
165
|
+
* },
|
|
166
|
+
* },
|
|
167
|
+
* ],
|
|
168
|
+
* });
|
|
169
|
+
* ```
|
|
49
170
|
*/
|
|
50
171
|
retrieveRateSchedule(params: ContractRetrieveRateScheduleParams, options?: Core.RequestOptions): Core.APIPromise<ContractRetrieveRateScheduleResponse>;
|
|
172
|
+
/**
|
|
173
|
+
* Fetch the quantity and price for a subscription over time. End-point does not
|
|
174
|
+
* return future scheduled changes.
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```ts
|
|
178
|
+
* const response =
|
|
179
|
+
* await client.v1.contracts.retrieveSubscriptionQuantityHistory(
|
|
180
|
+
* {
|
|
181
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
182
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
183
|
+
* subscription_id:
|
|
184
|
+
* '1a824d53-bde6-4d82-96d7-6347ff227d5c',
|
|
185
|
+
* },
|
|
186
|
+
* );
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
retrieveSubscriptionQuantityHistory(body: ContractRetrieveSubscriptionQuantityHistoryParams, options?: Core.RequestOptions): Core.APIPromise<ContractRetrieveSubscriptionQuantityHistoryResponse>;
|
|
51
190
|
/**
|
|
52
191
|
* Create a new scheduled invoice for Professional Services terms on a contract.
|
|
53
192
|
* This endpoint's availability is dependent on your client's configuration.
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```ts
|
|
196
|
+
* const response =
|
|
197
|
+
* await client.v1.contracts.scheduleProServicesInvoice({
|
|
198
|
+
* contract_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
199
|
+
* customer_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
200
|
+
* issued_at: '2019-12-27T18:11:19.117Z',
|
|
201
|
+
* line_items: [
|
|
202
|
+
* {
|
|
203
|
+
* professional_service_id:
|
|
204
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
205
|
+
* },
|
|
206
|
+
* ],
|
|
207
|
+
* });
|
|
208
|
+
* ```
|
|
54
209
|
*/
|
|
55
210
|
scheduleProServicesInvoice(body: ContractScheduleProServicesInvoiceParams, options?: Core.RequestOptions): Core.APIPromise<ContractScheduleProServicesInvoiceResponse>;
|
|
56
211
|
/**
|
|
57
212
|
* Set usage filter for a contract
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```ts
|
|
216
|
+
* await client.v1.contracts.setUsageFilter({
|
|
217
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
218
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
219
|
+
* group_key: 'business_subscription_id',
|
|
220
|
+
* group_values: ['ID-1', 'ID-2'],
|
|
221
|
+
* starting_at: '2020-01-01T00:00:00.000Z',
|
|
222
|
+
* });
|
|
223
|
+
* ```
|
|
58
224
|
*/
|
|
59
225
|
setUsageFilter(body: ContractSetUsageFilterParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
60
226
|
/**
|
|
61
227
|
* Update the end date of a contract
|
|
228
|
+
*
|
|
229
|
+
* @example
|
|
230
|
+
* ```ts
|
|
231
|
+
* const response = await client.v1.contracts.updateEndDate({
|
|
232
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
233
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
234
|
+
* ending_before: '2020-01-01T00:00:00.000Z',
|
|
235
|
+
* });
|
|
236
|
+
* ```
|
|
62
237
|
*/
|
|
63
238
|
updateEndDate(body: ContractUpdateEndDateParams, options?: Core.RequestOptions): Core.APIPromise<ContractUpdateEndDateResponse>;
|
|
64
239
|
}
|
|
@@ -80,11 +255,18 @@ export declare namespace ContractRetrieveResponse {
|
|
|
80
255
|
* the contract is not archived.
|
|
81
256
|
*/
|
|
82
257
|
archived_at?: string;
|
|
83
|
-
custom_fields?:
|
|
258
|
+
custom_fields?: {
|
|
259
|
+
[key: string]: string;
|
|
260
|
+
};
|
|
84
261
|
/**
|
|
85
262
|
* The billing provider configuration associated with a contract.
|
|
86
263
|
*/
|
|
87
264
|
customer_billing_provider_configuration?: Data.CustomerBillingProviderConfiguration;
|
|
265
|
+
prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
|
|
266
|
+
/**
|
|
267
|
+
* Priority of the contract.
|
|
268
|
+
*/
|
|
269
|
+
priority?: number;
|
|
88
270
|
/**
|
|
89
271
|
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
90
272
|
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
@@ -93,6 +275,10 @@ export declare namespace ContractRetrieveResponse {
|
|
|
93
275
|
* on a separate invoice from usage charges.
|
|
94
276
|
*/
|
|
95
277
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
278
|
+
spend_threshold_configuration?: Data.SpendThresholdConfiguration;
|
|
279
|
+
/**
|
|
280
|
+
* List of subscriptions on the contract.
|
|
281
|
+
*/
|
|
96
282
|
subscriptions?: Array<Data.Subscription>;
|
|
97
283
|
/**
|
|
98
284
|
* Prevents the creation of duplicates. If a request to create a record is made
|
|
@@ -158,16 +344,246 @@ export declare namespace ContractRetrieveResponse {
|
|
|
158
344
|
* Configuration for the billing provider. The structure of this object is specific
|
|
159
345
|
* to the billing provider.
|
|
160
346
|
*/
|
|
161
|
-
configuration?:
|
|
347
|
+
configuration?: {
|
|
348
|
+
[key: string]: unknown;
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
interface PrepaidBalanceThresholdConfiguration {
|
|
352
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
353
|
+
/**
|
|
354
|
+
* When set to false, the contract will not be evaluated against the
|
|
355
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
356
|
+
* regardless of prior state.
|
|
357
|
+
*/
|
|
358
|
+
is_enabled: boolean;
|
|
359
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
360
|
+
/**
|
|
361
|
+
* Specify the amount the balance should be recharged to.
|
|
362
|
+
*/
|
|
363
|
+
recharge_to_amount: number;
|
|
364
|
+
/**
|
|
365
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
366
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
367
|
+
*/
|
|
368
|
+
threshold_amount: number;
|
|
369
|
+
/**
|
|
370
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
371
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
372
|
+
*/
|
|
373
|
+
custom_credit_type_id?: string;
|
|
374
|
+
}
|
|
375
|
+
namespace PrepaidBalanceThresholdConfiguration {
|
|
376
|
+
interface Commit {
|
|
377
|
+
/**
|
|
378
|
+
* The commit product that will be used to generate the line item for commit
|
|
379
|
+
* payment.
|
|
380
|
+
*/
|
|
381
|
+
product_id: string;
|
|
382
|
+
/**
|
|
383
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
384
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
385
|
+
* all products.
|
|
386
|
+
*/
|
|
387
|
+
applicable_product_ids?: Array<string>;
|
|
388
|
+
/**
|
|
389
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
390
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
391
|
+
* all products.
|
|
392
|
+
*/
|
|
393
|
+
applicable_product_tags?: Array<string>;
|
|
394
|
+
description?: string;
|
|
395
|
+
/**
|
|
396
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
397
|
+
* will default to the commit product name.
|
|
398
|
+
*/
|
|
399
|
+
name?: string;
|
|
400
|
+
/**
|
|
401
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
402
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
403
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
404
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
405
|
+
*/
|
|
406
|
+
specifiers?: Array<Commit.Specifier>;
|
|
407
|
+
}
|
|
408
|
+
namespace Commit {
|
|
409
|
+
interface Specifier {
|
|
410
|
+
presentation_group_values?: {
|
|
411
|
+
[key: string]: string;
|
|
412
|
+
};
|
|
413
|
+
pricing_group_values?: {
|
|
414
|
+
[key: string]: string;
|
|
415
|
+
};
|
|
416
|
+
/**
|
|
417
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
418
|
+
*/
|
|
419
|
+
product_id?: string;
|
|
420
|
+
/**
|
|
421
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
422
|
+
* tags.
|
|
423
|
+
*/
|
|
424
|
+
product_tags?: Array<string>;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
interface PaymentGateConfig {
|
|
428
|
+
/**
|
|
429
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
430
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
431
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
432
|
+
* wish to payment gate the commit balance.
|
|
433
|
+
*/
|
|
434
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
435
|
+
/**
|
|
436
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
437
|
+
*/
|
|
438
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
439
|
+
/**
|
|
440
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
441
|
+
*/
|
|
442
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
443
|
+
/**
|
|
444
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
445
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
446
|
+
* will default to NONE.
|
|
447
|
+
*/
|
|
448
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
449
|
+
}
|
|
450
|
+
namespace PaymentGateConfig {
|
|
451
|
+
/**
|
|
452
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
453
|
+
*/
|
|
454
|
+
interface PrecalculatedTaxConfig {
|
|
455
|
+
/**
|
|
456
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
457
|
+
* denomination as the commit's invoice schedule
|
|
458
|
+
*/
|
|
459
|
+
tax_amount: number;
|
|
460
|
+
/**
|
|
461
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
462
|
+
* description.
|
|
463
|
+
*/
|
|
464
|
+
tax_name?: string;
|
|
465
|
+
}
|
|
466
|
+
/**
|
|
467
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
468
|
+
*/
|
|
469
|
+
interface StripeConfig {
|
|
470
|
+
/**
|
|
471
|
+
* If left blank, will default to INVOICE
|
|
472
|
+
*/
|
|
473
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
474
|
+
/**
|
|
475
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
476
|
+
* your payment type.
|
|
477
|
+
*/
|
|
478
|
+
invoice_metadata?: {
|
|
479
|
+
[key: string]: string;
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
interface SpendThresholdConfiguration {
|
|
485
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
486
|
+
/**
|
|
487
|
+
* When set to false, the contract will not be evaluated against the
|
|
488
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
489
|
+
* regardless of prior state.
|
|
490
|
+
*/
|
|
491
|
+
is_enabled: boolean;
|
|
492
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
493
|
+
/**
|
|
494
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
495
|
+
* hits this amount, a threshold charge will be initiated.
|
|
496
|
+
*/
|
|
497
|
+
threshold_amount: number;
|
|
498
|
+
}
|
|
499
|
+
namespace SpendThresholdConfiguration {
|
|
500
|
+
interface Commit {
|
|
501
|
+
/**
|
|
502
|
+
* The commit product that will be used to generate the line item for commit
|
|
503
|
+
* payment.
|
|
504
|
+
*/
|
|
505
|
+
product_id: string;
|
|
506
|
+
description?: string;
|
|
507
|
+
/**
|
|
508
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
509
|
+
* will default to the commit product name.
|
|
510
|
+
*/
|
|
511
|
+
name?: string;
|
|
512
|
+
}
|
|
513
|
+
interface PaymentGateConfig {
|
|
514
|
+
/**
|
|
515
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
516
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
517
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
518
|
+
* wish to payment gate the commit balance.
|
|
519
|
+
*/
|
|
520
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
521
|
+
/**
|
|
522
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
523
|
+
*/
|
|
524
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
525
|
+
/**
|
|
526
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
527
|
+
*/
|
|
528
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
529
|
+
/**
|
|
530
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
531
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
532
|
+
* will default to NONE.
|
|
533
|
+
*/
|
|
534
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
535
|
+
}
|
|
536
|
+
namespace PaymentGateConfig {
|
|
537
|
+
/**
|
|
538
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
539
|
+
*/
|
|
540
|
+
interface PrecalculatedTaxConfig {
|
|
541
|
+
/**
|
|
542
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
543
|
+
* denomination as the commit's invoice schedule
|
|
544
|
+
*/
|
|
545
|
+
tax_amount: number;
|
|
546
|
+
/**
|
|
547
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
548
|
+
* description.
|
|
549
|
+
*/
|
|
550
|
+
tax_name?: string;
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
554
|
+
*/
|
|
555
|
+
interface StripeConfig {
|
|
556
|
+
/**
|
|
557
|
+
* If left blank, will default to INVOICE
|
|
558
|
+
*/
|
|
559
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
560
|
+
/**
|
|
561
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
562
|
+
* your payment type.
|
|
563
|
+
*/
|
|
564
|
+
invoice_metadata?: {
|
|
565
|
+
[key: string]: string;
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
}
|
|
162
569
|
}
|
|
163
570
|
interface Subscription {
|
|
164
571
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
165
572
|
proration: Subscription.Proration;
|
|
573
|
+
/**
|
|
574
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
575
|
+
* quantity and future quantity changes.
|
|
576
|
+
*/
|
|
166
577
|
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
167
578
|
starting_at: string;
|
|
168
579
|
subscription_rate: Subscription.SubscriptionRate;
|
|
580
|
+
id?: string;
|
|
581
|
+
custom_fields?: {
|
|
582
|
+
[key: string]: string;
|
|
583
|
+
};
|
|
169
584
|
description?: string;
|
|
170
585
|
ending_before?: string;
|
|
586
|
+
fiat_credit_type_id?: string;
|
|
171
587
|
name?: string;
|
|
172
588
|
}
|
|
173
589
|
namespace Subscription {
|
|
@@ -181,7 +597,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
181
597
|
ending_before?: string;
|
|
182
598
|
}
|
|
183
599
|
interface SubscriptionRate {
|
|
184
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
600
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
185
601
|
product: SubscriptionRate.Product;
|
|
186
602
|
}
|
|
187
603
|
namespace SubscriptionRate {
|
|
@@ -208,11 +624,18 @@ export declare namespace ContractListResponse {
|
|
|
208
624
|
* the contract is not archived.
|
|
209
625
|
*/
|
|
210
626
|
archived_at?: string;
|
|
211
|
-
custom_fields?:
|
|
627
|
+
custom_fields?: {
|
|
628
|
+
[key: string]: string;
|
|
629
|
+
};
|
|
212
630
|
/**
|
|
213
631
|
* The billing provider configuration associated with a contract.
|
|
214
632
|
*/
|
|
215
633
|
customer_billing_provider_configuration?: Data.CustomerBillingProviderConfiguration;
|
|
634
|
+
prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
|
|
635
|
+
/**
|
|
636
|
+
* Priority of the contract.
|
|
637
|
+
*/
|
|
638
|
+
priority?: number;
|
|
216
639
|
/**
|
|
217
640
|
* Determines which scheduled and commit charges to consolidate onto the Contract's
|
|
218
641
|
* usage invoice. The charge's `timestamp` must match the usage invoice's
|
|
@@ -221,6 +644,10 @@ export declare namespace ContractListResponse {
|
|
|
221
644
|
* on a separate invoice from usage charges.
|
|
222
645
|
*/
|
|
223
646
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
647
|
+
spend_threshold_configuration?: Data.SpendThresholdConfiguration;
|
|
648
|
+
/**
|
|
649
|
+
* List of subscriptions on the contract.
|
|
650
|
+
*/
|
|
224
651
|
subscriptions?: Array<Data.Subscription>;
|
|
225
652
|
/**
|
|
226
653
|
* Prevents the creation of duplicates. If a request to create a record is made
|
|
@@ -286,16 +713,246 @@ export declare namespace ContractListResponse {
|
|
|
286
713
|
* Configuration for the billing provider. The structure of this object is specific
|
|
287
714
|
* to the billing provider.
|
|
288
715
|
*/
|
|
289
|
-
configuration?:
|
|
716
|
+
configuration?: {
|
|
717
|
+
[key: string]: unknown;
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
interface PrepaidBalanceThresholdConfiguration {
|
|
721
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
722
|
+
/**
|
|
723
|
+
* When set to false, the contract will not be evaluated against the
|
|
724
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
725
|
+
* regardless of prior state.
|
|
726
|
+
*/
|
|
727
|
+
is_enabled: boolean;
|
|
728
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
729
|
+
/**
|
|
730
|
+
* Specify the amount the balance should be recharged to.
|
|
731
|
+
*/
|
|
732
|
+
recharge_to_amount: number;
|
|
733
|
+
/**
|
|
734
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
735
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
736
|
+
*/
|
|
737
|
+
threshold_amount: number;
|
|
738
|
+
/**
|
|
739
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
740
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
741
|
+
*/
|
|
742
|
+
custom_credit_type_id?: string;
|
|
743
|
+
}
|
|
744
|
+
namespace PrepaidBalanceThresholdConfiguration {
|
|
745
|
+
interface Commit {
|
|
746
|
+
/**
|
|
747
|
+
* The commit product that will be used to generate the line item for commit
|
|
748
|
+
* payment.
|
|
749
|
+
*/
|
|
750
|
+
product_id: string;
|
|
751
|
+
/**
|
|
752
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
753
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
754
|
+
* all products.
|
|
755
|
+
*/
|
|
756
|
+
applicable_product_ids?: Array<string>;
|
|
757
|
+
/**
|
|
758
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
759
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
760
|
+
* all products.
|
|
761
|
+
*/
|
|
762
|
+
applicable_product_tags?: Array<string>;
|
|
763
|
+
description?: string;
|
|
764
|
+
/**
|
|
765
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
766
|
+
* will default to the commit product name.
|
|
767
|
+
*/
|
|
768
|
+
name?: string;
|
|
769
|
+
/**
|
|
770
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
771
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
772
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
773
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
774
|
+
*/
|
|
775
|
+
specifiers?: Array<Commit.Specifier>;
|
|
776
|
+
}
|
|
777
|
+
namespace Commit {
|
|
778
|
+
interface Specifier {
|
|
779
|
+
presentation_group_values?: {
|
|
780
|
+
[key: string]: string;
|
|
781
|
+
};
|
|
782
|
+
pricing_group_values?: {
|
|
783
|
+
[key: string]: string;
|
|
784
|
+
};
|
|
785
|
+
/**
|
|
786
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
787
|
+
*/
|
|
788
|
+
product_id?: string;
|
|
789
|
+
/**
|
|
790
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
791
|
+
* tags.
|
|
792
|
+
*/
|
|
793
|
+
product_tags?: Array<string>;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
interface PaymentGateConfig {
|
|
797
|
+
/**
|
|
798
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
799
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
800
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
801
|
+
* wish to payment gate the commit balance.
|
|
802
|
+
*/
|
|
803
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
804
|
+
/**
|
|
805
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
806
|
+
*/
|
|
807
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
808
|
+
/**
|
|
809
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
810
|
+
*/
|
|
811
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
812
|
+
/**
|
|
813
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
814
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
815
|
+
* will default to NONE.
|
|
816
|
+
*/
|
|
817
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
818
|
+
}
|
|
819
|
+
namespace PaymentGateConfig {
|
|
820
|
+
/**
|
|
821
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
822
|
+
*/
|
|
823
|
+
interface PrecalculatedTaxConfig {
|
|
824
|
+
/**
|
|
825
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
826
|
+
* denomination as the commit's invoice schedule
|
|
827
|
+
*/
|
|
828
|
+
tax_amount: number;
|
|
829
|
+
/**
|
|
830
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
831
|
+
* description.
|
|
832
|
+
*/
|
|
833
|
+
tax_name?: string;
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
837
|
+
*/
|
|
838
|
+
interface StripeConfig {
|
|
839
|
+
/**
|
|
840
|
+
* If left blank, will default to INVOICE
|
|
841
|
+
*/
|
|
842
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
843
|
+
/**
|
|
844
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
845
|
+
* your payment type.
|
|
846
|
+
*/
|
|
847
|
+
invoice_metadata?: {
|
|
848
|
+
[key: string]: string;
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
interface SpendThresholdConfiguration {
|
|
854
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
855
|
+
/**
|
|
856
|
+
* When set to false, the contract will not be evaluated against the
|
|
857
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
858
|
+
* regardless of prior state.
|
|
859
|
+
*/
|
|
860
|
+
is_enabled: boolean;
|
|
861
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
862
|
+
/**
|
|
863
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
864
|
+
* hits this amount, a threshold charge will be initiated.
|
|
865
|
+
*/
|
|
866
|
+
threshold_amount: number;
|
|
867
|
+
}
|
|
868
|
+
namespace SpendThresholdConfiguration {
|
|
869
|
+
interface Commit {
|
|
870
|
+
/**
|
|
871
|
+
* The commit product that will be used to generate the line item for commit
|
|
872
|
+
* payment.
|
|
873
|
+
*/
|
|
874
|
+
product_id: string;
|
|
875
|
+
description?: string;
|
|
876
|
+
/**
|
|
877
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
878
|
+
* will default to the commit product name.
|
|
879
|
+
*/
|
|
880
|
+
name?: string;
|
|
881
|
+
}
|
|
882
|
+
interface PaymentGateConfig {
|
|
883
|
+
/**
|
|
884
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
885
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
886
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
887
|
+
* wish to payment gate the commit balance.
|
|
888
|
+
*/
|
|
889
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
890
|
+
/**
|
|
891
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
892
|
+
*/
|
|
893
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
894
|
+
/**
|
|
895
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
896
|
+
*/
|
|
897
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
898
|
+
/**
|
|
899
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
900
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
901
|
+
* will default to NONE.
|
|
902
|
+
*/
|
|
903
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
904
|
+
}
|
|
905
|
+
namespace PaymentGateConfig {
|
|
906
|
+
/**
|
|
907
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
908
|
+
*/
|
|
909
|
+
interface PrecalculatedTaxConfig {
|
|
910
|
+
/**
|
|
911
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
912
|
+
* denomination as the commit's invoice schedule
|
|
913
|
+
*/
|
|
914
|
+
tax_amount: number;
|
|
915
|
+
/**
|
|
916
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
917
|
+
* description.
|
|
918
|
+
*/
|
|
919
|
+
tax_name?: string;
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
923
|
+
*/
|
|
924
|
+
interface StripeConfig {
|
|
925
|
+
/**
|
|
926
|
+
* If left blank, will default to INVOICE
|
|
927
|
+
*/
|
|
928
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
929
|
+
/**
|
|
930
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
931
|
+
* your payment type.
|
|
932
|
+
*/
|
|
933
|
+
invoice_metadata?: {
|
|
934
|
+
[key: string]: string;
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
}
|
|
290
938
|
}
|
|
291
939
|
interface Subscription {
|
|
292
940
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
293
941
|
proration: Subscription.Proration;
|
|
942
|
+
/**
|
|
943
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
944
|
+
* quantity and future quantity changes.
|
|
945
|
+
*/
|
|
294
946
|
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
295
947
|
starting_at: string;
|
|
296
948
|
subscription_rate: Subscription.SubscriptionRate;
|
|
949
|
+
id?: string;
|
|
950
|
+
custom_fields?: {
|
|
951
|
+
[key: string]: string;
|
|
952
|
+
};
|
|
297
953
|
description?: string;
|
|
298
954
|
ending_before?: string;
|
|
955
|
+
fiat_credit_type_id?: string;
|
|
299
956
|
name?: string;
|
|
300
957
|
}
|
|
301
958
|
namespace Subscription {
|
|
@@ -309,7 +966,7 @@ export declare namespace ContractListResponse {
|
|
|
309
966
|
ending_before?: string;
|
|
310
967
|
}
|
|
311
968
|
interface SubscriptionRate {
|
|
312
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
969
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
313
970
|
product: SubscriptionRate.Product;
|
|
314
971
|
}
|
|
315
972
|
namespace SubscriptionRate {
|
|
@@ -342,13 +999,15 @@ export declare namespace ContractRetrieveRateScheduleResponse {
|
|
|
342
999
|
interface Data {
|
|
343
1000
|
entitled: boolean;
|
|
344
1001
|
list_rate: Shared.Rate;
|
|
345
|
-
product_custom_fields:
|
|
1002
|
+
product_custom_fields: {
|
|
1003
|
+
[key: string]: string;
|
|
1004
|
+
};
|
|
346
1005
|
product_id: string;
|
|
347
1006
|
product_name: string;
|
|
348
1007
|
product_tags: Array<string>;
|
|
349
1008
|
rate_card_id: string;
|
|
350
1009
|
starting_at: string;
|
|
351
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1010
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
352
1011
|
/**
|
|
353
1012
|
* A distinct rate on the rate card. You can choose to use this rate rather than
|
|
354
1013
|
* list rate when consuming a credit or commit.
|
|
@@ -356,7 +1015,9 @@ export declare namespace ContractRetrieveRateScheduleResponse {
|
|
|
356
1015
|
commit_rate?: Data.CommitRate;
|
|
357
1016
|
ending_before?: string;
|
|
358
1017
|
override_rate?: Shared.Rate;
|
|
359
|
-
pricing_group_values?:
|
|
1018
|
+
pricing_group_values?: {
|
|
1019
|
+
[key: string]: string;
|
|
1020
|
+
};
|
|
360
1021
|
}
|
|
361
1022
|
namespace Data {
|
|
362
1023
|
/**
|
|
@@ -376,6 +1037,29 @@ export declare namespace ContractRetrieveRateScheduleResponse {
|
|
|
376
1037
|
}
|
|
377
1038
|
}
|
|
378
1039
|
}
|
|
1040
|
+
export interface ContractRetrieveSubscriptionQuantityHistoryResponse {
|
|
1041
|
+
data: ContractRetrieveSubscriptionQuantityHistoryResponse.Data;
|
|
1042
|
+
}
|
|
1043
|
+
export declare namespace ContractRetrieveSubscriptionQuantityHistoryResponse {
|
|
1044
|
+
interface Data {
|
|
1045
|
+
fiat_credit_type_id?: string;
|
|
1046
|
+
history?: Array<Data.History>;
|
|
1047
|
+
subscription_id?: string;
|
|
1048
|
+
}
|
|
1049
|
+
namespace Data {
|
|
1050
|
+
interface History {
|
|
1051
|
+
data: Array<History.Data>;
|
|
1052
|
+
starting_at: string;
|
|
1053
|
+
}
|
|
1054
|
+
namespace History {
|
|
1055
|
+
interface Data {
|
|
1056
|
+
quantity: number;
|
|
1057
|
+
total: number;
|
|
1058
|
+
unit_price: number;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
379
1063
|
export interface ContractScheduleProServicesInvoiceResponse {
|
|
380
1064
|
data: Array<InvoicesAPI.Invoice>;
|
|
381
1065
|
}
|
|
@@ -389,12 +1073,15 @@ export interface ContractCreateParams {
|
|
|
389
1073
|
*/
|
|
390
1074
|
starting_at: string;
|
|
391
1075
|
/**
|
|
392
|
-
* The billing provider configuration associated with a contract.
|
|
1076
|
+
* The billing provider configuration associated with a contract. Provide either an
|
|
1077
|
+
* ID or the provider and delivery method.
|
|
393
1078
|
*/
|
|
394
1079
|
billing_provider_configuration?: ContractCreateParams.BillingProviderConfiguration;
|
|
395
1080
|
commits?: Array<ContractCreateParams.Commit>;
|
|
396
1081
|
credits?: Array<ContractCreateParams.Credit>;
|
|
397
|
-
custom_fields?:
|
|
1082
|
+
custom_fields?: {
|
|
1083
|
+
[key: string]: string;
|
|
1084
|
+
};
|
|
398
1085
|
/**
|
|
399
1086
|
* This field's availability is dependent on your client's configuration.
|
|
400
1087
|
*/
|
|
@@ -403,6 +1090,7 @@ export interface ContractCreateParams {
|
|
|
403
1090
|
* exclusive contract end time
|
|
404
1091
|
*/
|
|
405
1092
|
ending_before?: string;
|
|
1093
|
+
hierarchy_configuration?: ContractCreateParams.HierarchyConfiguration;
|
|
406
1094
|
/**
|
|
407
1095
|
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
408
1096
|
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
@@ -417,6 +1105,11 @@ export interface ContractCreateParams {
|
|
|
417
1105
|
*/
|
|
418
1106
|
netsuite_sales_order_id?: string;
|
|
419
1107
|
overrides?: Array<ContractCreateParams.Override>;
|
|
1108
|
+
prepaid_balance_threshold_configuration?: ContractCreateParams.PrepaidBalanceThresholdConfiguration;
|
|
1109
|
+
/**
|
|
1110
|
+
* Priority of the contract.
|
|
1111
|
+
*/
|
|
1112
|
+
priority?: number;
|
|
420
1113
|
/**
|
|
421
1114
|
* This field's availability is dependent on your client's configuration.
|
|
422
1115
|
*/
|
|
@@ -446,8 +1139,13 @@ export interface ContractCreateParams {
|
|
|
446
1139
|
* on a separate invoice from usage charges.
|
|
447
1140
|
*/
|
|
448
1141
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1142
|
+
spend_threshold_configuration?: ContractCreateParams.SpendThresholdConfiguration;
|
|
1143
|
+
/**
|
|
1144
|
+
* Optional list of
|
|
1145
|
+
* [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
1146
|
+
* to add to the contract.
|
|
1147
|
+
*/
|
|
449
1148
|
subscriptions?: Array<ContractCreateParams.Subscription>;
|
|
450
|
-
threshold_billing_configuration?: ContractCreateParams.ThresholdBillingConfiguration;
|
|
451
1149
|
/**
|
|
452
1150
|
* This field's availability is dependent on your client's configuration.
|
|
453
1151
|
*/
|
|
@@ -464,14 +1162,23 @@ export interface ContractCreateParams {
|
|
|
464
1162
|
}
|
|
465
1163
|
export declare namespace ContractCreateParams {
|
|
466
1164
|
/**
|
|
467
|
-
* The billing provider configuration associated with a contract.
|
|
1165
|
+
* The billing provider configuration associated with a contract. Provide either an
|
|
1166
|
+
* ID or the provider and delivery method.
|
|
468
1167
|
*/
|
|
469
1168
|
interface BillingProviderConfiguration {
|
|
1169
|
+
/**
|
|
1170
|
+
* Do not specify if using billing_provider_configuration_id.
|
|
1171
|
+
*/
|
|
470
1172
|
billing_provider?: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace' | 'stripe' | 'netsuite';
|
|
471
1173
|
/**
|
|
472
|
-
* The Metronome ID of the billing provider configuration
|
|
1174
|
+
* The Metronome ID of the billing provider configuration. Use when a customer has
|
|
1175
|
+
* multiple configurations with the same billing provider and delivery method.
|
|
1176
|
+
* Otherwise, specify the billing_provider and delivery_method.
|
|
473
1177
|
*/
|
|
474
1178
|
billing_provider_configuration_id?: string;
|
|
1179
|
+
/**
|
|
1180
|
+
* Do not specify if using billing_provider_configuration_id.
|
|
1181
|
+
*/
|
|
475
1182
|
delivery_method?: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
476
1183
|
}
|
|
477
1184
|
interface Commit {
|
|
@@ -488,20 +1195,28 @@ export declare namespace ContractCreateParams {
|
|
|
488
1195
|
*/
|
|
489
1196
|
amount?: number;
|
|
490
1197
|
/**
|
|
491
|
-
* Which products the commit applies to. If
|
|
492
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
1198
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
1199
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1200
|
+
* all products.
|
|
493
1201
|
*/
|
|
494
1202
|
applicable_product_ids?: Array<string>;
|
|
495
1203
|
/**
|
|
496
|
-
* Which tags the commit applies to. If
|
|
497
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
1204
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
1205
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1206
|
+
* all products.
|
|
498
1207
|
*/
|
|
499
1208
|
applicable_product_tags?: Array<string>;
|
|
500
|
-
custom_fields?:
|
|
1209
|
+
custom_fields?: {
|
|
1210
|
+
[key: string]: string;
|
|
1211
|
+
};
|
|
501
1212
|
/**
|
|
502
1213
|
* Used only in UI/API. It is not exposed to end customers.
|
|
503
1214
|
*/
|
|
504
1215
|
description?: string;
|
|
1216
|
+
/**
|
|
1217
|
+
* Optional configuration for commit hierarchy access control
|
|
1218
|
+
*/
|
|
1219
|
+
hierarchy_configuration?: Commit.HierarchyConfiguration;
|
|
505
1220
|
/**
|
|
506
1221
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
507
1222
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -517,6 +1232,10 @@ export declare namespace ContractCreateParams {
|
|
|
517
1232
|
* This field's availability is dependent on your client's configuration.
|
|
518
1233
|
*/
|
|
519
1234
|
netsuite_sales_order_id?: string;
|
|
1235
|
+
/**
|
|
1236
|
+
* optionally payment gate this commit
|
|
1237
|
+
*/
|
|
1238
|
+
payment_gate_config?: Commit.PaymentGateConfig;
|
|
520
1239
|
/**
|
|
521
1240
|
* If multiple commits are applicable, the one with the lower priority will apply
|
|
522
1241
|
* first.
|
|
@@ -527,6 +1246,13 @@ export declare namespace ContractCreateParams {
|
|
|
527
1246
|
* Fraction of unused segments that will be rolled over. Must be between 0 and 1.
|
|
528
1247
|
*/
|
|
529
1248
|
rollover_fraction?: number;
|
|
1249
|
+
/**
|
|
1250
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1251
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1252
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1253
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1254
|
+
*/
|
|
1255
|
+
specifiers?: Array<Commit.Specifier>;
|
|
530
1256
|
/**
|
|
531
1257
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
532
1258
|
* commit specific overrides.
|
|
@@ -559,6 +1285,24 @@ export declare namespace ContractCreateParams {
|
|
|
559
1285
|
starting_at: string;
|
|
560
1286
|
}
|
|
561
1287
|
}
|
|
1288
|
+
/**
|
|
1289
|
+
* Optional configuration for commit hierarchy access control
|
|
1290
|
+
*/
|
|
1291
|
+
interface HierarchyConfiguration {
|
|
1292
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1293
|
+
}
|
|
1294
|
+
namespace HierarchyConfiguration {
|
|
1295
|
+
interface CommitHierarchyChildAccessAll {
|
|
1296
|
+
type: 'ALL';
|
|
1297
|
+
}
|
|
1298
|
+
interface CommitHierarchyChildAccessNone {
|
|
1299
|
+
type: 'NONE';
|
|
1300
|
+
}
|
|
1301
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
1302
|
+
contract_ids: Array<string>;
|
|
1303
|
+
type: 'CONTRACT_IDS';
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
562
1306
|
/**
|
|
563
1307
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
564
1308
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -642,6 +1386,82 @@ export declare namespace ContractCreateParams {
|
|
|
642
1386
|
unit_price?: number;
|
|
643
1387
|
}
|
|
644
1388
|
}
|
|
1389
|
+
/**
|
|
1390
|
+
* optionally payment gate this commit
|
|
1391
|
+
*/
|
|
1392
|
+
interface PaymentGateConfig {
|
|
1393
|
+
/**
|
|
1394
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1395
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1396
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1397
|
+
* wish to payment gate the commit balance.
|
|
1398
|
+
*/
|
|
1399
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1400
|
+
/**
|
|
1401
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1402
|
+
*/
|
|
1403
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1404
|
+
/**
|
|
1405
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1406
|
+
*/
|
|
1407
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1408
|
+
/**
|
|
1409
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1410
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1411
|
+
* will default to NONE.
|
|
1412
|
+
*/
|
|
1413
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1414
|
+
}
|
|
1415
|
+
namespace PaymentGateConfig {
|
|
1416
|
+
/**
|
|
1417
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1418
|
+
*/
|
|
1419
|
+
interface PrecalculatedTaxConfig {
|
|
1420
|
+
/**
|
|
1421
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1422
|
+
* denomination as the commit's invoice schedule
|
|
1423
|
+
*/
|
|
1424
|
+
tax_amount: number;
|
|
1425
|
+
/**
|
|
1426
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1427
|
+
* description.
|
|
1428
|
+
*/
|
|
1429
|
+
tax_name?: string;
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1433
|
+
*/
|
|
1434
|
+
interface StripeConfig {
|
|
1435
|
+
/**
|
|
1436
|
+
* If left blank, will default to INVOICE
|
|
1437
|
+
*/
|
|
1438
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1439
|
+
/**
|
|
1440
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1441
|
+
* your payment type.
|
|
1442
|
+
*/
|
|
1443
|
+
invoice_metadata?: {
|
|
1444
|
+
[key: string]: string;
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
interface Specifier {
|
|
1449
|
+
presentation_group_values?: {
|
|
1450
|
+
[key: string]: string;
|
|
1451
|
+
};
|
|
1452
|
+
pricing_group_values?: {
|
|
1453
|
+
[key: string]: string;
|
|
1454
|
+
};
|
|
1455
|
+
/**
|
|
1456
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1457
|
+
*/
|
|
1458
|
+
product_id?: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1461
|
+
* tags.
|
|
1462
|
+
*/
|
|
1463
|
+
product_tags?: Array<string>;
|
|
1464
|
+
}
|
|
645
1465
|
}
|
|
646
1466
|
interface Credit {
|
|
647
1467
|
/**
|
|
@@ -659,11 +1479,17 @@ export declare namespace ContractCreateParams {
|
|
|
659
1479
|
* applicable_product_tags are not provided, the credit applies to all products.
|
|
660
1480
|
*/
|
|
661
1481
|
applicable_product_tags?: Array<string>;
|
|
662
|
-
custom_fields?:
|
|
1482
|
+
custom_fields?: {
|
|
1483
|
+
[key: string]: string;
|
|
1484
|
+
};
|
|
663
1485
|
/**
|
|
664
1486
|
* Used only in UI/API. It is not exposed to end customers.
|
|
665
1487
|
*/
|
|
666
1488
|
description?: string;
|
|
1489
|
+
/**
|
|
1490
|
+
* Optional configuration for credit hierarchy access control
|
|
1491
|
+
*/
|
|
1492
|
+
hierarchy_configuration?: Credit.HierarchyConfiguration;
|
|
667
1493
|
/**
|
|
668
1494
|
* displayed on invoices
|
|
669
1495
|
*/
|
|
@@ -678,6 +1504,13 @@ export declare namespace ContractCreateParams {
|
|
|
678
1504
|
*/
|
|
679
1505
|
priority?: number;
|
|
680
1506
|
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
1507
|
+
/**
|
|
1508
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1509
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1510
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1511
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1512
|
+
*/
|
|
1513
|
+
specifiers?: Array<Credit.Specifier>;
|
|
681
1514
|
}
|
|
682
1515
|
namespace Credit {
|
|
683
1516
|
/**
|
|
@@ -703,6 +1536,41 @@ export declare namespace ContractCreateParams {
|
|
|
703
1536
|
starting_at: string;
|
|
704
1537
|
}
|
|
705
1538
|
}
|
|
1539
|
+
/**
|
|
1540
|
+
* Optional configuration for credit hierarchy access control
|
|
1541
|
+
*/
|
|
1542
|
+
interface HierarchyConfiguration {
|
|
1543
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1544
|
+
}
|
|
1545
|
+
namespace HierarchyConfiguration {
|
|
1546
|
+
interface CommitHierarchyChildAccessAll {
|
|
1547
|
+
type: 'ALL';
|
|
1548
|
+
}
|
|
1549
|
+
interface CommitHierarchyChildAccessNone {
|
|
1550
|
+
type: 'NONE';
|
|
1551
|
+
}
|
|
1552
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
1553
|
+
contract_ids: Array<string>;
|
|
1554
|
+
type: 'CONTRACT_IDS';
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
interface Specifier {
|
|
1558
|
+
presentation_group_values?: {
|
|
1559
|
+
[key: string]: string;
|
|
1560
|
+
};
|
|
1561
|
+
pricing_group_values?: {
|
|
1562
|
+
[key: string]: string;
|
|
1563
|
+
};
|
|
1564
|
+
/**
|
|
1565
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1566
|
+
*/
|
|
1567
|
+
product_id?: string;
|
|
1568
|
+
/**
|
|
1569
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1570
|
+
* tags.
|
|
1571
|
+
*/
|
|
1572
|
+
product_tags?: Array<string>;
|
|
1573
|
+
}
|
|
706
1574
|
}
|
|
707
1575
|
interface Discount {
|
|
708
1576
|
product_id: string;
|
|
@@ -710,7 +1578,9 @@ export declare namespace ContractCreateParams {
|
|
|
710
1578
|
* Must provide either schedule_items or recurring_schedule.
|
|
711
1579
|
*/
|
|
712
1580
|
schedule: Discount.Schedule;
|
|
713
|
-
custom_fields?:
|
|
1581
|
+
custom_fields?: {
|
|
1582
|
+
[key: string]: string;
|
|
1583
|
+
};
|
|
714
1584
|
/**
|
|
715
1585
|
* displayed on invoices
|
|
716
1586
|
*/
|
|
@@ -802,6 +1672,15 @@ export declare namespace ContractCreateParams {
|
|
|
802
1672
|
}
|
|
803
1673
|
}
|
|
804
1674
|
}
|
|
1675
|
+
interface HierarchyConfiguration {
|
|
1676
|
+
parent: HierarchyConfiguration.Parent;
|
|
1677
|
+
}
|
|
1678
|
+
namespace HierarchyConfiguration {
|
|
1679
|
+
interface Parent {
|
|
1680
|
+
contract_id: string;
|
|
1681
|
+
customer_id: string;
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
805
1684
|
interface Override {
|
|
806
1685
|
/**
|
|
807
1686
|
* RFC 3339 timestamp indicating when the override will start applying (inclusive)
|
|
@@ -866,7 +1745,7 @@ export declare namespace ContractCreateParams {
|
|
|
866
1745
|
}
|
|
867
1746
|
namespace Override {
|
|
868
1747
|
interface OverrideSpecifier {
|
|
869
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1748
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
870
1749
|
/**
|
|
871
1750
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
872
1751
|
* one of product_id, product_tags, pricing_group_values, or
|
|
@@ -878,12 +1757,16 @@ export declare namespace ContractCreateParams {
|
|
|
878
1757
|
* A map of group names to values. The override will only apply to line items with
|
|
879
1758
|
* the specified presentation group values.
|
|
880
1759
|
*/
|
|
881
|
-
presentation_group_values?:
|
|
1760
|
+
presentation_group_values?: {
|
|
1761
|
+
[key: string]: string;
|
|
1762
|
+
};
|
|
882
1763
|
/**
|
|
883
1764
|
* A map of pricing group names to values. The override will only apply to products
|
|
884
1765
|
* with the specified pricing group values.
|
|
885
1766
|
*/
|
|
886
|
-
pricing_group_values?:
|
|
1767
|
+
pricing_group_values?: {
|
|
1768
|
+
[key: string]: string;
|
|
1769
|
+
};
|
|
887
1770
|
/**
|
|
888
1771
|
* If provided, the override will only apply to the product with the specified ID.
|
|
889
1772
|
*/
|
|
@@ -915,32 +1798,167 @@ export declare namespace ContractCreateParams {
|
|
|
915
1798
|
rate_type: 'FLAT' | 'PERCENTAGE' | 'SUBSCRIPTION' | 'TIERED' | 'CUSTOM';
|
|
916
1799
|
credit_type_id?: string;
|
|
917
1800
|
/**
|
|
918
|
-
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
919
|
-
* processors.
|
|
1801
|
+
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1802
|
+
* processors.
|
|
1803
|
+
*/
|
|
1804
|
+
custom_rate?: {
|
|
1805
|
+
[key: string]: unknown;
|
|
1806
|
+
};
|
|
1807
|
+
/**
|
|
1808
|
+
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1809
|
+
* set to true.
|
|
1810
|
+
*/
|
|
1811
|
+
is_prorated?: boolean;
|
|
1812
|
+
/**
|
|
1813
|
+
* Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type,
|
|
1814
|
+
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1815
|
+
*/
|
|
1816
|
+
price?: number;
|
|
1817
|
+
/**
|
|
1818
|
+
* Default quantity. For SUBSCRIPTION rate_type, this must be >=0.
|
|
1819
|
+
*/
|
|
1820
|
+
quantity?: number;
|
|
1821
|
+
/**
|
|
1822
|
+
* Only set for TIERED rate_type.
|
|
1823
|
+
*/
|
|
1824
|
+
tiers?: Array<Shared.Tier>;
|
|
1825
|
+
}
|
|
1826
|
+
interface Tier {
|
|
1827
|
+
multiplier: number;
|
|
1828
|
+
size?: number;
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
interface PrepaidBalanceThresholdConfiguration {
|
|
1832
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
1833
|
+
/**
|
|
1834
|
+
* When set to false, the contract will not be evaluated against the
|
|
1835
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1836
|
+
* regardless of prior state.
|
|
1837
|
+
*/
|
|
1838
|
+
is_enabled: boolean;
|
|
1839
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
1840
|
+
/**
|
|
1841
|
+
* Specify the amount the balance should be recharged to.
|
|
1842
|
+
*/
|
|
1843
|
+
recharge_to_amount: number;
|
|
1844
|
+
/**
|
|
1845
|
+
* Specify the threshold amount for the contract. Each time the contract's prepaid
|
|
1846
|
+
* balance lowers to this amount, a threshold charge will be initiated.
|
|
1847
|
+
*/
|
|
1848
|
+
threshold_amount: number;
|
|
1849
|
+
/**
|
|
1850
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
1851
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
1852
|
+
*/
|
|
1853
|
+
custom_credit_type_id?: string;
|
|
1854
|
+
}
|
|
1855
|
+
namespace PrepaidBalanceThresholdConfiguration {
|
|
1856
|
+
interface Commit {
|
|
1857
|
+
/**
|
|
1858
|
+
* The commit product that will be used to generate the line item for commit
|
|
1859
|
+
* payment.
|
|
1860
|
+
*/
|
|
1861
|
+
product_id: string;
|
|
1862
|
+
/**
|
|
1863
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
1864
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1865
|
+
* all products.
|
|
1866
|
+
*/
|
|
1867
|
+
applicable_product_ids?: Array<string>;
|
|
1868
|
+
/**
|
|
1869
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
1870
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1871
|
+
* all products.
|
|
1872
|
+
*/
|
|
1873
|
+
applicable_product_tags?: Array<string>;
|
|
1874
|
+
description?: string;
|
|
1875
|
+
/**
|
|
1876
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1877
|
+
* will default to the commit product name.
|
|
1878
|
+
*/
|
|
1879
|
+
name?: string;
|
|
1880
|
+
/**
|
|
1881
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1882
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1883
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1884
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1885
|
+
*/
|
|
1886
|
+
specifiers?: Array<Commit.Specifier>;
|
|
1887
|
+
}
|
|
1888
|
+
namespace Commit {
|
|
1889
|
+
interface Specifier {
|
|
1890
|
+
presentation_group_values?: {
|
|
1891
|
+
[key: string]: string;
|
|
1892
|
+
};
|
|
1893
|
+
pricing_group_values?: {
|
|
1894
|
+
[key: string]: string;
|
|
1895
|
+
};
|
|
1896
|
+
/**
|
|
1897
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1898
|
+
*/
|
|
1899
|
+
product_id?: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1902
|
+
* tags.
|
|
1903
|
+
*/
|
|
1904
|
+
product_tags?: Array<string>;
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
interface PaymentGateConfig {
|
|
1908
|
+
/**
|
|
1909
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1910
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1911
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1912
|
+
* wish to payment gate the commit balance.
|
|
920
1913
|
*/
|
|
921
|
-
|
|
1914
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
922
1915
|
/**
|
|
923
|
-
*
|
|
924
|
-
* set to true.
|
|
1916
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
925
1917
|
*/
|
|
926
|
-
|
|
1918
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
927
1919
|
/**
|
|
928
|
-
*
|
|
929
|
-
* this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.
|
|
1920
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
930
1921
|
*/
|
|
931
|
-
|
|
1922
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
932
1923
|
/**
|
|
933
|
-
*
|
|
1924
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1925
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1926
|
+
* will default to NONE.
|
|
934
1927
|
*/
|
|
935
|
-
|
|
1928
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1929
|
+
}
|
|
1930
|
+
namespace PaymentGateConfig {
|
|
936
1931
|
/**
|
|
937
|
-
* Only
|
|
1932
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
938
1933
|
*/
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
1934
|
+
interface PrecalculatedTaxConfig {
|
|
1935
|
+
/**
|
|
1936
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1937
|
+
* denomination as the commit's invoice schedule
|
|
1938
|
+
*/
|
|
1939
|
+
tax_amount: number;
|
|
1940
|
+
/**
|
|
1941
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1942
|
+
* description.
|
|
1943
|
+
*/
|
|
1944
|
+
tax_name?: string;
|
|
1945
|
+
}
|
|
1946
|
+
/**
|
|
1947
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
1948
|
+
*/
|
|
1949
|
+
interface StripeConfig {
|
|
1950
|
+
/**
|
|
1951
|
+
* If left blank, will default to INVOICE
|
|
1952
|
+
*/
|
|
1953
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1954
|
+
/**
|
|
1955
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1956
|
+
* your payment type.
|
|
1957
|
+
*/
|
|
1958
|
+
invoice_metadata?: {
|
|
1959
|
+
[key: string]: string;
|
|
1960
|
+
};
|
|
1961
|
+
}
|
|
944
1962
|
}
|
|
945
1963
|
}
|
|
946
1964
|
interface ProfessionalService {
|
|
@@ -959,7 +1977,9 @@ export declare namespace ContractCreateParams {
|
|
|
959
1977
|
* amount and must be specified.
|
|
960
1978
|
*/
|
|
961
1979
|
unit_price: number;
|
|
962
|
-
custom_fields?:
|
|
1980
|
+
custom_fields?: {
|
|
1981
|
+
[key: string]: string;
|
|
1982
|
+
};
|
|
963
1983
|
description?: string;
|
|
964
1984
|
/**
|
|
965
1985
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -972,7 +1992,9 @@ export declare namespace ContractCreateParams {
|
|
|
972
1992
|
*/
|
|
973
1993
|
access_amount: RecurringCommit.AccessAmount;
|
|
974
1994
|
/**
|
|
975
|
-
*
|
|
1995
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
1996
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
1997
|
+
* length of a period is determined by the recurrence_frequency.
|
|
976
1998
|
*/
|
|
977
1999
|
commit_duration: RecurringCommit.CommitDuration;
|
|
978
2000
|
/**
|
|
@@ -1000,6 +2022,10 @@ export declare namespace ContractCreateParams {
|
|
|
1000
2022
|
* Determines when the contract will stop creating recurring commits. optional
|
|
1001
2023
|
*/
|
|
1002
2024
|
ending_before?: string;
|
|
2025
|
+
/**
|
|
2026
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2027
|
+
*/
|
|
2028
|
+
hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
|
|
1003
2029
|
/**
|
|
1004
2030
|
* The amount the customer should be billed for the commit. Not required.
|
|
1005
2031
|
*/
|
|
@@ -1025,16 +2051,27 @@ export declare namespace ContractCreateParams {
|
|
|
1025
2051
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1026
2052
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1027
2053
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1028
|
-
* be created aligned with the recurring commit's
|
|
2054
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1029
2055
|
* invoice dates.
|
|
1030
2056
|
*/
|
|
1031
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2057
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1032
2058
|
/**
|
|
1033
2059
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1034
2060
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1035
2061
|
* between 0 and 1.
|
|
1036
2062
|
*/
|
|
1037
2063
|
rollover_fraction?: number;
|
|
2064
|
+
/**
|
|
2065
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2066
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2067
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2068
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2069
|
+
*/
|
|
2070
|
+
specifiers?: Array<RecurringCommit.Specifier>;
|
|
2071
|
+
/**
|
|
2072
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2073
|
+
*/
|
|
2074
|
+
subscription_config?: RecurringCommit.SubscriptionConfig;
|
|
1038
2075
|
/**
|
|
1039
2076
|
* A temporary ID that can be used to reference the recurring commit for commit
|
|
1040
2077
|
* specific overrides.
|
|
@@ -1047,15 +2084,39 @@ export declare namespace ContractCreateParams {
|
|
|
1047
2084
|
*/
|
|
1048
2085
|
interface AccessAmount {
|
|
1049
2086
|
credit_type_id: string;
|
|
1050
|
-
quantity: number;
|
|
1051
2087
|
unit_price: number;
|
|
2088
|
+
/**
|
|
2089
|
+
* This field is currently required. Upcoming recurring commit/credit configuration
|
|
2090
|
+
* options will allow it to be optional.
|
|
2091
|
+
*/
|
|
2092
|
+
quantity?: number;
|
|
1052
2093
|
}
|
|
1053
2094
|
/**
|
|
1054
|
-
*
|
|
2095
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
2096
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
2097
|
+
* length of a period is determined by the recurrence_frequency.
|
|
1055
2098
|
*/
|
|
1056
2099
|
interface CommitDuration {
|
|
1057
|
-
unit: 'PERIODS';
|
|
1058
2100
|
value: number;
|
|
2101
|
+
unit?: 'PERIODS';
|
|
2102
|
+
}
|
|
2103
|
+
/**
|
|
2104
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2105
|
+
*/
|
|
2106
|
+
interface HierarchyConfiguration {
|
|
2107
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2108
|
+
}
|
|
2109
|
+
namespace HierarchyConfiguration {
|
|
2110
|
+
interface CommitHierarchyChildAccessAll {
|
|
2111
|
+
type: 'ALL';
|
|
2112
|
+
}
|
|
2113
|
+
interface CommitHierarchyChildAccessNone {
|
|
2114
|
+
type: 'NONE';
|
|
2115
|
+
}
|
|
2116
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2117
|
+
contract_ids: Array<string>;
|
|
2118
|
+
type: 'CONTRACT_IDS';
|
|
2119
|
+
}
|
|
1059
2120
|
}
|
|
1060
2121
|
/**
|
|
1061
2122
|
* The amount the customer should be billed for the commit. Not required.
|
|
@@ -1065,6 +2126,45 @@ export declare namespace ContractCreateParams {
|
|
|
1065
2126
|
quantity: number;
|
|
1066
2127
|
unit_price: number;
|
|
1067
2128
|
}
|
|
2129
|
+
interface Specifier {
|
|
2130
|
+
presentation_group_values?: {
|
|
2131
|
+
[key: string]: string;
|
|
2132
|
+
};
|
|
2133
|
+
pricing_group_values?: {
|
|
2134
|
+
[key: string]: string;
|
|
2135
|
+
};
|
|
2136
|
+
/**
|
|
2137
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2138
|
+
*/
|
|
2139
|
+
product_id?: string;
|
|
2140
|
+
/**
|
|
2141
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2142
|
+
* tags.
|
|
2143
|
+
*/
|
|
2144
|
+
product_tags?: Array<string>;
|
|
2145
|
+
}
|
|
2146
|
+
/**
|
|
2147
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2148
|
+
*/
|
|
2149
|
+
interface SubscriptionConfig {
|
|
2150
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
2151
|
+
/**
|
|
2152
|
+
* ID of the subscription to configure on the recurring commit/credit.
|
|
2153
|
+
*/
|
|
2154
|
+
subscription_id: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* If set to POOLED, allocation added per seat is pooled across the account.
|
|
2157
|
+
*/
|
|
2158
|
+
allocation?: 'POOLED';
|
|
2159
|
+
}
|
|
2160
|
+
namespace SubscriptionConfig {
|
|
2161
|
+
interface ApplySeatIncreaseConfig {
|
|
2162
|
+
/**
|
|
2163
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
2164
|
+
*/
|
|
2165
|
+
is_prorated: boolean;
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
1068
2168
|
}
|
|
1069
2169
|
interface RecurringCredit {
|
|
1070
2170
|
/**
|
|
@@ -1072,7 +2172,9 @@ export declare namespace ContractCreateParams {
|
|
|
1072
2172
|
*/
|
|
1073
2173
|
access_amount: RecurringCredit.AccessAmount;
|
|
1074
2174
|
/**
|
|
1075
|
-
*
|
|
2175
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
2176
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
2177
|
+
* length of a period is determined by the recurrence_frequency.
|
|
1076
2178
|
*/
|
|
1077
2179
|
commit_duration: RecurringCredit.CommitDuration;
|
|
1078
2180
|
/**
|
|
@@ -1100,6 +2202,10 @@ export declare namespace ContractCreateParams {
|
|
|
1100
2202
|
* Determines when the contract will stop creating recurring commits. optional
|
|
1101
2203
|
*/
|
|
1102
2204
|
ending_before?: string;
|
|
2205
|
+
/**
|
|
2206
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2207
|
+
*/
|
|
2208
|
+
hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
|
|
1103
2209
|
/**
|
|
1104
2210
|
* displayed on invoices. will be passed through to the individual commits
|
|
1105
2211
|
*/
|
|
@@ -1121,16 +2227,27 @@ export declare namespace ContractCreateParams {
|
|
|
1121
2227
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1122
2228
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1123
2229
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1124
|
-
* be created aligned with the recurring commit's
|
|
2230
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1125
2231
|
* invoice dates.
|
|
1126
2232
|
*/
|
|
1127
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2233
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1128
2234
|
/**
|
|
1129
2235
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1130
2236
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1131
2237
|
* between 0 and 1.
|
|
1132
2238
|
*/
|
|
1133
2239
|
rollover_fraction?: number;
|
|
2240
|
+
/**
|
|
2241
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2242
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2243
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2244
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2245
|
+
*/
|
|
2246
|
+
specifiers?: Array<RecurringCredit.Specifier>;
|
|
2247
|
+
/**
|
|
2248
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2249
|
+
*/
|
|
2250
|
+
subscription_config?: RecurringCredit.SubscriptionConfig;
|
|
1134
2251
|
/**
|
|
1135
2252
|
* A temporary ID that can be used to reference the recurring commit for commit
|
|
1136
2253
|
* specific overrides.
|
|
@@ -1143,15 +2260,78 @@ export declare namespace ContractCreateParams {
|
|
|
1143
2260
|
*/
|
|
1144
2261
|
interface AccessAmount {
|
|
1145
2262
|
credit_type_id: string;
|
|
1146
|
-
quantity: number;
|
|
1147
2263
|
unit_price: number;
|
|
2264
|
+
/**
|
|
2265
|
+
* This field is currently required. Upcoming recurring commit/credit configuration
|
|
2266
|
+
* options will allow it to be optional.
|
|
2267
|
+
*/
|
|
2268
|
+
quantity?: number;
|
|
1148
2269
|
}
|
|
1149
2270
|
/**
|
|
1150
|
-
*
|
|
2271
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
2272
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
2273
|
+
* length of a period is determined by the recurrence_frequency.
|
|
1151
2274
|
*/
|
|
1152
2275
|
interface CommitDuration {
|
|
1153
|
-
unit: 'PERIODS';
|
|
1154
2276
|
value: number;
|
|
2277
|
+
unit?: 'PERIODS';
|
|
2278
|
+
}
|
|
2279
|
+
/**
|
|
2280
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2281
|
+
*/
|
|
2282
|
+
interface HierarchyConfiguration {
|
|
2283
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2284
|
+
}
|
|
2285
|
+
namespace HierarchyConfiguration {
|
|
2286
|
+
interface CommitHierarchyChildAccessAll {
|
|
2287
|
+
type: 'ALL';
|
|
2288
|
+
}
|
|
2289
|
+
interface CommitHierarchyChildAccessNone {
|
|
2290
|
+
type: 'NONE';
|
|
2291
|
+
}
|
|
2292
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2293
|
+
contract_ids: Array<string>;
|
|
2294
|
+
type: 'CONTRACT_IDS';
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
interface Specifier {
|
|
2298
|
+
presentation_group_values?: {
|
|
2299
|
+
[key: string]: string;
|
|
2300
|
+
};
|
|
2301
|
+
pricing_group_values?: {
|
|
2302
|
+
[key: string]: string;
|
|
2303
|
+
};
|
|
2304
|
+
/**
|
|
2305
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2306
|
+
*/
|
|
2307
|
+
product_id?: string;
|
|
2308
|
+
/**
|
|
2309
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2310
|
+
* tags.
|
|
2311
|
+
*/
|
|
2312
|
+
product_tags?: Array<string>;
|
|
2313
|
+
}
|
|
2314
|
+
/**
|
|
2315
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2316
|
+
*/
|
|
2317
|
+
interface SubscriptionConfig {
|
|
2318
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
2319
|
+
/**
|
|
2320
|
+
* ID of the subscription to configure on the recurring commit/credit.
|
|
2321
|
+
*/
|
|
2322
|
+
subscription_id: string;
|
|
2323
|
+
/**
|
|
2324
|
+
* If set to POOLED, allocation added per seat is pooled across the account.
|
|
2325
|
+
*/
|
|
2326
|
+
allocation?: 'POOLED';
|
|
2327
|
+
}
|
|
2328
|
+
namespace SubscriptionConfig {
|
|
2329
|
+
interface ApplySeatIncreaseConfig {
|
|
2330
|
+
/**
|
|
2331
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
2332
|
+
*/
|
|
2333
|
+
is_prorated: boolean;
|
|
2334
|
+
}
|
|
1155
2335
|
}
|
|
1156
2336
|
}
|
|
1157
2337
|
interface ResellerRoyalty {
|
|
@@ -1280,11 +2460,103 @@ export declare namespace ContractCreateParams {
|
|
|
1280
2460
|
}
|
|
1281
2461
|
}
|
|
1282
2462
|
}
|
|
2463
|
+
interface SpendThresholdConfiguration {
|
|
2464
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
2465
|
+
/**
|
|
2466
|
+
* When set to false, the contract will not be evaluated against the
|
|
2467
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2468
|
+
* regardless of prior state.
|
|
2469
|
+
*/
|
|
2470
|
+
is_enabled: boolean;
|
|
2471
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
2472
|
+
/**
|
|
2473
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2474
|
+
* hits this amount, a threshold charge will be initiated.
|
|
2475
|
+
*/
|
|
2476
|
+
threshold_amount: number;
|
|
2477
|
+
}
|
|
2478
|
+
namespace SpendThresholdConfiguration {
|
|
2479
|
+
interface Commit {
|
|
2480
|
+
/**
|
|
2481
|
+
* The commit product that will be used to generate the line item for commit
|
|
2482
|
+
* payment.
|
|
2483
|
+
*/
|
|
2484
|
+
product_id: string;
|
|
2485
|
+
description?: string;
|
|
2486
|
+
/**
|
|
2487
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
2488
|
+
* will default to the commit product name.
|
|
2489
|
+
*/
|
|
2490
|
+
name?: string;
|
|
2491
|
+
}
|
|
2492
|
+
interface PaymentGateConfig {
|
|
2493
|
+
/**
|
|
2494
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2495
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2496
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2497
|
+
* wish to payment gate the commit balance.
|
|
2498
|
+
*/
|
|
2499
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2500
|
+
/**
|
|
2501
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2502
|
+
*/
|
|
2503
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2504
|
+
/**
|
|
2505
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
2506
|
+
*/
|
|
2507
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2508
|
+
/**
|
|
2509
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2510
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2511
|
+
* will default to NONE.
|
|
2512
|
+
*/
|
|
2513
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2514
|
+
}
|
|
2515
|
+
namespace PaymentGateConfig {
|
|
2516
|
+
/**
|
|
2517
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2518
|
+
*/
|
|
2519
|
+
interface PrecalculatedTaxConfig {
|
|
2520
|
+
/**
|
|
2521
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2522
|
+
* denomination as the commit's invoice schedule
|
|
2523
|
+
*/
|
|
2524
|
+
tax_amount: number;
|
|
2525
|
+
/**
|
|
2526
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2527
|
+
* description.
|
|
2528
|
+
*/
|
|
2529
|
+
tax_name?: string;
|
|
2530
|
+
}
|
|
2531
|
+
/**
|
|
2532
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
2533
|
+
*/
|
|
2534
|
+
interface StripeConfig {
|
|
2535
|
+
/**
|
|
2536
|
+
* If left blank, will default to INVOICE
|
|
2537
|
+
*/
|
|
2538
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
2539
|
+
/**
|
|
2540
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2541
|
+
* your payment type.
|
|
2542
|
+
*/
|
|
2543
|
+
invoice_metadata?: {
|
|
2544
|
+
[key: string]: string;
|
|
2545
|
+
};
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
1283
2549
|
interface Subscription {
|
|
1284
2550
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2551
|
+
/**
|
|
2552
|
+
* The initial quantity for the subscription. It must be non-negative value.
|
|
2553
|
+
*/
|
|
1285
2554
|
initial_quantity: number;
|
|
1286
2555
|
proration: Subscription.Proration;
|
|
1287
2556
|
subscription_rate: Subscription.SubscriptionRate;
|
|
2557
|
+
custom_fields?: {
|
|
2558
|
+
[key: string]: string;
|
|
2559
|
+
};
|
|
1288
2560
|
description?: string;
|
|
1289
2561
|
/**
|
|
1290
2562
|
* Exclusive end time for the subscription. If not provided, subscription inherits
|
|
@@ -1297,14 +2569,20 @@ export declare namespace ContractCreateParams {
|
|
|
1297
2569
|
* start date
|
|
1298
2570
|
*/
|
|
1299
2571
|
starting_at?: string;
|
|
2572
|
+
/**
|
|
2573
|
+
* A temporary ID used to reference the subscription in recurring commit/credit
|
|
2574
|
+
* subscription configs created within the same payload.
|
|
2575
|
+
*/
|
|
2576
|
+
temporary_id?: string;
|
|
1300
2577
|
}
|
|
1301
2578
|
namespace Subscription {
|
|
1302
2579
|
interface Proration {
|
|
1303
2580
|
/**
|
|
1304
|
-
* Indicates how mid-period quantity adjustments are invoiced.
|
|
1305
|
-
*
|
|
1306
|
-
*
|
|
1307
|
-
*
|
|
2581
|
+
* Indicates how mid-period quantity adjustments are invoiced.
|
|
2582
|
+
* **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
|
2583
|
+
* quantity increase will be billed immediately on the scheduled date.
|
|
2584
|
+
* **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
|
2585
|
+
* in-arrears at the end of the period.
|
|
1308
2586
|
*/
|
|
1309
2587
|
invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
1310
2588
|
/**
|
|
@@ -1317,49 +2595,13 @@ export declare namespace ContractCreateParams {
|
|
|
1317
2595
|
* Frequency to bill subscription with. Together with product_id, must match
|
|
1318
2596
|
* existing rate on the rate card.
|
|
1319
2597
|
*/
|
|
1320
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2598
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1321
2599
|
/**
|
|
1322
2600
|
* Must be subscription type product
|
|
1323
2601
|
*/
|
|
1324
2602
|
product_id: string;
|
|
1325
2603
|
}
|
|
1326
2604
|
}
|
|
1327
|
-
interface ThresholdBillingConfiguration {
|
|
1328
|
-
commit: ThresholdBillingConfiguration.Commit;
|
|
1329
|
-
/**
|
|
1330
|
-
* When set to false, the contract will not be evaluated against the
|
|
1331
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1332
|
-
* regardless of prior state
|
|
1333
|
-
*/
|
|
1334
|
-
is_enabled: boolean;
|
|
1335
|
-
/**
|
|
1336
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1337
|
-
* hits this amount, a threshold charge will be initiated.
|
|
1338
|
-
*/
|
|
1339
|
-
threshold_amount: number;
|
|
1340
|
-
}
|
|
1341
|
-
namespace ThresholdBillingConfiguration {
|
|
1342
|
-
interface Commit {
|
|
1343
|
-
product_id: string;
|
|
1344
|
-
/**
|
|
1345
|
-
* Which products the threshold commit applies to. If both applicable_product_ids
|
|
1346
|
-
* and applicable_product_tags are not provided, the commit applies to all
|
|
1347
|
-
* products.
|
|
1348
|
-
*/
|
|
1349
|
-
applicable_product_ids?: Array<string>;
|
|
1350
|
-
/**
|
|
1351
|
-
* Which tags the threshold commit applies to. If both applicable_product_ids and
|
|
1352
|
-
* applicable_product_tags are not provided, the commit applies to all products.
|
|
1353
|
-
*/
|
|
1354
|
-
applicable_product_tags?: Array<string>;
|
|
1355
|
-
description?: string;
|
|
1356
|
-
/**
|
|
1357
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1358
|
-
* will default to the commit product name.
|
|
1359
|
-
*/
|
|
1360
|
-
name?: string;
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
2605
|
interface Transition {
|
|
1364
2606
|
from_contract_id: string;
|
|
1365
2607
|
/**
|
|
@@ -1378,7 +2620,7 @@ export declare namespace ContractCreateParams {
|
|
|
1378
2620
|
}
|
|
1379
2621
|
}
|
|
1380
2622
|
interface UsageStatementSchedule {
|
|
1381
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2623
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1382
2624
|
/**
|
|
1383
2625
|
* Required when using CUSTOM_DATE. This option lets you set a historical billing
|
|
1384
2626
|
* anchor date, aligning future billing cycles with a chosen cadence. For example,
|
|
@@ -1489,7 +2731,9 @@ export interface ContractAmendParams {
|
|
|
1489
2731
|
starting_at: string;
|
|
1490
2732
|
commits?: Array<ContractAmendParams.Commit>;
|
|
1491
2733
|
credits?: Array<ContractAmendParams.Credit>;
|
|
1492
|
-
custom_fields?:
|
|
2734
|
+
custom_fields?: {
|
|
2735
|
+
[key: string]: string;
|
|
2736
|
+
};
|
|
1493
2737
|
/**
|
|
1494
2738
|
* This field's availability is dependent on your client's configuration.
|
|
1495
2739
|
*/
|
|
@@ -1532,20 +2776,28 @@ export declare namespace ContractAmendParams {
|
|
|
1532
2776
|
*/
|
|
1533
2777
|
amount?: number;
|
|
1534
2778
|
/**
|
|
1535
|
-
* Which products the commit applies to. If
|
|
1536
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
2779
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
2780
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2781
|
+
* all products.
|
|
1537
2782
|
*/
|
|
1538
2783
|
applicable_product_ids?: Array<string>;
|
|
1539
2784
|
/**
|
|
1540
|
-
* Which tags the commit applies to. If
|
|
1541
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
2785
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
2786
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2787
|
+
* all products.
|
|
1542
2788
|
*/
|
|
1543
2789
|
applicable_product_tags?: Array<string>;
|
|
1544
|
-
custom_fields?:
|
|
2790
|
+
custom_fields?: {
|
|
2791
|
+
[key: string]: string;
|
|
2792
|
+
};
|
|
1545
2793
|
/**
|
|
1546
2794
|
* Used only in UI/API. It is not exposed to end customers.
|
|
1547
2795
|
*/
|
|
1548
2796
|
description?: string;
|
|
2797
|
+
/**
|
|
2798
|
+
* Optional configuration for commit hierarchy access control
|
|
2799
|
+
*/
|
|
2800
|
+
hierarchy_configuration?: Commit.HierarchyConfiguration;
|
|
1549
2801
|
/**
|
|
1550
2802
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
1551
2803
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -1561,6 +2813,10 @@ export declare namespace ContractAmendParams {
|
|
|
1561
2813
|
* This field's availability is dependent on your client's configuration.
|
|
1562
2814
|
*/
|
|
1563
2815
|
netsuite_sales_order_id?: string;
|
|
2816
|
+
/**
|
|
2817
|
+
* optionally payment gate this commit
|
|
2818
|
+
*/
|
|
2819
|
+
payment_gate_config?: Commit.PaymentGateConfig;
|
|
1564
2820
|
/**
|
|
1565
2821
|
* If multiple commits are applicable, the one with the lower priority will apply
|
|
1566
2822
|
* first.
|
|
@@ -1571,6 +2827,13 @@ export declare namespace ContractAmendParams {
|
|
|
1571
2827
|
* Fraction of unused segments that will be rolled over. Must be between 0 and 1.
|
|
1572
2828
|
*/
|
|
1573
2829
|
rollover_fraction?: number;
|
|
2830
|
+
/**
|
|
2831
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2832
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2833
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2834
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2835
|
+
*/
|
|
2836
|
+
specifiers?: Array<Commit.Specifier>;
|
|
1574
2837
|
/**
|
|
1575
2838
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
1576
2839
|
* commit specific overrides.
|
|
@@ -1603,6 +2866,24 @@ export declare namespace ContractAmendParams {
|
|
|
1603
2866
|
starting_at: string;
|
|
1604
2867
|
}
|
|
1605
2868
|
}
|
|
2869
|
+
/**
|
|
2870
|
+
* Optional configuration for commit hierarchy access control
|
|
2871
|
+
*/
|
|
2872
|
+
interface HierarchyConfiguration {
|
|
2873
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2874
|
+
}
|
|
2875
|
+
namespace HierarchyConfiguration {
|
|
2876
|
+
interface CommitHierarchyChildAccessAll {
|
|
2877
|
+
type: 'ALL';
|
|
2878
|
+
}
|
|
2879
|
+
interface CommitHierarchyChildAccessNone {
|
|
2880
|
+
type: 'NONE';
|
|
2881
|
+
}
|
|
2882
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2883
|
+
contract_ids: Array<string>;
|
|
2884
|
+
type: 'CONTRACT_IDS';
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
1606
2887
|
/**
|
|
1607
2888
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
1608
2889
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -1686,6 +2967,82 @@ export declare namespace ContractAmendParams {
|
|
|
1686
2967
|
unit_price?: number;
|
|
1687
2968
|
}
|
|
1688
2969
|
}
|
|
2970
|
+
/**
|
|
2971
|
+
* optionally payment gate this commit
|
|
2972
|
+
*/
|
|
2973
|
+
interface PaymentGateConfig {
|
|
2974
|
+
/**
|
|
2975
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2976
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2977
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2978
|
+
* wish to payment gate the commit balance.
|
|
2979
|
+
*/
|
|
2980
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2981
|
+
/**
|
|
2982
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2983
|
+
*/
|
|
2984
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2985
|
+
/**
|
|
2986
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
2987
|
+
*/
|
|
2988
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2989
|
+
/**
|
|
2990
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2991
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2992
|
+
* will default to NONE.
|
|
2993
|
+
*/
|
|
2994
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2995
|
+
}
|
|
2996
|
+
namespace PaymentGateConfig {
|
|
2997
|
+
/**
|
|
2998
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2999
|
+
*/
|
|
3000
|
+
interface PrecalculatedTaxConfig {
|
|
3001
|
+
/**
|
|
3002
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
3003
|
+
* denomination as the commit's invoice schedule
|
|
3004
|
+
*/
|
|
3005
|
+
tax_amount: number;
|
|
3006
|
+
/**
|
|
3007
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
3008
|
+
* description.
|
|
3009
|
+
*/
|
|
3010
|
+
tax_name?: string;
|
|
3011
|
+
}
|
|
3012
|
+
/**
|
|
3013
|
+
* Only applicable if using STRIPE as your payment gate type.
|
|
3014
|
+
*/
|
|
3015
|
+
interface StripeConfig {
|
|
3016
|
+
/**
|
|
3017
|
+
* If left blank, will default to INVOICE
|
|
3018
|
+
*/
|
|
3019
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
3020
|
+
/**
|
|
3021
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
3022
|
+
* your payment type.
|
|
3023
|
+
*/
|
|
3024
|
+
invoice_metadata?: {
|
|
3025
|
+
[key: string]: string;
|
|
3026
|
+
};
|
|
3027
|
+
}
|
|
3028
|
+
}
|
|
3029
|
+
interface Specifier {
|
|
3030
|
+
presentation_group_values?: {
|
|
3031
|
+
[key: string]: string;
|
|
3032
|
+
};
|
|
3033
|
+
pricing_group_values?: {
|
|
3034
|
+
[key: string]: string;
|
|
3035
|
+
};
|
|
3036
|
+
/**
|
|
3037
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3038
|
+
*/
|
|
3039
|
+
product_id?: string;
|
|
3040
|
+
/**
|
|
3041
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3042
|
+
* tags.
|
|
3043
|
+
*/
|
|
3044
|
+
product_tags?: Array<string>;
|
|
3045
|
+
}
|
|
1689
3046
|
}
|
|
1690
3047
|
interface Credit {
|
|
1691
3048
|
/**
|
|
@@ -1703,11 +3060,17 @@ export declare namespace ContractAmendParams {
|
|
|
1703
3060
|
* applicable_product_tags are not provided, the credit applies to all products.
|
|
1704
3061
|
*/
|
|
1705
3062
|
applicable_product_tags?: Array<string>;
|
|
1706
|
-
custom_fields?:
|
|
3063
|
+
custom_fields?: {
|
|
3064
|
+
[key: string]: string;
|
|
3065
|
+
};
|
|
1707
3066
|
/**
|
|
1708
3067
|
* Used only in UI/API. It is not exposed to end customers.
|
|
1709
3068
|
*/
|
|
1710
3069
|
description?: string;
|
|
3070
|
+
/**
|
|
3071
|
+
* Optional configuration for credit hierarchy access control
|
|
3072
|
+
*/
|
|
3073
|
+
hierarchy_configuration?: Credit.HierarchyConfiguration;
|
|
1711
3074
|
/**
|
|
1712
3075
|
* displayed on invoices
|
|
1713
3076
|
*/
|
|
@@ -1722,6 +3085,13 @@ export declare namespace ContractAmendParams {
|
|
|
1722
3085
|
*/
|
|
1723
3086
|
priority?: number;
|
|
1724
3087
|
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
3088
|
+
/**
|
|
3089
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
3090
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
3091
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
3092
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
3093
|
+
*/
|
|
3094
|
+
specifiers?: Array<Credit.Specifier>;
|
|
1725
3095
|
}
|
|
1726
3096
|
namespace Credit {
|
|
1727
3097
|
/**
|
|
@@ -1747,6 +3117,41 @@ export declare namespace ContractAmendParams {
|
|
|
1747
3117
|
starting_at: string;
|
|
1748
3118
|
}
|
|
1749
3119
|
}
|
|
3120
|
+
/**
|
|
3121
|
+
* Optional configuration for credit hierarchy access control
|
|
3122
|
+
*/
|
|
3123
|
+
interface HierarchyConfiguration {
|
|
3124
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
3125
|
+
}
|
|
3126
|
+
namespace HierarchyConfiguration {
|
|
3127
|
+
interface CommitHierarchyChildAccessAll {
|
|
3128
|
+
type: 'ALL';
|
|
3129
|
+
}
|
|
3130
|
+
interface CommitHierarchyChildAccessNone {
|
|
3131
|
+
type: 'NONE';
|
|
3132
|
+
}
|
|
3133
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
3134
|
+
contract_ids: Array<string>;
|
|
3135
|
+
type: 'CONTRACT_IDS';
|
|
3136
|
+
}
|
|
3137
|
+
}
|
|
3138
|
+
interface Specifier {
|
|
3139
|
+
presentation_group_values?: {
|
|
3140
|
+
[key: string]: string;
|
|
3141
|
+
};
|
|
3142
|
+
pricing_group_values?: {
|
|
3143
|
+
[key: string]: string;
|
|
3144
|
+
};
|
|
3145
|
+
/**
|
|
3146
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3147
|
+
*/
|
|
3148
|
+
product_id?: string;
|
|
3149
|
+
/**
|
|
3150
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3151
|
+
* tags.
|
|
3152
|
+
*/
|
|
3153
|
+
product_tags?: Array<string>;
|
|
3154
|
+
}
|
|
1750
3155
|
}
|
|
1751
3156
|
interface Discount {
|
|
1752
3157
|
product_id: string;
|
|
@@ -1754,7 +3159,9 @@ export declare namespace ContractAmendParams {
|
|
|
1754
3159
|
* Must provide either schedule_items or recurring_schedule.
|
|
1755
3160
|
*/
|
|
1756
3161
|
schedule: Discount.Schedule;
|
|
1757
|
-
custom_fields?:
|
|
3162
|
+
custom_fields?: {
|
|
3163
|
+
[key: string]: string;
|
|
3164
|
+
};
|
|
1758
3165
|
/**
|
|
1759
3166
|
* displayed on invoices
|
|
1760
3167
|
*/
|
|
@@ -1910,7 +3317,7 @@ export declare namespace ContractAmendParams {
|
|
|
1910
3317
|
}
|
|
1911
3318
|
namespace Override {
|
|
1912
3319
|
interface OverrideSpecifier {
|
|
1913
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
3320
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1914
3321
|
/**
|
|
1915
3322
|
* Can only be used for commit specific overrides. Must be used in conjunction with
|
|
1916
3323
|
* one of product_id, product_tags, pricing_group_values, or
|
|
@@ -1922,12 +3329,16 @@ export declare namespace ContractAmendParams {
|
|
|
1922
3329
|
* A map of group names to values. The override will only apply to line items with
|
|
1923
3330
|
* the specified presentation group values.
|
|
1924
3331
|
*/
|
|
1925
|
-
presentation_group_values?:
|
|
3332
|
+
presentation_group_values?: {
|
|
3333
|
+
[key: string]: string;
|
|
3334
|
+
};
|
|
1926
3335
|
/**
|
|
1927
3336
|
* A map of pricing group names to values. The override will only apply to products
|
|
1928
3337
|
* with the specified pricing group values.
|
|
1929
3338
|
*/
|
|
1930
|
-
pricing_group_values?:
|
|
3339
|
+
pricing_group_values?: {
|
|
3340
|
+
[key: string]: string;
|
|
3341
|
+
};
|
|
1931
3342
|
/**
|
|
1932
3343
|
* If provided, the override will only apply to the product with the specified ID.
|
|
1933
3344
|
*/
|
|
@@ -1962,7 +3373,9 @@ export declare namespace ContractAmendParams {
|
|
|
1962
3373
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1963
3374
|
* processors.
|
|
1964
3375
|
*/
|
|
1965
|
-
custom_rate?:
|
|
3376
|
+
custom_rate?: {
|
|
3377
|
+
[key: string]: unknown;
|
|
3378
|
+
};
|
|
1966
3379
|
/**
|
|
1967
3380
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1968
3381
|
* set to true.
|
|
@@ -2003,7 +3416,9 @@ export declare namespace ContractAmendParams {
|
|
|
2003
3416
|
* amount and must be specified.
|
|
2004
3417
|
*/
|
|
2005
3418
|
unit_price: number;
|
|
2006
|
-
custom_fields?:
|
|
3419
|
+
custom_fields?: {
|
|
3420
|
+
[key: string]: string;
|
|
3421
|
+
};
|
|
2007
3422
|
description?: string;
|
|
2008
3423
|
/**
|
|
2009
3424
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -2173,15 +3588,21 @@ export declare namespace ContractCreateHistoricalInvoicesParams {
|
|
|
2173
3588
|
*/
|
|
2174
3589
|
billable_status?: 'billable' | 'unbillable';
|
|
2175
3590
|
breakdown_granularity?: 'HOUR' | 'DAY';
|
|
2176
|
-
custom_fields?:
|
|
3591
|
+
custom_fields?: {
|
|
3592
|
+
[key: string]: string;
|
|
3593
|
+
};
|
|
2177
3594
|
}
|
|
2178
3595
|
namespace Invoice {
|
|
2179
3596
|
interface UsageLineItem {
|
|
2180
3597
|
exclusive_end_date: string;
|
|
2181
3598
|
inclusive_start_date: string;
|
|
2182
3599
|
product_id: string;
|
|
2183
|
-
presentation_group_values?:
|
|
2184
|
-
|
|
3600
|
+
presentation_group_values?: {
|
|
3601
|
+
[key: string]: string;
|
|
3602
|
+
};
|
|
3603
|
+
pricing_group_values?: {
|
|
3604
|
+
[key: string]: string;
|
|
3605
|
+
};
|
|
2185
3606
|
quantity?: number;
|
|
2186
3607
|
subtotals_with_quantity?: Array<UsageLineItem.SubtotalsWithQuantity>;
|
|
2187
3608
|
}
|
|
@@ -2206,7 +3627,7 @@ export interface ContractListBalancesParams {
|
|
|
2206
3627
|
*/
|
|
2207
3628
|
effective_before?: string;
|
|
2208
3629
|
/**
|
|
2209
|
-
* Include credits from archived contracts.
|
|
3630
|
+
* Include archived credits and credits from archived contracts.
|
|
2210
3631
|
*/
|
|
2211
3632
|
include_archived?: boolean;
|
|
2212
3633
|
/**
|
|
@@ -2223,6 +3644,10 @@ export interface ContractListBalancesParams {
|
|
|
2223
3644
|
* slower.
|
|
2224
3645
|
*/
|
|
2225
3646
|
include_ledgers?: boolean;
|
|
3647
|
+
/**
|
|
3648
|
+
* The maximum number of commits to return. Defaults to 25.
|
|
3649
|
+
*/
|
|
3650
|
+
limit?: number;
|
|
2226
3651
|
/**
|
|
2227
3652
|
* The next page token from a previous response.
|
|
2228
3653
|
*/
|
|
@@ -2267,17 +3692,21 @@ export declare namespace ContractRetrieveRateScheduleParams {
|
|
|
2267
3692
|
* Subscription rates matching the billing frequency will be included in the
|
|
2268
3693
|
* response.
|
|
2269
3694
|
*/
|
|
2270
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
3695
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2271
3696
|
/**
|
|
2272
3697
|
* List of pricing group key value pairs, rates containing the matching key / value
|
|
2273
3698
|
* pairs will be included in the response.
|
|
2274
3699
|
*/
|
|
2275
|
-
partial_pricing_group_values?:
|
|
3700
|
+
partial_pricing_group_values?: {
|
|
3701
|
+
[key: string]: string;
|
|
3702
|
+
};
|
|
2276
3703
|
/**
|
|
2277
3704
|
* List of pricing group key value pairs, rates matching all of the key / value
|
|
2278
3705
|
* pairs will be included in the response.
|
|
2279
3706
|
*/
|
|
2280
|
-
pricing_group_values?:
|
|
3707
|
+
pricing_group_values?: {
|
|
3708
|
+
[key: string]: string;
|
|
3709
|
+
};
|
|
2281
3710
|
/**
|
|
2282
3711
|
* Rates matching the product id will be included in the response.
|
|
2283
3712
|
*/
|
|
@@ -2289,6 +3718,11 @@ export declare namespace ContractRetrieveRateScheduleParams {
|
|
|
2289
3718
|
product_tags?: Array<string>;
|
|
2290
3719
|
}
|
|
2291
3720
|
}
|
|
3721
|
+
export interface ContractRetrieveSubscriptionQuantityHistoryParams {
|
|
3722
|
+
contract_id: string;
|
|
3723
|
+
customer_id: string;
|
|
3724
|
+
subscription_id: string;
|
|
3725
|
+
}
|
|
2292
3726
|
export interface ContractScheduleProServicesInvoiceParams {
|
|
2293
3727
|
contract_id: string;
|
|
2294
3728
|
customer_id: string;
|
|
@@ -2377,9 +3811,9 @@ export interface ContractUpdateEndDateParams {
|
|
|
2377
3811
|
ending_before?: string;
|
|
2378
3812
|
}
|
|
2379
3813
|
export declare namespace Contracts {
|
|
2380
|
-
export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
|
|
3814
|
+
export { type ContractCreateResponse as ContractCreateResponse, type ContractRetrieveResponse as ContractRetrieveResponse, type ContractListResponse as ContractListResponse, type ContractAmendResponse as ContractAmendResponse, type ContractArchiveResponse as ContractArchiveResponse, type ContractCreateHistoricalInvoicesResponse as ContractCreateHistoricalInvoicesResponse, type ContractListBalancesResponse as ContractListBalancesResponse, type ContractRetrieveRateScheduleResponse as ContractRetrieveRateScheduleResponse, type ContractRetrieveSubscriptionQuantityHistoryResponse as ContractRetrieveSubscriptionQuantityHistoryResponse, type ContractScheduleProServicesInvoiceResponse as ContractScheduleProServicesInvoiceResponse, type ContractUpdateEndDateResponse as ContractUpdateEndDateResponse, type ContractCreateParams as ContractCreateParams, type ContractRetrieveParams as ContractRetrieveParams, type ContractListParams as ContractListParams, type ContractAddManualBalanceEntryParams as ContractAddManualBalanceEntryParams, type ContractAmendParams as ContractAmendParams, type ContractArchiveParams as ContractArchiveParams, type ContractCreateHistoricalInvoicesParams as ContractCreateHistoricalInvoicesParams, type ContractListBalancesParams as ContractListBalancesParams, type ContractRetrieveRateScheduleParams as ContractRetrieveRateScheduleParams, type ContractRetrieveSubscriptionQuantityHistoryParams as ContractRetrieveSubscriptionQuantityHistoryParams, type ContractScheduleProServicesInvoiceParams as ContractScheduleProServicesInvoiceParams, type ContractSetUsageFilterParams as ContractSetUsageFilterParams, type ContractUpdateEndDateParams as ContractUpdateEndDateParams, };
|
|
2381
3815
|
export { Products as Products, type ProductListItemState as ProductListItemState, type QuantityConversion as QuantityConversion, type QuantityRounding as QuantityRounding, type ProductCreateResponse as ProductCreateResponse, type ProductRetrieveResponse as ProductRetrieveResponse, type ProductUpdateResponse as ProductUpdateResponse, type ProductListResponse as ProductListResponse, type ProductArchiveResponse as ProductArchiveResponse, ProductListResponsesCursorPage as ProductListResponsesCursorPage, type ProductCreateParams as ProductCreateParams, type ProductRetrieveParams as ProductRetrieveParams, type ProductUpdateParams as ProductUpdateParams, type ProductListParams as ProductListParams, type ProductArchiveParams as ProductArchiveParams, };
|
|
2382
|
-
export { RateCards as RateCards, type RateCardCreateResponse as RateCardCreateResponse, type RateCardRetrieveResponse as RateCardRetrieveResponse, type RateCardUpdateResponse as RateCardUpdateResponse, type RateCardListResponse as RateCardListResponse, type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse, RateCardListResponsesCursorPage as RateCardListResponsesCursorPage, type RateCardCreateParams as RateCardCreateParams, type RateCardRetrieveParams as RateCardRetrieveParams, type RateCardUpdateParams as RateCardUpdateParams, type RateCardListParams as RateCardListParams, type RateCardRetrieveRateScheduleParams as RateCardRetrieveRateScheduleParams, };
|
|
3816
|
+
export { RateCards as RateCards, type RateCardCreateResponse as RateCardCreateResponse, type RateCardRetrieveResponse as RateCardRetrieveResponse, type RateCardUpdateResponse as RateCardUpdateResponse, type RateCardListResponse as RateCardListResponse, type RateCardArchiveResponse as RateCardArchiveResponse, type RateCardRetrieveRateScheduleResponse as RateCardRetrieveRateScheduleResponse, RateCardListResponsesCursorPage as RateCardListResponsesCursorPage, type RateCardCreateParams as RateCardCreateParams, type RateCardRetrieveParams as RateCardRetrieveParams, type RateCardUpdateParams as RateCardUpdateParams, type RateCardListParams as RateCardListParams, type RateCardArchiveParams as RateCardArchiveParams, type RateCardRetrieveRateScheduleParams as RateCardRetrieveRateScheduleParams, };
|
|
2383
3817
|
export { NamedSchedules as NamedSchedules, type NamedScheduleRetrieveResponse as NamedScheduleRetrieveResponse, type NamedScheduleRetrieveParams as NamedScheduleRetrieveParams, type NamedScheduleUpdateParams as NamedScheduleUpdateParams, };
|
|
2384
3818
|
}
|
|
2385
3819
|
//# sourceMappingURL=contracts.d.ts.map
|