@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
|
@@ -5,28 +5,116 @@ export declare class Contracts extends APIResource {
|
|
|
5
5
|
/**
|
|
6
6
|
* Get a specific contract. New clients should use this endpoint rather than the v1
|
|
7
7
|
* endpoint.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const contract = await client.v2.contracts.retrieve({
|
|
12
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
13
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
14
|
+
* });
|
|
15
|
+
* ```
|
|
8
16
|
*/
|
|
9
17
|
retrieve(body: ContractRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<ContractRetrieveResponse>;
|
|
10
18
|
/**
|
|
11
|
-
* List all contracts for a customer
|
|
19
|
+
* List all contracts for a customer in chronological order. New clients should use
|
|
20
|
+
* this endpoint rather than the v1 endpoint.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const contracts = await client.v2.contracts.list({
|
|
25
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
12
28
|
*/
|
|
13
29
|
list(body: ContractListParams, options?: Core.RequestOptions): Core.APIPromise<ContractListResponse>;
|
|
14
30
|
/**
|
|
15
31
|
* Edit a contract. Contract editing must be enabled to use this endpoint.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const response = await client.v2.contracts.edit({
|
|
36
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
37
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
38
|
+
* add_overrides: [
|
|
39
|
+
* {
|
|
40
|
+
* type: 'MULTIPLIER',
|
|
41
|
+
* starting_at: '2024-11-02T00:00:00Z',
|
|
42
|
+
* product_id: 'd4fc086c-d8e5-4091-a235-fbba5da4ec14',
|
|
43
|
+
* multiplier: 2,
|
|
44
|
+
* priority: 100,
|
|
45
|
+
* },
|
|
46
|
+
* ],
|
|
47
|
+
* add_scheduled_charges: [
|
|
48
|
+
* {
|
|
49
|
+
* product_id: '2e30f074-d04c-412e-a134-851ebfa5ceb2',
|
|
50
|
+
* schedule: {
|
|
51
|
+
* schedule_items: [
|
|
52
|
+
* {
|
|
53
|
+
* timestamp: '2020-02-15T00:00:00.000Z',
|
|
54
|
+
* unit_price: 1000000,
|
|
55
|
+
* quantity: 1,
|
|
56
|
+
* },
|
|
57
|
+
* ],
|
|
58
|
+
* },
|
|
59
|
+
* },
|
|
60
|
+
* ],
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
16
63
|
*/
|
|
17
64
|
edit(body: ContractEditParams, options?: Core.RequestOptions): Core.APIPromise<ContractEditResponse>;
|
|
18
65
|
/**
|
|
19
66
|
* Edit a customer or contract commit. Contract commits can only be edited using
|
|
20
67
|
* this endpoint if contract editing is enabled.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```ts
|
|
71
|
+
* const response = await client.v2.contracts.editCommit({
|
|
72
|
+
* commit_id: '5e7e82cf-ccb7-428c-a96f-a8e4f67af822',
|
|
73
|
+
* customer_id: '4c91c473-fc12-445a-9c38-40421d47023f',
|
|
74
|
+
* access_schedule: {
|
|
75
|
+
* update_schedule_items: [
|
|
76
|
+
* {
|
|
77
|
+
* id: 'd5edbd32-c744-48cb-9475-a9bca0e6fa39',
|
|
78
|
+
* ending_before: '2025-03-12T00:00:00Z',
|
|
79
|
+
* },
|
|
80
|
+
* ],
|
|
81
|
+
* },
|
|
82
|
+
* });
|
|
83
|
+
* ```
|
|
21
84
|
*/
|
|
22
85
|
editCommit(body: ContractEditCommitParams, options?: Core.RequestOptions): Core.APIPromise<ContractEditCommitResponse>;
|
|
23
86
|
/**
|
|
24
87
|
* Edit a customer or contract credit. Contract credits can only be edited using
|
|
25
88
|
* this endpoint if contract editing is enabled.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```ts
|
|
92
|
+
* const response = await client.v2.contracts.editCredit({
|
|
93
|
+
* credit_id: '5e7e82cf-ccb7-428c-a96f-a8e4f67af822',
|
|
94
|
+
* customer_id: '4c91c473-fc12-445a-9c38-40421d47023f',
|
|
95
|
+
* access_schedule: {
|
|
96
|
+
* update_schedule_items: [
|
|
97
|
+
* {
|
|
98
|
+
* id: 'd5edbd32-c744-48cb-9475-a9bca0e6fa39',
|
|
99
|
+
* ending_before: '2025-03-12T00:00:00Z',
|
|
100
|
+
* },
|
|
101
|
+
* ],
|
|
102
|
+
* },
|
|
103
|
+
* });
|
|
104
|
+
* ```
|
|
26
105
|
*/
|
|
27
106
|
editCredit(body: ContractEditCreditParams, options?: Core.RequestOptions): Core.APIPromise<ContractEditCreditResponse>;
|
|
28
107
|
/**
|
|
29
|
-
* Get the edit history of a specific contract
|
|
108
|
+
* Get the edit history of a specific contract. Contract editing must be enabled to
|
|
109
|
+
* use this endpoint.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```ts
|
|
113
|
+
* const response = await client.v2.contracts.getEditHistory({
|
|
114
|
+
* contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
115
|
+
* customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
|
|
116
|
+
* });
|
|
117
|
+
* ```
|
|
30
118
|
*/
|
|
31
119
|
getEditHistory(body: ContractGetEditHistoryParams, options?: Core.RequestOptions): Core.APIPromise<ContractGetEditHistoryResponse>;
|
|
32
120
|
}
|
|
@@ -48,7 +136,9 @@ export declare namespace ContractRetrieveResponse {
|
|
|
48
136
|
usage_statement_schedule: Data.UsageStatementSchedule;
|
|
49
137
|
archived_at?: string;
|
|
50
138
|
credits?: Array<Data.Credit>;
|
|
51
|
-
custom_fields?:
|
|
139
|
+
custom_fields?: {
|
|
140
|
+
[key: string]: string;
|
|
141
|
+
};
|
|
52
142
|
/**
|
|
53
143
|
* This field's availability is dependent on your client's configuration.
|
|
54
144
|
*/
|
|
@@ -58,6 +148,16 @@ export declare namespace ContractRetrieveResponse {
|
|
|
58
148
|
*/
|
|
59
149
|
discounts?: Array<Shared.Discount>;
|
|
60
150
|
ending_before?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
153
|
+
* respective list endpoints to get the full lists.
|
|
154
|
+
*/
|
|
155
|
+
has_more?: Data.HasMore;
|
|
156
|
+
/**
|
|
157
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
158
|
+
* configuration with a single parent.
|
|
159
|
+
*/
|
|
160
|
+
hierarchy_configuration?: Data.ParentHierarchyConfiguration | Data.ChildHierarchyConfiguration;
|
|
61
161
|
/**
|
|
62
162
|
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
63
163
|
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
@@ -71,6 +171,11 @@ export declare namespace ContractRetrieveResponse {
|
|
|
71
171
|
* This field's availability is dependent on your client's configuration.
|
|
72
172
|
*/
|
|
73
173
|
netsuite_sales_order_id?: string;
|
|
174
|
+
prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
|
|
175
|
+
/**
|
|
176
|
+
* Priority of the contract.
|
|
177
|
+
*/
|
|
178
|
+
priority?: number;
|
|
74
179
|
/**
|
|
75
180
|
* This field's availability is dependent on your client's configuration.
|
|
76
181
|
*/
|
|
@@ -94,8 +199,11 @@ export declare namespace ContractRetrieveResponse {
|
|
|
94
199
|
* on a separate invoice from usage charges.
|
|
95
200
|
*/
|
|
96
201
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
202
|
+
spend_threshold_configuration?: Data.SpendThresholdConfiguration;
|
|
203
|
+
/**
|
|
204
|
+
* List of subscriptions on the contract.
|
|
205
|
+
*/
|
|
97
206
|
subscriptions?: Array<Data.Subscription>;
|
|
98
|
-
threshold_billing_configuration?: Data.ThresholdBillingConfiguration;
|
|
99
207
|
total_contract_value?: number;
|
|
100
208
|
/**
|
|
101
209
|
* Prevents the creation of duplicates. If a request to create a record is made
|
|
@@ -117,6 +225,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
117
225
|
applicable_contract_ids?: Array<string>;
|
|
118
226
|
applicable_product_ids?: Array<string>;
|
|
119
227
|
applicable_product_tags?: Array<string>;
|
|
228
|
+
archived_at?: string;
|
|
120
229
|
/**
|
|
121
230
|
* The current balance of the credit or commit. This balance reflects the amount of
|
|
122
231
|
* credit or commit that the customer has access to use at this moment - thus,
|
|
@@ -129,8 +238,14 @@ export declare namespace ContractRetrieveResponse {
|
|
|
129
238
|
*/
|
|
130
239
|
balance?: number;
|
|
131
240
|
contract?: Commit.Contract;
|
|
132
|
-
custom_fields?:
|
|
241
|
+
custom_fields?: {
|
|
242
|
+
[key: string]: string;
|
|
243
|
+
};
|
|
133
244
|
description?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Optional configuration for commit hierarchy access control
|
|
247
|
+
*/
|
|
248
|
+
hierarchy_configuration?: Commit.HierarchyConfiguration;
|
|
134
249
|
/**
|
|
135
250
|
* The contract that this commit will be billed on.
|
|
136
251
|
*/
|
|
@@ -143,7 +258,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
143
258
|
* A list of ordered events that impact the balance of a commit. For example, an
|
|
144
259
|
* invoice deduction or a rollover.
|
|
145
260
|
*/
|
|
146
|
-
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
261
|
+
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
147
262
|
name?: string;
|
|
148
263
|
/**
|
|
149
264
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -161,6 +276,12 @@ export declare namespace ContractRetrieveResponse {
|
|
|
161
276
|
* This field's availability is dependent on your client's configuration.
|
|
162
277
|
*/
|
|
163
278
|
salesforce_opportunity_id?: string;
|
|
279
|
+
/**
|
|
280
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
281
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
282
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
283
|
+
*/
|
|
284
|
+
specifiers?: Array<Commit.Specifier>;
|
|
164
285
|
}
|
|
165
286
|
namespace Commit {
|
|
166
287
|
interface Product {
|
|
@@ -170,6 +291,24 @@ export declare namespace ContractRetrieveResponse {
|
|
|
170
291
|
interface Contract {
|
|
171
292
|
id: string;
|
|
172
293
|
}
|
|
294
|
+
/**
|
|
295
|
+
* Optional configuration for commit hierarchy access control
|
|
296
|
+
*/
|
|
297
|
+
interface HierarchyConfiguration {
|
|
298
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
299
|
+
}
|
|
300
|
+
namespace HierarchyConfiguration {
|
|
301
|
+
interface CommitHierarchyChildAccessAll {
|
|
302
|
+
type: 'ALL';
|
|
303
|
+
}
|
|
304
|
+
interface CommitHierarchyChildAccessNone {
|
|
305
|
+
type: 'NONE';
|
|
306
|
+
}
|
|
307
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
308
|
+
contract_ids: Array<string>;
|
|
309
|
+
type: 'CONTRACT_IDS';
|
|
310
|
+
}
|
|
311
|
+
}
|
|
173
312
|
/**
|
|
174
313
|
* The contract that this commit will be billed on.
|
|
175
314
|
*/
|
|
@@ -188,6 +327,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
188
327
|
segment_id: string;
|
|
189
328
|
timestamp: string;
|
|
190
329
|
type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
330
|
+
contract_id?: string;
|
|
191
331
|
}
|
|
192
332
|
interface PrepaidCommitRolloverLedgerEntry {
|
|
193
333
|
amount: number;
|
|
@@ -208,6 +348,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
208
348
|
segment_id: string;
|
|
209
349
|
timestamp: string;
|
|
210
350
|
type: 'PREPAID_COMMIT_CANCELED';
|
|
351
|
+
contract_id?: string;
|
|
211
352
|
}
|
|
212
353
|
interface PrepaidCommitCreditedLedgerEntry {
|
|
213
354
|
amount: number;
|
|
@@ -215,6 +356,13 @@ export declare namespace ContractRetrieveResponse {
|
|
|
215
356
|
segment_id: string;
|
|
216
357
|
timestamp: string;
|
|
217
358
|
type: 'PREPAID_COMMIT_CREDITED';
|
|
359
|
+
contract_id?: string;
|
|
360
|
+
}
|
|
361
|
+
interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
362
|
+
amount: number;
|
|
363
|
+
segment_id: string;
|
|
364
|
+
timestamp: string;
|
|
365
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
218
366
|
}
|
|
219
367
|
interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
220
368
|
amount: number;
|
|
@@ -227,6 +375,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
227
375
|
segment_id: string;
|
|
228
376
|
timestamp: string;
|
|
229
377
|
type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
378
|
+
contract_id?: string;
|
|
230
379
|
}
|
|
231
380
|
interface PostpaidCommitRolloverLedgerEntry {
|
|
232
381
|
amount: number;
|
|
@@ -240,6 +389,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
240
389
|
invoice_id: string;
|
|
241
390
|
timestamp: string;
|
|
242
391
|
type: 'POSTPAID_COMMIT_TRUEUP';
|
|
392
|
+
contract_id?: string;
|
|
243
393
|
}
|
|
244
394
|
interface PrepaidCommitManualLedgerEntry {
|
|
245
395
|
amount: number;
|
|
@@ -262,6 +412,23 @@ export declare namespace ContractRetrieveResponse {
|
|
|
262
412
|
commit_id: string;
|
|
263
413
|
contract_id: string;
|
|
264
414
|
}
|
|
415
|
+
interface Specifier {
|
|
416
|
+
presentation_group_values?: {
|
|
417
|
+
[key: string]: string;
|
|
418
|
+
};
|
|
419
|
+
pricing_group_values?: {
|
|
420
|
+
[key: string]: string;
|
|
421
|
+
};
|
|
422
|
+
/**
|
|
423
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
424
|
+
*/
|
|
425
|
+
product_id?: string;
|
|
426
|
+
/**
|
|
427
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
428
|
+
* tags.
|
|
429
|
+
*/
|
|
430
|
+
product_tags?: Array<string>;
|
|
431
|
+
}
|
|
265
432
|
}
|
|
266
433
|
interface Override {
|
|
267
434
|
id: string;
|
|
@@ -281,10 +448,14 @@ export declare namespace ContractRetrieveResponse {
|
|
|
281
448
|
}
|
|
282
449
|
namespace Override {
|
|
283
450
|
interface OverrideSpecifier {
|
|
284
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
451
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
285
452
|
commit_ids?: Array<string>;
|
|
286
|
-
presentation_group_values?:
|
|
287
|
-
|
|
453
|
+
presentation_group_values?: {
|
|
454
|
+
[key: string]: string | null;
|
|
455
|
+
};
|
|
456
|
+
pricing_group_values?: {
|
|
457
|
+
[key: string]: string;
|
|
458
|
+
};
|
|
288
459
|
product_id?: string;
|
|
289
460
|
product_tags?: Array<string>;
|
|
290
461
|
recurring_commit_ids?: Array<string>;
|
|
@@ -301,7 +472,9 @@ export declare namespace ContractRetrieveResponse {
|
|
|
301
472
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
302
473
|
* processors.
|
|
303
474
|
*/
|
|
304
|
-
custom_rate?:
|
|
475
|
+
custom_rate?: {
|
|
476
|
+
[key: string]: unknown;
|
|
477
|
+
};
|
|
305
478
|
/**
|
|
306
479
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
307
480
|
* set to true.
|
|
@@ -350,7 +523,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
350
523
|
* Contract usage statements follow a selected cadence based on this date.
|
|
351
524
|
*/
|
|
352
525
|
billing_anchor_date: string;
|
|
353
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
526
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
354
527
|
}
|
|
355
528
|
interface Credit {
|
|
356
529
|
id: string;
|
|
@@ -375,13 +548,19 @@ export declare namespace ContractRetrieveResponse {
|
|
|
375
548
|
*/
|
|
376
549
|
balance?: number;
|
|
377
550
|
contract?: Credit.Contract;
|
|
378
|
-
custom_fields?:
|
|
551
|
+
custom_fields?: {
|
|
552
|
+
[key: string]: string;
|
|
553
|
+
};
|
|
379
554
|
description?: string;
|
|
555
|
+
/**
|
|
556
|
+
* Optional configuration for credit hierarchy access control
|
|
557
|
+
*/
|
|
558
|
+
hierarchy_configuration?: Credit.HierarchyConfiguration;
|
|
380
559
|
/**
|
|
381
560
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
382
561
|
* invoice deduction or an expiration.
|
|
383
562
|
*/
|
|
384
|
-
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry>;
|
|
563
|
+
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry | Credit.CreditSeatBasedAdjustmentLedgerEntry>;
|
|
385
564
|
name?: string;
|
|
386
565
|
/**
|
|
387
566
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -396,6 +575,12 @@ export declare namespace ContractRetrieveResponse {
|
|
|
396
575
|
* This field's availability is dependent on your client's configuration.
|
|
397
576
|
*/
|
|
398
577
|
salesforce_opportunity_id?: string;
|
|
578
|
+
/**
|
|
579
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
580
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
581
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
582
|
+
*/
|
|
583
|
+
specifiers?: Array<Credit.Specifier>;
|
|
399
584
|
}
|
|
400
585
|
namespace Credit {
|
|
401
586
|
interface Product {
|
|
@@ -405,6 +590,24 @@ export declare namespace ContractRetrieveResponse {
|
|
|
405
590
|
interface Contract {
|
|
406
591
|
id: string;
|
|
407
592
|
}
|
|
593
|
+
/**
|
|
594
|
+
* Optional configuration for credit hierarchy access control
|
|
595
|
+
*/
|
|
596
|
+
interface HierarchyConfiguration {
|
|
597
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
598
|
+
}
|
|
599
|
+
namespace HierarchyConfiguration {
|
|
600
|
+
interface CommitHierarchyChildAccessAll {
|
|
601
|
+
type: 'ALL';
|
|
602
|
+
}
|
|
603
|
+
interface CommitHierarchyChildAccessNone {
|
|
604
|
+
type: 'NONE';
|
|
605
|
+
}
|
|
606
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
607
|
+
contract_ids: Array<string>;
|
|
608
|
+
type: 'CONTRACT_IDS';
|
|
609
|
+
}
|
|
610
|
+
}
|
|
408
611
|
interface CreditSegmentStartLedgerEntry {
|
|
409
612
|
amount: number;
|
|
410
613
|
segment_id: string;
|
|
@@ -417,6 +620,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
417
620
|
segment_id: string;
|
|
418
621
|
timestamp: string;
|
|
419
622
|
type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
623
|
+
contract_id?: string;
|
|
420
624
|
}
|
|
421
625
|
interface CreditExpirationLedgerEntry {
|
|
422
626
|
amount: number;
|
|
@@ -430,6 +634,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
430
634
|
segment_id: string;
|
|
431
635
|
timestamp: string;
|
|
432
636
|
type: 'CREDIT_CANCELED';
|
|
637
|
+
contract_id?: string;
|
|
433
638
|
}
|
|
434
639
|
interface CreditCreditedLedgerEntry {
|
|
435
640
|
amount: number;
|
|
@@ -437,6 +642,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
437
642
|
segment_id: string;
|
|
438
643
|
timestamp: string;
|
|
439
644
|
type: 'CREDIT_CREDITED';
|
|
645
|
+
contract_id?: string;
|
|
440
646
|
}
|
|
441
647
|
interface CreditManualLedgerEntry {
|
|
442
648
|
amount: number;
|
|
@@ -444,14 +650,221 @@ export declare namespace ContractRetrieveResponse {
|
|
|
444
650
|
timestamp: string;
|
|
445
651
|
type: 'CREDIT_MANUAL';
|
|
446
652
|
}
|
|
653
|
+
interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
654
|
+
amount: number;
|
|
655
|
+
segment_id: string;
|
|
656
|
+
timestamp: string;
|
|
657
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
658
|
+
}
|
|
659
|
+
interface Specifier {
|
|
660
|
+
presentation_group_values?: {
|
|
661
|
+
[key: string]: string;
|
|
662
|
+
};
|
|
663
|
+
pricing_group_values?: {
|
|
664
|
+
[key: string]: string;
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
668
|
+
*/
|
|
669
|
+
product_id?: string;
|
|
670
|
+
/**
|
|
671
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
672
|
+
* tags.
|
|
673
|
+
*/
|
|
674
|
+
product_tags?: Array<string>;
|
|
675
|
+
}
|
|
447
676
|
}
|
|
448
677
|
/**
|
|
449
678
|
* This field's availability is dependent on your client's configuration.
|
|
450
679
|
*/
|
|
451
680
|
interface CustomerBillingProviderConfiguration {
|
|
681
|
+
/**
|
|
682
|
+
* ID of Customer's billing provider configuration.
|
|
683
|
+
*/
|
|
684
|
+
id: string;
|
|
452
685
|
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
453
686
|
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
454
687
|
}
|
|
688
|
+
/**
|
|
689
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
690
|
+
* respective list endpoints to get the full lists.
|
|
691
|
+
*/
|
|
692
|
+
interface HasMore {
|
|
693
|
+
/**
|
|
694
|
+
* Whether there are more commits on this contract than the limit for this
|
|
695
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
696
|
+
* of commits.
|
|
697
|
+
*/
|
|
698
|
+
commits: boolean;
|
|
699
|
+
/**
|
|
700
|
+
* Whether there are more credits on this contract than the limit for this
|
|
701
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
702
|
+
* of credits.
|
|
703
|
+
*/
|
|
704
|
+
credits: boolean;
|
|
705
|
+
}
|
|
706
|
+
interface ParentHierarchyConfiguration {
|
|
707
|
+
/**
|
|
708
|
+
* List of contracts that belong to this parent.
|
|
709
|
+
*/
|
|
710
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
711
|
+
}
|
|
712
|
+
namespace ParentHierarchyConfiguration {
|
|
713
|
+
interface Child {
|
|
714
|
+
contract_id: string;
|
|
715
|
+
customer_id: string;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
interface ChildHierarchyConfiguration {
|
|
719
|
+
/**
|
|
720
|
+
* The single parent contract/customer for this child.
|
|
721
|
+
*/
|
|
722
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
723
|
+
}
|
|
724
|
+
namespace ChildHierarchyConfiguration {
|
|
725
|
+
/**
|
|
726
|
+
* The single parent contract/customer for this child.
|
|
727
|
+
*/
|
|
728
|
+
interface Parent {
|
|
729
|
+
contract_id: string;
|
|
730
|
+
customer_id: string;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
interface PrepaidBalanceThresholdConfiguration {
|
|
734
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
735
|
+
/**
|
|
736
|
+
* When set to false, the contract will not be evaluated against the
|
|
737
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
738
|
+
* regardless of prior state.
|
|
739
|
+
*/
|
|
740
|
+
is_enabled: boolean;
|
|
741
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
742
|
+
/**
|
|
743
|
+
* Specify the amount the balance should be recharged to.
|
|
744
|
+
*/
|
|
745
|
+
recharge_to_amount: number;
|
|
746
|
+
/**
|
|
747
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
748
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
749
|
+
*/
|
|
750
|
+
threshold_amount: number;
|
|
751
|
+
/**
|
|
752
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
753
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
754
|
+
*/
|
|
755
|
+
custom_credit_type_id?: string;
|
|
756
|
+
}
|
|
757
|
+
namespace PrepaidBalanceThresholdConfiguration {
|
|
758
|
+
interface Commit {
|
|
759
|
+
/**
|
|
760
|
+
* The commit product that will be used to generate the line item for commit
|
|
761
|
+
* payment.
|
|
762
|
+
*/
|
|
763
|
+
product_id: string;
|
|
764
|
+
/**
|
|
765
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
766
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
767
|
+
* all products.
|
|
768
|
+
*/
|
|
769
|
+
applicable_product_ids?: Array<string>;
|
|
770
|
+
/**
|
|
771
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
772
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
773
|
+
* all products.
|
|
774
|
+
*/
|
|
775
|
+
applicable_product_tags?: Array<string>;
|
|
776
|
+
description?: string;
|
|
777
|
+
/**
|
|
778
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
779
|
+
* will default to the commit product name.
|
|
780
|
+
*/
|
|
781
|
+
name?: string;
|
|
782
|
+
/**
|
|
783
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
784
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
785
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
786
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
787
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
788
|
+
* body of `specifiers`.
|
|
789
|
+
*/
|
|
790
|
+
specifiers?: Array<Commit.Specifier>;
|
|
791
|
+
}
|
|
792
|
+
namespace Commit {
|
|
793
|
+
interface Specifier {
|
|
794
|
+
presentation_group_values?: {
|
|
795
|
+
[key: string]: string;
|
|
796
|
+
};
|
|
797
|
+
pricing_group_values?: {
|
|
798
|
+
[key: string]: string;
|
|
799
|
+
};
|
|
800
|
+
/**
|
|
801
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
802
|
+
*/
|
|
803
|
+
product_id?: string;
|
|
804
|
+
/**
|
|
805
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
806
|
+
* tags.
|
|
807
|
+
*/
|
|
808
|
+
product_tags?: Array<string>;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
interface PaymentGateConfig {
|
|
812
|
+
/**
|
|
813
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
814
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
815
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
816
|
+
* wish to payment gate the commit balance.
|
|
817
|
+
*/
|
|
818
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
819
|
+
/**
|
|
820
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
821
|
+
*/
|
|
822
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
823
|
+
/**
|
|
824
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
825
|
+
*/
|
|
826
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
827
|
+
/**
|
|
828
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
829
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
830
|
+
* will default to NONE.
|
|
831
|
+
*/
|
|
832
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
833
|
+
}
|
|
834
|
+
namespace PaymentGateConfig {
|
|
835
|
+
/**
|
|
836
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
837
|
+
*/
|
|
838
|
+
interface PrecalculatedTaxConfig {
|
|
839
|
+
/**
|
|
840
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
841
|
+
* denomination as the commit's invoice schedule
|
|
842
|
+
*/
|
|
843
|
+
tax_amount: number;
|
|
844
|
+
/**
|
|
845
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
846
|
+
* description.
|
|
847
|
+
*/
|
|
848
|
+
tax_name?: string;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
852
|
+
*/
|
|
853
|
+
interface StripeConfig {
|
|
854
|
+
/**
|
|
855
|
+
* If left blank, will default to INVOICE
|
|
856
|
+
*/
|
|
857
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
858
|
+
/**
|
|
859
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
860
|
+
* your payment type.
|
|
861
|
+
*/
|
|
862
|
+
invoice_metadata?: {
|
|
863
|
+
[key: string]: string;
|
|
864
|
+
};
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
}
|
|
455
868
|
interface RecurringCommit {
|
|
456
869
|
id: string;
|
|
457
870
|
/**
|
|
@@ -492,6 +905,10 @@ export declare namespace ContractRetrieveResponse {
|
|
|
492
905
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
493
906
|
*/
|
|
494
907
|
ending_before?: string;
|
|
908
|
+
/**
|
|
909
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
910
|
+
*/
|
|
911
|
+
hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
|
|
495
912
|
/**
|
|
496
913
|
* The amount the customer should be billed for the commit. Not required.
|
|
497
914
|
*/
|
|
@@ -513,16 +930,26 @@ export declare namespace ContractRetrieveResponse {
|
|
|
513
930
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
514
931
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
515
932
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
516
|
-
* be created aligned with the recurring commit's
|
|
933
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
517
934
|
* invoice dates.
|
|
518
935
|
*/
|
|
519
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
936
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
520
937
|
/**
|
|
521
938
|
* Will be passed down to the individual commits. This controls how much of an
|
|
522
939
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
523
940
|
* between 0 and 1.
|
|
524
941
|
*/
|
|
525
942
|
rollover_fraction?: number;
|
|
943
|
+
/**
|
|
944
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
945
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
946
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
947
|
+
*/
|
|
948
|
+
specifiers?: Array<RecurringCommit.Specifier>;
|
|
949
|
+
/**
|
|
950
|
+
* Attach a subscription to the recurring commit/credit.
|
|
951
|
+
*/
|
|
952
|
+
subscription_config?: RecurringCommit.SubscriptionConfig;
|
|
526
953
|
}
|
|
527
954
|
namespace RecurringCommit {
|
|
528
955
|
/**
|
|
@@ -530,8 +957,8 @@ export declare namespace ContractRetrieveResponse {
|
|
|
530
957
|
*/
|
|
531
958
|
interface AccessAmount {
|
|
532
959
|
credit_type_id: string;
|
|
533
|
-
quantity: number;
|
|
534
960
|
unit_price: number;
|
|
961
|
+
quantity?: number;
|
|
535
962
|
}
|
|
536
963
|
/**
|
|
537
964
|
* The amount of time the created commits will be valid for
|
|
@@ -547,6 +974,24 @@ export declare namespace ContractRetrieveResponse {
|
|
|
547
974
|
interface Contract {
|
|
548
975
|
id: string;
|
|
549
976
|
}
|
|
977
|
+
/**
|
|
978
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
979
|
+
*/
|
|
980
|
+
interface HierarchyConfiguration {
|
|
981
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
982
|
+
}
|
|
983
|
+
namespace HierarchyConfiguration {
|
|
984
|
+
interface CommitHierarchyChildAccessAll {
|
|
985
|
+
type: 'ALL';
|
|
986
|
+
}
|
|
987
|
+
interface CommitHierarchyChildAccessNone {
|
|
988
|
+
type: 'NONE';
|
|
989
|
+
}
|
|
990
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
991
|
+
contract_ids: Array<string>;
|
|
992
|
+
type: 'CONTRACT_IDS';
|
|
993
|
+
}
|
|
994
|
+
}
|
|
550
995
|
/**
|
|
551
996
|
* The amount the customer should be billed for the commit. Not required.
|
|
552
997
|
*/
|
|
@@ -555,6 +1000,39 @@ export declare namespace ContractRetrieveResponse {
|
|
|
555
1000
|
quantity: number;
|
|
556
1001
|
unit_price: number;
|
|
557
1002
|
}
|
|
1003
|
+
interface Specifier {
|
|
1004
|
+
presentation_group_values?: {
|
|
1005
|
+
[key: string]: string;
|
|
1006
|
+
};
|
|
1007
|
+
pricing_group_values?: {
|
|
1008
|
+
[key: string]: string;
|
|
1009
|
+
};
|
|
1010
|
+
/**
|
|
1011
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1012
|
+
*/
|
|
1013
|
+
product_id?: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1016
|
+
* tags.
|
|
1017
|
+
*/
|
|
1018
|
+
product_tags?: Array<string>;
|
|
1019
|
+
}
|
|
1020
|
+
/**
|
|
1021
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1022
|
+
*/
|
|
1023
|
+
interface SubscriptionConfig {
|
|
1024
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
1025
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
1026
|
+
subscription_id: string;
|
|
1027
|
+
}
|
|
1028
|
+
namespace SubscriptionConfig {
|
|
1029
|
+
interface ApplySeatIncreaseConfig {
|
|
1030
|
+
/**
|
|
1031
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
1032
|
+
*/
|
|
1033
|
+
is_prorated: boolean;
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
558
1036
|
}
|
|
559
1037
|
interface RecurringCredit {
|
|
560
1038
|
id: string;
|
|
@@ -596,6 +1074,10 @@ export declare namespace ContractRetrieveResponse {
|
|
|
596
1074
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
597
1075
|
*/
|
|
598
1076
|
ending_before?: string;
|
|
1077
|
+
/**
|
|
1078
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1079
|
+
*/
|
|
1080
|
+
hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
|
|
599
1081
|
/**
|
|
600
1082
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
601
1083
|
*/
|
|
@@ -613,16 +1095,26 @@ export declare namespace ContractRetrieveResponse {
|
|
|
613
1095
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
614
1096
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
615
1097
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
616
|
-
* be created aligned with the recurring commit's
|
|
1098
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
617
1099
|
* invoice dates.
|
|
618
1100
|
*/
|
|
619
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1101
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
620
1102
|
/**
|
|
621
1103
|
* Will be passed down to the individual commits. This controls how much of an
|
|
622
1104
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
623
1105
|
* between 0 and 1.
|
|
624
1106
|
*/
|
|
625
1107
|
rollover_fraction?: number;
|
|
1108
|
+
/**
|
|
1109
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1110
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1111
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1112
|
+
*/
|
|
1113
|
+
specifiers?: Array<RecurringCredit.Specifier>;
|
|
1114
|
+
/**
|
|
1115
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1116
|
+
*/
|
|
1117
|
+
subscription_config?: RecurringCredit.SubscriptionConfig;
|
|
626
1118
|
}
|
|
627
1119
|
namespace RecurringCredit {
|
|
628
1120
|
/**
|
|
@@ -630,8 +1122,8 @@ export declare namespace ContractRetrieveResponse {
|
|
|
630
1122
|
*/
|
|
631
1123
|
interface AccessAmount {
|
|
632
1124
|
credit_type_id: string;
|
|
633
|
-
quantity: number;
|
|
634
1125
|
unit_price: number;
|
|
1126
|
+
quantity?: number;
|
|
635
1127
|
}
|
|
636
1128
|
/**
|
|
637
1129
|
* The amount of time the created commits will be valid for
|
|
@@ -647,6 +1139,57 @@ export declare namespace ContractRetrieveResponse {
|
|
|
647
1139
|
interface Contract {
|
|
648
1140
|
id: string;
|
|
649
1141
|
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
1144
|
+
*/
|
|
1145
|
+
interface HierarchyConfiguration {
|
|
1146
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1147
|
+
}
|
|
1148
|
+
namespace HierarchyConfiguration {
|
|
1149
|
+
interface CommitHierarchyChildAccessAll {
|
|
1150
|
+
type: 'ALL';
|
|
1151
|
+
}
|
|
1152
|
+
interface CommitHierarchyChildAccessNone {
|
|
1153
|
+
type: 'NONE';
|
|
1154
|
+
}
|
|
1155
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
1156
|
+
contract_ids: Array<string>;
|
|
1157
|
+
type: 'CONTRACT_IDS';
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
interface Specifier {
|
|
1161
|
+
presentation_group_values?: {
|
|
1162
|
+
[key: string]: string;
|
|
1163
|
+
};
|
|
1164
|
+
pricing_group_values?: {
|
|
1165
|
+
[key: string]: string;
|
|
1166
|
+
};
|
|
1167
|
+
/**
|
|
1168
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1169
|
+
*/
|
|
1170
|
+
product_id?: string;
|
|
1171
|
+
/**
|
|
1172
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1173
|
+
* tags.
|
|
1174
|
+
*/
|
|
1175
|
+
product_tags?: Array<string>;
|
|
1176
|
+
}
|
|
1177
|
+
/**
|
|
1178
|
+
* Attach a subscription to the recurring commit/credit.
|
|
1179
|
+
*/
|
|
1180
|
+
interface SubscriptionConfig {
|
|
1181
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
1182
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
1183
|
+
subscription_id: string;
|
|
1184
|
+
}
|
|
1185
|
+
namespace SubscriptionConfig {
|
|
1186
|
+
interface ApplySeatIncreaseConfig {
|
|
1187
|
+
/**
|
|
1188
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
1189
|
+
*/
|
|
1190
|
+
is_prorated: boolean;
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
650
1193
|
}
|
|
651
1194
|
interface ResellerRoyalty {
|
|
652
1195
|
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
@@ -669,14 +1212,109 @@ export declare namespace ContractRetrieveResponse {
|
|
|
669
1212
|
reseller_contract_value?: number;
|
|
670
1213
|
}
|
|
671
1214
|
}
|
|
1215
|
+
interface SpendThresholdConfiguration {
|
|
1216
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
1217
|
+
/**
|
|
1218
|
+
* When set to false, the contract will not be evaluated against the
|
|
1219
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1220
|
+
* regardless of prior state.
|
|
1221
|
+
*/
|
|
1222
|
+
is_enabled: boolean;
|
|
1223
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
1224
|
+
/**
|
|
1225
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1226
|
+
* hits this amount, a threshold charge will be initiated.
|
|
1227
|
+
*/
|
|
1228
|
+
threshold_amount: number;
|
|
1229
|
+
}
|
|
1230
|
+
namespace SpendThresholdConfiguration {
|
|
1231
|
+
interface Commit {
|
|
1232
|
+
/**
|
|
1233
|
+
* The commit product that will be used to generate the line item for commit
|
|
1234
|
+
* payment.
|
|
1235
|
+
*/
|
|
1236
|
+
product_id: string;
|
|
1237
|
+
description?: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1240
|
+
* will default to the commit product name.
|
|
1241
|
+
*/
|
|
1242
|
+
name?: string;
|
|
1243
|
+
}
|
|
1244
|
+
interface PaymentGateConfig {
|
|
1245
|
+
/**
|
|
1246
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1247
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1248
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1249
|
+
* wish to payment gate the commit balance.
|
|
1250
|
+
*/
|
|
1251
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1252
|
+
/**
|
|
1253
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1254
|
+
*/
|
|
1255
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1256
|
+
/**
|
|
1257
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1258
|
+
*/
|
|
1259
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1260
|
+
/**
|
|
1261
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1262
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1263
|
+
* will default to NONE.
|
|
1264
|
+
*/
|
|
1265
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1266
|
+
}
|
|
1267
|
+
namespace PaymentGateConfig {
|
|
1268
|
+
/**
|
|
1269
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1270
|
+
*/
|
|
1271
|
+
interface PrecalculatedTaxConfig {
|
|
1272
|
+
/**
|
|
1273
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1274
|
+
* denomination as the commit's invoice schedule
|
|
1275
|
+
*/
|
|
1276
|
+
tax_amount: number;
|
|
1277
|
+
/**
|
|
1278
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1279
|
+
* description.
|
|
1280
|
+
*/
|
|
1281
|
+
tax_name?: string;
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1285
|
+
*/
|
|
1286
|
+
interface StripeConfig {
|
|
1287
|
+
/**
|
|
1288
|
+
* If left blank, will default to INVOICE
|
|
1289
|
+
*/
|
|
1290
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1291
|
+
/**
|
|
1292
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1293
|
+
* your payment type.
|
|
1294
|
+
*/
|
|
1295
|
+
invoice_metadata?: {
|
|
1296
|
+
[key: string]: string;
|
|
1297
|
+
};
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
672
1301
|
interface Subscription {
|
|
673
1302
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
674
1303
|
proration: Subscription.Proration;
|
|
1304
|
+
/**
|
|
1305
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
1306
|
+
* quantity and future quantity changes.
|
|
1307
|
+
*/
|
|
675
1308
|
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
676
1309
|
starting_at: string;
|
|
677
1310
|
subscription_rate: Subscription.SubscriptionRate;
|
|
1311
|
+
id?: string;
|
|
1312
|
+
custom_fields?: {
|
|
1313
|
+
[key: string]: string;
|
|
1314
|
+
};
|
|
678
1315
|
description?: string;
|
|
679
1316
|
ending_before?: string;
|
|
1317
|
+
fiat_credit_type_id?: string;
|
|
680
1318
|
name?: string;
|
|
681
1319
|
}
|
|
682
1320
|
namespace Subscription {
|
|
@@ -690,7 +1328,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
690
1328
|
ending_before?: string;
|
|
691
1329
|
}
|
|
692
1330
|
interface SubscriptionRate {
|
|
693
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1331
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
694
1332
|
product: SubscriptionRate.Product;
|
|
695
1333
|
}
|
|
696
1334
|
namespace SubscriptionRate {
|
|
@@ -700,42 +1338,6 @@ export declare namespace ContractRetrieveResponse {
|
|
|
700
1338
|
}
|
|
701
1339
|
}
|
|
702
1340
|
}
|
|
703
|
-
interface ThresholdBillingConfiguration {
|
|
704
|
-
commit: ThresholdBillingConfiguration.Commit;
|
|
705
|
-
/**
|
|
706
|
-
* When set to false, the contract will not be evaluated against the
|
|
707
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
708
|
-
* regardless of prior state
|
|
709
|
-
*/
|
|
710
|
-
is_enabled: boolean;
|
|
711
|
-
/**
|
|
712
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
713
|
-
* hits this amount, a threshold charge will be initiated.
|
|
714
|
-
*/
|
|
715
|
-
threshold_amount: number;
|
|
716
|
-
}
|
|
717
|
-
namespace ThresholdBillingConfiguration {
|
|
718
|
-
interface Commit {
|
|
719
|
-
product_id: string;
|
|
720
|
-
/**
|
|
721
|
-
* Which products the threshold commit applies to. If both applicable_product_ids
|
|
722
|
-
* and applicable_product_tags are not provided, the commit applies to all
|
|
723
|
-
* products.
|
|
724
|
-
*/
|
|
725
|
-
applicable_product_ids?: Array<string>;
|
|
726
|
-
/**
|
|
727
|
-
* Which tags the threshold commit applies to. If both applicable_product_ids and
|
|
728
|
-
* applicable_product_tags are not provided, the commit applies to all products.
|
|
729
|
-
*/
|
|
730
|
-
applicable_product_tags?: Array<string>;
|
|
731
|
-
description?: string;
|
|
732
|
-
/**
|
|
733
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
734
|
-
* will default to the commit product name.
|
|
735
|
-
*/
|
|
736
|
-
name?: string;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
1341
|
}
|
|
740
1342
|
}
|
|
741
1343
|
export interface ContractListResponse {
|
|
@@ -756,7 +1358,9 @@ export declare namespace ContractListResponse {
|
|
|
756
1358
|
usage_statement_schedule: Data.UsageStatementSchedule;
|
|
757
1359
|
archived_at?: string;
|
|
758
1360
|
credits?: Array<Data.Credit>;
|
|
759
|
-
custom_fields?:
|
|
1361
|
+
custom_fields?: {
|
|
1362
|
+
[key: string]: string;
|
|
1363
|
+
};
|
|
760
1364
|
/**
|
|
761
1365
|
* This field's availability is dependent on your client's configuration.
|
|
762
1366
|
*/
|
|
@@ -766,6 +1370,16 @@ export declare namespace ContractListResponse {
|
|
|
766
1370
|
*/
|
|
767
1371
|
discounts?: Array<Shared.Discount>;
|
|
768
1372
|
ending_before?: string;
|
|
1373
|
+
/**
|
|
1374
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
1375
|
+
* respective list endpoints to get the full lists.
|
|
1376
|
+
*/
|
|
1377
|
+
has_more?: Data.HasMore;
|
|
1378
|
+
/**
|
|
1379
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
1380
|
+
* configuration with a single parent.
|
|
1381
|
+
*/
|
|
1382
|
+
hierarchy_configuration?: Data.ParentHierarchyConfiguration | Data.ChildHierarchyConfiguration;
|
|
769
1383
|
/**
|
|
770
1384
|
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
771
1385
|
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
@@ -779,6 +1393,11 @@ export declare namespace ContractListResponse {
|
|
|
779
1393
|
* This field's availability is dependent on your client's configuration.
|
|
780
1394
|
*/
|
|
781
1395
|
netsuite_sales_order_id?: string;
|
|
1396
|
+
prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
|
|
1397
|
+
/**
|
|
1398
|
+
* Priority of the contract.
|
|
1399
|
+
*/
|
|
1400
|
+
priority?: number;
|
|
782
1401
|
/**
|
|
783
1402
|
* This field's availability is dependent on your client's configuration.
|
|
784
1403
|
*/
|
|
@@ -802,8 +1421,11 @@ export declare namespace ContractListResponse {
|
|
|
802
1421
|
* on a separate invoice from usage charges.
|
|
803
1422
|
*/
|
|
804
1423
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1424
|
+
spend_threshold_configuration?: Data.SpendThresholdConfiguration;
|
|
1425
|
+
/**
|
|
1426
|
+
* List of subscriptions on the contract.
|
|
1427
|
+
*/
|
|
805
1428
|
subscriptions?: Array<Data.Subscription>;
|
|
806
|
-
threshold_billing_configuration?: Data.ThresholdBillingConfiguration;
|
|
807
1429
|
total_contract_value?: number;
|
|
808
1430
|
/**
|
|
809
1431
|
* Prevents the creation of duplicates. If a request to create a record is made
|
|
@@ -825,6 +1447,7 @@ export declare namespace ContractListResponse {
|
|
|
825
1447
|
applicable_contract_ids?: Array<string>;
|
|
826
1448
|
applicable_product_ids?: Array<string>;
|
|
827
1449
|
applicable_product_tags?: Array<string>;
|
|
1450
|
+
archived_at?: string;
|
|
828
1451
|
/**
|
|
829
1452
|
* The current balance of the credit or commit. This balance reflects the amount of
|
|
830
1453
|
* credit or commit that the customer has access to use at this moment - thus,
|
|
@@ -837,8 +1460,14 @@ export declare namespace ContractListResponse {
|
|
|
837
1460
|
*/
|
|
838
1461
|
balance?: number;
|
|
839
1462
|
contract?: Commit.Contract;
|
|
840
|
-
custom_fields?:
|
|
1463
|
+
custom_fields?: {
|
|
1464
|
+
[key: string]: string;
|
|
1465
|
+
};
|
|
841
1466
|
description?: string;
|
|
1467
|
+
/**
|
|
1468
|
+
* Optional configuration for commit hierarchy access control
|
|
1469
|
+
*/
|
|
1470
|
+
hierarchy_configuration?: Commit.HierarchyConfiguration;
|
|
842
1471
|
/**
|
|
843
1472
|
* The contract that this commit will be billed on.
|
|
844
1473
|
*/
|
|
@@ -851,7 +1480,7 @@ export declare namespace ContractListResponse {
|
|
|
851
1480
|
* A list of ordered events that impact the balance of a commit. For example, an
|
|
852
1481
|
* invoice deduction or a rollover.
|
|
853
1482
|
*/
|
|
854
|
-
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
1483
|
+
ledger?: Array<Commit.PrepaidCommitSegmentStartLedgerEntry | Commit.PrepaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PrepaidCommitRolloverLedgerEntry | Commit.PrepaidCommitExpirationLedgerEntry | Commit.PrepaidCommitCanceledLedgerEntry | Commit.PrepaidCommitCreditedLedgerEntry | Commit.PrepaidCommitSeatBasedAdjustmentLedgerEntry | Commit.PostpaidCommitInitialBalanceLedgerEntry | Commit.PostpaidCommitAutomatedInvoiceDeductionLedgerEntry | Commit.PostpaidCommitRolloverLedgerEntry | Commit.PostpaidCommitTrueupLedgerEntry | Commit.PrepaidCommitManualLedgerEntry | Commit.PostpaidCommitManualLedgerEntry | Commit.PostpaidCommitExpirationLedgerEntry>;
|
|
855
1484
|
name?: string;
|
|
856
1485
|
/**
|
|
857
1486
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -869,6 +1498,12 @@ export declare namespace ContractListResponse {
|
|
|
869
1498
|
* This field's availability is dependent on your client's configuration.
|
|
870
1499
|
*/
|
|
871
1500
|
salesforce_opportunity_id?: string;
|
|
1501
|
+
/**
|
|
1502
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1503
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1504
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1505
|
+
*/
|
|
1506
|
+
specifiers?: Array<Commit.Specifier>;
|
|
872
1507
|
}
|
|
873
1508
|
namespace Commit {
|
|
874
1509
|
interface Product {
|
|
@@ -878,6 +1513,24 @@ export declare namespace ContractListResponse {
|
|
|
878
1513
|
interface Contract {
|
|
879
1514
|
id: string;
|
|
880
1515
|
}
|
|
1516
|
+
/**
|
|
1517
|
+
* Optional configuration for commit hierarchy access control
|
|
1518
|
+
*/
|
|
1519
|
+
interface HierarchyConfiguration {
|
|
1520
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1521
|
+
}
|
|
1522
|
+
namespace HierarchyConfiguration {
|
|
1523
|
+
interface CommitHierarchyChildAccessAll {
|
|
1524
|
+
type: 'ALL';
|
|
1525
|
+
}
|
|
1526
|
+
interface CommitHierarchyChildAccessNone {
|
|
1527
|
+
type: 'NONE';
|
|
1528
|
+
}
|
|
1529
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
1530
|
+
contract_ids: Array<string>;
|
|
1531
|
+
type: 'CONTRACT_IDS';
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
881
1534
|
/**
|
|
882
1535
|
* The contract that this commit will be billed on.
|
|
883
1536
|
*/
|
|
@@ -896,6 +1549,7 @@ export declare namespace ContractListResponse {
|
|
|
896
1549
|
segment_id: string;
|
|
897
1550
|
timestamp: string;
|
|
898
1551
|
type: 'PREPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
1552
|
+
contract_id?: string;
|
|
899
1553
|
}
|
|
900
1554
|
interface PrepaidCommitRolloverLedgerEntry {
|
|
901
1555
|
amount: number;
|
|
@@ -916,6 +1570,7 @@ export declare namespace ContractListResponse {
|
|
|
916
1570
|
segment_id: string;
|
|
917
1571
|
timestamp: string;
|
|
918
1572
|
type: 'PREPAID_COMMIT_CANCELED';
|
|
1573
|
+
contract_id?: string;
|
|
919
1574
|
}
|
|
920
1575
|
interface PrepaidCommitCreditedLedgerEntry {
|
|
921
1576
|
amount: number;
|
|
@@ -923,6 +1578,13 @@ export declare namespace ContractListResponse {
|
|
|
923
1578
|
segment_id: string;
|
|
924
1579
|
timestamp: string;
|
|
925
1580
|
type: 'PREPAID_COMMIT_CREDITED';
|
|
1581
|
+
contract_id?: string;
|
|
1582
|
+
}
|
|
1583
|
+
interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
1584
|
+
amount: number;
|
|
1585
|
+
segment_id: string;
|
|
1586
|
+
timestamp: string;
|
|
1587
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
926
1588
|
}
|
|
927
1589
|
interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
928
1590
|
amount: number;
|
|
@@ -935,6 +1597,7 @@ export declare namespace ContractListResponse {
|
|
|
935
1597
|
segment_id: string;
|
|
936
1598
|
timestamp: string;
|
|
937
1599
|
type: 'POSTPAID_COMMIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
1600
|
+
contract_id?: string;
|
|
938
1601
|
}
|
|
939
1602
|
interface PostpaidCommitRolloverLedgerEntry {
|
|
940
1603
|
amount: number;
|
|
@@ -948,6 +1611,7 @@ export declare namespace ContractListResponse {
|
|
|
948
1611
|
invoice_id: string;
|
|
949
1612
|
timestamp: string;
|
|
950
1613
|
type: 'POSTPAID_COMMIT_TRUEUP';
|
|
1614
|
+
contract_id?: string;
|
|
951
1615
|
}
|
|
952
1616
|
interface PrepaidCommitManualLedgerEntry {
|
|
953
1617
|
amount: number;
|
|
@@ -970,6 +1634,23 @@ export declare namespace ContractListResponse {
|
|
|
970
1634
|
commit_id: string;
|
|
971
1635
|
contract_id: string;
|
|
972
1636
|
}
|
|
1637
|
+
interface Specifier {
|
|
1638
|
+
presentation_group_values?: {
|
|
1639
|
+
[key: string]: string;
|
|
1640
|
+
};
|
|
1641
|
+
pricing_group_values?: {
|
|
1642
|
+
[key: string]: string;
|
|
1643
|
+
};
|
|
1644
|
+
/**
|
|
1645
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1646
|
+
*/
|
|
1647
|
+
product_id?: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1650
|
+
* tags.
|
|
1651
|
+
*/
|
|
1652
|
+
product_tags?: Array<string>;
|
|
1653
|
+
}
|
|
973
1654
|
}
|
|
974
1655
|
interface Override {
|
|
975
1656
|
id: string;
|
|
@@ -989,10 +1670,14 @@ export declare namespace ContractListResponse {
|
|
|
989
1670
|
}
|
|
990
1671
|
namespace Override {
|
|
991
1672
|
interface OverrideSpecifier {
|
|
992
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1673
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
993
1674
|
commit_ids?: Array<string>;
|
|
994
|
-
presentation_group_values?:
|
|
995
|
-
|
|
1675
|
+
presentation_group_values?: {
|
|
1676
|
+
[key: string]: string | null;
|
|
1677
|
+
};
|
|
1678
|
+
pricing_group_values?: {
|
|
1679
|
+
[key: string]: string;
|
|
1680
|
+
};
|
|
996
1681
|
product_id?: string;
|
|
997
1682
|
product_tags?: Array<string>;
|
|
998
1683
|
recurring_commit_ids?: Array<string>;
|
|
@@ -1009,7 +1694,9 @@ export declare namespace ContractListResponse {
|
|
|
1009
1694
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1010
1695
|
* processors.
|
|
1011
1696
|
*/
|
|
1012
|
-
custom_rate?:
|
|
1697
|
+
custom_rate?: {
|
|
1698
|
+
[key: string]: unknown;
|
|
1699
|
+
};
|
|
1013
1700
|
/**
|
|
1014
1701
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1015
1702
|
* set to true.
|
|
@@ -1058,7 +1745,7 @@ export declare namespace ContractListResponse {
|
|
|
1058
1745
|
* Contract usage statements follow a selected cadence based on this date.
|
|
1059
1746
|
*/
|
|
1060
1747
|
billing_anchor_date: string;
|
|
1061
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1748
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1062
1749
|
}
|
|
1063
1750
|
interface Credit {
|
|
1064
1751
|
id: string;
|
|
@@ -1083,13 +1770,19 @@ export declare namespace ContractListResponse {
|
|
|
1083
1770
|
*/
|
|
1084
1771
|
balance?: number;
|
|
1085
1772
|
contract?: Credit.Contract;
|
|
1086
|
-
custom_fields?:
|
|
1773
|
+
custom_fields?: {
|
|
1774
|
+
[key: string]: string;
|
|
1775
|
+
};
|
|
1087
1776
|
description?: string;
|
|
1777
|
+
/**
|
|
1778
|
+
* Optional configuration for credit hierarchy access control
|
|
1779
|
+
*/
|
|
1780
|
+
hierarchy_configuration?: Credit.HierarchyConfiguration;
|
|
1088
1781
|
/**
|
|
1089
1782
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
1090
1783
|
* invoice deduction or an expiration.
|
|
1091
1784
|
*/
|
|
1092
|
-
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry>;
|
|
1785
|
+
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry | Credit.CreditSeatBasedAdjustmentLedgerEntry>;
|
|
1093
1786
|
name?: string;
|
|
1094
1787
|
/**
|
|
1095
1788
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -1104,6 +1797,12 @@ export declare namespace ContractListResponse {
|
|
|
1104
1797
|
* This field's availability is dependent on your client's configuration.
|
|
1105
1798
|
*/
|
|
1106
1799
|
salesforce_opportunity_id?: string;
|
|
1800
|
+
/**
|
|
1801
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1802
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1803
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1804
|
+
*/
|
|
1805
|
+
specifiers?: Array<Credit.Specifier>;
|
|
1107
1806
|
}
|
|
1108
1807
|
namespace Credit {
|
|
1109
1808
|
interface Product {
|
|
@@ -1113,6 +1812,24 @@ export declare namespace ContractListResponse {
|
|
|
1113
1812
|
interface Contract {
|
|
1114
1813
|
id: string;
|
|
1115
1814
|
}
|
|
1815
|
+
/**
|
|
1816
|
+
* Optional configuration for credit hierarchy access control
|
|
1817
|
+
*/
|
|
1818
|
+
interface HierarchyConfiguration {
|
|
1819
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1820
|
+
}
|
|
1821
|
+
namespace HierarchyConfiguration {
|
|
1822
|
+
interface CommitHierarchyChildAccessAll {
|
|
1823
|
+
type: 'ALL';
|
|
1824
|
+
}
|
|
1825
|
+
interface CommitHierarchyChildAccessNone {
|
|
1826
|
+
type: 'NONE';
|
|
1827
|
+
}
|
|
1828
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
1829
|
+
contract_ids: Array<string>;
|
|
1830
|
+
type: 'CONTRACT_IDS';
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1116
1833
|
interface CreditSegmentStartLedgerEntry {
|
|
1117
1834
|
amount: number;
|
|
1118
1835
|
segment_id: string;
|
|
@@ -1125,6 +1842,7 @@ export declare namespace ContractListResponse {
|
|
|
1125
1842
|
segment_id: string;
|
|
1126
1843
|
timestamp: string;
|
|
1127
1844
|
type: 'CREDIT_AUTOMATED_INVOICE_DEDUCTION';
|
|
1845
|
+
contract_id?: string;
|
|
1128
1846
|
}
|
|
1129
1847
|
interface CreditExpirationLedgerEntry {
|
|
1130
1848
|
amount: number;
|
|
@@ -1138,6 +1856,7 @@ export declare namespace ContractListResponse {
|
|
|
1138
1856
|
segment_id: string;
|
|
1139
1857
|
timestamp: string;
|
|
1140
1858
|
type: 'CREDIT_CANCELED';
|
|
1859
|
+
contract_id?: string;
|
|
1141
1860
|
}
|
|
1142
1861
|
interface CreditCreditedLedgerEntry {
|
|
1143
1862
|
amount: number;
|
|
@@ -1145,6 +1864,7 @@ export declare namespace ContractListResponse {
|
|
|
1145
1864
|
segment_id: string;
|
|
1146
1865
|
timestamp: string;
|
|
1147
1866
|
type: 'CREDIT_CREDITED';
|
|
1867
|
+
contract_id?: string;
|
|
1148
1868
|
}
|
|
1149
1869
|
interface CreditManualLedgerEntry {
|
|
1150
1870
|
amount: number;
|
|
@@ -1152,14 +1872,221 @@ export declare namespace ContractListResponse {
|
|
|
1152
1872
|
timestamp: string;
|
|
1153
1873
|
type: 'CREDIT_MANUAL';
|
|
1154
1874
|
}
|
|
1875
|
+
interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
1876
|
+
amount: number;
|
|
1877
|
+
segment_id: string;
|
|
1878
|
+
timestamp: string;
|
|
1879
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1880
|
+
}
|
|
1881
|
+
interface Specifier {
|
|
1882
|
+
presentation_group_values?: {
|
|
1883
|
+
[key: string]: string;
|
|
1884
|
+
};
|
|
1885
|
+
pricing_group_values?: {
|
|
1886
|
+
[key: string]: string;
|
|
1887
|
+
};
|
|
1888
|
+
/**
|
|
1889
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1890
|
+
*/
|
|
1891
|
+
product_id?: string;
|
|
1892
|
+
/**
|
|
1893
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1894
|
+
* tags.
|
|
1895
|
+
*/
|
|
1896
|
+
product_tags?: Array<string>;
|
|
1897
|
+
}
|
|
1155
1898
|
}
|
|
1156
1899
|
/**
|
|
1157
1900
|
* This field's availability is dependent on your client's configuration.
|
|
1158
1901
|
*/
|
|
1159
1902
|
interface CustomerBillingProviderConfiguration {
|
|
1903
|
+
/**
|
|
1904
|
+
* ID of Customer's billing provider configuration.
|
|
1905
|
+
*/
|
|
1906
|
+
id: string;
|
|
1160
1907
|
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
1161
1908
|
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
1162
1909
|
}
|
|
1910
|
+
/**
|
|
1911
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
1912
|
+
* respective list endpoints to get the full lists.
|
|
1913
|
+
*/
|
|
1914
|
+
interface HasMore {
|
|
1915
|
+
/**
|
|
1916
|
+
* Whether there are more commits on this contract than the limit for this
|
|
1917
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
1918
|
+
* of commits.
|
|
1919
|
+
*/
|
|
1920
|
+
commits: boolean;
|
|
1921
|
+
/**
|
|
1922
|
+
* Whether there are more credits on this contract than the limit for this
|
|
1923
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
1924
|
+
* of credits.
|
|
1925
|
+
*/
|
|
1926
|
+
credits: boolean;
|
|
1927
|
+
}
|
|
1928
|
+
interface ParentHierarchyConfiguration {
|
|
1929
|
+
/**
|
|
1930
|
+
* List of contracts that belong to this parent.
|
|
1931
|
+
*/
|
|
1932
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
1933
|
+
}
|
|
1934
|
+
namespace ParentHierarchyConfiguration {
|
|
1935
|
+
interface Child {
|
|
1936
|
+
contract_id: string;
|
|
1937
|
+
customer_id: string;
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
interface ChildHierarchyConfiguration {
|
|
1941
|
+
/**
|
|
1942
|
+
* The single parent contract/customer for this child.
|
|
1943
|
+
*/
|
|
1944
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
1945
|
+
}
|
|
1946
|
+
namespace ChildHierarchyConfiguration {
|
|
1947
|
+
/**
|
|
1948
|
+
* The single parent contract/customer for this child.
|
|
1949
|
+
*/
|
|
1950
|
+
interface Parent {
|
|
1951
|
+
contract_id: string;
|
|
1952
|
+
customer_id: string;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
interface PrepaidBalanceThresholdConfiguration {
|
|
1956
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
1957
|
+
/**
|
|
1958
|
+
* When set to false, the contract will not be evaluated against the
|
|
1959
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1960
|
+
* regardless of prior state.
|
|
1961
|
+
*/
|
|
1962
|
+
is_enabled: boolean;
|
|
1963
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
1964
|
+
/**
|
|
1965
|
+
* Specify the amount the balance should be recharged to.
|
|
1966
|
+
*/
|
|
1967
|
+
recharge_to_amount: number;
|
|
1968
|
+
/**
|
|
1969
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
1970
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
1971
|
+
*/
|
|
1972
|
+
threshold_amount: number;
|
|
1973
|
+
/**
|
|
1974
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
1975
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
1976
|
+
*/
|
|
1977
|
+
custom_credit_type_id?: string;
|
|
1978
|
+
}
|
|
1979
|
+
namespace PrepaidBalanceThresholdConfiguration {
|
|
1980
|
+
interface Commit {
|
|
1981
|
+
/**
|
|
1982
|
+
* The commit product that will be used to generate the line item for commit
|
|
1983
|
+
* payment.
|
|
1984
|
+
*/
|
|
1985
|
+
product_id: string;
|
|
1986
|
+
/**
|
|
1987
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
1988
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1989
|
+
* all products.
|
|
1990
|
+
*/
|
|
1991
|
+
applicable_product_ids?: Array<string>;
|
|
1992
|
+
/**
|
|
1993
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
1994
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1995
|
+
* all products.
|
|
1996
|
+
*/
|
|
1997
|
+
applicable_product_tags?: Array<string>;
|
|
1998
|
+
description?: string;
|
|
1999
|
+
/**
|
|
2000
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
2001
|
+
* will default to the commit product name.
|
|
2002
|
+
*/
|
|
2003
|
+
name?: string;
|
|
2004
|
+
/**
|
|
2005
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2006
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2007
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2008
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2009
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
2010
|
+
* body of `specifiers`.
|
|
2011
|
+
*/
|
|
2012
|
+
specifiers?: Array<Commit.Specifier>;
|
|
2013
|
+
}
|
|
2014
|
+
namespace Commit {
|
|
2015
|
+
interface Specifier {
|
|
2016
|
+
presentation_group_values?: {
|
|
2017
|
+
[key: string]: string;
|
|
2018
|
+
};
|
|
2019
|
+
pricing_group_values?: {
|
|
2020
|
+
[key: string]: string;
|
|
2021
|
+
};
|
|
2022
|
+
/**
|
|
2023
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2024
|
+
*/
|
|
2025
|
+
product_id?: string;
|
|
2026
|
+
/**
|
|
2027
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2028
|
+
* tags.
|
|
2029
|
+
*/
|
|
2030
|
+
product_tags?: Array<string>;
|
|
2031
|
+
}
|
|
2032
|
+
}
|
|
2033
|
+
interface PaymentGateConfig {
|
|
2034
|
+
/**
|
|
2035
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2036
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2037
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2038
|
+
* wish to payment gate the commit balance.
|
|
2039
|
+
*/
|
|
2040
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2041
|
+
/**
|
|
2042
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2043
|
+
*/
|
|
2044
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2045
|
+
/**
|
|
2046
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2047
|
+
*/
|
|
2048
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2049
|
+
/**
|
|
2050
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2051
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2052
|
+
* will default to NONE.
|
|
2053
|
+
*/
|
|
2054
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2055
|
+
}
|
|
2056
|
+
namespace PaymentGateConfig {
|
|
2057
|
+
/**
|
|
2058
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2059
|
+
*/
|
|
2060
|
+
interface PrecalculatedTaxConfig {
|
|
2061
|
+
/**
|
|
2062
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2063
|
+
* denomination as the commit's invoice schedule
|
|
2064
|
+
*/
|
|
2065
|
+
tax_amount: number;
|
|
2066
|
+
/**
|
|
2067
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2068
|
+
* description.
|
|
2069
|
+
*/
|
|
2070
|
+
tax_name?: string;
|
|
2071
|
+
}
|
|
2072
|
+
/**
|
|
2073
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2074
|
+
*/
|
|
2075
|
+
interface StripeConfig {
|
|
2076
|
+
/**
|
|
2077
|
+
* If left blank, will default to INVOICE
|
|
2078
|
+
*/
|
|
2079
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
2080
|
+
/**
|
|
2081
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2082
|
+
* your payment type.
|
|
2083
|
+
*/
|
|
2084
|
+
invoice_metadata?: {
|
|
2085
|
+
[key: string]: string;
|
|
2086
|
+
};
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
1163
2090
|
interface RecurringCommit {
|
|
1164
2091
|
id: string;
|
|
1165
2092
|
/**
|
|
@@ -1200,6 +2127,10 @@ export declare namespace ContractListResponse {
|
|
|
1200
2127
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
1201
2128
|
*/
|
|
1202
2129
|
ending_before?: string;
|
|
2130
|
+
/**
|
|
2131
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
2132
|
+
*/
|
|
2133
|
+
hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
|
|
1203
2134
|
/**
|
|
1204
2135
|
* The amount the customer should be billed for the commit. Not required.
|
|
1205
2136
|
*/
|
|
@@ -1221,16 +2152,26 @@ export declare namespace ContractListResponse {
|
|
|
1221
2152
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1222
2153
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1223
2154
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1224
|
-
* be created aligned with the recurring commit's
|
|
2155
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1225
2156
|
* invoice dates.
|
|
1226
2157
|
*/
|
|
1227
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2158
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1228
2159
|
/**
|
|
1229
2160
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1230
2161
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1231
2162
|
* between 0 and 1.
|
|
1232
2163
|
*/
|
|
1233
2164
|
rollover_fraction?: number;
|
|
2165
|
+
/**
|
|
2166
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2167
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2168
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
2169
|
+
*/
|
|
2170
|
+
specifiers?: Array<RecurringCommit.Specifier>;
|
|
2171
|
+
/**
|
|
2172
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2173
|
+
*/
|
|
2174
|
+
subscription_config?: RecurringCommit.SubscriptionConfig;
|
|
1234
2175
|
}
|
|
1235
2176
|
namespace RecurringCommit {
|
|
1236
2177
|
/**
|
|
@@ -1238,8 +2179,8 @@ export declare namespace ContractListResponse {
|
|
|
1238
2179
|
*/
|
|
1239
2180
|
interface AccessAmount {
|
|
1240
2181
|
credit_type_id: string;
|
|
1241
|
-
quantity: number;
|
|
1242
2182
|
unit_price: number;
|
|
2183
|
+
quantity?: number;
|
|
1243
2184
|
}
|
|
1244
2185
|
/**
|
|
1245
2186
|
* The amount of time the created commits will be valid for
|
|
@@ -1255,6 +2196,24 @@ export declare namespace ContractListResponse {
|
|
|
1255
2196
|
interface Contract {
|
|
1256
2197
|
id: string;
|
|
1257
2198
|
}
|
|
2199
|
+
/**
|
|
2200
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
2201
|
+
*/
|
|
2202
|
+
interface HierarchyConfiguration {
|
|
2203
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2204
|
+
}
|
|
2205
|
+
namespace HierarchyConfiguration {
|
|
2206
|
+
interface CommitHierarchyChildAccessAll {
|
|
2207
|
+
type: 'ALL';
|
|
2208
|
+
}
|
|
2209
|
+
interface CommitHierarchyChildAccessNone {
|
|
2210
|
+
type: 'NONE';
|
|
2211
|
+
}
|
|
2212
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2213
|
+
contract_ids: Array<string>;
|
|
2214
|
+
type: 'CONTRACT_IDS';
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
1258
2217
|
/**
|
|
1259
2218
|
* The amount the customer should be billed for the commit. Not required.
|
|
1260
2219
|
*/
|
|
@@ -1263,6 +2222,39 @@ export declare namespace ContractListResponse {
|
|
|
1263
2222
|
quantity: number;
|
|
1264
2223
|
unit_price: number;
|
|
1265
2224
|
}
|
|
2225
|
+
interface Specifier {
|
|
2226
|
+
presentation_group_values?: {
|
|
2227
|
+
[key: string]: string;
|
|
2228
|
+
};
|
|
2229
|
+
pricing_group_values?: {
|
|
2230
|
+
[key: string]: string;
|
|
2231
|
+
};
|
|
2232
|
+
/**
|
|
2233
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2234
|
+
*/
|
|
2235
|
+
product_id?: string;
|
|
2236
|
+
/**
|
|
2237
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2238
|
+
* tags.
|
|
2239
|
+
*/
|
|
2240
|
+
product_tags?: Array<string>;
|
|
2241
|
+
}
|
|
2242
|
+
/**
|
|
2243
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2244
|
+
*/
|
|
2245
|
+
interface SubscriptionConfig {
|
|
2246
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
2247
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
2248
|
+
subscription_id: string;
|
|
2249
|
+
}
|
|
2250
|
+
namespace SubscriptionConfig {
|
|
2251
|
+
interface ApplySeatIncreaseConfig {
|
|
2252
|
+
/**
|
|
2253
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
2254
|
+
*/
|
|
2255
|
+
is_prorated: boolean;
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
1266
2258
|
}
|
|
1267
2259
|
interface RecurringCredit {
|
|
1268
2260
|
id: string;
|
|
@@ -1304,6 +2296,10 @@ export declare namespace ContractListResponse {
|
|
|
1304
2296
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
1305
2297
|
*/
|
|
1306
2298
|
ending_before?: string;
|
|
2299
|
+
/**
|
|
2300
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
2301
|
+
*/
|
|
2302
|
+
hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
|
|
1307
2303
|
/**
|
|
1308
2304
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
1309
2305
|
*/
|
|
@@ -1321,16 +2317,26 @@ export declare namespace ContractListResponse {
|
|
|
1321
2317
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1322
2318
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1323
2319
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1324
|
-
* be created aligned with the recurring commit's
|
|
2320
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1325
2321
|
* invoice dates.
|
|
1326
2322
|
*/
|
|
1327
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2323
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1328
2324
|
/**
|
|
1329
2325
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1330
2326
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1331
2327
|
* between 0 and 1.
|
|
1332
2328
|
*/
|
|
1333
2329
|
rollover_fraction?: number;
|
|
2330
|
+
/**
|
|
2331
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2332
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2333
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
2334
|
+
*/
|
|
2335
|
+
specifiers?: Array<RecurringCredit.Specifier>;
|
|
2336
|
+
/**
|
|
2337
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2338
|
+
*/
|
|
2339
|
+
subscription_config?: RecurringCredit.SubscriptionConfig;
|
|
1334
2340
|
}
|
|
1335
2341
|
namespace RecurringCredit {
|
|
1336
2342
|
/**
|
|
@@ -1338,8 +2344,8 @@ export declare namespace ContractListResponse {
|
|
|
1338
2344
|
*/
|
|
1339
2345
|
interface AccessAmount {
|
|
1340
2346
|
credit_type_id: string;
|
|
1341
|
-
quantity: number;
|
|
1342
2347
|
unit_price: number;
|
|
2348
|
+
quantity?: number;
|
|
1343
2349
|
}
|
|
1344
2350
|
/**
|
|
1345
2351
|
* The amount of time the created commits will be valid for
|
|
@@ -1355,6 +2361,57 @@ export declare namespace ContractListResponse {
|
|
|
1355
2361
|
interface Contract {
|
|
1356
2362
|
id: string;
|
|
1357
2363
|
}
|
|
2364
|
+
/**
|
|
2365
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
2366
|
+
*/
|
|
2367
|
+
interface HierarchyConfiguration {
|
|
2368
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2369
|
+
}
|
|
2370
|
+
namespace HierarchyConfiguration {
|
|
2371
|
+
interface CommitHierarchyChildAccessAll {
|
|
2372
|
+
type: 'ALL';
|
|
2373
|
+
}
|
|
2374
|
+
interface CommitHierarchyChildAccessNone {
|
|
2375
|
+
type: 'NONE';
|
|
2376
|
+
}
|
|
2377
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2378
|
+
contract_ids: Array<string>;
|
|
2379
|
+
type: 'CONTRACT_IDS';
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
interface Specifier {
|
|
2383
|
+
presentation_group_values?: {
|
|
2384
|
+
[key: string]: string;
|
|
2385
|
+
};
|
|
2386
|
+
pricing_group_values?: {
|
|
2387
|
+
[key: string]: string;
|
|
2388
|
+
};
|
|
2389
|
+
/**
|
|
2390
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2391
|
+
*/
|
|
2392
|
+
product_id?: string;
|
|
2393
|
+
/**
|
|
2394
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2395
|
+
* tags.
|
|
2396
|
+
*/
|
|
2397
|
+
product_tags?: Array<string>;
|
|
2398
|
+
}
|
|
2399
|
+
/**
|
|
2400
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2401
|
+
*/
|
|
2402
|
+
interface SubscriptionConfig {
|
|
2403
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
2404
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
2405
|
+
subscription_id: string;
|
|
2406
|
+
}
|
|
2407
|
+
namespace SubscriptionConfig {
|
|
2408
|
+
interface ApplySeatIncreaseConfig {
|
|
2409
|
+
/**
|
|
2410
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
2411
|
+
*/
|
|
2412
|
+
is_prorated: boolean;
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
1358
2415
|
}
|
|
1359
2416
|
interface ResellerRoyalty {
|
|
1360
2417
|
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
@@ -1377,72 +2434,131 @@ export declare namespace ContractListResponse {
|
|
|
1377
2434
|
reseller_contract_value?: number;
|
|
1378
2435
|
}
|
|
1379
2436
|
}
|
|
1380
|
-
interface
|
|
1381
|
-
|
|
1382
|
-
proration: Subscription.Proration;
|
|
1383
|
-
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
1384
|
-
starting_at: string;
|
|
1385
|
-
subscription_rate: Subscription.SubscriptionRate;
|
|
1386
|
-
description?: string;
|
|
1387
|
-
ending_before?: string;
|
|
1388
|
-
name?: string;
|
|
1389
|
-
}
|
|
1390
|
-
namespace Subscription {
|
|
1391
|
-
interface Proration {
|
|
1392
|
-
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
1393
|
-
is_prorated: boolean;
|
|
1394
|
-
}
|
|
1395
|
-
interface QuantitySchedule {
|
|
1396
|
-
quantity: number;
|
|
1397
|
-
starting_at: string;
|
|
1398
|
-
ending_before?: string;
|
|
1399
|
-
}
|
|
1400
|
-
interface SubscriptionRate {
|
|
1401
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1402
|
-
product: SubscriptionRate.Product;
|
|
1403
|
-
}
|
|
1404
|
-
namespace SubscriptionRate {
|
|
1405
|
-
interface Product {
|
|
1406
|
-
id: string;
|
|
1407
|
-
name: string;
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
}
|
|
1411
|
-
interface ThresholdBillingConfiguration {
|
|
1412
|
-
commit: ThresholdBillingConfiguration.Commit;
|
|
2437
|
+
interface SpendThresholdConfiguration {
|
|
2438
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
1413
2439
|
/**
|
|
1414
2440
|
* When set to false, the contract will not be evaluated against the
|
|
1415
2441
|
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1416
|
-
* regardless of prior state
|
|
2442
|
+
* regardless of prior state.
|
|
1417
2443
|
*/
|
|
1418
2444
|
is_enabled: boolean;
|
|
2445
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
1419
2446
|
/**
|
|
1420
2447
|
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1421
2448
|
* hits this amount, a threshold charge will be initiated.
|
|
1422
2449
|
*/
|
|
1423
2450
|
threshold_amount: number;
|
|
1424
2451
|
}
|
|
1425
|
-
namespace
|
|
2452
|
+
namespace SpendThresholdConfiguration {
|
|
1426
2453
|
interface Commit {
|
|
1427
|
-
product_id: string;
|
|
1428
2454
|
/**
|
|
1429
|
-
*
|
|
1430
|
-
*
|
|
1431
|
-
* products.
|
|
2455
|
+
* The commit product that will be used to generate the line item for commit
|
|
2456
|
+
* payment.
|
|
1432
2457
|
*/
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
* Which tags the threshold commit applies to. If both applicable_product_ids and
|
|
1436
|
-
* applicable_product_tags are not provided, the commit applies to all products.
|
|
1437
|
-
*/
|
|
1438
|
-
applicable_product_tags?: Array<string>;
|
|
1439
|
-
description?: string;
|
|
2458
|
+
product_id: string;
|
|
2459
|
+
description?: string;
|
|
1440
2460
|
/**
|
|
1441
2461
|
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1442
2462
|
* will default to the commit product name.
|
|
1443
2463
|
*/
|
|
1444
2464
|
name?: string;
|
|
1445
2465
|
}
|
|
2466
|
+
interface PaymentGateConfig {
|
|
2467
|
+
/**
|
|
2468
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2469
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2470
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2471
|
+
* wish to payment gate the commit balance.
|
|
2472
|
+
*/
|
|
2473
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2474
|
+
/**
|
|
2475
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2476
|
+
*/
|
|
2477
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2478
|
+
/**
|
|
2479
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2480
|
+
*/
|
|
2481
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2482
|
+
/**
|
|
2483
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2484
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2485
|
+
* will default to NONE.
|
|
2486
|
+
*/
|
|
2487
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2488
|
+
}
|
|
2489
|
+
namespace PaymentGateConfig {
|
|
2490
|
+
/**
|
|
2491
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2492
|
+
*/
|
|
2493
|
+
interface PrecalculatedTaxConfig {
|
|
2494
|
+
/**
|
|
2495
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2496
|
+
* denomination as the commit's invoice schedule
|
|
2497
|
+
*/
|
|
2498
|
+
tax_amount: number;
|
|
2499
|
+
/**
|
|
2500
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2501
|
+
* description.
|
|
2502
|
+
*/
|
|
2503
|
+
tax_name?: string;
|
|
2504
|
+
}
|
|
2505
|
+
/**
|
|
2506
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2507
|
+
*/
|
|
2508
|
+
interface StripeConfig {
|
|
2509
|
+
/**
|
|
2510
|
+
* If left blank, will default to INVOICE
|
|
2511
|
+
*/
|
|
2512
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
2513
|
+
/**
|
|
2514
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2515
|
+
* your payment type.
|
|
2516
|
+
*/
|
|
2517
|
+
invoice_metadata?: {
|
|
2518
|
+
[key: string]: string;
|
|
2519
|
+
};
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
}
|
|
2523
|
+
interface Subscription {
|
|
2524
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
2525
|
+
proration: Subscription.Proration;
|
|
2526
|
+
/**
|
|
2527
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
2528
|
+
* quantity and future quantity changes.
|
|
2529
|
+
*/
|
|
2530
|
+
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
2531
|
+
starting_at: string;
|
|
2532
|
+
subscription_rate: Subscription.SubscriptionRate;
|
|
2533
|
+
id?: string;
|
|
2534
|
+
custom_fields?: {
|
|
2535
|
+
[key: string]: string;
|
|
2536
|
+
};
|
|
2537
|
+
description?: string;
|
|
2538
|
+
ending_before?: string;
|
|
2539
|
+
fiat_credit_type_id?: string;
|
|
2540
|
+
name?: string;
|
|
2541
|
+
}
|
|
2542
|
+
namespace Subscription {
|
|
2543
|
+
interface Proration {
|
|
2544
|
+
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
2545
|
+
is_prorated: boolean;
|
|
2546
|
+
}
|
|
2547
|
+
interface QuantitySchedule {
|
|
2548
|
+
quantity: number;
|
|
2549
|
+
starting_at: string;
|
|
2550
|
+
ending_before?: string;
|
|
2551
|
+
}
|
|
2552
|
+
interface SubscriptionRate {
|
|
2553
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2554
|
+
product: SubscriptionRate.Product;
|
|
2555
|
+
}
|
|
2556
|
+
namespace SubscriptionRate {
|
|
2557
|
+
interface Product {
|
|
2558
|
+
id: string;
|
|
2559
|
+
name: string;
|
|
2560
|
+
}
|
|
2561
|
+
}
|
|
1446
2562
|
}
|
|
1447
2563
|
}
|
|
1448
2564
|
}
|
|
@@ -1465,19 +2581,42 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1465
2581
|
add_credits?: Array<Data.AddCredit>;
|
|
1466
2582
|
add_discounts?: Array<Shared.Discount>;
|
|
1467
2583
|
add_overrides?: Array<Data.AddOverride>;
|
|
2584
|
+
add_prepaid_balance_threshold_configuration?: Data.AddPrepaidBalanceThresholdConfiguration;
|
|
1468
2585
|
add_pro_services?: Array<Shared.ProService>;
|
|
1469
2586
|
add_recurring_commits?: Array<Data.AddRecurringCommit>;
|
|
1470
2587
|
add_recurring_credits?: Array<Data.AddRecurringCredit>;
|
|
1471
2588
|
add_reseller_royalties?: Array<Data.AddResellerRoyalty>;
|
|
1472
2589
|
add_scheduled_charges?: Array<Data.AddScheduledCharge>;
|
|
2590
|
+
add_spend_threshold_configuration?: Data.AddSpendThresholdConfiguration;
|
|
2591
|
+
/**
|
|
2592
|
+
* List of subscriptions on the contract.
|
|
2593
|
+
*/
|
|
2594
|
+
add_subscriptions?: Array<Data.AddSubscription>;
|
|
1473
2595
|
add_usage_filters?: Array<Data.AddUsageFilter>;
|
|
2596
|
+
archive_commits?: Array<Data.ArchiveCommit>;
|
|
2597
|
+
archive_credits?: Array<Data.ArchiveCredit>;
|
|
2598
|
+
archive_scheduled_charges?: Array<Data.ArchiveScheduledCharge>;
|
|
2599
|
+
remove_overrides?: Array<Data.RemoveOverride>;
|
|
1474
2600
|
timestamp?: string;
|
|
1475
2601
|
update_commits?: Array<Data.UpdateCommit>;
|
|
1476
2602
|
update_contract_end_date?: string;
|
|
2603
|
+
/**
|
|
2604
|
+
* Value to update the contract name to. If not provided, the contract name will
|
|
2605
|
+
* remain unchanged.
|
|
2606
|
+
*/
|
|
2607
|
+
update_contract_name?: string | null;
|
|
1477
2608
|
update_credits?: Array<Data.UpdateCredit>;
|
|
1478
2609
|
update_discounts?: Array<Data.UpdateDiscount>;
|
|
2610
|
+
update_prepaid_balance_threshold_configuration?: Data.UpdatePrepaidBalanceThresholdConfiguration;
|
|
2611
|
+
update_recurring_commits?: Array<Data.UpdateRecurringCommit>;
|
|
2612
|
+
update_recurring_credits?: Array<Data.UpdateRecurringCredit>;
|
|
1479
2613
|
update_refund_invoices?: Array<Data.UpdateRefundInvoice>;
|
|
1480
2614
|
update_scheduled_charges?: Array<Data.UpdateScheduledCharge>;
|
|
2615
|
+
update_spend_threshold_configuration?: Data.UpdateSpendThresholdConfiguration;
|
|
2616
|
+
/**
|
|
2617
|
+
* Optional list of subscriptions to update.
|
|
2618
|
+
*/
|
|
2619
|
+
update_subscriptions?: Array<Data.UpdateSubscription>;
|
|
1481
2620
|
}
|
|
1482
2621
|
namespace Data {
|
|
1483
2622
|
interface AddCommit {
|
|
@@ -1492,6 +2631,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1492
2631
|
applicable_product_ids?: Array<string>;
|
|
1493
2632
|
applicable_product_tags?: Array<string>;
|
|
1494
2633
|
description?: string;
|
|
2634
|
+
/**
|
|
2635
|
+
* Optional configuration for commit hierarchy access control
|
|
2636
|
+
*/
|
|
2637
|
+
hierarchy_configuration?: AddCommit.HierarchyConfiguration;
|
|
1495
2638
|
/**
|
|
1496
2639
|
* The schedule that the customer will be invoiced for this commit.
|
|
1497
2640
|
*/
|
|
@@ -1512,12 +2655,56 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1512
2655
|
* This field's availability is dependent on your client's configuration.
|
|
1513
2656
|
*/
|
|
1514
2657
|
salesforce_opportunity_id?: string;
|
|
2658
|
+
/**
|
|
2659
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2660
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2661
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2662
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2663
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
2664
|
+
* body of `specifiers`.
|
|
2665
|
+
*/
|
|
2666
|
+
specifiers?: Array<AddCommit.Specifier>;
|
|
1515
2667
|
}
|
|
1516
2668
|
namespace AddCommit {
|
|
1517
2669
|
interface Product {
|
|
1518
2670
|
id: string;
|
|
1519
2671
|
name: string;
|
|
1520
2672
|
}
|
|
2673
|
+
/**
|
|
2674
|
+
* Optional configuration for commit hierarchy access control
|
|
2675
|
+
*/
|
|
2676
|
+
interface HierarchyConfiguration {
|
|
2677
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2678
|
+
}
|
|
2679
|
+
namespace HierarchyConfiguration {
|
|
2680
|
+
interface CommitHierarchyChildAccessAll {
|
|
2681
|
+
type: 'ALL';
|
|
2682
|
+
}
|
|
2683
|
+
interface CommitHierarchyChildAccessNone {
|
|
2684
|
+
type: 'NONE';
|
|
2685
|
+
}
|
|
2686
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2687
|
+
contract_ids: Array<string>;
|
|
2688
|
+
type: 'CONTRACT_IDS';
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
interface Specifier {
|
|
2692
|
+
presentation_group_values?: {
|
|
2693
|
+
[key: string]: string;
|
|
2694
|
+
};
|
|
2695
|
+
pricing_group_values?: {
|
|
2696
|
+
[key: string]: string;
|
|
2697
|
+
};
|
|
2698
|
+
/**
|
|
2699
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2700
|
+
*/
|
|
2701
|
+
product_id?: string;
|
|
2702
|
+
/**
|
|
2703
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2704
|
+
* tags.
|
|
2705
|
+
*/
|
|
2706
|
+
product_tags?: Array<string>;
|
|
2707
|
+
}
|
|
1521
2708
|
}
|
|
1522
2709
|
interface AddCredit {
|
|
1523
2710
|
id: string;
|
|
@@ -1530,6 +2717,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1530
2717
|
applicable_product_ids?: Array<string>;
|
|
1531
2718
|
applicable_product_tags?: Array<string>;
|
|
1532
2719
|
description?: string;
|
|
2720
|
+
/**
|
|
2721
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
2722
|
+
*/
|
|
2723
|
+
hierarchy_configuration?: AddCredit.HierarchyConfiguration;
|
|
1533
2724
|
name?: string;
|
|
1534
2725
|
/**
|
|
1535
2726
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -1544,12 +2735,56 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1544
2735
|
* This field's availability is dependent on your client's configuration.
|
|
1545
2736
|
*/
|
|
1546
2737
|
salesforce_opportunity_id?: string;
|
|
2738
|
+
/**
|
|
2739
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2740
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2741
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2742
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2743
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
2744
|
+
* body of `specifiers`.
|
|
2745
|
+
*/
|
|
2746
|
+
specifiers?: Array<AddCredit.Specifier>;
|
|
1547
2747
|
}
|
|
1548
2748
|
namespace AddCredit {
|
|
1549
2749
|
interface Product {
|
|
1550
2750
|
id: string;
|
|
1551
2751
|
name: string;
|
|
1552
2752
|
}
|
|
2753
|
+
/**
|
|
2754
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
2755
|
+
*/
|
|
2756
|
+
interface HierarchyConfiguration {
|
|
2757
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2758
|
+
}
|
|
2759
|
+
namespace HierarchyConfiguration {
|
|
2760
|
+
interface CommitHierarchyChildAccessAll {
|
|
2761
|
+
type: 'ALL';
|
|
2762
|
+
}
|
|
2763
|
+
interface CommitHierarchyChildAccessNone {
|
|
2764
|
+
type: 'NONE';
|
|
2765
|
+
}
|
|
2766
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2767
|
+
contract_ids: Array<string>;
|
|
2768
|
+
type: 'CONTRACT_IDS';
|
|
2769
|
+
}
|
|
2770
|
+
}
|
|
2771
|
+
interface Specifier {
|
|
2772
|
+
presentation_group_values?: {
|
|
2773
|
+
[key: string]: string;
|
|
2774
|
+
};
|
|
2775
|
+
pricing_group_values?: {
|
|
2776
|
+
[key: string]: string;
|
|
2777
|
+
};
|
|
2778
|
+
/**
|
|
2779
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2780
|
+
*/
|
|
2781
|
+
product_id?: string;
|
|
2782
|
+
/**
|
|
2783
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2784
|
+
* tags.
|
|
2785
|
+
*/
|
|
2786
|
+
product_tags?: Array<string>;
|
|
2787
|
+
}
|
|
1553
2788
|
}
|
|
1554
2789
|
interface AddOverride {
|
|
1555
2790
|
id: string;
|
|
@@ -1569,10 +2804,14 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1569
2804
|
}
|
|
1570
2805
|
namespace AddOverride {
|
|
1571
2806
|
interface OverrideSpecifier {
|
|
1572
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2807
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1573
2808
|
commit_ids?: Array<string>;
|
|
1574
|
-
presentation_group_values?:
|
|
1575
|
-
|
|
2809
|
+
presentation_group_values?: {
|
|
2810
|
+
[key: string]: string | null;
|
|
2811
|
+
};
|
|
2812
|
+
pricing_group_values?: {
|
|
2813
|
+
[key: string]: string;
|
|
2814
|
+
};
|
|
1576
2815
|
product_id?: string;
|
|
1577
2816
|
product_tags?: Array<string>;
|
|
1578
2817
|
recurring_commit_ids?: Array<string>;
|
|
@@ -1589,7 +2828,9 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1589
2828
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1590
2829
|
* processors.
|
|
1591
2830
|
*/
|
|
1592
|
-
custom_rate?:
|
|
2831
|
+
custom_rate?: {
|
|
2832
|
+
[key: string]: unknown;
|
|
2833
|
+
};
|
|
1593
2834
|
/**
|
|
1594
2835
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1595
2836
|
* set to true.
|
|
@@ -1614,6 +2855,141 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1614
2855
|
name: string;
|
|
1615
2856
|
}
|
|
1616
2857
|
}
|
|
2858
|
+
interface AddPrepaidBalanceThresholdConfiguration {
|
|
2859
|
+
commit: AddPrepaidBalanceThresholdConfiguration.Commit;
|
|
2860
|
+
/**
|
|
2861
|
+
* When set to false, the contract will not be evaluated against the
|
|
2862
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2863
|
+
* regardless of prior state.
|
|
2864
|
+
*/
|
|
2865
|
+
is_enabled: boolean;
|
|
2866
|
+
payment_gate_config: AddPrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
2867
|
+
/**
|
|
2868
|
+
* Specify the amount the balance should be recharged to.
|
|
2869
|
+
*/
|
|
2870
|
+
recharge_to_amount: number;
|
|
2871
|
+
/**
|
|
2872
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
2873
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
2874
|
+
*/
|
|
2875
|
+
threshold_amount: number;
|
|
2876
|
+
/**
|
|
2877
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
2878
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
2879
|
+
*/
|
|
2880
|
+
custom_credit_type_id?: string;
|
|
2881
|
+
}
|
|
2882
|
+
namespace AddPrepaidBalanceThresholdConfiguration {
|
|
2883
|
+
interface Commit {
|
|
2884
|
+
/**
|
|
2885
|
+
* The commit product that will be used to generate the line item for commit
|
|
2886
|
+
* payment.
|
|
2887
|
+
*/
|
|
2888
|
+
product_id: string;
|
|
2889
|
+
/**
|
|
2890
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
2891
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2892
|
+
* all products.
|
|
2893
|
+
*/
|
|
2894
|
+
applicable_product_ids?: Array<string>;
|
|
2895
|
+
/**
|
|
2896
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
2897
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2898
|
+
* all products.
|
|
2899
|
+
*/
|
|
2900
|
+
applicable_product_tags?: Array<string>;
|
|
2901
|
+
description?: string;
|
|
2902
|
+
/**
|
|
2903
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
2904
|
+
* will default to the commit product name.
|
|
2905
|
+
*/
|
|
2906
|
+
name?: string;
|
|
2907
|
+
/**
|
|
2908
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2909
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2910
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2911
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2912
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
2913
|
+
* body of `specifiers`.
|
|
2914
|
+
*/
|
|
2915
|
+
specifiers?: Array<Commit.Specifier>;
|
|
2916
|
+
}
|
|
2917
|
+
namespace Commit {
|
|
2918
|
+
interface Specifier {
|
|
2919
|
+
presentation_group_values?: {
|
|
2920
|
+
[key: string]: string;
|
|
2921
|
+
};
|
|
2922
|
+
pricing_group_values?: {
|
|
2923
|
+
[key: string]: string;
|
|
2924
|
+
};
|
|
2925
|
+
/**
|
|
2926
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2927
|
+
*/
|
|
2928
|
+
product_id?: string;
|
|
2929
|
+
/**
|
|
2930
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2931
|
+
* tags.
|
|
2932
|
+
*/
|
|
2933
|
+
product_tags?: Array<string>;
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
interface PaymentGateConfig {
|
|
2937
|
+
/**
|
|
2938
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2939
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2940
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2941
|
+
* wish to payment gate the commit balance.
|
|
2942
|
+
*/
|
|
2943
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2944
|
+
/**
|
|
2945
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2946
|
+
*/
|
|
2947
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2948
|
+
/**
|
|
2949
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2950
|
+
*/
|
|
2951
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2952
|
+
/**
|
|
2953
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2954
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2955
|
+
* will default to NONE.
|
|
2956
|
+
*/
|
|
2957
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2958
|
+
}
|
|
2959
|
+
namespace PaymentGateConfig {
|
|
2960
|
+
/**
|
|
2961
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2962
|
+
*/
|
|
2963
|
+
interface PrecalculatedTaxConfig {
|
|
2964
|
+
/**
|
|
2965
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2966
|
+
* denomination as the commit's invoice schedule
|
|
2967
|
+
*/
|
|
2968
|
+
tax_amount: number;
|
|
2969
|
+
/**
|
|
2970
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2971
|
+
* description.
|
|
2972
|
+
*/
|
|
2973
|
+
tax_name?: string;
|
|
2974
|
+
}
|
|
2975
|
+
/**
|
|
2976
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2977
|
+
*/
|
|
2978
|
+
interface StripeConfig {
|
|
2979
|
+
/**
|
|
2980
|
+
* If left blank, will default to INVOICE
|
|
2981
|
+
*/
|
|
2982
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
2983
|
+
/**
|
|
2984
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2985
|
+
* your payment type.
|
|
2986
|
+
*/
|
|
2987
|
+
invoice_metadata?: {
|
|
2988
|
+
[key: string]: string;
|
|
2989
|
+
};
|
|
2990
|
+
}
|
|
2991
|
+
}
|
|
2992
|
+
}
|
|
1617
2993
|
interface AddRecurringCommit {
|
|
1618
2994
|
id: string;
|
|
1619
2995
|
/**
|
|
@@ -1654,6 +3030,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1654
3030
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
1655
3031
|
*/
|
|
1656
3032
|
ending_before?: string;
|
|
3033
|
+
/**
|
|
3034
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
3035
|
+
*/
|
|
3036
|
+
hierarchy_configuration?: AddRecurringCommit.HierarchyConfiguration;
|
|
1657
3037
|
/**
|
|
1658
3038
|
* The amount the customer should be billed for the commit. Not required.
|
|
1659
3039
|
*/
|
|
@@ -1675,16 +3055,26 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1675
3055
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1676
3056
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1677
3057
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1678
|
-
* be created aligned with the recurring commit's
|
|
3058
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1679
3059
|
* invoice dates.
|
|
1680
3060
|
*/
|
|
1681
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
3061
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1682
3062
|
/**
|
|
1683
3063
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1684
3064
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1685
3065
|
* between 0 and 1.
|
|
1686
3066
|
*/
|
|
1687
3067
|
rollover_fraction?: number;
|
|
3068
|
+
/**
|
|
3069
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
3070
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
3071
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
3072
|
+
*/
|
|
3073
|
+
specifiers?: Array<AddRecurringCommit.Specifier>;
|
|
3074
|
+
/**
|
|
3075
|
+
* Attach a subscription to the recurring commit/credit.
|
|
3076
|
+
*/
|
|
3077
|
+
subscription_config?: AddRecurringCommit.SubscriptionConfig;
|
|
1688
3078
|
}
|
|
1689
3079
|
namespace AddRecurringCommit {
|
|
1690
3080
|
/**
|
|
@@ -1692,8 +3082,8 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1692
3082
|
*/
|
|
1693
3083
|
interface AccessAmount {
|
|
1694
3084
|
credit_type_id: string;
|
|
1695
|
-
quantity: number;
|
|
1696
3085
|
unit_price: number;
|
|
3086
|
+
quantity?: number;
|
|
1697
3087
|
}
|
|
1698
3088
|
/**
|
|
1699
3089
|
* The amount of time the created commits will be valid for
|
|
@@ -1709,6 +3099,24 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1709
3099
|
interface Contract {
|
|
1710
3100
|
id: string;
|
|
1711
3101
|
}
|
|
3102
|
+
/**
|
|
3103
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
3104
|
+
*/
|
|
3105
|
+
interface HierarchyConfiguration {
|
|
3106
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
3107
|
+
}
|
|
3108
|
+
namespace HierarchyConfiguration {
|
|
3109
|
+
interface CommitHierarchyChildAccessAll {
|
|
3110
|
+
type: 'ALL';
|
|
3111
|
+
}
|
|
3112
|
+
interface CommitHierarchyChildAccessNone {
|
|
3113
|
+
type: 'NONE';
|
|
3114
|
+
}
|
|
3115
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
3116
|
+
contract_ids: Array<string>;
|
|
3117
|
+
type: 'CONTRACT_IDS';
|
|
3118
|
+
}
|
|
3119
|
+
}
|
|
1712
3120
|
/**
|
|
1713
3121
|
* The amount the customer should be billed for the commit. Not required.
|
|
1714
3122
|
*/
|
|
@@ -1717,6 +3125,39 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1717
3125
|
quantity: number;
|
|
1718
3126
|
unit_price: number;
|
|
1719
3127
|
}
|
|
3128
|
+
interface Specifier {
|
|
3129
|
+
presentation_group_values?: {
|
|
3130
|
+
[key: string]: string;
|
|
3131
|
+
};
|
|
3132
|
+
pricing_group_values?: {
|
|
3133
|
+
[key: string]: string;
|
|
3134
|
+
};
|
|
3135
|
+
/**
|
|
3136
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3137
|
+
*/
|
|
3138
|
+
product_id?: string;
|
|
3139
|
+
/**
|
|
3140
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3141
|
+
* tags.
|
|
3142
|
+
*/
|
|
3143
|
+
product_tags?: Array<string>;
|
|
3144
|
+
}
|
|
3145
|
+
/**
|
|
3146
|
+
* Attach a subscription to the recurring commit/credit.
|
|
3147
|
+
*/
|
|
3148
|
+
interface SubscriptionConfig {
|
|
3149
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
3150
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
3151
|
+
subscription_id: string;
|
|
3152
|
+
}
|
|
3153
|
+
namespace SubscriptionConfig {
|
|
3154
|
+
interface ApplySeatIncreaseConfig {
|
|
3155
|
+
/**
|
|
3156
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
3157
|
+
*/
|
|
3158
|
+
is_prorated: boolean;
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
1720
3161
|
}
|
|
1721
3162
|
interface AddRecurringCredit {
|
|
1722
3163
|
id: string;
|
|
@@ -1758,6 +3199,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1758
3199
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
1759
3200
|
*/
|
|
1760
3201
|
ending_before?: string;
|
|
3202
|
+
/**
|
|
3203
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
3204
|
+
*/
|
|
3205
|
+
hierarchy_configuration?: AddRecurringCredit.HierarchyConfiguration;
|
|
1761
3206
|
/**
|
|
1762
3207
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
1763
3208
|
*/
|
|
@@ -1775,16 +3220,26 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1775
3220
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1776
3221
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1777
3222
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1778
|
-
* be created aligned with the recurring commit's
|
|
3223
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1779
3224
|
* invoice dates.
|
|
1780
3225
|
*/
|
|
1781
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
3226
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1782
3227
|
/**
|
|
1783
3228
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1784
3229
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1785
3230
|
* between 0 and 1.
|
|
1786
3231
|
*/
|
|
1787
3232
|
rollover_fraction?: number;
|
|
3233
|
+
/**
|
|
3234
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
3235
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
3236
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
3237
|
+
*/
|
|
3238
|
+
specifiers?: Array<AddRecurringCredit.Specifier>;
|
|
3239
|
+
/**
|
|
3240
|
+
* Attach a subscription to the recurring commit/credit.
|
|
3241
|
+
*/
|
|
3242
|
+
subscription_config?: AddRecurringCredit.SubscriptionConfig;
|
|
1788
3243
|
}
|
|
1789
3244
|
namespace AddRecurringCredit {
|
|
1790
3245
|
/**
|
|
@@ -1792,8 +3247,8 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1792
3247
|
*/
|
|
1793
3248
|
interface AccessAmount {
|
|
1794
3249
|
credit_type_id: string;
|
|
1795
|
-
quantity: number;
|
|
1796
3250
|
unit_price: number;
|
|
3251
|
+
quantity?: number;
|
|
1797
3252
|
}
|
|
1798
3253
|
/**
|
|
1799
3254
|
* The amount of time the created commits will be valid for
|
|
@@ -1809,6 +3264,57 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1809
3264
|
interface Contract {
|
|
1810
3265
|
id: string;
|
|
1811
3266
|
}
|
|
3267
|
+
/**
|
|
3268
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
3269
|
+
*/
|
|
3270
|
+
interface HierarchyConfiguration {
|
|
3271
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
3272
|
+
}
|
|
3273
|
+
namespace HierarchyConfiguration {
|
|
3274
|
+
interface CommitHierarchyChildAccessAll {
|
|
3275
|
+
type: 'ALL';
|
|
3276
|
+
}
|
|
3277
|
+
interface CommitHierarchyChildAccessNone {
|
|
3278
|
+
type: 'NONE';
|
|
3279
|
+
}
|
|
3280
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
3281
|
+
contract_ids: Array<string>;
|
|
3282
|
+
type: 'CONTRACT_IDS';
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
interface Specifier {
|
|
3286
|
+
presentation_group_values?: {
|
|
3287
|
+
[key: string]: string;
|
|
3288
|
+
};
|
|
3289
|
+
pricing_group_values?: {
|
|
3290
|
+
[key: string]: string;
|
|
3291
|
+
};
|
|
3292
|
+
/**
|
|
3293
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3294
|
+
*/
|
|
3295
|
+
product_id?: string;
|
|
3296
|
+
/**
|
|
3297
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3298
|
+
* tags.
|
|
3299
|
+
*/
|
|
3300
|
+
product_tags?: Array<string>;
|
|
3301
|
+
}
|
|
3302
|
+
/**
|
|
3303
|
+
* Attach a subscription to the recurring commit/credit.
|
|
3304
|
+
*/
|
|
3305
|
+
interface SubscriptionConfig {
|
|
3306
|
+
allocation: 'INDIVIDUAL' | 'POOLED';
|
|
3307
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
3308
|
+
subscription_id: string;
|
|
3309
|
+
}
|
|
3310
|
+
namespace SubscriptionConfig {
|
|
3311
|
+
interface ApplySeatIncreaseConfig {
|
|
3312
|
+
/**
|
|
3313
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
3314
|
+
*/
|
|
3315
|
+
is_prorated: boolean;
|
|
3316
|
+
}
|
|
3317
|
+
}
|
|
1812
3318
|
}
|
|
1813
3319
|
interface AddResellerRoyalty {
|
|
1814
3320
|
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
@@ -1844,41 +3350,194 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1844
3350
|
name: string;
|
|
1845
3351
|
}
|
|
1846
3352
|
}
|
|
1847
|
-
interface
|
|
1848
|
-
|
|
1849
|
-
group_values: Array<string>;
|
|
1850
|
-
/**
|
|
1851
|
-
* This will match contract starting_at value if usage filter is active from the
|
|
1852
|
-
* beginning of the contract.
|
|
1853
|
-
*/
|
|
1854
|
-
starting_at: string;
|
|
1855
|
-
/**
|
|
1856
|
-
* This will match contract ending_before value if usage filter is active until the
|
|
1857
|
-
* end of the contract. It will be undefined if the contract is open-ended.
|
|
1858
|
-
*/
|
|
1859
|
-
ending_before?: string;
|
|
1860
|
-
}
|
|
1861
|
-
interface UpdateCommit {
|
|
1862
|
-
id: string;
|
|
1863
|
-
access_schedule?: UpdateCommit.AccessSchedule;
|
|
3353
|
+
interface AddSpendThresholdConfiguration {
|
|
3354
|
+
commit: AddSpendThresholdConfiguration.Commit;
|
|
1864
3355
|
/**
|
|
1865
|
-
*
|
|
1866
|
-
*
|
|
3356
|
+
* When set to false, the contract will not be evaluated against the
|
|
3357
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
3358
|
+
* regardless of prior state.
|
|
1867
3359
|
*/
|
|
1868
|
-
|
|
3360
|
+
is_enabled: boolean;
|
|
3361
|
+
payment_gate_config: AddSpendThresholdConfiguration.PaymentGateConfig;
|
|
1869
3362
|
/**
|
|
1870
|
-
*
|
|
1871
|
-
*
|
|
3363
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
3364
|
+
* hits this amount, a threshold charge will be initiated.
|
|
1872
3365
|
*/
|
|
1873
|
-
|
|
1874
|
-
invoice_schedule?: UpdateCommit.InvoiceSchedule;
|
|
1875
|
-
name?: string;
|
|
1876
|
-
netsuite_sales_order_id?: string | null;
|
|
1877
|
-
product_id?: string;
|
|
1878
|
-
rollover_fraction?: number | null;
|
|
3366
|
+
threshold_amount: number;
|
|
1879
3367
|
}
|
|
1880
|
-
namespace
|
|
1881
|
-
interface
|
|
3368
|
+
namespace AddSpendThresholdConfiguration {
|
|
3369
|
+
interface Commit {
|
|
3370
|
+
/**
|
|
3371
|
+
* The commit product that will be used to generate the line item for commit
|
|
3372
|
+
* payment.
|
|
3373
|
+
*/
|
|
3374
|
+
product_id: string;
|
|
3375
|
+
description?: string;
|
|
3376
|
+
/**
|
|
3377
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
3378
|
+
* will default to the commit product name.
|
|
3379
|
+
*/
|
|
3380
|
+
name?: string;
|
|
3381
|
+
}
|
|
3382
|
+
interface PaymentGateConfig {
|
|
3383
|
+
/**
|
|
3384
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
3385
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
3386
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
3387
|
+
* wish to payment gate the commit balance.
|
|
3388
|
+
*/
|
|
3389
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
3390
|
+
/**
|
|
3391
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3392
|
+
*/
|
|
3393
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
3394
|
+
/**
|
|
3395
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3396
|
+
*/
|
|
3397
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
3398
|
+
/**
|
|
3399
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
3400
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
3401
|
+
* will default to NONE.
|
|
3402
|
+
*/
|
|
3403
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
3404
|
+
}
|
|
3405
|
+
namespace PaymentGateConfig {
|
|
3406
|
+
/**
|
|
3407
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3408
|
+
*/
|
|
3409
|
+
interface PrecalculatedTaxConfig {
|
|
3410
|
+
/**
|
|
3411
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
3412
|
+
* denomination as the commit's invoice schedule
|
|
3413
|
+
*/
|
|
3414
|
+
tax_amount: number;
|
|
3415
|
+
/**
|
|
3416
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
3417
|
+
* description.
|
|
3418
|
+
*/
|
|
3419
|
+
tax_name?: string;
|
|
3420
|
+
}
|
|
3421
|
+
/**
|
|
3422
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3423
|
+
*/
|
|
3424
|
+
interface StripeConfig {
|
|
3425
|
+
/**
|
|
3426
|
+
* If left blank, will default to INVOICE
|
|
3427
|
+
*/
|
|
3428
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
3429
|
+
/**
|
|
3430
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
3431
|
+
* your payment type.
|
|
3432
|
+
*/
|
|
3433
|
+
invoice_metadata?: {
|
|
3434
|
+
[key: string]: string;
|
|
3435
|
+
};
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
}
|
|
3439
|
+
interface AddSubscription {
|
|
3440
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
3441
|
+
proration: AddSubscription.Proration;
|
|
3442
|
+
/**
|
|
3443
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
3444
|
+
* quantity and future quantity changes.
|
|
3445
|
+
*/
|
|
3446
|
+
quantity_schedule: Array<AddSubscription.QuantitySchedule>;
|
|
3447
|
+
starting_at: string;
|
|
3448
|
+
subscription_rate: AddSubscription.SubscriptionRate;
|
|
3449
|
+
id?: string;
|
|
3450
|
+
custom_fields?: {
|
|
3451
|
+
[key: string]: string;
|
|
3452
|
+
};
|
|
3453
|
+
description?: string;
|
|
3454
|
+
ending_before?: string;
|
|
3455
|
+
fiat_credit_type_id?: string;
|
|
3456
|
+
name?: string;
|
|
3457
|
+
}
|
|
3458
|
+
namespace AddSubscription {
|
|
3459
|
+
interface Proration {
|
|
3460
|
+
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
3461
|
+
is_prorated: boolean;
|
|
3462
|
+
}
|
|
3463
|
+
interface QuantitySchedule {
|
|
3464
|
+
quantity: number;
|
|
3465
|
+
starting_at: string;
|
|
3466
|
+
ending_before?: string;
|
|
3467
|
+
}
|
|
3468
|
+
interface SubscriptionRate {
|
|
3469
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3470
|
+
product: SubscriptionRate.Product;
|
|
3471
|
+
}
|
|
3472
|
+
namespace SubscriptionRate {
|
|
3473
|
+
interface Product {
|
|
3474
|
+
id: string;
|
|
3475
|
+
name: string;
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3479
|
+
interface AddUsageFilter {
|
|
3480
|
+
group_key: string;
|
|
3481
|
+
group_values: Array<string>;
|
|
3482
|
+
/**
|
|
3483
|
+
* This will match contract starting_at value if usage filter is active from the
|
|
3484
|
+
* beginning of the contract.
|
|
3485
|
+
*/
|
|
3486
|
+
starting_at: string;
|
|
3487
|
+
/**
|
|
3488
|
+
* This will match contract ending_before value if usage filter is active until the
|
|
3489
|
+
* end of the contract. It will be undefined if the contract is open-ended.
|
|
3490
|
+
*/
|
|
3491
|
+
ending_before?: string;
|
|
3492
|
+
}
|
|
3493
|
+
interface ArchiveCommit {
|
|
3494
|
+
id: string;
|
|
3495
|
+
}
|
|
3496
|
+
interface ArchiveCredit {
|
|
3497
|
+
id: string;
|
|
3498
|
+
}
|
|
3499
|
+
interface ArchiveScheduledCharge {
|
|
3500
|
+
id: string;
|
|
3501
|
+
}
|
|
3502
|
+
interface RemoveOverride {
|
|
3503
|
+
id: string;
|
|
3504
|
+
}
|
|
3505
|
+
interface UpdateCommit {
|
|
3506
|
+
id: string;
|
|
3507
|
+
access_schedule?: UpdateCommit.AccessSchedule;
|
|
3508
|
+
/**
|
|
3509
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
3510
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
3511
|
+
* all products.
|
|
3512
|
+
*/
|
|
3513
|
+
applicable_product_ids?: Array<string> | null;
|
|
3514
|
+
/**
|
|
3515
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
3516
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
3517
|
+
* all products.
|
|
3518
|
+
*/
|
|
3519
|
+
applicable_product_tags?: Array<string> | null;
|
|
3520
|
+
/**
|
|
3521
|
+
* Optional configuration for commit hierarchy access control
|
|
3522
|
+
*/
|
|
3523
|
+
hierarchy_configuration?: UpdateCommit.HierarchyConfiguration;
|
|
3524
|
+
invoice_schedule?: UpdateCommit.InvoiceSchedule;
|
|
3525
|
+
name?: string;
|
|
3526
|
+
netsuite_sales_order_id?: string | null;
|
|
3527
|
+
product_id?: string;
|
|
3528
|
+
rollover_fraction?: number | null;
|
|
3529
|
+
/**
|
|
3530
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
3531
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
3532
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
3533
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
3534
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
3535
|
+
* body of `specifiers`.
|
|
3536
|
+
*/
|
|
3537
|
+
specifiers?: Array<UpdateCommit.Specifier> | null;
|
|
3538
|
+
}
|
|
3539
|
+
namespace UpdateCommit {
|
|
3540
|
+
interface AccessSchedule {
|
|
1882
3541
|
add_schedule_items?: Array<AccessSchedule.AddScheduleItem>;
|
|
1883
3542
|
remove_schedule_items?: Array<AccessSchedule.RemoveScheduleItem>;
|
|
1884
3543
|
update_schedule_items?: Array<AccessSchedule.UpdateScheduleItem>;
|
|
@@ -1911,6 +3570,24 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1911
3570
|
starting_at?: string;
|
|
1912
3571
|
}
|
|
1913
3572
|
}
|
|
3573
|
+
/**
|
|
3574
|
+
* Optional configuration for commit hierarchy access control
|
|
3575
|
+
*/
|
|
3576
|
+
interface HierarchyConfiguration {
|
|
3577
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
3578
|
+
}
|
|
3579
|
+
namespace HierarchyConfiguration {
|
|
3580
|
+
interface CommitHierarchyChildAccessAll {
|
|
3581
|
+
type: 'ALL';
|
|
3582
|
+
}
|
|
3583
|
+
interface CommitHierarchyChildAccessNone {
|
|
3584
|
+
type: 'NONE';
|
|
3585
|
+
}
|
|
3586
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
3587
|
+
contract_ids: Array<string>;
|
|
3588
|
+
type: 'CONTRACT_IDS';
|
|
3589
|
+
}
|
|
3590
|
+
}
|
|
1914
3591
|
interface InvoiceSchedule {
|
|
1915
3592
|
add_schedule_items?: Array<InvoiceSchedule.AddScheduleItem>;
|
|
1916
3593
|
remove_schedule_items?: Array<InvoiceSchedule.RemoveScheduleItem>;
|
|
@@ -1934,10 +3611,31 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1934
3611
|
unit_price?: number;
|
|
1935
3612
|
}
|
|
1936
3613
|
}
|
|
3614
|
+
interface Specifier {
|
|
3615
|
+
presentation_group_values?: {
|
|
3616
|
+
[key: string]: string;
|
|
3617
|
+
};
|
|
3618
|
+
pricing_group_values?: {
|
|
3619
|
+
[key: string]: string;
|
|
3620
|
+
};
|
|
3621
|
+
/**
|
|
3622
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3623
|
+
*/
|
|
3624
|
+
product_id?: string;
|
|
3625
|
+
/**
|
|
3626
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3627
|
+
* tags.
|
|
3628
|
+
*/
|
|
3629
|
+
product_tags?: Array<string>;
|
|
3630
|
+
}
|
|
1937
3631
|
}
|
|
1938
3632
|
interface UpdateCredit {
|
|
1939
3633
|
id: string;
|
|
1940
3634
|
access_schedule?: UpdateCredit.AccessSchedule;
|
|
3635
|
+
/**
|
|
3636
|
+
* Optional configuration for credit hierarchy access control
|
|
3637
|
+
*/
|
|
3638
|
+
hierarchy_configuration?: UpdateCredit.HierarchyConfiguration;
|
|
1941
3639
|
name?: string;
|
|
1942
3640
|
netsuite_sales_order_id?: string | null;
|
|
1943
3641
|
rollover_fraction?: number | null;
|
|
@@ -1976,10 +3674,30 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1976
3674
|
starting_at?: string;
|
|
1977
3675
|
}
|
|
1978
3676
|
}
|
|
3677
|
+
/**
|
|
3678
|
+
* Optional configuration for credit hierarchy access control
|
|
3679
|
+
*/
|
|
3680
|
+
interface HierarchyConfiguration {
|
|
3681
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
3682
|
+
}
|
|
3683
|
+
namespace HierarchyConfiguration {
|
|
3684
|
+
interface CommitHierarchyChildAccessAll {
|
|
3685
|
+
type: 'ALL';
|
|
3686
|
+
}
|
|
3687
|
+
interface CommitHierarchyChildAccessNone {
|
|
3688
|
+
type: 'NONE';
|
|
3689
|
+
}
|
|
3690
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
3691
|
+
contract_ids: Array<string>;
|
|
3692
|
+
type: 'CONTRACT_IDS';
|
|
3693
|
+
}
|
|
3694
|
+
}
|
|
1979
3695
|
}
|
|
1980
3696
|
interface UpdateDiscount {
|
|
1981
3697
|
id: string;
|
|
1982
|
-
custom_fields?:
|
|
3698
|
+
custom_fields?: {
|
|
3699
|
+
[key: string]: string;
|
|
3700
|
+
};
|
|
1983
3701
|
name?: string;
|
|
1984
3702
|
netsuite_sales_order_id?: string;
|
|
1985
3703
|
/**
|
|
@@ -1993,7 +3711,7 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1993
3711
|
*/
|
|
1994
3712
|
interface Schedule {
|
|
1995
3713
|
/**
|
|
1996
|
-
* Defaults to USD if not passed.
|
|
3714
|
+
* Defaults to USD (cents) if not passed.
|
|
1997
3715
|
*/
|
|
1998
3716
|
credit_type_id?: string;
|
|
1999
3717
|
/**
|
|
@@ -2019,7 +3737,7 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
2019
3737
|
* RFC 3339 timestamp (exclusive).
|
|
2020
3738
|
*/
|
|
2021
3739
|
ending_before: string;
|
|
2022
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
|
|
3740
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
2023
3741
|
/**
|
|
2024
3742
|
* RFC 3339 timestamp (inclusive).
|
|
2025
3743
|
*/
|
|
@@ -2069,6 +3787,167 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
2069
3787
|
}
|
|
2070
3788
|
}
|
|
2071
3789
|
}
|
|
3790
|
+
interface UpdatePrepaidBalanceThresholdConfiguration {
|
|
3791
|
+
commit?: UpdatePrepaidBalanceThresholdConfiguration.Commit;
|
|
3792
|
+
/**
|
|
3793
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
3794
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
3795
|
+
*/
|
|
3796
|
+
custom_credit_type_id?: string | null;
|
|
3797
|
+
/**
|
|
3798
|
+
* When set to false, the contract will not be evaluated against the
|
|
3799
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
3800
|
+
* regardless of prior state.
|
|
3801
|
+
*/
|
|
3802
|
+
is_enabled?: boolean;
|
|
3803
|
+
payment_gate_config?: UpdatePrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
3804
|
+
/**
|
|
3805
|
+
* Specify the amount the balance should be recharged to.
|
|
3806
|
+
*/
|
|
3807
|
+
recharge_to_amount?: number;
|
|
3808
|
+
/**
|
|
3809
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
3810
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
3811
|
+
*/
|
|
3812
|
+
threshold_amount?: number;
|
|
3813
|
+
}
|
|
3814
|
+
namespace UpdatePrepaidBalanceThresholdConfiguration {
|
|
3815
|
+
interface Commit {
|
|
3816
|
+
/**
|
|
3817
|
+
* Which products the threshold commit applies to. If both applicable_product_ids
|
|
3818
|
+
* and applicable_product_tags are not provided, the commit applies to all
|
|
3819
|
+
* products.
|
|
3820
|
+
*/
|
|
3821
|
+
applicable_product_ids?: Array<string> | null;
|
|
3822
|
+
/**
|
|
3823
|
+
* Which tags the threshold commit applies to. If both applicable_product_ids and
|
|
3824
|
+
* applicable_product_tags are not provided, the commit applies to all products.
|
|
3825
|
+
*/
|
|
3826
|
+
applicable_product_tags?: Array<string> | null;
|
|
3827
|
+
description?: string;
|
|
3828
|
+
/**
|
|
3829
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
3830
|
+
* will default to the commit product name.
|
|
3831
|
+
*/
|
|
3832
|
+
name?: string;
|
|
3833
|
+
/**
|
|
3834
|
+
* The commit product that will be used to generate the line item for commit
|
|
3835
|
+
* payment.
|
|
3836
|
+
*/
|
|
3837
|
+
product_id?: string;
|
|
3838
|
+
/**
|
|
3839
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
3840
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
3841
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
3842
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
3843
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
3844
|
+
* body of `specifiers`.
|
|
3845
|
+
*/
|
|
3846
|
+
specifiers?: Array<Commit.Specifier> | null;
|
|
3847
|
+
}
|
|
3848
|
+
namespace Commit {
|
|
3849
|
+
interface Specifier {
|
|
3850
|
+
presentation_group_values?: {
|
|
3851
|
+
[key: string]: string;
|
|
3852
|
+
};
|
|
3853
|
+
pricing_group_values?: {
|
|
3854
|
+
[key: string]: string;
|
|
3855
|
+
};
|
|
3856
|
+
/**
|
|
3857
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3858
|
+
*/
|
|
3859
|
+
product_id?: string;
|
|
3860
|
+
/**
|
|
3861
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3862
|
+
* tags.
|
|
3863
|
+
*/
|
|
3864
|
+
product_tags?: Array<string>;
|
|
3865
|
+
}
|
|
3866
|
+
}
|
|
3867
|
+
interface PaymentGateConfig {
|
|
3868
|
+
/**
|
|
3869
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
3870
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
3871
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
3872
|
+
* wish to payment gate the commit balance.
|
|
3873
|
+
*/
|
|
3874
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
3875
|
+
/**
|
|
3876
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3877
|
+
*/
|
|
3878
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
3879
|
+
/**
|
|
3880
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3881
|
+
*/
|
|
3882
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
3883
|
+
/**
|
|
3884
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
3885
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
3886
|
+
* will default to NONE.
|
|
3887
|
+
*/
|
|
3888
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
3889
|
+
}
|
|
3890
|
+
namespace PaymentGateConfig {
|
|
3891
|
+
/**
|
|
3892
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3893
|
+
*/
|
|
3894
|
+
interface PrecalculatedTaxConfig {
|
|
3895
|
+
/**
|
|
3896
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
3897
|
+
* denomination as the commit's invoice schedule
|
|
3898
|
+
*/
|
|
3899
|
+
tax_amount: number;
|
|
3900
|
+
/**
|
|
3901
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
3902
|
+
* description.
|
|
3903
|
+
*/
|
|
3904
|
+
tax_name?: string;
|
|
3905
|
+
}
|
|
3906
|
+
/**
|
|
3907
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3908
|
+
*/
|
|
3909
|
+
interface StripeConfig {
|
|
3910
|
+
/**
|
|
3911
|
+
* If left blank, will default to INVOICE
|
|
3912
|
+
*/
|
|
3913
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
3914
|
+
/**
|
|
3915
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
3916
|
+
* your payment type.
|
|
3917
|
+
*/
|
|
3918
|
+
invoice_metadata?: {
|
|
3919
|
+
[key: string]: string;
|
|
3920
|
+
};
|
|
3921
|
+
}
|
|
3922
|
+
}
|
|
3923
|
+
}
|
|
3924
|
+
interface UpdateRecurringCommit {
|
|
3925
|
+
id: string;
|
|
3926
|
+
access_amount?: UpdateRecurringCommit.AccessAmount;
|
|
3927
|
+
ending_before?: string;
|
|
3928
|
+
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
3929
|
+
}
|
|
3930
|
+
namespace UpdateRecurringCommit {
|
|
3931
|
+
interface AccessAmount {
|
|
3932
|
+
quantity?: number;
|
|
3933
|
+
unit_price?: number;
|
|
3934
|
+
}
|
|
3935
|
+
interface InvoiceAmount {
|
|
3936
|
+
quantity?: number;
|
|
3937
|
+
unit_price?: number;
|
|
3938
|
+
}
|
|
3939
|
+
}
|
|
3940
|
+
interface UpdateRecurringCredit {
|
|
3941
|
+
id: string;
|
|
3942
|
+
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
3943
|
+
ending_before?: string;
|
|
3944
|
+
}
|
|
3945
|
+
namespace UpdateRecurringCredit {
|
|
3946
|
+
interface AccessAmount {
|
|
3947
|
+
quantity?: number;
|
|
3948
|
+
unit_price?: number;
|
|
3949
|
+
}
|
|
3950
|
+
}
|
|
2072
3951
|
interface UpdateRefundInvoice {
|
|
2073
3952
|
date: string;
|
|
2074
3953
|
invoice_id: string;
|
|
@@ -2104,6 +3983,104 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
2104
3983
|
}
|
|
2105
3984
|
}
|
|
2106
3985
|
}
|
|
3986
|
+
interface UpdateSpendThresholdConfiguration {
|
|
3987
|
+
commit?: UpdateSpendThresholdConfiguration.Commit;
|
|
3988
|
+
/**
|
|
3989
|
+
* When set to false, the contract will not be evaluated against the
|
|
3990
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
3991
|
+
* regardless of prior state.
|
|
3992
|
+
*/
|
|
3993
|
+
is_enabled?: boolean;
|
|
3994
|
+
payment_gate_config?: UpdateSpendThresholdConfiguration.PaymentGateConfig;
|
|
3995
|
+
/**
|
|
3996
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
3997
|
+
* hits this amount, a threshold charge will be initiated.
|
|
3998
|
+
*/
|
|
3999
|
+
threshold_amount?: number;
|
|
4000
|
+
}
|
|
4001
|
+
namespace UpdateSpendThresholdConfiguration {
|
|
4002
|
+
interface Commit {
|
|
4003
|
+
description?: string;
|
|
4004
|
+
/**
|
|
4005
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
4006
|
+
* will default to the commit product name.
|
|
4007
|
+
*/
|
|
4008
|
+
name?: string;
|
|
4009
|
+
/**
|
|
4010
|
+
* The commit product that will be used to generate the line item for commit
|
|
4011
|
+
* payment.
|
|
4012
|
+
*/
|
|
4013
|
+
product_id?: string;
|
|
4014
|
+
}
|
|
4015
|
+
interface PaymentGateConfig {
|
|
4016
|
+
/**
|
|
4017
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
4018
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
4019
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
4020
|
+
* wish to payment gate the commit balance.
|
|
4021
|
+
*/
|
|
4022
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
4023
|
+
/**
|
|
4024
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4025
|
+
*/
|
|
4026
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
4027
|
+
/**
|
|
4028
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4029
|
+
*/
|
|
4030
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
4031
|
+
/**
|
|
4032
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
4033
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
4034
|
+
* will default to NONE.
|
|
4035
|
+
*/
|
|
4036
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
4037
|
+
}
|
|
4038
|
+
namespace PaymentGateConfig {
|
|
4039
|
+
/**
|
|
4040
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4041
|
+
*/
|
|
4042
|
+
interface PrecalculatedTaxConfig {
|
|
4043
|
+
/**
|
|
4044
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
4045
|
+
* denomination as the commit's invoice schedule
|
|
4046
|
+
*/
|
|
4047
|
+
tax_amount: number;
|
|
4048
|
+
/**
|
|
4049
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
4050
|
+
* description.
|
|
4051
|
+
*/
|
|
4052
|
+
tax_name?: string;
|
|
4053
|
+
}
|
|
4054
|
+
/**
|
|
4055
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4056
|
+
*/
|
|
4057
|
+
interface StripeConfig {
|
|
4058
|
+
/**
|
|
4059
|
+
* If left blank, will default to INVOICE
|
|
4060
|
+
*/
|
|
4061
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
4062
|
+
/**
|
|
4063
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
4064
|
+
* your payment type.
|
|
4065
|
+
*/
|
|
4066
|
+
invoice_metadata?: {
|
|
4067
|
+
[key: string]: string;
|
|
4068
|
+
};
|
|
4069
|
+
}
|
|
4070
|
+
}
|
|
4071
|
+
}
|
|
4072
|
+
interface UpdateSubscription {
|
|
4073
|
+
id: string;
|
|
4074
|
+
ending_before?: string;
|
|
4075
|
+
quantity_updates?: Array<UpdateSubscription.QuantityUpdate>;
|
|
4076
|
+
}
|
|
4077
|
+
namespace UpdateSubscription {
|
|
4078
|
+
interface QuantityUpdate {
|
|
4079
|
+
starting_at: string;
|
|
4080
|
+
quantity?: number;
|
|
4081
|
+
quantity_delta?: number;
|
|
4082
|
+
}
|
|
4083
|
+
}
|
|
2107
4084
|
}
|
|
2108
4085
|
}
|
|
2109
4086
|
export interface ContractRetrieveParams {
|
|
@@ -2165,6 +4142,7 @@ export interface ContractEditParams {
|
|
|
2165
4142
|
add_credits?: Array<ContractEditParams.AddCredit>;
|
|
2166
4143
|
add_discounts?: Array<ContractEditParams.AddDiscount>;
|
|
2167
4144
|
add_overrides?: Array<ContractEditParams.AddOverride>;
|
|
4145
|
+
add_prepaid_balance_threshold_configuration?: ContractEditParams.AddPrepaidBalanceThresholdConfiguration;
|
|
2168
4146
|
/**
|
|
2169
4147
|
* This field's availability is dependent on your client's configuration.
|
|
2170
4148
|
*/
|
|
@@ -2173,9 +4151,66 @@ export interface ContractEditParams {
|
|
|
2173
4151
|
add_recurring_credits?: Array<ContractEditParams.AddRecurringCredit>;
|
|
2174
4152
|
add_reseller_royalties?: Array<ContractEditParams.AddResellerRoyalty>;
|
|
2175
4153
|
add_scheduled_charges?: Array<ContractEditParams.AddScheduledCharge>;
|
|
4154
|
+
add_spend_threshold_configuration?: ContractEditParams.AddSpendThresholdConfiguration;
|
|
4155
|
+
/**
|
|
4156
|
+
* Optional list of
|
|
4157
|
+
* [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
4158
|
+
* to add to the contract.
|
|
4159
|
+
*/
|
|
4160
|
+
add_subscriptions?: Array<ContractEditParams.AddSubscription>;
|
|
4161
|
+
/**
|
|
4162
|
+
* If true, allows setting the contract end date earlier than the end_timestamp of
|
|
4163
|
+
* existing finalized invoices. Finalized invoices will be unchanged; if you want
|
|
4164
|
+
* to incorporate the new end date, you can void and regenerate finalized usage
|
|
4165
|
+
* invoices. Defaults to true.
|
|
4166
|
+
*/
|
|
4167
|
+
allow_contract_ending_before_finalized_invoice?: boolean;
|
|
4168
|
+
/**
|
|
4169
|
+
* IDs of commits to archive
|
|
4170
|
+
*/
|
|
4171
|
+
archive_commits?: Array<ContractEditParams.ArchiveCommit>;
|
|
4172
|
+
/**
|
|
4173
|
+
* IDs of credits to archive
|
|
4174
|
+
*/
|
|
4175
|
+
archive_credits?: Array<ContractEditParams.ArchiveCredit>;
|
|
4176
|
+
/**
|
|
4177
|
+
* IDs of scheduled charges to archive
|
|
4178
|
+
*/
|
|
4179
|
+
archive_scheduled_charges?: Array<ContractEditParams.ArchiveScheduledCharge>;
|
|
4180
|
+
/**
|
|
4181
|
+
* IDs of overrides to remove
|
|
4182
|
+
*/
|
|
4183
|
+
remove_overrides?: Array<ContractEditParams.RemoveOverride>;
|
|
2176
4184
|
update_commits?: Array<ContractEditParams.UpdateCommit>;
|
|
4185
|
+
/**
|
|
4186
|
+
* RFC 3339 timestamp indicating when the contract will end (exclusive).
|
|
4187
|
+
*/
|
|
4188
|
+
update_contract_end_date?: string | null;
|
|
4189
|
+
/**
|
|
4190
|
+
* Value to update the contract name to. If not provided, the contract name will
|
|
4191
|
+
* remain unchanged.
|
|
4192
|
+
*/
|
|
4193
|
+
update_contract_name?: string | null;
|
|
2177
4194
|
update_credits?: Array<ContractEditParams.UpdateCredit>;
|
|
4195
|
+
update_prepaid_balance_threshold_configuration?: ContractEditParams.UpdatePrepaidBalanceThresholdConfiguration;
|
|
4196
|
+
/**
|
|
4197
|
+
* Edits to these recurring commits will only affect commits whose access schedules
|
|
4198
|
+
* has not started. Expired commits, and commits with an active access schedule
|
|
4199
|
+
* will remain unchanged.
|
|
4200
|
+
*/
|
|
4201
|
+
update_recurring_commits?: Array<ContractEditParams.UpdateRecurringCommit>;
|
|
4202
|
+
/**
|
|
4203
|
+
* Edits to these recurring credits will only affect credits whose access schedules
|
|
4204
|
+
* has not started. Expired credits, and credits with an active access schedule
|
|
4205
|
+
* will remain unchanged.
|
|
4206
|
+
*/
|
|
4207
|
+
update_recurring_credits?: Array<ContractEditParams.UpdateRecurringCredit>;
|
|
2178
4208
|
update_scheduled_charges?: Array<ContractEditParams.UpdateScheduledCharge>;
|
|
4209
|
+
update_spend_threshold_configuration?: ContractEditParams.UpdateSpendThresholdConfiguration;
|
|
4210
|
+
/**
|
|
4211
|
+
* Optional list of subscriptions to update.
|
|
4212
|
+
*/
|
|
4213
|
+
update_subscriptions?: Array<ContractEditParams.UpdateSubscription>;
|
|
2179
4214
|
}
|
|
2180
4215
|
export declare namespace ContractEditParams {
|
|
2181
4216
|
interface AddCommit {
|
|
@@ -2192,20 +4227,28 @@ export declare namespace ContractEditParams {
|
|
|
2192
4227
|
*/
|
|
2193
4228
|
amount?: number;
|
|
2194
4229
|
/**
|
|
2195
|
-
* Which products the commit applies to. If
|
|
2196
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
4230
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
4231
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
4232
|
+
* all products.
|
|
2197
4233
|
*/
|
|
2198
4234
|
applicable_product_ids?: Array<string>;
|
|
2199
4235
|
/**
|
|
2200
|
-
* Which tags the commit applies to. If
|
|
2201
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
4236
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
4237
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
4238
|
+
* all products.
|
|
2202
4239
|
*/
|
|
2203
4240
|
applicable_product_tags?: Array<string>;
|
|
2204
|
-
custom_fields?:
|
|
4241
|
+
custom_fields?: {
|
|
4242
|
+
[key: string]: string;
|
|
4243
|
+
};
|
|
2205
4244
|
/**
|
|
2206
4245
|
* Used only in UI/API. It is not exposed to end customers.
|
|
2207
4246
|
*/
|
|
2208
4247
|
description?: string;
|
|
4248
|
+
/**
|
|
4249
|
+
* Optional configuration for commit hierarchy access control
|
|
4250
|
+
*/
|
|
4251
|
+
hierarchy_configuration?: AddCommit.HierarchyConfiguration;
|
|
2209
4252
|
/**
|
|
2210
4253
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
2211
4254
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -2221,6 +4264,10 @@ export declare namespace ContractEditParams {
|
|
|
2221
4264
|
* This field's availability is dependent on your client's configuration.
|
|
2222
4265
|
*/
|
|
2223
4266
|
netsuite_sales_order_id?: string;
|
|
4267
|
+
/**
|
|
4268
|
+
* optionally payment gate this commit
|
|
4269
|
+
*/
|
|
4270
|
+
payment_gate_config?: AddCommit.PaymentGateConfig;
|
|
2224
4271
|
/**
|
|
2225
4272
|
* If multiple commits are applicable, the one with the lower priority will apply
|
|
2226
4273
|
* first.
|
|
@@ -2231,6 +4278,15 @@ export declare namespace ContractEditParams {
|
|
|
2231
4278
|
* Fraction of unused segments that will be rolled over. Must be between 0 and 1.
|
|
2232
4279
|
*/
|
|
2233
4280
|
rollover_fraction?: number;
|
|
4281
|
+
/**
|
|
4282
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
4283
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
4284
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
4285
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
4286
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
4287
|
+
* body of `specifiers`.
|
|
4288
|
+
*/
|
|
4289
|
+
specifiers?: Array<AddCommit.Specifier>;
|
|
2234
4290
|
/**
|
|
2235
4291
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
2236
4292
|
* commit specific overrides.
|
|
@@ -2260,6 +4316,24 @@ export declare namespace ContractEditParams {
|
|
|
2260
4316
|
starting_at: string;
|
|
2261
4317
|
}
|
|
2262
4318
|
}
|
|
4319
|
+
/**
|
|
4320
|
+
* Optional configuration for commit hierarchy access control
|
|
4321
|
+
*/
|
|
4322
|
+
interface HierarchyConfiguration {
|
|
4323
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
4324
|
+
}
|
|
4325
|
+
namespace HierarchyConfiguration {
|
|
4326
|
+
interface CommitHierarchyChildAccessAll {
|
|
4327
|
+
type: 'ALL';
|
|
4328
|
+
}
|
|
4329
|
+
interface CommitHierarchyChildAccessNone {
|
|
4330
|
+
type: 'NONE';
|
|
4331
|
+
}
|
|
4332
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
4333
|
+
contract_ids: Array<string>;
|
|
4334
|
+
type: 'CONTRACT_IDS';
|
|
4335
|
+
}
|
|
4336
|
+
}
|
|
2263
4337
|
/**
|
|
2264
4338
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
2265
4339
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -2268,7 +4342,7 @@ export declare namespace ContractEditParams {
|
|
|
2268
4342
|
*/
|
|
2269
4343
|
interface InvoiceSchedule {
|
|
2270
4344
|
/**
|
|
2271
|
-
* Defaults to USD if not passed.
|
|
4345
|
+
* Defaults to USD (cents) if not passed.
|
|
2272
4346
|
*/
|
|
2273
4347
|
credit_type_id?: string;
|
|
2274
4348
|
/**
|
|
@@ -2294,7 +4368,7 @@ export declare namespace ContractEditParams {
|
|
|
2294
4368
|
* RFC 3339 timestamp (exclusive).
|
|
2295
4369
|
*/
|
|
2296
4370
|
ending_before: string;
|
|
2297
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
|
|
4371
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
2298
4372
|
/**
|
|
2299
4373
|
* RFC 3339 timestamp (inclusive).
|
|
2300
4374
|
*/
|
|
@@ -2343,6 +4417,82 @@ export declare namespace ContractEditParams {
|
|
|
2343
4417
|
unit_price?: number;
|
|
2344
4418
|
}
|
|
2345
4419
|
}
|
|
4420
|
+
/**
|
|
4421
|
+
* optionally payment gate this commit
|
|
4422
|
+
*/
|
|
4423
|
+
interface PaymentGateConfig {
|
|
4424
|
+
/**
|
|
4425
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
4426
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
4427
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
4428
|
+
* wish to payment gate the commit balance.
|
|
4429
|
+
*/
|
|
4430
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
4431
|
+
/**
|
|
4432
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4433
|
+
*/
|
|
4434
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
4435
|
+
/**
|
|
4436
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4437
|
+
*/
|
|
4438
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
4439
|
+
/**
|
|
4440
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
4441
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
4442
|
+
* will default to NONE.
|
|
4443
|
+
*/
|
|
4444
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
4445
|
+
}
|
|
4446
|
+
namespace PaymentGateConfig {
|
|
4447
|
+
/**
|
|
4448
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4449
|
+
*/
|
|
4450
|
+
interface PrecalculatedTaxConfig {
|
|
4451
|
+
/**
|
|
4452
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
4453
|
+
* denomination as the commit's invoice schedule
|
|
4454
|
+
*/
|
|
4455
|
+
tax_amount: number;
|
|
4456
|
+
/**
|
|
4457
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
4458
|
+
* description.
|
|
4459
|
+
*/
|
|
4460
|
+
tax_name?: string;
|
|
4461
|
+
}
|
|
4462
|
+
/**
|
|
4463
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4464
|
+
*/
|
|
4465
|
+
interface StripeConfig {
|
|
4466
|
+
/**
|
|
4467
|
+
* If left blank, will default to INVOICE
|
|
4468
|
+
*/
|
|
4469
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
4470
|
+
/**
|
|
4471
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
4472
|
+
* your payment type.
|
|
4473
|
+
*/
|
|
4474
|
+
invoice_metadata?: {
|
|
4475
|
+
[key: string]: string;
|
|
4476
|
+
};
|
|
4477
|
+
}
|
|
4478
|
+
}
|
|
4479
|
+
interface Specifier {
|
|
4480
|
+
presentation_group_values?: {
|
|
4481
|
+
[key: string]: string;
|
|
4482
|
+
};
|
|
4483
|
+
pricing_group_values?: {
|
|
4484
|
+
[key: string]: string;
|
|
4485
|
+
};
|
|
4486
|
+
/**
|
|
4487
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
4488
|
+
*/
|
|
4489
|
+
product_id?: string;
|
|
4490
|
+
/**
|
|
4491
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
4492
|
+
* tags.
|
|
4493
|
+
*/
|
|
4494
|
+
product_tags?: Array<string>;
|
|
4495
|
+
}
|
|
2346
4496
|
}
|
|
2347
4497
|
interface AddCredit {
|
|
2348
4498
|
/**
|
|
@@ -2360,11 +4510,17 @@ export declare namespace ContractEditParams {
|
|
|
2360
4510
|
* applicable_product_tags are not provided, the credit applies to all products.
|
|
2361
4511
|
*/
|
|
2362
4512
|
applicable_product_tags?: Array<string>;
|
|
2363
|
-
custom_fields?:
|
|
4513
|
+
custom_fields?: {
|
|
4514
|
+
[key: string]: string;
|
|
4515
|
+
};
|
|
2364
4516
|
/**
|
|
2365
4517
|
* Used only in UI/API. It is not exposed to end customers.
|
|
2366
4518
|
*/
|
|
2367
4519
|
description?: string;
|
|
4520
|
+
/**
|
|
4521
|
+
* Optional configuration for credit hierarchy access control
|
|
4522
|
+
*/
|
|
4523
|
+
hierarchy_configuration?: AddCredit.HierarchyConfiguration;
|
|
2368
4524
|
/**
|
|
2369
4525
|
* displayed on invoices
|
|
2370
4526
|
*/
|
|
@@ -2379,6 +4535,15 @@ export declare namespace ContractEditParams {
|
|
|
2379
4535
|
*/
|
|
2380
4536
|
priority?: number;
|
|
2381
4537
|
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
4538
|
+
/**
|
|
4539
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
4540
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
4541
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
4542
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
4543
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
4544
|
+
* body of `specifiers`.
|
|
4545
|
+
*/
|
|
4546
|
+
specifiers?: Array<AddCredit.Specifier>;
|
|
2382
4547
|
}
|
|
2383
4548
|
namespace AddCredit {
|
|
2384
4549
|
/**
|
|
@@ -2401,6 +4566,41 @@ export declare namespace ContractEditParams {
|
|
|
2401
4566
|
starting_at: string;
|
|
2402
4567
|
}
|
|
2403
4568
|
}
|
|
4569
|
+
/**
|
|
4570
|
+
* Optional configuration for credit hierarchy access control
|
|
4571
|
+
*/
|
|
4572
|
+
interface HierarchyConfiguration {
|
|
4573
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
4574
|
+
}
|
|
4575
|
+
namespace HierarchyConfiguration {
|
|
4576
|
+
interface CommitHierarchyChildAccessAll {
|
|
4577
|
+
type: 'ALL';
|
|
4578
|
+
}
|
|
4579
|
+
interface CommitHierarchyChildAccessNone {
|
|
4580
|
+
type: 'NONE';
|
|
4581
|
+
}
|
|
4582
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
4583
|
+
contract_ids: Array<string>;
|
|
4584
|
+
type: 'CONTRACT_IDS';
|
|
4585
|
+
}
|
|
4586
|
+
}
|
|
4587
|
+
interface Specifier {
|
|
4588
|
+
presentation_group_values?: {
|
|
4589
|
+
[key: string]: string;
|
|
4590
|
+
};
|
|
4591
|
+
pricing_group_values?: {
|
|
4592
|
+
[key: string]: string;
|
|
4593
|
+
};
|
|
4594
|
+
/**
|
|
4595
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
4596
|
+
*/
|
|
4597
|
+
product_id?: string;
|
|
4598
|
+
/**
|
|
4599
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
4600
|
+
* tags.
|
|
4601
|
+
*/
|
|
4602
|
+
product_tags?: Array<string>;
|
|
4603
|
+
}
|
|
2404
4604
|
}
|
|
2405
4605
|
interface AddDiscount {
|
|
2406
4606
|
product_id: string;
|
|
@@ -2408,7 +4608,9 @@ export declare namespace ContractEditParams {
|
|
|
2408
4608
|
* Must provide either schedule_items or recurring_schedule.
|
|
2409
4609
|
*/
|
|
2410
4610
|
schedule: AddDiscount.Schedule;
|
|
2411
|
-
custom_fields?:
|
|
4611
|
+
custom_fields?: {
|
|
4612
|
+
[key: string]: string;
|
|
4613
|
+
};
|
|
2412
4614
|
/**
|
|
2413
4615
|
* displayed on invoices
|
|
2414
4616
|
*/
|
|
@@ -2424,7 +4626,7 @@ export declare namespace ContractEditParams {
|
|
|
2424
4626
|
*/
|
|
2425
4627
|
interface Schedule {
|
|
2426
4628
|
/**
|
|
2427
|
-
* Defaults to USD if not passed.
|
|
4629
|
+
* Defaults to USD (cents) if not passed.
|
|
2428
4630
|
*/
|
|
2429
4631
|
credit_type_id?: string;
|
|
2430
4632
|
/**
|
|
@@ -2450,7 +4652,7 @@ export declare namespace ContractEditParams {
|
|
|
2450
4652
|
* RFC 3339 timestamp (exclusive).
|
|
2451
4653
|
*/
|
|
2452
4654
|
ending_before: string;
|
|
2453
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
|
|
4655
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
2454
4656
|
/**
|
|
2455
4657
|
* RFC 3339 timestamp (inclusive).
|
|
2456
4658
|
*/
|
|
@@ -2561,6 +4763,7 @@ export declare namespace ContractEditParams {
|
|
|
2561
4763
|
}
|
|
2562
4764
|
namespace AddOverride {
|
|
2563
4765
|
interface OverrideSpecifier {
|
|
4766
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2564
4767
|
/**
|
|
2565
4768
|
* If provided, the override will only apply to the specified commits. Can only be
|
|
2566
4769
|
* used for commit specific overrides. If not provided, the override will apply to
|
|
@@ -2572,12 +4775,16 @@ export declare namespace ContractEditParams {
|
|
|
2572
4775
|
* the specified presentation group values. Can only be used for multiplier
|
|
2573
4776
|
* overrides.
|
|
2574
4777
|
*/
|
|
2575
|
-
presentation_group_values?:
|
|
4778
|
+
presentation_group_values?: {
|
|
4779
|
+
[key: string]: string;
|
|
4780
|
+
};
|
|
2576
4781
|
/**
|
|
2577
4782
|
* A map of pricing group names to values. The override will only apply to products
|
|
2578
4783
|
* with the specified pricing group values.
|
|
2579
4784
|
*/
|
|
2580
|
-
pricing_group_values?:
|
|
4785
|
+
pricing_group_values?: {
|
|
4786
|
+
[key: string]: string;
|
|
4787
|
+
};
|
|
2581
4788
|
/**
|
|
2582
4789
|
* If provided, the override will only apply to the product with the specified ID.
|
|
2583
4790
|
*/
|
|
@@ -2612,7 +4819,9 @@ export declare namespace ContractEditParams {
|
|
|
2612
4819
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
2613
4820
|
* processors.
|
|
2614
4821
|
*/
|
|
2615
|
-
custom_rate?:
|
|
4822
|
+
custom_rate?: {
|
|
4823
|
+
[key: string]: unknown;
|
|
4824
|
+
};
|
|
2616
4825
|
/**
|
|
2617
4826
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
2618
4827
|
* set to true.
|
|
@@ -2637,6 +4846,141 @@ export declare namespace ContractEditParams {
|
|
|
2637
4846
|
size?: number;
|
|
2638
4847
|
}
|
|
2639
4848
|
}
|
|
4849
|
+
interface AddPrepaidBalanceThresholdConfiguration {
|
|
4850
|
+
commit: AddPrepaidBalanceThresholdConfiguration.Commit;
|
|
4851
|
+
/**
|
|
4852
|
+
* When set to false, the contract will not be evaluated against the
|
|
4853
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
4854
|
+
* regardless of prior state.
|
|
4855
|
+
*/
|
|
4856
|
+
is_enabled: boolean;
|
|
4857
|
+
payment_gate_config: AddPrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
4858
|
+
/**
|
|
4859
|
+
* Specify the amount the balance should be recharged to.
|
|
4860
|
+
*/
|
|
4861
|
+
recharge_to_amount: number;
|
|
4862
|
+
/**
|
|
4863
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
4864
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
4865
|
+
*/
|
|
4866
|
+
threshold_amount: number;
|
|
4867
|
+
/**
|
|
4868
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
4869
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
4870
|
+
*/
|
|
4871
|
+
custom_credit_type_id?: string;
|
|
4872
|
+
}
|
|
4873
|
+
namespace AddPrepaidBalanceThresholdConfiguration {
|
|
4874
|
+
interface Commit {
|
|
4875
|
+
/**
|
|
4876
|
+
* The commit product that will be used to generate the line item for commit
|
|
4877
|
+
* payment.
|
|
4878
|
+
*/
|
|
4879
|
+
product_id: string;
|
|
4880
|
+
/**
|
|
4881
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
4882
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
4883
|
+
* all products.
|
|
4884
|
+
*/
|
|
4885
|
+
applicable_product_ids?: Array<string>;
|
|
4886
|
+
/**
|
|
4887
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
4888
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
4889
|
+
* all products.
|
|
4890
|
+
*/
|
|
4891
|
+
applicable_product_tags?: Array<string>;
|
|
4892
|
+
description?: string;
|
|
4893
|
+
/**
|
|
4894
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
4895
|
+
* will default to the commit product name.
|
|
4896
|
+
*/
|
|
4897
|
+
name?: string;
|
|
4898
|
+
/**
|
|
4899
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
4900
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
4901
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
4902
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
4903
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
4904
|
+
* body of `specifiers`.
|
|
4905
|
+
*/
|
|
4906
|
+
specifiers?: Array<Commit.Specifier>;
|
|
4907
|
+
}
|
|
4908
|
+
namespace Commit {
|
|
4909
|
+
interface Specifier {
|
|
4910
|
+
presentation_group_values?: {
|
|
4911
|
+
[key: string]: string;
|
|
4912
|
+
};
|
|
4913
|
+
pricing_group_values?: {
|
|
4914
|
+
[key: string]: string;
|
|
4915
|
+
};
|
|
4916
|
+
/**
|
|
4917
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
4918
|
+
*/
|
|
4919
|
+
product_id?: string;
|
|
4920
|
+
/**
|
|
4921
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
4922
|
+
* tags.
|
|
4923
|
+
*/
|
|
4924
|
+
product_tags?: Array<string>;
|
|
4925
|
+
}
|
|
4926
|
+
}
|
|
4927
|
+
interface PaymentGateConfig {
|
|
4928
|
+
/**
|
|
4929
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
4930
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
4931
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
4932
|
+
* wish to payment gate the commit balance.
|
|
4933
|
+
*/
|
|
4934
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
4935
|
+
/**
|
|
4936
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4937
|
+
*/
|
|
4938
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
4939
|
+
/**
|
|
4940
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4941
|
+
*/
|
|
4942
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
4943
|
+
/**
|
|
4944
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
4945
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
4946
|
+
* will default to NONE.
|
|
4947
|
+
*/
|
|
4948
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
4949
|
+
}
|
|
4950
|
+
namespace PaymentGateConfig {
|
|
4951
|
+
/**
|
|
4952
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4953
|
+
*/
|
|
4954
|
+
interface PrecalculatedTaxConfig {
|
|
4955
|
+
/**
|
|
4956
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
4957
|
+
* denomination as the commit's invoice schedule
|
|
4958
|
+
*/
|
|
4959
|
+
tax_amount: number;
|
|
4960
|
+
/**
|
|
4961
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
4962
|
+
* description.
|
|
4963
|
+
*/
|
|
4964
|
+
tax_name?: string;
|
|
4965
|
+
}
|
|
4966
|
+
/**
|
|
4967
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4968
|
+
*/
|
|
4969
|
+
interface StripeConfig {
|
|
4970
|
+
/**
|
|
4971
|
+
* If left blank, will default to INVOICE
|
|
4972
|
+
*/
|
|
4973
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
4974
|
+
/**
|
|
4975
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
4976
|
+
* your payment type.
|
|
4977
|
+
*/
|
|
4978
|
+
invoice_metadata?: {
|
|
4979
|
+
[key: string]: string;
|
|
4980
|
+
};
|
|
4981
|
+
}
|
|
4982
|
+
}
|
|
4983
|
+
}
|
|
2640
4984
|
interface AddProfessionalService {
|
|
2641
4985
|
/**
|
|
2642
4986
|
* Maximum amount for the term.
|
|
@@ -2653,7 +4997,9 @@ export declare namespace ContractEditParams {
|
|
|
2653
4997
|
* amount and must be specified.
|
|
2654
4998
|
*/
|
|
2655
4999
|
unit_price: number;
|
|
2656
|
-
custom_fields?:
|
|
5000
|
+
custom_fields?: {
|
|
5001
|
+
[key: string]: string;
|
|
5002
|
+
};
|
|
2657
5003
|
description?: string;
|
|
2658
5004
|
/**
|
|
2659
5005
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -2666,7 +5012,9 @@ export declare namespace ContractEditParams {
|
|
|
2666
5012
|
*/
|
|
2667
5013
|
access_amount: AddRecurringCommit.AccessAmount;
|
|
2668
5014
|
/**
|
|
2669
|
-
*
|
|
5015
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
5016
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
5017
|
+
* length of a period is determined by the recurrence_frequency.
|
|
2670
5018
|
*/
|
|
2671
5019
|
commit_duration: AddRecurringCommit.CommitDuration;
|
|
2672
5020
|
/**
|
|
@@ -2694,6 +5042,10 @@ export declare namespace ContractEditParams {
|
|
|
2694
5042
|
* Determines when the contract will stop creating recurring commits. optional
|
|
2695
5043
|
*/
|
|
2696
5044
|
ending_before?: string;
|
|
5045
|
+
/**
|
|
5046
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
5047
|
+
*/
|
|
5048
|
+
hierarchy_configuration?: AddRecurringCommit.HierarchyConfiguration;
|
|
2697
5049
|
/**
|
|
2698
5050
|
* The amount the customer should be billed for the commit. Not required.
|
|
2699
5051
|
*/
|
|
@@ -2719,16 +5071,29 @@ export declare namespace ContractEditParams {
|
|
|
2719
5071
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
2720
5072
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
2721
5073
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
2722
|
-
* be created aligned with the recurring commit's
|
|
5074
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2723
5075
|
* invoice dates.
|
|
2724
5076
|
*/
|
|
2725
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
5077
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2726
5078
|
/**
|
|
2727
5079
|
* Will be passed down to the individual commits. This controls how much of an
|
|
2728
5080
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
2729
5081
|
* between 0 and 1.
|
|
2730
5082
|
*/
|
|
2731
5083
|
rollover_fraction?: number;
|
|
5084
|
+
/**
|
|
5085
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
5086
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
5087
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
5088
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
5089
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
5090
|
+
* body of `specifiers`.
|
|
5091
|
+
*/
|
|
5092
|
+
specifiers?: Array<AddRecurringCommit.Specifier>;
|
|
5093
|
+
/**
|
|
5094
|
+
* Attach a subscription to the recurring commit/credit.
|
|
5095
|
+
*/
|
|
5096
|
+
subscription_config?: AddRecurringCommit.SubscriptionConfig;
|
|
2732
5097
|
/**
|
|
2733
5098
|
* A temporary ID that can be used to reference the recurring commit for commit
|
|
2734
5099
|
* specific overrides.
|
|
@@ -2741,15 +5106,39 @@ export declare namespace ContractEditParams {
|
|
|
2741
5106
|
*/
|
|
2742
5107
|
interface AccessAmount {
|
|
2743
5108
|
credit_type_id: string;
|
|
2744
|
-
quantity: number;
|
|
2745
5109
|
unit_price: number;
|
|
5110
|
+
/**
|
|
5111
|
+
* This field is currently required. Upcoming recurring commit/credit configuration
|
|
5112
|
+
* options will allow it to be optional.
|
|
5113
|
+
*/
|
|
5114
|
+
quantity?: number;
|
|
2746
5115
|
}
|
|
2747
5116
|
/**
|
|
2748
|
-
*
|
|
5117
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
5118
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
5119
|
+
* length of a period is determined by the recurrence_frequency.
|
|
2749
5120
|
*/
|
|
2750
5121
|
interface CommitDuration {
|
|
2751
|
-
unit: 'PERIODS';
|
|
2752
5122
|
value: number;
|
|
5123
|
+
unit?: 'PERIODS';
|
|
5124
|
+
}
|
|
5125
|
+
/**
|
|
5126
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
5127
|
+
*/
|
|
5128
|
+
interface HierarchyConfiguration {
|
|
5129
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
5130
|
+
}
|
|
5131
|
+
namespace HierarchyConfiguration {
|
|
5132
|
+
interface CommitHierarchyChildAccessAll {
|
|
5133
|
+
type: 'ALL';
|
|
5134
|
+
}
|
|
5135
|
+
interface CommitHierarchyChildAccessNone {
|
|
5136
|
+
type: 'NONE';
|
|
5137
|
+
}
|
|
5138
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
5139
|
+
contract_ids: Array<string>;
|
|
5140
|
+
type: 'CONTRACT_IDS';
|
|
5141
|
+
}
|
|
2753
5142
|
}
|
|
2754
5143
|
/**
|
|
2755
5144
|
* The amount the customer should be billed for the commit. Not required.
|
|
@@ -2759,6 +5148,45 @@ export declare namespace ContractEditParams {
|
|
|
2759
5148
|
quantity: number;
|
|
2760
5149
|
unit_price: number;
|
|
2761
5150
|
}
|
|
5151
|
+
interface Specifier {
|
|
5152
|
+
presentation_group_values?: {
|
|
5153
|
+
[key: string]: string;
|
|
5154
|
+
};
|
|
5155
|
+
pricing_group_values?: {
|
|
5156
|
+
[key: string]: string;
|
|
5157
|
+
};
|
|
5158
|
+
/**
|
|
5159
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
5160
|
+
*/
|
|
5161
|
+
product_id?: string;
|
|
5162
|
+
/**
|
|
5163
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
5164
|
+
* tags.
|
|
5165
|
+
*/
|
|
5166
|
+
product_tags?: Array<string>;
|
|
5167
|
+
}
|
|
5168
|
+
/**
|
|
5169
|
+
* Attach a subscription to the recurring commit/credit.
|
|
5170
|
+
*/
|
|
5171
|
+
interface SubscriptionConfig {
|
|
5172
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
5173
|
+
/**
|
|
5174
|
+
* ID of the subscription to configure on the recurring commit/credit.
|
|
5175
|
+
*/
|
|
5176
|
+
subscription_id: string;
|
|
5177
|
+
/**
|
|
5178
|
+
* If set to POOLED, allocation added per seat is pooled across the account.
|
|
5179
|
+
*/
|
|
5180
|
+
allocation?: 'POOLED';
|
|
5181
|
+
}
|
|
5182
|
+
namespace SubscriptionConfig {
|
|
5183
|
+
interface ApplySeatIncreaseConfig {
|
|
5184
|
+
/**
|
|
5185
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
5186
|
+
*/
|
|
5187
|
+
is_prorated: boolean;
|
|
5188
|
+
}
|
|
5189
|
+
}
|
|
2762
5190
|
}
|
|
2763
5191
|
interface AddRecurringCredit {
|
|
2764
5192
|
/**
|
|
@@ -2766,7 +5194,9 @@ export declare namespace ContractEditParams {
|
|
|
2766
5194
|
*/
|
|
2767
5195
|
access_amount: AddRecurringCredit.AccessAmount;
|
|
2768
5196
|
/**
|
|
2769
|
-
*
|
|
5197
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
5198
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
5199
|
+
* length of a period is determined by the recurrence_frequency.
|
|
2770
5200
|
*/
|
|
2771
5201
|
commit_duration: AddRecurringCredit.CommitDuration;
|
|
2772
5202
|
/**
|
|
@@ -2794,6 +5224,10 @@ export declare namespace ContractEditParams {
|
|
|
2794
5224
|
* Determines when the contract will stop creating recurring commits. optional
|
|
2795
5225
|
*/
|
|
2796
5226
|
ending_before?: string;
|
|
5227
|
+
/**
|
|
5228
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
5229
|
+
*/
|
|
5230
|
+
hierarchy_configuration?: AddRecurringCredit.HierarchyConfiguration;
|
|
2797
5231
|
/**
|
|
2798
5232
|
* displayed on invoices. will be passed through to the individual commits
|
|
2799
5233
|
*/
|
|
@@ -2815,16 +5249,29 @@ export declare namespace ContractEditParams {
|
|
|
2815
5249
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
2816
5250
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
2817
5251
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
2818
|
-
* be created aligned with the recurring commit's
|
|
5252
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2819
5253
|
* invoice dates.
|
|
2820
5254
|
*/
|
|
2821
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
5255
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2822
5256
|
/**
|
|
2823
5257
|
* Will be passed down to the individual commits. This controls how much of an
|
|
2824
5258
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
2825
5259
|
* between 0 and 1.
|
|
2826
5260
|
*/
|
|
2827
5261
|
rollover_fraction?: number;
|
|
5262
|
+
/**
|
|
5263
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
5264
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
5265
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
5266
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
5267
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
5268
|
+
* body of `specifiers`.
|
|
5269
|
+
*/
|
|
5270
|
+
specifiers?: Array<AddRecurringCredit.Specifier>;
|
|
5271
|
+
/**
|
|
5272
|
+
* Attach a subscription to the recurring commit/credit.
|
|
5273
|
+
*/
|
|
5274
|
+
subscription_config?: AddRecurringCredit.SubscriptionConfig;
|
|
2828
5275
|
/**
|
|
2829
5276
|
* A temporary ID that can be used to reference the recurring commit for commit
|
|
2830
5277
|
* specific overrides.
|
|
@@ -2837,15 +5284,78 @@ export declare namespace ContractEditParams {
|
|
|
2837
5284
|
*/
|
|
2838
5285
|
interface AccessAmount {
|
|
2839
5286
|
credit_type_id: string;
|
|
2840
|
-
quantity: number;
|
|
2841
5287
|
unit_price: number;
|
|
5288
|
+
/**
|
|
5289
|
+
* This field is currently required. Upcoming recurring commit/credit configuration
|
|
5290
|
+
* options will allow it to be optional.
|
|
5291
|
+
*/
|
|
5292
|
+
quantity?: number;
|
|
5293
|
+
}
|
|
5294
|
+
/**
|
|
5295
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
5296
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
5297
|
+
* length of a period is determined by the recurrence_frequency.
|
|
5298
|
+
*/
|
|
5299
|
+
interface CommitDuration {
|
|
5300
|
+
value: number;
|
|
5301
|
+
unit?: 'PERIODS';
|
|
5302
|
+
}
|
|
5303
|
+
/**
|
|
5304
|
+
* Optional configuration for recurring credit hierarchy access control
|
|
5305
|
+
*/
|
|
5306
|
+
interface HierarchyConfiguration {
|
|
5307
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
5308
|
+
}
|
|
5309
|
+
namespace HierarchyConfiguration {
|
|
5310
|
+
interface CommitHierarchyChildAccessAll {
|
|
5311
|
+
type: 'ALL';
|
|
5312
|
+
}
|
|
5313
|
+
interface CommitHierarchyChildAccessNone {
|
|
5314
|
+
type: 'NONE';
|
|
5315
|
+
}
|
|
5316
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
5317
|
+
contract_ids: Array<string>;
|
|
5318
|
+
type: 'CONTRACT_IDS';
|
|
5319
|
+
}
|
|
5320
|
+
}
|
|
5321
|
+
interface Specifier {
|
|
5322
|
+
presentation_group_values?: {
|
|
5323
|
+
[key: string]: string;
|
|
5324
|
+
};
|
|
5325
|
+
pricing_group_values?: {
|
|
5326
|
+
[key: string]: string;
|
|
5327
|
+
};
|
|
5328
|
+
/**
|
|
5329
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
5330
|
+
*/
|
|
5331
|
+
product_id?: string;
|
|
5332
|
+
/**
|
|
5333
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
5334
|
+
* tags.
|
|
5335
|
+
*/
|
|
5336
|
+
product_tags?: Array<string>;
|
|
2842
5337
|
}
|
|
2843
5338
|
/**
|
|
2844
|
-
*
|
|
5339
|
+
* Attach a subscription to the recurring commit/credit.
|
|
2845
5340
|
*/
|
|
2846
|
-
interface
|
|
2847
|
-
|
|
2848
|
-
|
|
5341
|
+
interface SubscriptionConfig {
|
|
5342
|
+
apply_seat_increase_config: SubscriptionConfig.ApplySeatIncreaseConfig;
|
|
5343
|
+
/**
|
|
5344
|
+
* ID of the subscription to configure on the recurring commit/credit.
|
|
5345
|
+
*/
|
|
5346
|
+
subscription_id: string;
|
|
5347
|
+
/**
|
|
5348
|
+
* If set to POOLED, allocation added per seat is pooled across the account.
|
|
5349
|
+
*/
|
|
5350
|
+
allocation?: 'POOLED';
|
|
5351
|
+
}
|
|
5352
|
+
namespace SubscriptionConfig {
|
|
5353
|
+
interface ApplySeatIncreaseConfig {
|
|
5354
|
+
/**
|
|
5355
|
+
* Indicates whether a mid-period seat increase should be prorated.
|
|
5356
|
+
*/
|
|
5357
|
+
is_prorated: boolean;
|
|
5358
|
+
}
|
|
2849
5359
|
}
|
|
2850
5360
|
}
|
|
2851
5361
|
interface AddResellerRoyalty {
|
|
@@ -2901,7 +5411,7 @@ export declare namespace ContractEditParams {
|
|
|
2901
5411
|
*/
|
|
2902
5412
|
interface Schedule {
|
|
2903
5413
|
/**
|
|
2904
|
-
* Defaults to USD if not passed.
|
|
5414
|
+
* Defaults to USD (cents) if not passed.
|
|
2905
5415
|
*/
|
|
2906
5416
|
credit_type_id?: string;
|
|
2907
5417
|
/**
|
|
@@ -2927,7 +5437,7 @@ export declare namespace ContractEditParams {
|
|
|
2927
5437
|
* RFC 3339 timestamp (exclusive).
|
|
2928
5438
|
*/
|
|
2929
5439
|
ending_before: string;
|
|
2930
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
|
|
5440
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
2931
5441
|
/**
|
|
2932
5442
|
* RFC 3339 timestamp (inclusive).
|
|
2933
5443
|
*/
|
|
@@ -2977,19 +5487,176 @@ export declare namespace ContractEditParams {
|
|
|
2977
5487
|
}
|
|
2978
5488
|
}
|
|
2979
5489
|
}
|
|
5490
|
+
interface AddSpendThresholdConfiguration {
|
|
5491
|
+
commit: AddSpendThresholdConfiguration.Commit;
|
|
5492
|
+
/**
|
|
5493
|
+
* When set to false, the contract will not be evaluated against the
|
|
5494
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
5495
|
+
* regardless of prior state.
|
|
5496
|
+
*/
|
|
5497
|
+
is_enabled: boolean;
|
|
5498
|
+
payment_gate_config: AddSpendThresholdConfiguration.PaymentGateConfig;
|
|
5499
|
+
/**
|
|
5500
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
5501
|
+
* hits this amount, a threshold charge will be initiated.
|
|
5502
|
+
*/
|
|
5503
|
+
threshold_amount: number;
|
|
5504
|
+
}
|
|
5505
|
+
namespace AddSpendThresholdConfiguration {
|
|
5506
|
+
interface Commit {
|
|
5507
|
+
/**
|
|
5508
|
+
* The commit product that will be used to generate the line item for commit
|
|
5509
|
+
* payment.
|
|
5510
|
+
*/
|
|
5511
|
+
product_id: string;
|
|
5512
|
+
description?: string;
|
|
5513
|
+
/**
|
|
5514
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
5515
|
+
* will default to the commit product name.
|
|
5516
|
+
*/
|
|
5517
|
+
name?: string;
|
|
5518
|
+
}
|
|
5519
|
+
interface PaymentGateConfig {
|
|
5520
|
+
/**
|
|
5521
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
5522
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
5523
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
5524
|
+
* wish to payment gate the commit balance.
|
|
5525
|
+
*/
|
|
5526
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
5527
|
+
/**
|
|
5528
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5529
|
+
*/
|
|
5530
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
5531
|
+
/**
|
|
5532
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5533
|
+
*/
|
|
5534
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
5535
|
+
/**
|
|
5536
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
5537
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
5538
|
+
* will default to NONE.
|
|
5539
|
+
*/
|
|
5540
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
5541
|
+
}
|
|
5542
|
+
namespace PaymentGateConfig {
|
|
5543
|
+
/**
|
|
5544
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5545
|
+
*/
|
|
5546
|
+
interface PrecalculatedTaxConfig {
|
|
5547
|
+
/**
|
|
5548
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
5549
|
+
* denomination as the commit's invoice schedule
|
|
5550
|
+
*/
|
|
5551
|
+
tax_amount: number;
|
|
5552
|
+
/**
|
|
5553
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
5554
|
+
* description.
|
|
5555
|
+
*/
|
|
5556
|
+
tax_name?: string;
|
|
5557
|
+
}
|
|
5558
|
+
/**
|
|
5559
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5560
|
+
*/
|
|
5561
|
+
interface StripeConfig {
|
|
5562
|
+
/**
|
|
5563
|
+
* If left blank, will default to INVOICE
|
|
5564
|
+
*/
|
|
5565
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
5566
|
+
/**
|
|
5567
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
5568
|
+
* your payment type.
|
|
5569
|
+
*/
|
|
5570
|
+
invoice_metadata?: {
|
|
5571
|
+
[key: string]: string;
|
|
5572
|
+
};
|
|
5573
|
+
}
|
|
5574
|
+
}
|
|
5575
|
+
}
|
|
5576
|
+
interface AddSubscription {
|
|
5577
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
5578
|
+
initial_quantity: number;
|
|
5579
|
+
proration: AddSubscription.Proration;
|
|
5580
|
+
subscription_rate: AddSubscription.SubscriptionRate;
|
|
5581
|
+
custom_fields?: {
|
|
5582
|
+
[key: string]: string;
|
|
5583
|
+
};
|
|
5584
|
+
description?: string;
|
|
5585
|
+
/**
|
|
5586
|
+
* Exclusive end time for the subscription. If not provided, subscription inherits
|
|
5587
|
+
* contract end date.
|
|
5588
|
+
*/
|
|
5589
|
+
ending_before?: string;
|
|
5590
|
+
name?: string;
|
|
5591
|
+
/**
|
|
5592
|
+
* Inclusive start time for the subscription. If not provided, defaults to contract
|
|
5593
|
+
* start date
|
|
5594
|
+
*/
|
|
5595
|
+
starting_at?: string;
|
|
5596
|
+
/**
|
|
5597
|
+
* A temporary ID used to reference the subscription in recurring commit/credit
|
|
5598
|
+
* subscription configs created within the same payload.
|
|
5599
|
+
*/
|
|
5600
|
+
temporary_id?: string;
|
|
5601
|
+
}
|
|
5602
|
+
namespace AddSubscription {
|
|
5603
|
+
interface Proration {
|
|
5604
|
+
/**
|
|
5605
|
+
* Indicates how mid-period quantity adjustments are invoiced.
|
|
5606
|
+
* **BILL_IMMEDIATELY**: Only available when collection schedule is `ADVANCE`. The
|
|
5607
|
+
* quantity increase will be billed immediately on the scheduled date.
|
|
5608
|
+
* **BILL_ON_NEXT_COLLECTION_DATE**: The quantity increase will be billed for
|
|
5609
|
+
* in-arrears at the end of the period.
|
|
5610
|
+
*/
|
|
5611
|
+
invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
5612
|
+
/**
|
|
5613
|
+
* Indicates if the partial period will be prorated or charged a full amount.
|
|
5614
|
+
*/
|
|
5615
|
+
is_prorated?: boolean;
|
|
5616
|
+
}
|
|
5617
|
+
interface SubscriptionRate {
|
|
5618
|
+
/**
|
|
5619
|
+
* Frequency to bill subscription with. Together with product_id, must match
|
|
5620
|
+
* existing rate on the rate card.
|
|
5621
|
+
*/
|
|
5622
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
5623
|
+
/**
|
|
5624
|
+
* Must be subscription type product
|
|
5625
|
+
*/
|
|
5626
|
+
product_id: string;
|
|
5627
|
+
}
|
|
5628
|
+
}
|
|
5629
|
+
interface ArchiveCommit {
|
|
5630
|
+
id: string;
|
|
5631
|
+
}
|
|
5632
|
+
interface ArchiveCredit {
|
|
5633
|
+
id: string;
|
|
5634
|
+
}
|
|
5635
|
+
interface ArchiveScheduledCharge {
|
|
5636
|
+
id: string;
|
|
5637
|
+
}
|
|
5638
|
+
interface RemoveOverride {
|
|
5639
|
+
id: string;
|
|
5640
|
+
}
|
|
2980
5641
|
interface UpdateCommit {
|
|
2981
5642
|
commit_id: string;
|
|
2982
5643
|
access_schedule?: UpdateCommit.AccessSchedule;
|
|
2983
5644
|
/**
|
|
2984
|
-
* Which products the commit applies to. If
|
|
2985
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5645
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
5646
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5647
|
+
* all products.
|
|
2986
5648
|
*/
|
|
2987
5649
|
applicable_product_ids?: Array<string> | null;
|
|
2988
5650
|
/**
|
|
2989
|
-
* Which tags the commit applies to. If
|
|
2990
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5651
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
5652
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5653
|
+
* all products.
|
|
2991
5654
|
*/
|
|
2992
5655
|
applicable_product_tags?: Array<string> | null;
|
|
5656
|
+
/**
|
|
5657
|
+
* Optional configuration for commit hierarchy access control
|
|
5658
|
+
*/
|
|
5659
|
+
hierarchy_configuration?: UpdateCommit.HierarchyConfiguration;
|
|
2993
5660
|
invoice_schedule?: UpdateCommit.InvoiceSchedule;
|
|
2994
5661
|
netsuite_sales_order_id?: string | null;
|
|
2995
5662
|
product_id?: string;
|
|
@@ -3017,6 +5684,24 @@ export declare namespace ContractEditParams {
|
|
|
3017
5684
|
starting_at?: string;
|
|
3018
5685
|
}
|
|
3019
5686
|
}
|
|
5687
|
+
/**
|
|
5688
|
+
* Optional configuration for commit hierarchy access control
|
|
5689
|
+
*/
|
|
5690
|
+
interface HierarchyConfiguration {
|
|
5691
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
5692
|
+
}
|
|
5693
|
+
namespace HierarchyConfiguration {
|
|
5694
|
+
interface CommitHierarchyChildAccessAll {
|
|
5695
|
+
type: 'ALL';
|
|
5696
|
+
}
|
|
5697
|
+
interface CommitHierarchyChildAccessNone {
|
|
5698
|
+
type: 'NONE';
|
|
5699
|
+
}
|
|
5700
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
5701
|
+
contract_ids: Array<string>;
|
|
5702
|
+
type: 'CONTRACT_IDS';
|
|
5703
|
+
}
|
|
5704
|
+
}
|
|
3020
5705
|
interface InvoiceSchedule {
|
|
3021
5706
|
add_schedule_items?: Array<InvoiceSchedule.AddScheduleItem>;
|
|
3022
5707
|
remove_schedule_items?: Array<InvoiceSchedule.RemoveScheduleItem>;
|
|
@@ -3045,15 +5730,21 @@ export declare namespace ContractEditParams {
|
|
|
3045
5730
|
credit_id: string;
|
|
3046
5731
|
access_schedule?: UpdateCredit.AccessSchedule;
|
|
3047
5732
|
/**
|
|
3048
|
-
* Which products the commit applies to. If
|
|
3049
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5733
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
5734
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5735
|
+
* all products.
|
|
3050
5736
|
*/
|
|
3051
5737
|
applicable_product_ids?: Array<string> | null;
|
|
3052
5738
|
/**
|
|
3053
|
-
* Which tags the commit applies to. If
|
|
3054
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5739
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
5740
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5741
|
+
* all products.
|
|
3055
5742
|
*/
|
|
3056
5743
|
applicable_product_tags?: Array<string> | null;
|
|
5744
|
+
/**
|
|
5745
|
+
* Optional configuration for commit hierarchy access control
|
|
5746
|
+
*/
|
|
5747
|
+
hierarchy_configuration?: UpdateCredit.HierarchyConfiguration;
|
|
3057
5748
|
netsuite_sales_order_id?: string | null;
|
|
3058
5749
|
product_id?: string;
|
|
3059
5750
|
}
|
|
@@ -3079,6 +5770,185 @@ export declare namespace ContractEditParams {
|
|
|
3079
5770
|
starting_at?: string;
|
|
3080
5771
|
}
|
|
3081
5772
|
}
|
|
5773
|
+
/**
|
|
5774
|
+
* Optional configuration for commit hierarchy access control
|
|
5775
|
+
*/
|
|
5776
|
+
interface HierarchyConfiguration {
|
|
5777
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
5778
|
+
}
|
|
5779
|
+
namespace HierarchyConfiguration {
|
|
5780
|
+
interface CommitHierarchyChildAccessAll {
|
|
5781
|
+
type: 'ALL';
|
|
5782
|
+
}
|
|
5783
|
+
interface CommitHierarchyChildAccessNone {
|
|
5784
|
+
type: 'NONE';
|
|
5785
|
+
}
|
|
5786
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
5787
|
+
contract_ids: Array<string>;
|
|
5788
|
+
type: 'CONTRACT_IDS';
|
|
5789
|
+
}
|
|
5790
|
+
}
|
|
5791
|
+
}
|
|
5792
|
+
interface UpdatePrepaidBalanceThresholdConfiguration {
|
|
5793
|
+
commit?: UpdatePrepaidBalanceThresholdConfiguration.Commit;
|
|
5794
|
+
/**
|
|
5795
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
5796
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
5797
|
+
*/
|
|
5798
|
+
custom_credit_type_id?: string | null;
|
|
5799
|
+
/**
|
|
5800
|
+
* When set to false, the contract will not be evaluated against the
|
|
5801
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
5802
|
+
* regardless of prior state.
|
|
5803
|
+
*/
|
|
5804
|
+
is_enabled?: boolean;
|
|
5805
|
+
payment_gate_config?: UpdatePrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
5806
|
+
/**
|
|
5807
|
+
* Specify the amount the balance should be recharged to.
|
|
5808
|
+
*/
|
|
5809
|
+
recharge_to_amount?: number;
|
|
5810
|
+
/**
|
|
5811
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
5812
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
5813
|
+
*/
|
|
5814
|
+
threshold_amount?: number;
|
|
5815
|
+
}
|
|
5816
|
+
namespace UpdatePrepaidBalanceThresholdConfiguration {
|
|
5817
|
+
interface Commit {
|
|
5818
|
+
/**
|
|
5819
|
+
* Which products the threshold commit applies to. If both applicable_product_ids
|
|
5820
|
+
* and applicable_product_tags are not provided, the commit applies to all
|
|
5821
|
+
* products.
|
|
5822
|
+
*/
|
|
5823
|
+
applicable_product_ids?: Array<string> | null;
|
|
5824
|
+
/**
|
|
5825
|
+
* Which tags the threshold commit applies to. If both applicable_product_ids and
|
|
5826
|
+
* applicable_product_tags are not provided, the commit applies to all products.
|
|
5827
|
+
*/
|
|
5828
|
+
applicable_product_tags?: Array<string> | null;
|
|
5829
|
+
description?: string;
|
|
5830
|
+
/**
|
|
5831
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
5832
|
+
* will default to the commit product name.
|
|
5833
|
+
*/
|
|
5834
|
+
name?: string;
|
|
5835
|
+
/**
|
|
5836
|
+
* The commit product that will be used to generate the line item for commit
|
|
5837
|
+
* payment.
|
|
5838
|
+
*/
|
|
5839
|
+
product_id?: string;
|
|
5840
|
+
/**
|
|
5841
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
5842
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
5843
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
5844
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
5845
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
5846
|
+
* body of `specifiers`.
|
|
5847
|
+
*/
|
|
5848
|
+
specifiers?: Array<Commit.Specifier> | null;
|
|
5849
|
+
}
|
|
5850
|
+
namespace Commit {
|
|
5851
|
+
interface Specifier {
|
|
5852
|
+
presentation_group_values?: {
|
|
5853
|
+
[key: string]: string;
|
|
5854
|
+
};
|
|
5855
|
+
pricing_group_values?: {
|
|
5856
|
+
[key: string]: string;
|
|
5857
|
+
};
|
|
5858
|
+
/**
|
|
5859
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
5860
|
+
*/
|
|
5861
|
+
product_id?: string;
|
|
5862
|
+
/**
|
|
5863
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
5864
|
+
* tags.
|
|
5865
|
+
*/
|
|
5866
|
+
product_tags?: Array<string>;
|
|
5867
|
+
}
|
|
5868
|
+
}
|
|
5869
|
+
interface PaymentGateConfig {
|
|
5870
|
+
/**
|
|
5871
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
5872
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
5873
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
5874
|
+
* wish to payment gate the commit balance.
|
|
5875
|
+
*/
|
|
5876
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
5877
|
+
/**
|
|
5878
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5879
|
+
*/
|
|
5880
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
5881
|
+
/**
|
|
5882
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5883
|
+
*/
|
|
5884
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
5885
|
+
/**
|
|
5886
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
5887
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
5888
|
+
* will default to NONE.
|
|
5889
|
+
*/
|
|
5890
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
5891
|
+
}
|
|
5892
|
+
namespace PaymentGateConfig {
|
|
5893
|
+
/**
|
|
5894
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5895
|
+
*/
|
|
5896
|
+
interface PrecalculatedTaxConfig {
|
|
5897
|
+
/**
|
|
5898
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
5899
|
+
* denomination as the commit's invoice schedule
|
|
5900
|
+
*/
|
|
5901
|
+
tax_amount: number;
|
|
5902
|
+
/**
|
|
5903
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
5904
|
+
* description.
|
|
5905
|
+
*/
|
|
5906
|
+
tax_name?: string;
|
|
5907
|
+
}
|
|
5908
|
+
/**
|
|
5909
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5910
|
+
*/
|
|
5911
|
+
interface StripeConfig {
|
|
5912
|
+
/**
|
|
5913
|
+
* If left blank, will default to INVOICE
|
|
5914
|
+
*/
|
|
5915
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
5916
|
+
/**
|
|
5917
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
5918
|
+
* your payment type.
|
|
5919
|
+
*/
|
|
5920
|
+
invoice_metadata?: {
|
|
5921
|
+
[key: string]: string;
|
|
5922
|
+
};
|
|
5923
|
+
}
|
|
5924
|
+
}
|
|
5925
|
+
}
|
|
5926
|
+
interface UpdateRecurringCommit {
|
|
5927
|
+
recurring_commit_id: string;
|
|
5928
|
+
access_amount?: UpdateRecurringCommit.AccessAmount;
|
|
5929
|
+
ending_before?: string | null;
|
|
5930
|
+
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
5931
|
+
}
|
|
5932
|
+
namespace UpdateRecurringCommit {
|
|
5933
|
+
interface AccessAmount {
|
|
5934
|
+
quantity?: number;
|
|
5935
|
+
unit_price?: number;
|
|
5936
|
+
}
|
|
5937
|
+
interface InvoiceAmount {
|
|
5938
|
+
quantity?: number;
|
|
5939
|
+
unit_price?: number;
|
|
5940
|
+
}
|
|
5941
|
+
}
|
|
5942
|
+
interface UpdateRecurringCredit {
|
|
5943
|
+
recurring_credit_id: string;
|
|
5944
|
+
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
5945
|
+
ending_before?: string | null;
|
|
5946
|
+
}
|
|
5947
|
+
namespace UpdateRecurringCredit {
|
|
5948
|
+
interface AccessAmount {
|
|
5949
|
+
quantity?: number;
|
|
5950
|
+
unit_price?: number;
|
|
5951
|
+
}
|
|
3082
5952
|
}
|
|
3083
5953
|
interface UpdateScheduledCharge {
|
|
3084
5954
|
scheduled_charge_id: string;
|
|
@@ -3110,6 +5980,118 @@ export declare namespace ContractEditParams {
|
|
|
3110
5980
|
}
|
|
3111
5981
|
}
|
|
3112
5982
|
}
|
|
5983
|
+
interface UpdateSpendThresholdConfiguration {
|
|
5984
|
+
commit?: UpdateSpendThresholdConfiguration.Commit;
|
|
5985
|
+
/**
|
|
5986
|
+
* When set to false, the contract will not be evaluated against the
|
|
5987
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
5988
|
+
* regardless of prior state.
|
|
5989
|
+
*/
|
|
5990
|
+
is_enabled?: boolean;
|
|
5991
|
+
payment_gate_config?: UpdateSpendThresholdConfiguration.PaymentGateConfig;
|
|
5992
|
+
/**
|
|
5993
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
5994
|
+
* hits this amount, a threshold charge will be initiated.
|
|
5995
|
+
*/
|
|
5996
|
+
threshold_amount?: number;
|
|
5997
|
+
}
|
|
5998
|
+
namespace UpdateSpendThresholdConfiguration {
|
|
5999
|
+
interface Commit {
|
|
6000
|
+
description?: string;
|
|
6001
|
+
/**
|
|
6002
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
6003
|
+
* will default to the commit product name.
|
|
6004
|
+
*/
|
|
6005
|
+
name?: string;
|
|
6006
|
+
/**
|
|
6007
|
+
* The commit product that will be used to generate the line item for commit
|
|
6008
|
+
* payment.
|
|
6009
|
+
*/
|
|
6010
|
+
product_id?: string;
|
|
6011
|
+
}
|
|
6012
|
+
interface PaymentGateConfig {
|
|
6013
|
+
/**
|
|
6014
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
6015
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
6016
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
6017
|
+
* wish to payment gate the commit balance.
|
|
6018
|
+
*/
|
|
6019
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
6020
|
+
/**
|
|
6021
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
6022
|
+
*/
|
|
6023
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
6024
|
+
/**
|
|
6025
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
6026
|
+
*/
|
|
6027
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
6028
|
+
/**
|
|
6029
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
6030
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
6031
|
+
* will default to NONE.
|
|
6032
|
+
*/
|
|
6033
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
6034
|
+
}
|
|
6035
|
+
namespace PaymentGateConfig {
|
|
6036
|
+
/**
|
|
6037
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
6038
|
+
*/
|
|
6039
|
+
interface PrecalculatedTaxConfig {
|
|
6040
|
+
/**
|
|
6041
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
6042
|
+
* denomination as the commit's invoice schedule
|
|
6043
|
+
*/
|
|
6044
|
+
tax_amount: number;
|
|
6045
|
+
/**
|
|
6046
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
6047
|
+
* description.
|
|
6048
|
+
*/
|
|
6049
|
+
tax_name?: string;
|
|
6050
|
+
}
|
|
6051
|
+
/**
|
|
6052
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
6053
|
+
*/
|
|
6054
|
+
interface StripeConfig {
|
|
6055
|
+
/**
|
|
6056
|
+
* If left blank, will default to INVOICE
|
|
6057
|
+
*/
|
|
6058
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
6059
|
+
/**
|
|
6060
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
6061
|
+
* your payment type.
|
|
6062
|
+
*/
|
|
6063
|
+
invoice_metadata?: {
|
|
6064
|
+
[key: string]: string;
|
|
6065
|
+
};
|
|
6066
|
+
}
|
|
6067
|
+
}
|
|
6068
|
+
}
|
|
6069
|
+
interface UpdateSubscription {
|
|
6070
|
+
subscription_id: string;
|
|
6071
|
+
ending_before?: string | null;
|
|
6072
|
+
/**
|
|
6073
|
+
* Quantity changes are applied on the effective date based on the order which they
|
|
6074
|
+
* are sent. For example, if I scheduled the quantity to be 12 on May 21 and then
|
|
6075
|
+
* scheduled a quantity delta change of -1, the result from that day would be 11.
|
|
6076
|
+
*/
|
|
6077
|
+
quantity_updates?: Array<UpdateSubscription.QuantityUpdate>;
|
|
6078
|
+
}
|
|
6079
|
+
namespace UpdateSubscription {
|
|
6080
|
+
interface QuantityUpdate {
|
|
6081
|
+
starting_at: string;
|
|
6082
|
+
/**
|
|
6083
|
+
* The new quantity for the subscription. Must be provided if quantity_delta is not
|
|
6084
|
+
* provided. Must be non-negative.
|
|
6085
|
+
*/
|
|
6086
|
+
quantity?: number;
|
|
6087
|
+
/**
|
|
6088
|
+
* The delta to add to the subscription's quantity. Must be provided if quantity is
|
|
6089
|
+
* not provided. Can't be zero. It also can't result in a negative quantity on the
|
|
6090
|
+
* subscription.
|
|
6091
|
+
*/
|
|
6092
|
+
quantity_delta?: number;
|
|
6093
|
+
}
|
|
6094
|
+
}
|
|
3113
6095
|
}
|
|
3114
6096
|
export interface ContractEditCommitParams {
|
|
3115
6097
|
/**
|
|
@@ -3122,13 +6104,15 @@ export interface ContractEditCommitParams {
|
|
|
3122
6104
|
customer_id: string;
|
|
3123
6105
|
access_schedule?: ContractEditCommitParams.AccessSchedule;
|
|
3124
6106
|
/**
|
|
3125
|
-
* Which products the commit applies to. If
|
|
3126
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
6107
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
6108
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
6109
|
+
* all products.
|
|
3127
6110
|
*/
|
|
3128
6111
|
applicable_product_ids?: Array<string> | null;
|
|
3129
6112
|
/**
|
|
3130
|
-
* Which tags the commit applies to. If
|
|
3131
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
6113
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
6114
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
6115
|
+
* all products.
|
|
3132
6116
|
*/
|
|
3133
6117
|
applicable_product_tags?: Array<string> | null;
|
|
3134
6118
|
/**
|
|
@@ -3137,6 +6121,15 @@ export interface ContractEditCommitParams {
|
|
|
3137
6121
|
invoice_contract_id?: string;
|
|
3138
6122
|
invoice_schedule?: ContractEditCommitParams.InvoiceSchedule;
|
|
3139
6123
|
product_id?: string;
|
|
6124
|
+
/**
|
|
6125
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
6126
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
6127
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
6128
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
6129
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
6130
|
+
* body of `specifiers`.
|
|
6131
|
+
*/
|
|
6132
|
+
specifiers?: Array<ContractEditCommitParams.Specifier> | null;
|
|
3140
6133
|
}
|
|
3141
6134
|
export declare namespace ContractEditCommitParams {
|
|
3142
6135
|
interface AccessSchedule {
|
|
@@ -3183,6 +6176,23 @@ export declare namespace ContractEditCommitParams {
|
|
|
3183
6176
|
unit_price?: number;
|
|
3184
6177
|
}
|
|
3185
6178
|
}
|
|
6179
|
+
interface Specifier {
|
|
6180
|
+
presentation_group_values?: {
|
|
6181
|
+
[key: string]: string;
|
|
6182
|
+
};
|
|
6183
|
+
pricing_group_values?: {
|
|
6184
|
+
[key: string]: string;
|
|
6185
|
+
};
|
|
6186
|
+
/**
|
|
6187
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
6188
|
+
*/
|
|
6189
|
+
product_id?: string;
|
|
6190
|
+
/**
|
|
6191
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
6192
|
+
* tags.
|
|
6193
|
+
*/
|
|
6194
|
+
product_tags?: Array<string>;
|
|
6195
|
+
}
|
|
3186
6196
|
}
|
|
3187
6197
|
export interface ContractEditCreditParams {
|
|
3188
6198
|
/**
|
|
@@ -3205,6 +6215,15 @@ export interface ContractEditCreditParams {
|
|
|
3205
6215
|
*/
|
|
3206
6216
|
applicable_product_tags?: Array<string> | null;
|
|
3207
6217
|
product_id?: string;
|
|
6218
|
+
/**
|
|
6219
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
6220
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
6221
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
6222
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
6223
|
+
* Instead, to target usage by product or product tag, pass those values in the
|
|
6224
|
+
* body of `specifiers`.
|
|
6225
|
+
*/
|
|
6226
|
+
specifiers?: Array<ContractEditCreditParams.Specifier> | null;
|
|
3208
6227
|
}
|
|
3209
6228
|
export declare namespace ContractEditCreditParams {
|
|
3210
6229
|
interface AccessSchedule {
|
|
@@ -3228,6 +6247,23 @@ export declare namespace ContractEditCreditParams {
|
|
|
3228
6247
|
starting_at?: string;
|
|
3229
6248
|
}
|
|
3230
6249
|
}
|
|
6250
|
+
interface Specifier {
|
|
6251
|
+
presentation_group_values?: {
|
|
6252
|
+
[key: string]: string;
|
|
6253
|
+
};
|
|
6254
|
+
pricing_group_values?: {
|
|
6255
|
+
[key: string]: string;
|
|
6256
|
+
};
|
|
6257
|
+
/**
|
|
6258
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
6259
|
+
*/
|
|
6260
|
+
product_id?: string;
|
|
6261
|
+
/**
|
|
6262
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
6263
|
+
* tags.
|
|
6264
|
+
*/
|
|
6265
|
+
product_tags?: Array<string>;
|
|
6266
|
+
}
|
|
3231
6267
|
}
|
|
3232
6268
|
export interface ContractGetEditHistoryParams {
|
|
3233
6269
|
contract_id: string;
|