@metronome/sdk 0.1.0-beta.9 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +179 -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 -1
- 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 +473 -37
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.ts +26 -2
- 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 +1478 -102
- 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 +28 -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 +30 -2
- 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 +2923 -207
- 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 +539 -40
- package/src/resources/v1/alerts.ts +29 -5
- 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 +1643 -124
- 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 +32 -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 +30 -4
- 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 +3397 -235
- 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
|
*/
|
|
@@ -216,6 +355,12 @@ export declare namespace ContractRetrieveResponse {
|
|
|
216
355
|
timestamp: string;
|
|
217
356
|
type: 'PREPAID_COMMIT_CREDITED';
|
|
218
357
|
}
|
|
358
|
+
interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
359
|
+
amount: number;
|
|
360
|
+
segment_id: string;
|
|
361
|
+
timestamp: string;
|
|
362
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
363
|
+
}
|
|
219
364
|
interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
220
365
|
amount: number;
|
|
221
366
|
timestamp: string;
|
|
@@ -262,6 +407,23 @@ export declare namespace ContractRetrieveResponse {
|
|
|
262
407
|
commit_id: string;
|
|
263
408
|
contract_id: string;
|
|
264
409
|
}
|
|
410
|
+
interface Specifier {
|
|
411
|
+
presentation_group_values?: {
|
|
412
|
+
[key: string]: string;
|
|
413
|
+
};
|
|
414
|
+
pricing_group_values?: {
|
|
415
|
+
[key: string]: string;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
419
|
+
*/
|
|
420
|
+
product_id?: string;
|
|
421
|
+
/**
|
|
422
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
423
|
+
* tags.
|
|
424
|
+
*/
|
|
425
|
+
product_tags?: Array<string>;
|
|
426
|
+
}
|
|
265
427
|
}
|
|
266
428
|
interface Override {
|
|
267
429
|
id: string;
|
|
@@ -281,10 +443,14 @@ export declare namespace ContractRetrieveResponse {
|
|
|
281
443
|
}
|
|
282
444
|
namespace Override {
|
|
283
445
|
interface OverrideSpecifier {
|
|
284
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
446
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
285
447
|
commit_ids?: Array<string>;
|
|
286
|
-
presentation_group_values?:
|
|
287
|
-
|
|
448
|
+
presentation_group_values?: {
|
|
449
|
+
[key: string]: string | null;
|
|
450
|
+
};
|
|
451
|
+
pricing_group_values?: {
|
|
452
|
+
[key: string]: string;
|
|
453
|
+
};
|
|
288
454
|
product_id?: string;
|
|
289
455
|
product_tags?: Array<string>;
|
|
290
456
|
recurring_commit_ids?: Array<string>;
|
|
@@ -301,7 +467,9 @@ export declare namespace ContractRetrieveResponse {
|
|
|
301
467
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
302
468
|
* processors.
|
|
303
469
|
*/
|
|
304
|
-
custom_rate?:
|
|
470
|
+
custom_rate?: {
|
|
471
|
+
[key: string]: unknown;
|
|
472
|
+
};
|
|
305
473
|
/**
|
|
306
474
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
307
475
|
* set to true.
|
|
@@ -350,7 +518,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
350
518
|
* Contract usage statements follow a selected cadence based on this date.
|
|
351
519
|
*/
|
|
352
520
|
billing_anchor_date: string;
|
|
353
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
521
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
354
522
|
}
|
|
355
523
|
interface Credit {
|
|
356
524
|
id: string;
|
|
@@ -375,13 +543,19 @@ export declare namespace ContractRetrieveResponse {
|
|
|
375
543
|
*/
|
|
376
544
|
balance?: number;
|
|
377
545
|
contract?: Credit.Contract;
|
|
378
|
-
custom_fields?:
|
|
546
|
+
custom_fields?: {
|
|
547
|
+
[key: string]: string;
|
|
548
|
+
};
|
|
379
549
|
description?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Optional configuration for credit hierarchy access control
|
|
552
|
+
*/
|
|
553
|
+
hierarchy_configuration?: Credit.HierarchyConfiguration;
|
|
380
554
|
/**
|
|
381
555
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
382
556
|
* invoice deduction or an expiration.
|
|
383
557
|
*/
|
|
384
|
-
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry>;
|
|
558
|
+
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry | Credit.CreditSeatBasedAdjustmentLedgerEntry>;
|
|
385
559
|
name?: string;
|
|
386
560
|
/**
|
|
387
561
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -396,6 +570,12 @@ export declare namespace ContractRetrieveResponse {
|
|
|
396
570
|
* This field's availability is dependent on your client's configuration.
|
|
397
571
|
*/
|
|
398
572
|
salesforce_opportunity_id?: string;
|
|
573
|
+
/**
|
|
574
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
575
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
576
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
577
|
+
*/
|
|
578
|
+
specifiers?: Array<Credit.Specifier>;
|
|
399
579
|
}
|
|
400
580
|
namespace Credit {
|
|
401
581
|
interface Product {
|
|
@@ -405,6 +585,24 @@ export declare namespace ContractRetrieveResponse {
|
|
|
405
585
|
interface Contract {
|
|
406
586
|
id: string;
|
|
407
587
|
}
|
|
588
|
+
/**
|
|
589
|
+
* Optional configuration for credit hierarchy access control
|
|
590
|
+
*/
|
|
591
|
+
interface HierarchyConfiguration {
|
|
592
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
593
|
+
}
|
|
594
|
+
namespace HierarchyConfiguration {
|
|
595
|
+
interface CommitHierarchyChildAccessAll {
|
|
596
|
+
type: 'ALL';
|
|
597
|
+
}
|
|
598
|
+
interface CommitHierarchyChildAccessNone {
|
|
599
|
+
type: 'NONE';
|
|
600
|
+
}
|
|
601
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
602
|
+
contract_ids: Array<string>;
|
|
603
|
+
type: 'CONTRACT_IDS';
|
|
604
|
+
}
|
|
605
|
+
}
|
|
408
606
|
interface CreditSegmentStartLedgerEntry {
|
|
409
607
|
amount: number;
|
|
410
608
|
segment_id: string;
|
|
@@ -444,6 +642,29 @@ export declare namespace ContractRetrieveResponse {
|
|
|
444
642
|
timestamp: string;
|
|
445
643
|
type: 'CREDIT_MANUAL';
|
|
446
644
|
}
|
|
645
|
+
interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
646
|
+
amount: number;
|
|
647
|
+
segment_id: string;
|
|
648
|
+
timestamp: string;
|
|
649
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
650
|
+
}
|
|
651
|
+
interface Specifier {
|
|
652
|
+
presentation_group_values?: {
|
|
653
|
+
[key: string]: string;
|
|
654
|
+
};
|
|
655
|
+
pricing_group_values?: {
|
|
656
|
+
[key: string]: string;
|
|
657
|
+
};
|
|
658
|
+
/**
|
|
659
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
660
|
+
*/
|
|
661
|
+
product_id?: string;
|
|
662
|
+
/**
|
|
663
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
664
|
+
* tags.
|
|
665
|
+
*/
|
|
666
|
+
product_tags?: Array<string>;
|
|
667
|
+
}
|
|
447
668
|
}
|
|
448
669
|
/**
|
|
449
670
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -452,6 +673,184 @@ export declare namespace ContractRetrieveResponse {
|
|
|
452
673
|
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
453
674
|
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
454
675
|
}
|
|
676
|
+
/**
|
|
677
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
678
|
+
* respective list endpoints to get the full lists.
|
|
679
|
+
*/
|
|
680
|
+
interface HasMore {
|
|
681
|
+
/**
|
|
682
|
+
* Whether there are more commits on this contract than the limit for this
|
|
683
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
684
|
+
* of commits.
|
|
685
|
+
*/
|
|
686
|
+
commits: boolean;
|
|
687
|
+
/**
|
|
688
|
+
* Whether there are more credits on this contract than the limit for this
|
|
689
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
690
|
+
* of credits.
|
|
691
|
+
*/
|
|
692
|
+
credits: boolean;
|
|
693
|
+
}
|
|
694
|
+
interface ParentHierarchyConfiguration {
|
|
695
|
+
/**
|
|
696
|
+
* List of contracts that belong to this parent.
|
|
697
|
+
*/
|
|
698
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
699
|
+
}
|
|
700
|
+
namespace ParentHierarchyConfiguration {
|
|
701
|
+
interface Child {
|
|
702
|
+
contract_id: string;
|
|
703
|
+
customer_id: string;
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
interface ChildHierarchyConfiguration {
|
|
707
|
+
/**
|
|
708
|
+
* The single parent contract/customer for this child.
|
|
709
|
+
*/
|
|
710
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
711
|
+
}
|
|
712
|
+
namespace ChildHierarchyConfiguration {
|
|
713
|
+
/**
|
|
714
|
+
* The single parent contract/customer for this child.
|
|
715
|
+
*/
|
|
716
|
+
interface Parent {
|
|
717
|
+
contract_id: string;
|
|
718
|
+
customer_id: string;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
interface PrepaidBalanceThresholdConfiguration {
|
|
722
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
723
|
+
/**
|
|
724
|
+
* When set to false, the contract will not be evaluated against the
|
|
725
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
726
|
+
* regardless of prior state.
|
|
727
|
+
*/
|
|
728
|
+
is_enabled: boolean;
|
|
729
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
730
|
+
/**
|
|
731
|
+
* Specify the amount the balance should be recharged to.
|
|
732
|
+
*/
|
|
733
|
+
recharge_to_amount: number;
|
|
734
|
+
/**
|
|
735
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
736
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
737
|
+
*/
|
|
738
|
+
threshold_amount: number;
|
|
739
|
+
/**
|
|
740
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
741
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
742
|
+
*/
|
|
743
|
+
custom_credit_type_id?: string;
|
|
744
|
+
}
|
|
745
|
+
namespace PrepaidBalanceThresholdConfiguration {
|
|
746
|
+
interface Commit {
|
|
747
|
+
/**
|
|
748
|
+
* The commit product that will be used to generate the line item for commit
|
|
749
|
+
* payment.
|
|
750
|
+
*/
|
|
751
|
+
product_id: string;
|
|
752
|
+
/**
|
|
753
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
754
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
755
|
+
* all products.
|
|
756
|
+
*/
|
|
757
|
+
applicable_product_ids?: Array<string>;
|
|
758
|
+
/**
|
|
759
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
760
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
761
|
+
* all products.
|
|
762
|
+
*/
|
|
763
|
+
applicable_product_tags?: Array<string>;
|
|
764
|
+
description?: string;
|
|
765
|
+
/**
|
|
766
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
767
|
+
* will default to the commit product name.
|
|
768
|
+
*/
|
|
769
|
+
name?: string;
|
|
770
|
+
/**
|
|
771
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
772
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
773
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
774
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
775
|
+
*/
|
|
776
|
+
specifiers?: Array<Commit.Specifier>;
|
|
777
|
+
}
|
|
778
|
+
namespace Commit {
|
|
779
|
+
interface Specifier {
|
|
780
|
+
presentation_group_values?: {
|
|
781
|
+
[key: string]: string;
|
|
782
|
+
};
|
|
783
|
+
pricing_group_values?: {
|
|
784
|
+
[key: string]: string;
|
|
785
|
+
};
|
|
786
|
+
/**
|
|
787
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
788
|
+
*/
|
|
789
|
+
product_id?: string;
|
|
790
|
+
/**
|
|
791
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
792
|
+
* tags.
|
|
793
|
+
*/
|
|
794
|
+
product_tags?: Array<string>;
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
interface PaymentGateConfig {
|
|
798
|
+
/**
|
|
799
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
800
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
801
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
802
|
+
* wish to payment gate the commit balance.
|
|
803
|
+
*/
|
|
804
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
805
|
+
/**
|
|
806
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
807
|
+
*/
|
|
808
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
809
|
+
/**
|
|
810
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
811
|
+
*/
|
|
812
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
813
|
+
/**
|
|
814
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
815
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
816
|
+
* will default to NONE.
|
|
817
|
+
*/
|
|
818
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
819
|
+
}
|
|
820
|
+
namespace PaymentGateConfig {
|
|
821
|
+
/**
|
|
822
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
823
|
+
*/
|
|
824
|
+
interface PrecalculatedTaxConfig {
|
|
825
|
+
/**
|
|
826
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
827
|
+
* denomination as the commit's invoice schedule
|
|
828
|
+
*/
|
|
829
|
+
tax_amount: number;
|
|
830
|
+
/**
|
|
831
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
832
|
+
* description.
|
|
833
|
+
*/
|
|
834
|
+
tax_name?: string;
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
838
|
+
*/
|
|
839
|
+
interface StripeConfig {
|
|
840
|
+
/**
|
|
841
|
+
* If left blank, will default to INVOICE
|
|
842
|
+
*/
|
|
843
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
844
|
+
/**
|
|
845
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
846
|
+
* your payment type.
|
|
847
|
+
*/
|
|
848
|
+
invoice_metadata?: {
|
|
849
|
+
[key: string]: string;
|
|
850
|
+
};
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
455
854
|
interface RecurringCommit {
|
|
456
855
|
id: string;
|
|
457
856
|
/**
|
|
@@ -492,6 +891,10 @@ export declare namespace ContractRetrieveResponse {
|
|
|
492
891
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
493
892
|
*/
|
|
494
893
|
ending_before?: string;
|
|
894
|
+
/**
|
|
895
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
896
|
+
*/
|
|
897
|
+
hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
|
|
495
898
|
/**
|
|
496
899
|
* The amount the customer should be billed for the commit. Not required.
|
|
497
900
|
*/
|
|
@@ -513,16 +916,22 @@ export declare namespace ContractRetrieveResponse {
|
|
|
513
916
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
514
917
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
515
918
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
516
|
-
* be created aligned with the recurring commit's
|
|
919
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
517
920
|
* invoice dates.
|
|
518
921
|
*/
|
|
519
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
922
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
520
923
|
/**
|
|
521
924
|
* Will be passed down to the individual commits. This controls how much of an
|
|
522
925
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
523
926
|
* between 0 and 1.
|
|
524
927
|
*/
|
|
525
928
|
rollover_fraction?: number;
|
|
929
|
+
/**
|
|
930
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
931
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
932
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
933
|
+
*/
|
|
934
|
+
specifiers?: Array<RecurringCommit.Specifier>;
|
|
526
935
|
}
|
|
527
936
|
namespace RecurringCommit {
|
|
528
937
|
/**
|
|
@@ -530,8 +939,8 @@ export declare namespace ContractRetrieveResponse {
|
|
|
530
939
|
*/
|
|
531
940
|
interface AccessAmount {
|
|
532
941
|
credit_type_id: string;
|
|
533
|
-
quantity: number;
|
|
534
942
|
unit_price: number;
|
|
943
|
+
quantity?: number;
|
|
535
944
|
}
|
|
536
945
|
/**
|
|
537
946
|
* The amount of time the created commits will be valid for
|
|
@@ -547,6 +956,24 @@ export declare namespace ContractRetrieveResponse {
|
|
|
547
956
|
interface Contract {
|
|
548
957
|
id: string;
|
|
549
958
|
}
|
|
959
|
+
/**
|
|
960
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
961
|
+
*/
|
|
962
|
+
interface HierarchyConfiguration {
|
|
963
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
964
|
+
}
|
|
965
|
+
namespace HierarchyConfiguration {
|
|
966
|
+
interface CommitHierarchyChildAccessAll {
|
|
967
|
+
type: 'ALL';
|
|
968
|
+
}
|
|
969
|
+
interface CommitHierarchyChildAccessNone {
|
|
970
|
+
type: 'NONE';
|
|
971
|
+
}
|
|
972
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
973
|
+
contract_ids: Array<string>;
|
|
974
|
+
type: 'CONTRACT_IDS';
|
|
975
|
+
}
|
|
976
|
+
}
|
|
550
977
|
/**
|
|
551
978
|
* The amount the customer should be billed for the commit. Not required.
|
|
552
979
|
*/
|
|
@@ -555,6 +982,23 @@ export declare namespace ContractRetrieveResponse {
|
|
|
555
982
|
quantity: number;
|
|
556
983
|
unit_price: number;
|
|
557
984
|
}
|
|
985
|
+
interface Specifier {
|
|
986
|
+
presentation_group_values?: {
|
|
987
|
+
[key: string]: string;
|
|
988
|
+
};
|
|
989
|
+
pricing_group_values?: {
|
|
990
|
+
[key: string]: string;
|
|
991
|
+
};
|
|
992
|
+
/**
|
|
993
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
994
|
+
*/
|
|
995
|
+
product_id?: string;
|
|
996
|
+
/**
|
|
997
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
998
|
+
* tags.
|
|
999
|
+
*/
|
|
1000
|
+
product_tags?: Array<string>;
|
|
1001
|
+
}
|
|
558
1002
|
}
|
|
559
1003
|
interface RecurringCredit {
|
|
560
1004
|
id: string;
|
|
@@ -596,6 +1040,10 @@ export declare namespace ContractRetrieveResponse {
|
|
|
596
1040
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
597
1041
|
*/
|
|
598
1042
|
ending_before?: string;
|
|
1043
|
+
/**
|
|
1044
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
1045
|
+
*/
|
|
1046
|
+
hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
|
|
599
1047
|
/**
|
|
600
1048
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
601
1049
|
*/
|
|
@@ -613,16 +1061,22 @@ export declare namespace ContractRetrieveResponse {
|
|
|
613
1061
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
614
1062
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
615
1063
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
616
|
-
* be created aligned with the recurring commit's
|
|
1064
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
617
1065
|
* invoice dates.
|
|
618
1066
|
*/
|
|
619
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1067
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
620
1068
|
/**
|
|
621
1069
|
* Will be passed down to the individual commits. This controls how much of an
|
|
622
1070
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
623
1071
|
* between 0 and 1.
|
|
624
1072
|
*/
|
|
625
1073
|
rollover_fraction?: number;
|
|
1074
|
+
/**
|
|
1075
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1076
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1077
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1078
|
+
*/
|
|
1079
|
+
specifiers?: Array<RecurringCredit.Specifier>;
|
|
626
1080
|
}
|
|
627
1081
|
namespace RecurringCredit {
|
|
628
1082
|
/**
|
|
@@ -630,8 +1084,8 @@ export declare namespace ContractRetrieveResponse {
|
|
|
630
1084
|
*/
|
|
631
1085
|
interface AccessAmount {
|
|
632
1086
|
credit_type_id: string;
|
|
633
|
-
quantity: number;
|
|
634
1087
|
unit_price: number;
|
|
1088
|
+
quantity?: number;
|
|
635
1089
|
}
|
|
636
1090
|
/**
|
|
637
1091
|
* The amount of time the created commits will be valid for
|
|
@@ -647,6 +1101,41 @@ export declare namespace ContractRetrieveResponse {
|
|
|
647
1101
|
interface Contract {
|
|
648
1102
|
id: string;
|
|
649
1103
|
}
|
|
1104
|
+
/**
|
|
1105
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
1106
|
+
*/
|
|
1107
|
+
interface HierarchyConfiguration {
|
|
1108
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1109
|
+
}
|
|
1110
|
+
namespace HierarchyConfiguration {
|
|
1111
|
+
interface CommitHierarchyChildAccessAll {
|
|
1112
|
+
type: 'ALL';
|
|
1113
|
+
}
|
|
1114
|
+
interface CommitHierarchyChildAccessNone {
|
|
1115
|
+
type: 'NONE';
|
|
1116
|
+
}
|
|
1117
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
1118
|
+
contract_ids: Array<string>;
|
|
1119
|
+
type: 'CONTRACT_IDS';
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
interface Specifier {
|
|
1123
|
+
presentation_group_values?: {
|
|
1124
|
+
[key: string]: string;
|
|
1125
|
+
};
|
|
1126
|
+
pricing_group_values?: {
|
|
1127
|
+
[key: string]: string;
|
|
1128
|
+
};
|
|
1129
|
+
/**
|
|
1130
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1131
|
+
*/
|
|
1132
|
+
product_id?: string;
|
|
1133
|
+
/**
|
|
1134
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1135
|
+
* tags.
|
|
1136
|
+
*/
|
|
1137
|
+
product_tags?: Array<string>;
|
|
1138
|
+
}
|
|
650
1139
|
}
|
|
651
1140
|
interface ResellerRoyalty {
|
|
652
1141
|
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
@@ -669,14 +1158,109 @@ export declare namespace ContractRetrieveResponse {
|
|
|
669
1158
|
reseller_contract_value?: number;
|
|
670
1159
|
}
|
|
671
1160
|
}
|
|
1161
|
+
interface SpendThresholdConfiguration {
|
|
1162
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
1163
|
+
/**
|
|
1164
|
+
* When set to false, the contract will not be evaluated against the
|
|
1165
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1166
|
+
* regardless of prior state.
|
|
1167
|
+
*/
|
|
1168
|
+
is_enabled: boolean;
|
|
1169
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
1170
|
+
/**
|
|
1171
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1172
|
+
* hits this amount, a threshold charge will be initiated.
|
|
1173
|
+
*/
|
|
1174
|
+
threshold_amount: number;
|
|
1175
|
+
}
|
|
1176
|
+
namespace SpendThresholdConfiguration {
|
|
1177
|
+
interface Commit {
|
|
1178
|
+
/**
|
|
1179
|
+
* The commit product that will be used to generate the line item for commit
|
|
1180
|
+
* payment.
|
|
1181
|
+
*/
|
|
1182
|
+
product_id: string;
|
|
1183
|
+
description?: string;
|
|
1184
|
+
/**
|
|
1185
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1186
|
+
* will default to the commit product name.
|
|
1187
|
+
*/
|
|
1188
|
+
name?: string;
|
|
1189
|
+
}
|
|
1190
|
+
interface PaymentGateConfig {
|
|
1191
|
+
/**
|
|
1192
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1193
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1194
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1195
|
+
* wish to payment gate the commit balance.
|
|
1196
|
+
*/
|
|
1197
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1198
|
+
/**
|
|
1199
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1200
|
+
*/
|
|
1201
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1202
|
+
/**
|
|
1203
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1204
|
+
*/
|
|
1205
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1206
|
+
/**
|
|
1207
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1208
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1209
|
+
* will default to NONE.
|
|
1210
|
+
*/
|
|
1211
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1212
|
+
}
|
|
1213
|
+
namespace PaymentGateConfig {
|
|
1214
|
+
/**
|
|
1215
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1216
|
+
*/
|
|
1217
|
+
interface PrecalculatedTaxConfig {
|
|
1218
|
+
/**
|
|
1219
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1220
|
+
* denomination as the commit's invoice schedule
|
|
1221
|
+
*/
|
|
1222
|
+
tax_amount: number;
|
|
1223
|
+
/**
|
|
1224
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
1225
|
+
* description.
|
|
1226
|
+
*/
|
|
1227
|
+
tax_name?: string;
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1231
|
+
*/
|
|
1232
|
+
interface StripeConfig {
|
|
1233
|
+
/**
|
|
1234
|
+
* If left blank, will default to INVOICE
|
|
1235
|
+
*/
|
|
1236
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
1237
|
+
/**
|
|
1238
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
1239
|
+
* your payment type.
|
|
1240
|
+
*/
|
|
1241
|
+
invoice_metadata?: {
|
|
1242
|
+
[key: string]: string;
|
|
1243
|
+
};
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
672
1247
|
interface Subscription {
|
|
673
1248
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
674
1249
|
proration: Subscription.Proration;
|
|
1250
|
+
/**
|
|
1251
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
1252
|
+
* quantity and future quantity changes.
|
|
1253
|
+
*/
|
|
675
1254
|
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
676
1255
|
starting_at: string;
|
|
677
1256
|
subscription_rate: Subscription.SubscriptionRate;
|
|
1257
|
+
id?: string;
|
|
1258
|
+
custom_fields?: {
|
|
1259
|
+
[key: string]: string;
|
|
1260
|
+
};
|
|
678
1261
|
description?: string;
|
|
679
1262
|
ending_before?: string;
|
|
1263
|
+
fiat_credit_type_id?: string;
|
|
680
1264
|
name?: string;
|
|
681
1265
|
}
|
|
682
1266
|
namespace Subscription {
|
|
@@ -690,7 +1274,7 @@ export declare namespace ContractRetrieveResponse {
|
|
|
690
1274
|
ending_before?: string;
|
|
691
1275
|
}
|
|
692
1276
|
interface SubscriptionRate {
|
|
693
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1277
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
694
1278
|
product: SubscriptionRate.Product;
|
|
695
1279
|
}
|
|
696
1280
|
namespace SubscriptionRate {
|
|
@@ -700,42 +1284,6 @@ export declare namespace ContractRetrieveResponse {
|
|
|
700
1284
|
}
|
|
701
1285
|
}
|
|
702
1286
|
}
|
|
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
1287
|
}
|
|
740
1288
|
}
|
|
741
1289
|
export interface ContractListResponse {
|
|
@@ -756,7 +1304,9 @@ export declare namespace ContractListResponse {
|
|
|
756
1304
|
usage_statement_schedule: Data.UsageStatementSchedule;
|
|
757
1305
|
archived_at?: string;
|
|
758
1306
|
credits?: Array<Data.Credit>;
|
|
759
|
-
custom_fields?:
|
|
1307
|
+
custom_fields?: {
|
|
1308
|
+
[key: string]: string;
|
|
1309
|
+
};
|
|
760
1310
|
/**
|
|
761
1311
|
* This field's availability is dependent on your client's configuration.
|
|
762
1312
|
*/
|
|
@@ -766,6 +1316,16 @@ export declare namespace ContractListResponse {
|
|
|
766
1316
|
*/
|
|
767
1317
|
discounts?: Array<Shared.Discount>;
|
|
768
1318
|
ending_before?: string;
|
|
1319
|
+
/**
|
|
1320
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
1321
|
+
* respective list endpoints to get the full lists.
|
|
1322
|
+
*/
|
|
1323
|
+
has_more?: Data.HasMore;
|
|
1324
|
+
/**
|
|
1325
|
+
* Either a **parent** configuration with a list of children or a **child**
|
|
1326
|
+
* configuration with a single parent.
|
|
1327
|
+
*/
|
|
1328
|
+
hierarchy_configuration?: Data.ParentHierarchyConfiguration | Data.ChildHierarchyConfiguration;
|
|
769
1329
|
/**
|
|
770
1330
|
* Defaults to LOWEST_MULTIPLIER, which applies the greatest discount to list
|
|
771
1331
|
* prices automatically. EXPLICIT prioritization requires specifying priorities for
|
|
@@ -779,6 +1339,11 @@ export declare namespace ContractListResponse {
|
|
|
779
1339
|
* This field's availability is dependent on your client's configuration.
|
|
780
1340
|
*/
|
|
781
1341
|
netsuite_sales_order_id?: string;
|
|
1342
|
+
prepaid_balance_threshold_configuration?: Data.PrepaidBalanceThresholdConfiguration;
|
|
1343
|
+
/**
|
|
1344
|
+
* Priority of the contract.
|
|
1345
|
+
*/
|
|
1346
|
+
priority?: number;
|
|
782
1347
|
/**
|
|
783
1348
|
* This field's availability is dependent on your client's configuration.
|
|
784
1349
|
*/
|
|
@@ -802,8 +1367,11 @@ export declare namespace ContractListResponse {
|
|
|
802
1367
|
* on a separate invoice from usage charges.
|
|
803
1368
|
*/
|
|
804
1369
|
scheduled_charges_on_usage_invoices?: 'ALL';
|
|
1370
|
+
spend_threshold_configuration?: Data.SpendThresholdConfiguration;
|
|
1371
|
+
/**
|
|
1372
|
+
* List of subscriptions on the contract.
|
|
1373
|
+
*/
|
|
805
1374
|
subscriptions?: Array<Data.Subscription>;
|
|
806
|
-
threshold_billing_configuration?: Data.ThresholdBillingConfiguration;
|
|
807
1375
|
total_contract_value?: number;
|
|
808
1376
|
/**
|
|
809
1377
|
* Prevents the creation of duplicates. If a request to create a record is made
|
|
@@ -825,6 +1393,7 @@ export declare namespace ContractListResponse {
|
|
|
825
1393
|
applicable_contract_ids?: Array<string>;
|
|
826
1394
|
applicable_product_ids?: Array<string>;
|
|
827
1395
|
applicable_product_tags?: Array<string>;
|
|
1396
|
+
archived_at?: string;
|
|
828
1397
|
/**
|
|
829
1398
|
* The current balance of the credit or commit. This balance reflects the amount of
|
|
830
1399
|
* credit or commit that the customer has access to use at this moment - thus,
|
|
@@ -837,8 +1406,14 @@ export declare namespace ContractListResponse {
|
|
|
837
1406
|
*/
|
|
838
1407
|
balance?: number;
|
|
839
1408
|
contract?: Commit.Contract;
|
|
840
|
-
custom_fields?:
|
|
1409
|
+
custom_fields?: {
|
|
1410
|
+
[key: string]: string;
|
|
1411
|
+
};
|
|
841
1412
|
description?: string;
|
|
1413
|
+
/**
|
|
1414
|
+
* Optional configuration for commit hierarchy access control
|
|
1415
|
+
*/
|
|
1416
|
+
hierarchy_configuration?: Commit.HierarchyConfiguration;
|
|
842
1417
|
/**
|
|
843
1418
|
* The contract that this commit will be billed on.
|
|
844
1419
|
*/
|
|
@@ -851,7 +1426,7 @@ export declare namespace ContractListResponse {
|
|
|
851
1426
|
* A list of ordered events that impact the balance of a commit. For example, an
|
|
852
1427
|
* invoice deduction or a rollover.
|
|
853
1428
|
*/
|
|
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>;
|
|
1429
|
+
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
1430
|
name?: string;
|
|
856
1431
|
/**
|
|
857
1432
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -869,6 +1444,12 @@ export declare namespace ContractListResponse {
|
|
|
869
1444
|
* This field's availability is dependent on your client's configuration.
|
|
870
1445
|
*/
|
|
871
1446
|
salesforce_opportunity_id?: string;
|
|
1447
|
+
/**
|
|
1448
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1449
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1450
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1451
|
+
*/
|
|
1452
|
+
specifiers?: Array<Commit.Specifier>;
|
|
872
1453
|
}
|
|
873
1454
|
namespace Commit {
|
|
874
1455
|
interface Product {
|
|
@@ -878,6 +1459,24 @@ export declare namespace ContractListResponse {
|
|
|
878
1459
|
interface Contract {
|
|
879
1460
|
id: string;
|
|
880
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Optional configuration for commit hierarchy access control
|
|
1464
|
+
*/
|
|
1465
|
+
interface HierarchyConfiguration {
|
|
1466
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1467
|
+
}
|
|
1468
|
+
namespace HierarchyConfiguration {
|
|
1469
|
+
interface CommitHierarchyChildAccessAll {
|
|
1470
|
+
type: 'ALL';
|
|
1471
|
+
}
|
|
1472
|
+
interface CommitHierarchyChildAccessNone {
|
|
1473
|
+
type: 'NONE';
|
|
1474
|
+
}
|
|
1475
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
1476
|
+
contract_ids: Array<string>;
|
|
1477
|
+
type: 'CONTRACT_IDS';
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
881
1480
|
/**
|
|
882
1481
|
* The contract that this commit will be billed on.
|
|
883
1482
|
*/
|
|
@@ -924,6 +1523,12 @@ export declare namespace ContractListResponse {
|
|
|
924
1523
|
timestamp: string;
|
|
925
1524
|
type: 'PREPAID_COMMIT_CREDITED';
|
|
926
1525
|
}
|
|
1526
|
+
interface PrepaidCommitSeatBasedAdjustmentLedgerEntry {
|
|
1527
|
+
amount: number;
|
|
1528
|
+
segment_id: string;
|
|
1529
|
+
timestamp: string;
|
|
1530
|
+
type: 'PREPAID_COMMIT_SEAT_BASED_ADJUSTMENT';
|
|
1531
|
+
}
|
|
927
1532
|
interface PostpaidCommitInitialBalanceLedgerEntry {
|
|
928
1533
|
amount: number;
|
|
929
1534
|
timestamp: string;
|
|
@@ -970,6 +1575,23 @@ export declare namespace ContractListResponse {
|
|
|
970
1575
|
commit_id: string;
|
|
971
1576
|
contract_id: string;
|
|
972
1577
|
}
|
|
1578
|
+
interface Specifier {
|
|
1579
|
+
presentation_group_values?: {
|
|
1580
|
+
[key: string]: string;
|
|
1581
|
+
};
|
|
1582
|
+
pricing_group_values?: {
|
|
1583
|
+
[key: string]: string;
|
|
1584
|
+
};
|
|
1585
|
+
/**
|
|
1586
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1587
|
+
*/
|
|
1588
|
+
product_id?: string;
|
|
1589
|
+
/**
|
|
1590
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1591
|
+
* tags.
|
|
1592
|
+
*/
|
|
1593
|
+
product_tags?: Array<string>;
|
|
1594
|
+
}
|
|
973
1595
|
}
|
|
974
1596
|
interface Override {
|
|
975
1597
|
id: string;
|
|
@@ -989,10 +1611,14 @@ export declare namespace ContractListResponse {
|
|
|
989
1611
|
}
|
|
990
1612
|
namespace Override {
|
|
991
1613
|
interface OverrideSpecifier {
|
|
992
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1614
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
993
1615
|
commit_ids?: Array<string>;
|
|
994
|
-
presentation_group_values?:
|
|
995
|
-
|
|
1616
|
+
presentation_group_values?: {
|
|
1617
|
+
[key: string]: string | null;
|
|
1618
|
+
};
|
|
1619
|
+
pricing_group_values?: {
|
|
1620
|
+
[key: string]: string;
|
|
1621
|
+
};
|
|
996
1622
|
product_id?: string;
|
|
997
1623
|
product_tags?: Array<string>;
|
|
998
1624
|
recurring_commit_ids?: Array<string>;
|
|
@@ -1009,7 +1635,9 @@ export declare namespace ContractListResponse {
|
|
|
1009
1635
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1010
1636
|
* processors.
|
|
1011
1637
|
*/
|
|
1012
|
-
custom_rate?:
|
|
1638
|
+
custom_rate?: {
|
|
1639
|
+
[key: string]: unknown;
|
|
1640
|
+
};
|
|
1013
1641
|
/**
|
|
1014
1642
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1015
1643
|
* set to true.
|
|
@@ -1058,7 +1686,7 @@ export declare namespace ContractListResponse {
|
|
|
1058
1686
|
* Contract usage statements follow a selected cadence based on this date.
|
|
1059
1687
|
*/
|
|
1060
1688
|
billing_anchor_date: string;
|
|
1061
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
1689
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1062
1690
|
}
|
|
1063
1691
|
interface Credit {
|
|
1064
1692
|
id: string;
|
|
@@ -1083,13 +1711,19 @@ export declare namespace ContractListResponse {
|
|
|
1083
1711
|
*/
|
|
1084
1712
|
balance?: number;
|
|
1085
1713
|
contract?: Credit.Contract;
|
|
1086
|
-
custom_fields?:
|
|
1714
|
+
custom_fields?: {
|
|
1715
|
+
[key: string]: string;
|
|
1716
|
+
};
|
|
1087
1717
|
description?: string;
|
|
1718
|
+
/**
|
|
1719
|
+
* Optional configuration for credit hierarchy access control
|
|
1720
|
+
*/
|
|
1721
|
+
hierarchy_configuration?: Credit.HierarchyConfiguration;
|
|
1088
1722
|
/**
|
|
1089
1723
|
* A list of ordered events that impact the balance of a credit. For example, an
|
|
1090
1724
|
* invoice deduction or an expiration.
|
|
1091
1725
|
*/
|
|
1092
|
-
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry>;
|
|
1726
|
+
ledger?: Array<Credit.CreditSegmentStartLedgerEntry | Credit.CreditAutomatedInvoiceDeductionLedgerEntry | Credit.CreditExpirationLedgerEntry | Credit.CreditCanceledLedgerEntry | Credit.CreditCreditedLedgerEntry | Credit.CreditManualLedgerEntry | Credit.CreditSeatBasedAdjustmentLedgerEntry>;
|
|
1093
1727
|
name?: string;
|
|
1094
1728
|
/**
|
|
1095
1729
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -1104,6 +1738,12 @@ export declare namespace ContractListResponse {
|
|
|
1104
1738
|
* This field's availability is dependent on your client's configuration.
|
|
1105
1739
|
*/
|
|
1106
1740
|
salesforce_opportunity_id?: string;
|
|
1741
|
+
/**
|
|
1742
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1743
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1744
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
1745
|
+
*/
|
|
1746
|
+
specifiers?: Array<Credit.Specifier>;
|
|
1107
1747
|
}
|
|
1108
1748
|
namespace Credit {
|
|
1109
1749
|
interface Product {
|
|
@@ -1113,6 +1753,24 @@ export declare namespace ContractListResponse {
|
|
|
1113
1753
|
interface Contract {
|
|
1114
1754
|
id: string;
|
|
1115
1755
|
}
|
|
1756
|
+
/**
|
|
1757
|
+
* Optional configuration for credit hierarchy access control
|
|
1758
|
+
*/
|
|
1759
|
+
interface HierarchyConfiguration {
|
|
1760
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
1761
|
+
}
|
|
1762
|
+
namespace HierarchyConfiguration {
|
|
1763
|
+
interface CommitHierarchyChildAccessAll {
|
|
1764
|
+
type: 'ALL';
|
|
1765
|
+
}
|
|
1766
|
+
interface CommitHierarchyChildAccessNone {
|
|
1767
|
+
type: 'NONE';
|
|
1768
|
+
}
|
|
1769
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
1770
|
+
contract_ids: Array<string>;
|
|
1771
|
+
type: 'CONTRACT_IDS';
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1116
1774
|
interface CreditSegmentStartLedgerEntry {
|
|
1117
1775
|
amount: number;
|
|
1118
1776
|
segment_id: string;
|
|
@@ -1152,6 +1810,29 @@ export declare namespace ContractListResponse {
|
|
|
1152
1810
|
timestamp: string;
|
|
1153
1811
|
type: 'CREDIT_MANUAL';
|
|
1154
1812
|
}
|
|
1813
|
+
interface CreditSeatBasedAdjustmentLedgerEntry {
|
|
1814
|
+
amount: number;
|
|
1815
|
+
segment_id: string;
|
|
1816
|
+
timestamp: string;
|
|
1817
|
+
type: 'CREDIT_SEAT_BASED_ADJUSTMENT';
|
|
1818
|
+
}
|
|
1819
|
+
interface Specifier {
|
|
1820
|
+
presentation_group_values?: {
|
|
1821
|
+
[key: string]: string;
|
|
1822
|
+
};
|
|
1823
|
+
pricing_group_values?: {
|
|
1824
|
+
[key: string]: string;
|
|
1825
|
+
};
|
|
1826
|
+
/**
|
|
1827
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1828
|
+
*/
|
|
1829
|
+
product_id?: string;
|
|
1830
|
+
/**
|
|
1831
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1832
|
+
* tags.
|
|
1833
|
+
*/
|
|
1834
|
+
product_tags?: Array<string>;
|
|
1835
|
+
}
|
|
1155
1836
|
}
|
|
1156
1837
|
/**
|
|
1157
1838
|
* This field's availability is dependent on your client's configuration.
|
|
@@ -1160,6 +1841,184 @@ export declare namespace ContractListResponse {
|
|
|
1160
1841
|
billing_provider: 'aws_marketplace' | 'stripe' | 'netsuite' | 'custom' | 'azure_marketplace' | 'quickbooks_online' | 'workday' | 'gcp_marketplace';
|
|
1161
1842
|
delivery_method: 'direct_to_billing_provider' | 'aws_sqs' | 'tackle' | 'aws_sns';
|
|
1162
1843
|
}
|
|
1844
|
+
/**
|
|
1845
|
+
* Indicates whether there are more items than the limit for this endpoint. Use the
|
|
1846
|
+
* respective list endpoints to get the full lists.
|
|
1847
|
+
*/
|
|
1848
|
+
interface HasMore {
|
|
1849
|
+
/**
|
|
1850
|
+
* Whether there are more commits on this contract than the limit for this
|
|
1851
|
+
* endpoint. Use the /contracts/customerCommits/list endpoint to get the full list
|
|
1852
|
+
* of commits.
|
|
1853
|
+
*/
|
|
1854
|
+
commits: boolean;
|
|
1855
|
+
/**
|
|
1856
|
+
* Whether there are more credits on this contract than the limit for this
|
|
1857
|
+
* endpoint. Use the /contracts/customerCredits/list endpoint to get the full list
|
|
1858
|
+
* of credits.
|
|
1859
|
+
*/
|
|
1860
|
+
credits: boolean;
|
|
1861
|
+
}
|
|
1862
|
+
interface ParentHierarchyConfiguration {
|
|
1863
|
+
/**
|
|
1864
|
+
* List of contracts that belong to this parent.
|
|
1865
|
+
*/
|
|
1866
|
+
children: Array<ParentHierarchyConfiguration.Child>;
|
|
1867
|
+
}
|
|
1868
|
+
namespace ParentHierarchyConfiguration {
|
|
1869
|
+
interface Child {
|
|
1870
|
+
contract_id: string;
|
|
1871
|
+
customer_id: string;
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
interface ChildHierarchyConfiguration {
|
|
1875
|
+
/**
|
|
1876
|
+
* The single parent contract/customer for this child.
|
|
1877
|
+
*/
|
|
1878
|
+
parent: ChildHierarchyConfiguration.Parent;
|
|
1879
|
+
}
|
|
1880
|
+
namespace ChildHierarchyConfiguration {
|
|
1881
|
+
/**
|
|
1882
|
+
* The single parent contract/customer for this child.
|
|
1883
|
+
*/
|
|
1884
|
+
interface Parent {
|
|
1885
|
+
contract_id: string;
|
|
1886
|
+
customer_id: string;
|
|
1887
|
+
}
|
|
1888
|
+
}
|
|
1889
|
+
interface PrepaidBalanceThresholdConfiguration {
|
|
1890
|
+
commit: PrepaidBalanceThresholdConfiguration.Commit;
|
|
1891
|
+
/**
|
|
1892
|
+
* When set to false, the contract will not be evaluated against the
|
|
1893
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1894
|
+
* regardless of prior state.
|
|
1895
|
+
*/
|
|
1896
|
+
is_enabled: boolean;
|
|
1897
|
+
payment_gate_config: PrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
1898
|
+
/**
|
|
1899
|
+
* Specify the amount the balance should be recharged to.
|
|
1900
|
+
*/
|
|
1901
|
+
recharge_to_amount: number;
|
|
1902
|
+
/**
|
|
1903
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
1904
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
1905
|
+
*/
|
|
1906
|
+
threshold_amount: number;
|
|
1907
|
+
/**
|
|
1908
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
1909
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
1910
|
+
*/
|
|
1911
|
+
custom_credit_type_id?: string;
|
|
1912
|
+
}
|
|
1913
|
+
namespace PrepaidBalanceThresholdConfiguration {
|
|
1914
|
+
interface Commit {
|
|
1915
|
+
/**
|
|
1916
|
+
* The commit product that will be used to generate the line item for commit
|
|
1917
|
+
* payment.
|
|
1918
|
+
*/
|
|
1919
|
+
product_id: string;
|
|
1920
|
+
/**
|
|
1921
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
1922
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1923
|
+
* all products.
|
|
1924
|
+
*/
|
|
1925
|
+
applicable_product_ids?: Array<string>;
|
|
1926
|
+
/**
|
|
1927
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
1928
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
1929
|
+
* all products.
|
|
1930
|
+
*/
|
|
1931
|
+
applicable_product_tags?: Array<string>;
|
|
1932
|
+
description?: string;
|
|
1933
|
+
/**
|
|
1934
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1935
|
+
* will default to the commit product name.
|
|
1936
|
+
*/
|
|
1937
|
+
name?: string;
|
|
1938
|
+
/**
|
|
1939
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
1940
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
1941
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
1942
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
1943
|
+
*/
|
|
1944
|
+
specifiers?: Array<Commit.Specifier>;
|
|
1945
|
+
}
|
|
1946
|
+
namespace Commit {
|
|
1947
|
+
interface Specifier {
|
|
1948
|
+
presentation_group_values?: {
|
|
1949
|
+
[key: string]: string;
|
|
1950
|
+
};
|
|
1951
|
+
pricing_group_values?: {
|
|
1952
|
+
[key: string]: string;
|
|
1953
|
+
};
|
|
1954
|
+
/**
|
|
1955
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
1956
|
+
*/
|
|
1957
|
+
product_id?: string;
|
|
1958
|
+
/**
|
|
1959
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
1960
|
+
* tags.
|
|
1961
|
+
*/
|
|
1962
|
+
product_tags?: Array<string>;
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
interface PaymentGateConfig {
|
|
1966
|
+
/**
|
|
1967
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
1968
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
1969
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
1970
|
+
* wish to payment gate the commit balance.
|
|
1971
|
+
*/
|
|
1972
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
1973
|
+
/**
|
|
1974
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1975
|
+
*/
|
|
1976
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
1977
|
+
/**
|
|
1978
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
1979
|
+
*/
|
|
1980
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
1981
|
+
/**
|
|
1982
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
1983
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
1984
|
+
* will default to NONE.
|
|
1985
|
+
*/
|
|
1986
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
1987
|
+
}
|
|
1988
|
+
namespace PaymentGateConfig {
|
|
1989
|
+
/**
|
|
1990
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
1991
|
+
*/
|
|
1992
|
+
interface PrecalculatedTaxConfig {
|
|
1993
|
+
/**
|
|
1994
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
1995
|
+
* denomination as the commit's invoice schedule
|
|
1996
|
+
*/
|
|
1997
|
+
tax_amount: number;
|
|
1998
|
+
/**
|
|
1999
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2000
|
+
* description.
|
|
2001
|
+
*/
|
|
2002
|
+
tax_name?: string;
|
|
2003
|
+
}
|
|
2004
|
+
/**
|
|
2005
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2006
|
+
*/
|
|
2007
|
+
interface StripeConfig {
|
|
2008
|
+
/**
|
|
2009
|
+
* If left blank, will default to INVOICE
|
|
2010
|
+
*/
|
|
2011
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
2012
|
+
/**
|
|
2013
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2014
|
+
* your payment type.
|
|
2015
|
+
*/
|
|
2016
|
+
invoice_metadata?: {
|
|
2017
|
+
[key: string]: string;
|
|
2018
|
+
};
|
|
2019
|
+
}
|
|
2020
|
+
}
|
|
2021
|
+
}
|
|
1163
2022
|
interface RecurringCommit {
|
|
1164
2023
|
id: string;
|
|
1165
2024
|
/**
|
|
@@ -1200,6 +2059,10 @@ export declare namespace ContractListResponse {
|
|
|
1200
2059
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
1201
2060
|
*/
|
|
1202
2061
|
ending_before?: string;
|
|
2062
|
+
/**
|
|
2063
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2064
|
+
*/
|
|
2065
|
+
hierarchy_configuration?: RecurringCommit.HierarchyConfiguration;
|
|
1203
2066
|
/**
|
|
1204
2067
|
* The amount the customer should be billed for the commit. Not required.
|
|
1205
2068
|
*/
|
|
@@ -1221,16 +2084,22 @@ export declare namespace ContractListResponse {
|
|
|
1221
2084
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1222
2085
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1223
2086
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1224
|
-
* be created aligned with the recurring commit's
|
|
2087
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1225
2088
|
* invoice dates.
|
|
1226
2089
|
*/
|
|
1227
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2090
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1228
2091
|
/**
|
|
1229
2092
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1230
2093
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1231
2094
|
* between 0 and 1.
|
|
1232
2095
|
*/
|
|
1233
2096
|
rollover_fraction?: number;
|
|
2097
|
+
/**
|
|
2098
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2099
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2100
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
2101
|
+
*/
|
|
2102
|
+
specifiers?: Array<RecurringCommit.Specifier>;
|
|
1234
2103
|
}
|
|
1235
2104
|
namespace RecurringCommit {
|
|
1236
2105
|
/**
|
|
@@ -1238,8 +2107,8 @@ export declare namespace ContractListResponse {
|
|
|
1238
2107
|
*/
|
|
1239
2108
|
interface AccessAmount {
|
|
1240
2109
|
credit_type_id: string;
|
|
1241
|
-
quantity: number;
|
|
1242
2110
|
unit_price: number;
|
|
2111
|
+
quantity?: number;
|
|
1243
2112
|
}
|
|
1244
2113
|
/**
|
|
1245
2114
|
* The amount of time the created commits will be valid for
|
|
@@ -1255,6 +2124,24 @@ export declare namespace ContractListResponse {
|
|
|
1255
2124
|
interface Contract {
|
|
1256
2125
|
id: string;
|
|
1257
2126
|
}
|
|
2127
|
+
/**
|
|
2128
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2129
|
+
*/
|
|
2130
|
+
interface HierarchyConfiguration {
|
|
2131
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2132
|
+
}
|
|
2133
|
+
namespace HierarchyConfiguration {
|
|
2134
|
+
interface CommitHierarchyChildAccessAll {
|
|
2135
|
+
type: 'ALL';
|
|
2136
|
+
}
|
|
2137
|
+
interface CommitHierarchyChildAccessNone {
|
|
2138
|
+
type: 'NONE';
|
|
2139
|
+
}
|
|
2140
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2141
|
+
contract_ids: Array<string>;
|
|
2142
|
+
type: 'CONTRACT_IDS';
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
1258
2145
|
/**
|
|
1259
2146
|
* The amount the customer should be billed for the commit. Not required.
|
|
1260
2147
|
*/
|
|
@@ -1263,6 +2150,23 @@ export declare namespace ContractListResponse {
|
|
|
1263
2150
|
quantity: number;
|
|
1264
2151
|
unit_price: number;
|
|
1265
2152
|
}
|
|
2153
|
+
interface Specifier {
|
|
2154
|
+
presentation_group_values?: {
|
|
2155
|
+
[key: string]: string;
|
|
2156
|
+
};
|
|
2157
|
+
pricing_group_values?: {
|
|
2158
|
+
[key: string]: string;
|
|
2159
|
+
};
|
|
2160
|
+
/**
|
|
2161
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2162
|
+
*/
|
|
2163
|
+
product_id?: string;
|
|
2164
|
+
/**
|
|
2165
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2166
|
+
* tags.
|
|
2167
|
+
*/
|
|
2168
|
+
product_tags?: Array<string>;
|
|
2169
|
+
}
|
|
1266
2170
|
}
|
|
1267
2171
|
interface RecurringCredit {
|
|
1268
2172
|
id: string;
|
|
@@ -1304,6 +2208,10 @@ export declare namespace ContractListResponse {
|
|
|
1304
2208
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
1305
2209
|
*/
|
|
1306
2210
|
ending_before?: string;
|
|
2211
|
+
/**
|
|
2212
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2213
|
+
*/
|
|
2214
|
+
hierarchy_configuration?: RecurringCredit.HierarchyConfiguration;
|
|
1307
2215
|
/**
|
|
1308
2216
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
1309
2217
|
*/
|
|
@@ -1321,16 +2229,22 @@ export declare namespace ContractListResponse {
|
|
|
1321
2229
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1322
2230
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1323
2231
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1324
|
-
* be created aligned with the recurring commit's
|
|
2232
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1325
2233
|
* invoice dates.
|
|
1326
2234
|
*/
|
|
1327
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2235
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1328
2236
|
/**
|
|
1329
2237
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1330
2238
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1331
2239
|
* between 0 and 1.
|
|
1332
2240
|
*/
|
|
1333
2241
|
rollover_fraction?: number;
|
|
2242
|
+
/**
|
|
2243
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2244
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2245
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
2246
|
+
*/
|
|
2247
|
+
specifiers?: Array<RecurringCredit.Specifier>;
|
|
1334
2248
|
}
|
|
1335
2249
|
namespace RecurringCredit {
|
|
1336
2250
|
/**
|
|
@@ -1338,8 +2252,8 @@ export declare namespace ContractListResponse {
|
|
|
1338
2252
|
*/
|
|
1339
2253
|
interface AccessAmount {
|
|
1340
2254
|
credit_type_id: string;
|
|
1341
|
-
quantity: number;
|
|
1342
2255
|
unit_price: number;
|
|
2256
|
+
quantity?: number;
|
|
1343
2257
|
}
|
|
1344
2258
|
/**
|
|
1345
2259
|
* The amount of time the created commits will be valid for
|
|
@@ -1355,6 +2269,41 @@ export declare namespace ContractListResponse {
|
|
|
1355
2269
|
interface Contract {
|
|
1356
2270
|
id: string;
|
|
1357
2271
|
}
|
|
2272
|
+
/**
|
|
2273
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2274
|
+
*/
|
|
2275
|
+
interface HierarchyConfiguration {
|
|
2276
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2277
|
+
}
|
|
2278
|
+
namespace HierarchyConfiguration {
|
|
2279
|
+
interface CommitHierarchyChildAccessAll {
|
|
2280
|
+
type: 'ALL';
|
|
2281
|
+
}
|
|
2282
|
+
interface CommitHierarchyChildAccessNone {
|
|
2283
|
+
type: 'NONE';
|
|
2284
|
+
}
|
|
2285
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2286
|
+
contract_ids: Array<string>;
|
|
2287
|
+
type: 'CONTRACT_IDS';
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
interface Specifier {
|
|
2291
|
+
presentation_group_values?: {
|
|
2292
|
+
[key: string]: string;
|
|
2293
|
+
};
|
|
2294
|
+
pricing_group_values?: {
|
|
2295
|
+
[key: string]: string;
|
|
2296
|
+
};
|
|
2297
|
+
/**
|
|
2298
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2299
|
+
*/
|
|
2300
|
+
product_id?: string;
|
|
2301
|
+
/**
|
|
2302
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2303
|
+
* tags.
|
|
2304
|
+
*/
|
|
2305
|
+
product_tags?: Array<string>;
|
|
2306
|
+
}
|
|
1358
2307
|
}
|
|
1359
2308
|
interface ResellerRoyalty {
|
|
1360
2309
|
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
@@ -1377,14 +2326,109 @@ export declare namespace ContractListResponse {
|
|
|
1377
2326
|
reseller_contract_value?: number;
|
|
1378
2327
|
}
|
|
1379
2328
|
}
|
|
2329
|
+
interface SpendThresholdConfiguration {
|
|
2330
|
+
commit: SpendThresholdConfiguration.Commit;
|
|
2331
|
+
/**
|
|
2332
|
+
* When set to false, the contract will not be evaluated against the
|
|
2333
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2334
|
+
* regardless of prior state.
|
|
2335
|
+
*/
|
|
2336
|
+
is_enabled: boolean;
|
|
2337
|
+
payment_gate_config: SpendThresholdConfiguration.PaymentGateConfig;
|
|
2338
|
+
/**
|
|
2339
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
2340
|
+
* hits this amount, a threshold charge will be initiated.
|
|
2341
|
+
*/
|
|
2342
|
+
threshold_amount: number;
|
|
2343
|
+
}
|
|
2344
|
+
namespace SpendThresholdConfiguration {
|
|
2345
|
+
interface Commit {
|
|
2346
|
+
/**
|
|
2347
|
+
* The commit product that will be used to generate the line item for commit
|
|
2348
|
+
* payment.
|
|
2349
|
+
*/
|
|
2350
|
+
product_id: string;
|
|
2351
|
+
description?: string;
|
|
2352
|
+
/**
|
|
2353
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
2354
|
+
* will default to the commit product name.
|
|
2355
|
+
*/
|
|
2356
|
+
name?: string;
|
|
2357
|
+
}
|
|
2358
|
+
interface PaymentGateConfig {
|
|
2359
|
+
/**
|
|
2360
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2361
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2362
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2363
|
+
* wish to payment gate the commit balance.
|
|
2364
|
+
*/
|
|
2365
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2366
|
+
/**
|
|
2367
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2368
|
+
*/
|
|
2369
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2370
|
+
/**
|
|
2371
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2372
|
+
*/
|
|
2373
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2374
|
+
/**
|
|
2375
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2376
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2377
|
+
* will default to NONE.
|
|
2378
|
+
*/
|
|
2379
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2380
|
+
}
|
|
2381
|
+
namespace PaymentGateConfig {
|
|
2382
|
+
/**
|
|
2383
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2384
|
+
*/
|
|
2385
|
+
interface PrecalculatedTaxConfig {
|
|
2386
|
+
/**
|
|
2387
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2388
|
+
* denomination as the commit's invoice schedule
|
|
2389
|
+
*/
|
|
2390
|
+
tax_amount: number;
|
|
2391
|
+
/**
|
|
2392
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2393
|
+
* description.
|
|
2394
|
+
*/
|
|
2395
|
+
tax_name?: string;
|
|
2396
|
+
}
|
|
2397
|
+
/**
|
|
2398
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2399
|
+
*/
|
|
2400
|
+
interface StripeConfig {
|
|
2401
|
+
/**
|
|
2402
|
+
* If left blank, will default to INVOICE
|
|
2403
|
+
*/
|
|
2404
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
2405
|
+
/**
|
|
2406
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2407
|
+
* your payment type.
|
|
2408
|
+
*/
|
|
2409
|
+
invoice_metadata?: {
|
|
2410
|
+
[key: string]: string;
|
|
2411
|
+
};
|
|
2412
|
+
}
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
1380
2415
|
interface Subscription {
|
|
1381
2416
|
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
1382
2417
|
proration: Subscription.Proration;
|
|
2418
|
+
/**
|
|
2419
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
2420
|
+
* quantity and future quantity changes.
|
|
2421
|
+
*/
|
|
1383
2422
|
quantity_schedule: Array<Subscription.QuantitySchedule>;
|
|
1384
2423
|
starting_at: string;
|
|
1385
2424
|
subscription_rate: Subscription.SubscriptionRate;
|
|
2425
|
+
id?: string;
|
|
2426
|
+
custom_fields?: {
|
|
2427
|
+
[key: string]: string;
|
|
2428
|
+
};
|
|
1386
2429
|
description?: string;
|
|
1387
2430
|
ending_before?: string;
|
|
2431
|
+
fiat_credit_type_id?: string;
|
|
1388
2432
|
name?: string;
|
|
1389
2433
|
}
|
|
1390
2434
|
namespace Subscription {
|
|
@@ -1398,7 +2442,7 @@ export declare namespace ContractListResponse {
|
|
|
1398
2442
|
ending_before?: string;
|
|
1399
2443
|
}
|
|
1400
2444
|
interface SubscriptionRate {
|
|
1401
|
-
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2445
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1402
2446
|
product: SubscriptionRate.Product;
|
|
1403
2447
|
}
|
|
1404
2448
|
namespace SubscriptionRate {
|
|
@@ -1408,42 +2452,6 @@ export declare namespace ContractListResponse {
|
|
|
1408
2452
|
}
|
|
1409
2453
|
}
|
|
1410
2454
|
}
|
|
1411
|
-
interface ThresholdBillingConfiguration {
|
|
1412
|
-
commit: ThresholdBillingConfiguration.Commit;
|
|
1413
|
-
/**
|
|
1414
|
-
* When set to false, the contract will not be evaluated against the
|
|
1415
|
-
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
1416
|
-
* regardless of prior state
|
|
1417
|
-
*/
|
|
1418
|
-
is_enabled: boolean;
|
|
1419
|
-
/**
|
|
1420
|
-
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
1421
|
-
* hits this amount, a threshold charge will be initiated.
|
|
1422
|
-
*/
|
|
1423
|
-
threshold_amount: number;
|
|
1424
|
-
}
|
|
1425
|
-
namespace ThresholdBillingConfiguration {
|
|
1426
|
-
interface Commit {
|
|
1427
|
-
product_id: string;
|
|
1428
|
-
/**
|
|
1429
|
-
* Which products the threshold commit applies to. If both applicable_product_ids
|
|
1430
|
-
* and applicable_product_tags are not provided, the commit applies to all
|
|
1431
|
-
* products.
|
|
1432
|
-
*/
|
|
1433
|
-
applicable_product_ids?: Array<string>;
|
|
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;
|
|
1440
|
-
/**
|
|
1441
|
-
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
1442
|
-
* will default to the commit product name.
|
|
1443
|
-
*/
|
|
1444
|
-
name?: string;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
2455
|
}
|
|
1448
2456
|
}
|
|
1449
2457
|
export interface ContractEditResponse {
|
|
@@ -1465,19 +2473,42 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1465
2473
|
add_credits?: Array<Data.AddCredit>;
|
|
1466
2474
|
add_discounts?: Array<Shared.Discount>;
|
|
1467
2475
|
add_overrides?: Array<Data.AddOverride>;
|
|
2476
|
+
add_prepaid_balance_threshold_configuration?: Data.AddPrepaidBalanceThresholdConfiguration;
|
|
1468
2477
|
add_pro_services?: Array<Shared.ProService>;
|
|
1469
2478
|
add_recurring_commits?: Array<Data.AddRecurringCommit>;
|
|
1470
2479
|
add_recurring_credits?: Array<Data.AddRecurringCredit>;
|
|
1471
2480
|
add_reseller_royalties?: Array<Data.AddResellerRoyalty>;
|
|
1472
2481
|
add_scheduled_charges?: Array<Data.AddScheduledCharge>;
|
|
2482
|
+
add_spend_threshold_configuration?: Data.AddSpendThresholdConfiguration;
|
|
2483
|
+
/**
|
|
2484
|
+
* List of subscriptions on the contract.
|
|
2485
|
+
*/
|
|
2486
|
+
add_subscriptions?: Array<Data.AddSubscription>;
|
|
1473
2487
|
add_usage_filters?: Array<Data.AddUsageFilter>;
|
|
2488
|
+
archive_commits?: Array<Data.ArchiveCommit>;
|
|
2489
|
+
archive_credits?: Array<Data.ArchiveCredit>;
|
|
2490
|
+
archive_scheduled_charges?: Array<Data.ArchiveScheduledCharge>;
|
|
2491
|
+
remove_overrides?: Array<Data.RemoveOverride>;
|
|
1474
2492
|
timestamp?: string;
|
|
1475
2493
|
update_commits?: Array<Data.UpdateCommit>;
|
|
1476
2494
|
update_contract_end_date?: string;
|
|
2495
|
+
/**
|
|
2496
|
+
* Value to update the contract name to. If not provided, the contract name will
|
|
2497
|
+
* remain unchanged.
|
|
2498
|
+
*/
|
|
2499
|
+
update_contract_name?: string | null;
|
|
1477
2500
|
update_credits?: Array<Data.UpdateCredit>;
|
|
1478
2501
|
update_discounts?: Array<Data.UpdateDiscount>;
|
|
2502
|
+
update_prepaid_balance_threshold_configuration?: Data.UpdatePrepaidBalanceThresholdConfiguration;
|
|
2503
|
+
update_recurring_commits?: Array<Data.UpdateRecurringCommit>;
|
|
2504
|
+
update_recurring_credits?: Array<Data.UpdateRecurringCredit>;
|
|
1479
2505
|
update_refund_invoices?: Array<Data.UpdateRefundInvoice>;
|
|
1480
2506
|
update_scheduled_charges?: Array<Data.UpdateScheduledCharge>;
|
|
2507
|
+
update_spend_threshold_configuration?: Data.UpdateSpendThresholdConfiguration;
|
|
2508
|
+
/**
|
|
2509
|
+
* Optional list of subscriptions to update.
|
|
2510
|
+
*/
|
|
2511
|
+
update_subscriptions?: Array<Data.UpdateSubscription>;
|
|
1481
2512
|
}
|
|
1482
2513
|
namespace Data {
|
|
1483
2514
|
interface AddCommit {
|
|
@@ -1512,12 +2543,36 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1512
2543
|
* This field's availability is dependent on your client's configuration.
|
|
1513
2544
|
*/
|
|
1514
2545
|
salesforce_opportunity_id?: string;
|
|
2546
|
+
/**
|
|
2547
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2548
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2549
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2550
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2551
|
+
*/
|
|
2552
|
+
specifiers?: Array<AddCommit.Specifier>;
|
|
1515
2553
|
}
|
|
1516
2554
|
namespace AddCommit {
|
|
1517
2555
|
interface Product {
|
|
1518
2556
|
id: string;
|
|
1519
2557
|
name: string;
|
|
1520
2558
|
}
|
|
2559
|
+
interface Specifier {
|
|
2560
|
+
presentation_group_values?: {
|
|
2561
|
+
[key: string]: string;
|
|
2562
|
+
};
|
|
2563
|
+
pricing_group_values?: {
|
|
2564
|
+
[key: string]: string;
|
|
2565
|
+
};
|
|
2566
|
+
/**
|
|
2567
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2568
|
+
*/
|
|
2569
|
+
product_id?: string;
|
|
2570
|
+
/**
|
|
2571
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2572
|
+
* tags.
|
|
2573
|
+
*/
|
|
2574
|
+
product_tags?: Array<string>;
|
|
2575
|
+
}
|
|
1521
2576
|
}
|
|
1522
2577
|
interface AddCredit {
|
|
1523
2578
|
id: string;
|
|
@@ -1544,12 +2599,36 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1544
2599
|
* This field's availability is dependent on your client's configuration.
|
|
1545
2600
|
*/
|
|
1546
2601
|
salesforce_opportunity_id?: string;
|
|
2602
|
+
/**
|
|
2603
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2604
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2605
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2606
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2607
|
+
*/
|
|
2608
|
+
specifiers?: Array<AddCredit.Specifier>;
|
|
1547
2609
|
}
|
|
1548
2610
|
namespace AddCredit {
|
|
1549
2611
|
interface Product {
|
|
1550
2612
|
id: string;
|
|
1551
2613
|
name: string;
|
|
1552
2614
|
}
|
|
2615
|
+
interface Specifier {
|
|
2616
|
+
presentation_group_values?: {
|
|
2617
|
+
[key: string]: string;
|
|
2618
|
+
};
|
|
2619
|
+
pricing_group_values?: {
|
|
2620
|
+
[key: string]: string;
|
|
2621
|
+
};
|
|
2622
|
+
/**
|
|
2623
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2624
|
+
*/
|
|
2625
|
+
product_id?: string;
|
|
2626
|
+
/**
|
|
2627
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2628
|
+
* tags.
|
|
2629
|
+
*/
|
|
2630
|
+
product_tags?: Array<string>;
|
|
2631
|
+
}
|
|
1553
2632
|
}
|
|
1554
2633
|
interface AddOverride {
|
|
1555
2634
|
id: string;
|
|
@@ -1569,10 +2648,14 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1569
2648
|
}
|
|
1570
2649
|
namespace AddOverride {
|
|
1571
2650
|
interface OverrideSpecifier {
|
|
1572
|
-
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2651
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1573
2652
|
commit_ids?: Array<string>;
|
|
1574
|
-
presentation_group_values?:
|
|
1575
|
-
|
|
2653
|
+
presentation_group_values?: {
|
|
2654
|
+
[key: string]: string | null;
|
|
2655
|
+
};
|
|
2656
|
+
pricing_group_values?: {
|
|
2657
|
+
[key: string]: string;
|
|
2658
|
+
};
|
|
1576
2659
|
product_id?: string;
|
|
1577
2660
|
product_tags?: Array<string>;
|
|
1578
2661
|
recurring_commit_ids?: Array<string>;
|
|
@@ -1589,7 +2672,9 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1589
2672
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
1590
2673
|
* processors.
|
|
1591
2674
|
*/
|
|
1592
|
-
custom_rate?:
|
|
2675
|
+
custom_rate?: {
|
|
2676
|
+
[key: string]: unknown;
|
|
2677
|
+
};
|
|
1593
2678
|
/**
|
|
1594
2679
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
1595
2680
|
* set to true.
|
|
@@ -1614,6 +2699,139 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1614
2699
|
name: string;
|
|
1615
2700
|
}
|
|
1616
2701
|
}
|
|
2702
|
+
interface AddPrepaidBalanceThresholdConfiguration {
|
|
2703
|
+
commit: AddPrepaidBalanceThresholdConfiguration.Commit;
|
|
2704
|
+
/**
|
|
2705
|
+
* When set to false, the contract will not be evaluated against the
|
|
2706
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
2707
|
+
* regardless of prior state.
|
|
2708
|
+
*/
|
|
2709
|
+
is_enabled: boolean;
|
|
2710
|
+
payment_gate_config: AddPrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
2711
|
+
/**
|
|
2712
|
+
* Specify the amount the balance should be recharged to.
|
|
2713
|
+
*/
|
|
2714
|
+
recharge_to_amount: number;
|
|
2715
|
+
/**
|
|
2716
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
2717
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
2718
|
+
*/
|
|
2719
|
+
threshold_amount: number;
|
|
2720
|
+
/**
|
|
2721
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
2722
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
2723
|
+
*/
|
|
2724
|
+
custom_credit_type_id?: string;
|
|
2725
|
+
}
|
|
2726
|
+
namespace AddPrepaidBalanceThresholdConfiguration {
|
|
2727
|
+
interface Commit {
|
|
2728
|
+
/**
|
|
2729
|
+
* The commit product that will be used to generate the line item for commit
|
|
2730
|
+
* payment.
|
|
2731
|
+
*/
|
|
2732
|
+
product_id: string;
|
|
2733
|
+
/**
|
|
2734
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
2735
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2736
|
+
* all products.
|
|
2737
|
+
*/
|
|
2738
|
+
applicable_product_ids?: Array<string>;
|
|
2739
|
+
/**
|
|
2740
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
2741
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
2742
|
+
* all products.
|
|
2743
|
+
*/
|
|
2744
|
+
applicable_product_tags?: Array<string>;
|
|
2745
|
+
description?: string;
|
|
2746
|
+
/**
|
|
2747
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
2748
|
+
* will default to the commit product name.
|
|
2749
|
+
*/
|
|
2750
|
+
name?: string;
|
|
2751
|
+
/**
|
|
2752
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2753
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2754
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
2755
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
2756
|
+
*/
|
|
2757
|
+
specifiers?: Array<Commit.Specifier>;
|
|
2758
|
+
}
|
|
2759
|
+
namespace Commit {
|
|
2760
|
+
interface Specifier {
|
|
2761
|
+
presentation_group_values?: {
|
|
2762
|
+
[key: string]: string;
|
|
2763
|
+
};
|
|
2764
|
+
pricing_group_values?: {
|
|
2765
|
+
[key: string]: string;
|
|
2766
|
+
};
|
|
2767
|
+
/**
|
|
2768
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2769
|
+
*/
|
|
2770
|
+
product_id?: string;
|
|
2771
|
+
/**
|
|
2772
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2773
|
+
* tags.
|
|
2774
|
+
*/
|
|
2775
|
+
product_tags?: Array<string>;
|
|
2776
|
+
}
|
|
2777
|
+
}
|
|
2778
|
+
interface PaymentGateConfig {
|
|
2779
|
+
/**
|
|
2780
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
2781
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
2782
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
2783
|
+
* wish to payment gate the commit balance.
|
|
2784
|
+
*/
|
|
2785
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
2786
|
+
/**
|
|
2787
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2788
|
+
*/
|
|
2789
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
2790
|
+
/**
|
|
2791
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2792
|
+
*/
|
|
2793
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
2794
|
+
/**
|
|
2795
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
2796
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
2797
|
+
* will default to NONE.
|
|
2798
|
+
*/
|
|
2799
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
2800
|
+
}
|
|
2801
|
+
namespace PaymentGateConfig {
|
|
2802
|
+
/**
|
|
2803
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
2804
|
+
*/
|
|
2805
|
+
interface PrecalculatedTaxConfig {
|
|
2806
|
+
/**
|
|
2807
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
2808
|
+
* denomination as the commit's invoice schedule
|
|
2809
|
+
*/
|
|
2810
|
+
tax_amount: number;
|
|
2811
|
+
/**
|
|
2812
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
2813
|
+
* description.
|
|
2814
|
+
*/
|
|
2815
|
+
tax_name?: string;
|
|
2816
|
+
}
|
|
2817
|
+
/**
|
|
2818
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
2819
|
+
*/
|
|
2820
|
+
interface StripeConfig {
|
|
2821
|
+
/**
|
|
2822
|
+
* If left blank, will default to INVOICE
|
|
2823
|
+
*/
|
|
2824
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
2825
|
+
/**
|
|
2826
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
2827
|
+
* your payment type.
|
|
2828
|
+
*/
|
|
2829
|
+
invoice_metadata?: {
|
|
2830
|
+
[key: string]: string;
|
|
2831
|
+
};
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
1617
2835
|
interface AddRecurringCommit {
|
|
1618
2836
|
id: string;
|
|
1619
2837
|
/**
|
|
@@ -1654,6 +2872,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1654
2872
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
1655
2873
|
*/
|
|
1656
2874
|
ending_before?: string;
|
|
2875
|
+
/**
|
|
2876
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2877
|
+
*/
|
|
2878
|
+
hierarchy_configuration?: AddRecurringCommit.HierarchyConfiguration;
|
|
1657
2879
|
/**
|
|
1658
2880
|
* The amount the customer should be billed for the commit. Not required.
|
|
1659
2881
|
*/
|
|
@@ -1675,16 +2897,22 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1675
2897
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1676
2898
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1677
2899
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1678
|
-
* be created aligned with the recurring commit's
|
|
2900
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1679
2901
|
* invoice dates.
|
|
1680
2902
|
*/
|
|
1681
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
2903
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1682
2904
|
/**
|
|
1683
2905
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1684
2906
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1685
2907
|
* between 0 and 1.
|
|
1686
2908
|
*/
|
|
1687
2909
|
rollover_fraction?: number;
|
|
2910
|
+
/**
|
|
2911
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
2912
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
2913
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
2914
|
+
*/
|
|
2915
|
+
specifiers?: Array<AddRecurringCommit.Specifier>;
|
|
1688
2916
|
}
|
|
1689
2917
|
namespace AddRecurringCommit {
|
|
1690
2918
|
/**
|
|
@@ -1692,8 +2920,8 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1692
2920
|
*/
|
|
1693
2921
|
interface AccessAmount {
|
|
1694
2922
|
credit_type_id: string;
|
|
1695
|
-
quantity: number;
|
|
1696
2923
|
unit_price: number;
|
|
2924
|
+
quantity?: number;
|
|
1697
2925
|
}
|
|
1698
2926
|
/**
|
|
1699
2927
|
* The amount of time the created commits will be valid for
|
|
@@ -1709,6 +2937,24 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1709
2937
|
interface Contract {
|
|
1710
2938
|
id: string;
|
|
1711
2939
|
}
|
|
2940
|
+
/**
|
|
2941
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
2942
|
+
*/
|
|
2943
|
+
interface HierarchyConfiguration {
|
|
2944
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
2945
|
+
}
|
|
2946
|
+
namespace HierarchyConfiguration {
|
|
2947
|
+
interface CommitHierarchyChildAccessAll {
|
|
2948
|
+
type: 'ALL';
|
|
2949
|
+
}
|
|
2950
|
+
interface CommitHierarchyChildAccessNone {
|
|
2951
|
+
type: 'NONE';
|
|
2952
|
+
}
|
|
2953
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
2954
|
+
contract_ids: Array<string>;
|
|
2955
|
+
type: 'CONTRACT_IDS';
|
|
2956
|
+
}
|
|
2957
|
+
}
|
|
1712
2958
|
/**
|
|
1713
2959
|
* The amount the customer should be billed for the commit. Not required.
|
|
1714
2960
|
*/
|
|
@@ -1717,6 +2963,23 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1717
2963
|
quantity: number;
|
|
1718
2964
|
unit_price: number;
|
|
1719
2965
|
}
|
|
2966
|
+
interface Specifier {
|
|
2967
|
+
presentation_group_values?: {
|
|
2968
|
+
[key: string]: string;
|
|
2969
|
+
};
|
|
2970
|
+
pricing_group_values?: {
|
|
2971
|
+
[key: string]: string;
|
|
2972
|
+
};
|
|
2973
|
+
/**
|
|
2974
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
2975
|
+
*/
|
|
2976
|
+
product_id?: string;
|
|
2977
|
+
/**
|
|
2978
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
2979
|
+
* tags.
|
|
2980
|
+
*/
|
|
2981
|
+
product_tags?: Array<string>;
|
|
2982
|
+
}
|
|
1720
2983
|
}
|
|
1721
2984
|
interface AddRecurringCredit {
|
|
1722
2985
|
id: string;
|
|
@@ -1758,6 +3021,10 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1758
3021
|
* Determines when the contract will stop creating recurring commits. Optional
|
|
1759
3022
|
*/
|
|
1760
3023
|
ending_before?: string;
|
|
3024
|
+
/**
|
|
3025
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
3026
|
+
*/
|
|
3027
|
+
hierarchy_configuration?: AddRecurringCredit.HierarchyConfiguration;
|
|
1761
3028
|
/**
|
|
1762
3029
|
* Displayed on invoices. Will be passed through to the individual commits
|
|
1763
3030
|
*/
|
|
@@ -1775,16 +3042,22 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1775
3042
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
1776
3043
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
1777
3044
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
1778
|
-
* be created aligned with the recurring commit's
|
|
3045
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
1779
3046
|
* invoice dates.
|
|
1780
3047
|
*/
|
|
1781
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
3048
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
1782
3049
|
/**
|
|
1783
3050
|
* Will be passed down to the individual commits. This controls how much of an
|
|
1784
3051
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
1785
3052
|
* between 0 and 1.
|
|
1786
3053
|
*/
|
|
1787
3054
|
rollover_fraction?: number;
|
|
3055
|
+
/**
|
|
3056
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
3057
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
3058
|
+
* specifiers to contribute to a commit's or credit's drawdown.
|
|
3059
|
+
*/
|
|
3060
|
+
specifiers?: Array<AddRecurringCredit.Specifier>;
|
|
1788
3061
|
}
|
|
1789
3062
|
namespace AddRecurringCredit {
|
|
1790
3063
|
/**
|
|
@@ -1792,8 +3065,8 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1792
3065
|
*/
|
|
1793
3066
|
interface AccessAmount {
|
|
1794
3067
|
credit_type_id: string;
|
|
1795
|
-
quantity: number;
|
|
1796
3068
|
unit_price: number;
|
|
3069
|
+
quantity?: number;
|
|
1797
3070
|
}
|
|
1798
3071
|
/**
|
|
1799
3072
|
* The amount of time the created commits will be valid for
|
|
@@ -1809,6 +3082,41 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1809
3082
|
interface Contract {
|
|
1810
3083
|
id: string;
|
|
1811
3084
|
}
|
|
3085
|
+
/**
|
|
3086
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
3087
|
+
*/
|
|
3088
|
+
interface HierarchyConfiguration {
|
|
3089
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
3090
|
+
}
|
|
3091
|
+
namespace HierarchyConfiguration {
|
|
3092
|
+
interface CommitHierarchyChildAccessAll {
|
|
3093
|
+
type: 'ALL';
|
|
3094
|
+
}
|
|
3095
|
+
interface CommitHierarchyChildAccessNone {
|
|
3096
|
+
type: 'NONE';
|
|
3097
|
+
}
|
|
3098
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
3099
|
+
contract_ids: Array<string>;
|
|
3100
|
+
type: 'CONTRACT_IDS';
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
interface Specifier {
|
|
3104
|
+
presentation_group_values?: {
|
|
3105
|
+
[key: string]: string;
|
|
3106
|
+
};
|
|
3107
|
+
pricing_group_values?: {
|
|
3108
|
+
[key: string]: string;
|
|
3109
|
+
};
|
|
3110
|
+
/**
|
|
3111
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3112
|
+
*/
|
|
3113
|
+
product_id?: string;
|
|
3114
|
+
/**
|
|
3115
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3116
|
+
* tags.
|
|
3117
|
+
*/
|
|
3118
|
+
product_tags?: Array<string>;
|
|
3119
|
+
}
|
|
1812
3120
|
}
|
|
1813
3121
|
interface AddResellerRoyalty {
|
|
1814
3122
|
reseller_type: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
@@ -1844,6 +3152,132 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1844
3152
|
name: string;
|
|
1845
3153
|
}
|
|
1846
3154
|
}
|
|
3155
|
+
interface AddSpendThresholdConfiguration {
|
|
3156
|
+
commit: AddSpendThresholdConfiguration.Commit;
|
|
3157
|
+
/**
|
|
3158
|
+
* When set to false, the contract will not be evaluated against the
|
|
3159
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
3160
|
+
* regardless of prior state.
|
|
3161
|
+
*/
|
|
3162
|
+
is_enabled: boolean;
|
|
3163
|
+
payment_gate_config: AddSpendThresholdConfiguration.PaymentGateConfig;
|
|
3164
|
+
/**
|
|
3165
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
3166
|
+
* hits this amount, a threshold charge will be initiated.
|
|
3167
|
+
*/
|
|
3168
|
+
threshold_amount: number;
|
|
3169
|
+
}
|
|
3170
|
+
namespace AddSpendThresholdConfiguration {
|
|
3171
|
+
interface Commit {
|
|
3172
|
+
/**
|
|
3173
|
+
* The commit product that will be used to generate the line item for commit
|
|
3174
|
+
* payment.
|
|
3175
|
+
*/
|
|
3176
|
+
product_id: string;
|
|
3177
|
+
description?: string;
|
|
3178
|
+
/**
|
|
3179
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
3180
|
+
* will default to the commit product name.
|
|
3181
|
+
*/
|
|
3182
|
+
name?: string;
|
|
3183
|
+
}
|
|
3184
|
+
interface PaymentGateConfig {
|
|
3185
|
+
/**
|
|
3186
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
3187
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
3188
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
3189
|
+
* wish to payment gate the commit balance.
|
|
3190
|
+
*/
|
|
3191
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
3192
|
+
/**
|
|
3193
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3194
|
+
*/
|
|
3195
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
3196
|
+
/**
|
|
3197
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3198
|
+
*/
|
|
3199
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
3200
|
+
/**
|
|
3201
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
3202
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
3203
|
+
* will default to NONE.
|
|
3204
|
+
*/
|
|
3205
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
3206
|
+
}
|
|
3207
|
+
namespace PaymentGateConfig {
|
|
3208
|
+
/**
|
|
3209
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3210
|
+
*/
|
|
3211
|
+
interface PrecalculatedTaxConfig {
|
|
3212
|
+
/**
|
|
3213
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
3214
|
+
* denomination as the commit's invoice schedule
|
|
3215
|
+
*/
|
|
3216
|
+
tax_amount: number;
|
|
3217
|
+
/**
|
|
3218
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
3219
|
+
* description.
|
|
3220
|
+
*/
|
|
3221
|
+
tax_name?: string;
|
|
3222
|
+
}
|
|
3223
|
+
/**
|
|
3224
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3225
|
+
*/
|
|
3226
|
+
interface StripeConfig {
|
|
3227
|
+
/**
|
|
3228
|
+
* If left blank, will default to INVOICE
|
|
3229
|
+
*/
|
|
3230
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
3231
|
+
/**
|
|
3232
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
3233
|
+
* your payment type.
|
|
3234
|
+
*/
|
|
3235
|
+
invoice_metadata?: {
|
|
3236
|
+
[key: string]: string;
|
|
3237
|
+
};
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3240
|
+
}
|
|
3241
|
+
interface AddSubscription {
|
|
3242
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
3243
|
+
proration: AddSubscription.Proration;
|
|
3244
|
+
/**
|
|
3245
|
+
* List of quantity schedule items for the subscription. Only includes the current
|
|
3246
|
+
* quantity and future quantity changes.
|
|
3247
|
+
*/
|
|
3248
|
+
quantity_schedule: Array<AddSubscription.QuantitySchedule>;
|
|
3249
|
+
starting_at: string;
|
|
3250
|
+
subscription_rate: AddSubscription.SubscriptionRate;
|
|
3251
|
+
id?: string;
|
|
3252
|
+
custom_fields?: {
|
|
3253
|
+
[key: string]: string;
|
|
3254
|
+
};
|
|
3255
|
+
description?: string;
|
|
3256
|
+
ending_before?: string;
|
|
3257
|
+
fiat_credit_type_id?: string;
|
|
3258
|
+
name?: string;
|
|
3259
|
+
}
|
|
3260
|
+
namespace AddSubscription {
|
|
3261
|
+
interface Proration {
|
|
3262
|
+
invoice_behavior: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
3263
|
+
is_prorated: boolean;
|
|
3264
|
+
}
|
|
3265
|
+
interface QuantitySchedule {
|
|
3266
|
+
quantity: number;
|
|
3267
|
+
starting_at: string;
|
|
3268
|
+
ending_before?: string;
|
|
3269
|
+
}
|
|
3270
|
+
interface SubscriptionRate {
|
|
3271
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
3272
|
+
product: SubscriptionRate.Product;
|
|
3273
|
+
}
|
|
3274
|
+
namespace SubscriptionRate {
|
|
3275
|
+
interface Product {
|
|
3276
|
+
id: string;
|
|
3277
|
+
name: string;
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
1847
3281
|
interface AddUsageFilter {
|
|
1848
3282
|
group_key: string;
|
|
1849
3283
|
group_values: Array<string>;
|
|
@@ -1858,17 +3292,31 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1858
3292
|
*/
|
|
1859
3293
|
ending_before?: string;
|
|
1860
3294
|
}
|
|
3295
|
+
interface ArchiveCommit {
|
|
3296
|
+
id: string;
|
|
3297
|
+
}
|
|
3298
|
+
interface ArchiveCredit {
|
|
3299
|
+
id: string;
|
|
3300
|
+
}
|
|
3301
|
+
interface ArchiveScheduledCharge {
|
|
3302
|
+
id: string;
|
|
3303
|
+
}
|
|
3304
|
+
interface RemoveOverride {
|
|
3305
|
+
id: string;
|
|
3306
|
+
}
|
|
1861
3307
|
interface UpdateCommit {
|
|
1862
3308
|
id: string;
|
|
1863
3309
|
access_schedule?: UpdateCommit.AccessSchedule;
|
|
1864
3310
|
/**
|
|
1865
|
-
* Which products the commit applies to. If
|
|
1866
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
3311
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
3312
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
3313
|
+
* all products.
|
|
1867
3314
|
*/
|
|
1868
3315
|
applicable_product_ids?: Array<string> | null;
|
|
1869
3316
|
/**
|
|
1870
|
-
* Which tags the commit applies to. If
|
|
1871
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
3317
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
3318
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
3319
|
+
* all products.
|
|
1872
3320
|
*/
|
|
1873
3321
|
applicable_product_tags?: Array<string> | null;
|
|
1874
3322
|
invoice_schedule?: UpdateCommit.InvoiceSchedule;
|
|
@@ -1876,6 +3324,13 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1876
3324
|
netsuite_sales_order_id?: string | null;
|
|
1877
3325
|
product_id?: string;
|
|
1878
3326
|
rollover_fraction?: number | null;
|
|
3327
|
+
/**
|
|
3328
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
3329
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
3330
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
3331
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
3332
|
+
*/
|
|
3333
|
+
specifiers?: Array<UpdateCommit.Specifier> | null;
|
|
1879
3334
|
}
|
|
1880
3335
|
namespace UpdateCommit {
|
|
1881
3336
|
interface AccessSchedule {
|
|
@@ -1934,6 +3389,23 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1934
3389
|
unit_price?: number;
|
|
1935
3390
|
}
|
|
1936
3391
|
}
|
|
3392
|
+
interface Specifier {
|
|
3393
|
+
presentation_group_values?: {
|
|
3394
|
+
[key: string]: string;
|
|
3395
|
+
};
|
|
3396
|
+
pricing_group_values?: {
|
|
3397
|
+
[key: string]: string;
|
|
3398
|
+
};
|
|
3399
|
+
/**
|
|
3400
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3401
|
+
*/
|
|
3402
|
+
product_id?: string;
|
|
3403
|
+
/**
|
|
3404
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3405
|
+
* tags.
|
|
3406
|
+
*/
|
|
3407
|
+
product_tags?: Array<string>;
|
|
3408
|
+
}
|
|
1937
3409
|
}
|
|
1938
3410
|
interface UpdateCredit {
|
|
1939
3411
|
id: string;
|
|
@@ -1979,7 +3451,9 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
1979
3451
|
}
|
|
1980
3452
|
interface UpdateDiscount {
|
|
1981
3453
|
id: string;
|
|
1982
|
-
custom_fields?:
|
|
3454
|
+
custom_fields?: {
|
|
3455
|
+
[key: string]: string;
|
|
3456
|
+
};
|
|
1983
3457
|
name?: string;
|
|
1984
3458
|
netsuite_sales_order_id?: string;
|
|
1985
3459
|
/**
|
|
@@ -2019,7 +3493,7 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
2019
3493
|
* RFC 3339 timestamp (exclusive).
|
|
2020
3494
|
*/
|
|
2021
3495
|
ending_before: string;
|
|
2022
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
|
|
3496
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
2023
3497
|
/**
|
|
2024
3498
|
* RFC 3339 timestamp (inclusive).
|
|
2025
3499
|
*/
|
|
@@ -2069,34 +3543,193 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
2069
3543
|
}
|
|
2070
3544
|
}
|
|
2071
3545
|
}
|
|
2072
|
-
interface
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
3546
|
+
interface UpdatePrepaidBalanceThresholdConfiguration {
|
|
3547
|
+
commit?: UpdatePrepaidBalanceThresholdConfiguration.Commit;
|
|
3548
|
+
/**
|
|
3549
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
3550
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
3551
|
+
*/
|
|
3552
|
+
custom_credit_type_id?: string | null;
|
|
3553
|
+
/**
|
|
3554
|
+
* When set to false, the contract will not be evaluated against the
|
|
3555
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
3556
|
+
* regardless of prior state.
|
|
3557
|
+
*/
|
|
3558
|
+
is_enabled?: boolean;
|
|
3559
|
+
payment_gate_config?: UpdatePrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
3560
|
+
/**
|
|
3561
|
+
* Specify the amount the balance should be recharged to.
|
|
3562
|
+
*/
|
|
3563
|
+
recharge_to_amount?: number;
|
|
3564
|
+
/**
|
|
3565
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
3566
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
3567
|
+
*/
|
|
3568
|
+
threshold_amount?: number;
|
|
2081
3569
|
}
|
|
2082
|
-
namespace
|
|
2083
|
-
interface
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
3570
|
+
namespace UpdatePrepaidBalanceThresholdConfiguration {
|
|
3571
|
+
interface Commit {
|
|
3572
|
+
/**
|
|
3573
|
+
* Which products the threshold commit applies to. If both applicable_product_ids
|
|
3574
|
+
* and applicable_product_tags are not provided, the commit applies to all
|
|
3575
|
+
* products.
|
|
3576
|
+
*/
|
|
3577
|
+
applicable_product_ids?: Array<string> | null;
|
|
3578
|
+
/**
|
|
3579
|
+
* Which tags the threshold commit applies to. If both applicable_product_ids and
|
|
3580
|
+
* applicable_product_tags are not provided, the commit applies to all products.
|
|
3581
|
+
*/
|
|
3582
|
+
applicable_product_tags?: Array<string> | null;
|
|
3583
|
+
description?: string;
|
|
3584
|
+
/**
|
|
3585
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
3586
|
+
* will default to the commit product name.
|
|
3587
|
+
*/
|
|
3588
|
+
name?: string;
|
|
3589
|
+
/**
|
|
3590
|
+
* The commit product that will be used to generate the line item for commit
|
|
3591
|
+
* payment.
|
|
3592
|
+
*/
|
|
3593
|
+
product_id?: string;
|
|
3594
|
+
/**
|
|
3595
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
3596
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
3597
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
3598
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
3599
|
+
*/
|
|
3600
|
+
specifiers?: Array<Commit.Specifier> | null;
|
|
3601
|
+
}
|
|
3602
|
+
namespace Commit {
|
|
3603
|
+
interface Specifier {
|
|
3604
|
+
presentation_group_values?: {
|
|
3605
|
+
[key: string]: string;
|
|
3606
|
+
};
|
|
3607
|
+
pricing_group_values?: {
|
|
3608
|
+
[key: string]: string;
|
|
3609
|
+
};
|
|
3610
|
+
/**
|
|
3611
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
3612
|
+
*/
|
|
3613
|
+
product_id?: string;
|
|
3614
|
+
/**
|
|
3615
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
3616
|
+
* tags.
|
|
3617
|
+
*/
|
|
3618
|
+
product_tags?: Array<string>;
|
|
3619
|
+
}
|
|
3620
|
+
}
|
|
3621
|
+
interface PaymentGateConfig {
|
|
3622
|
+
/**
|
|
3623
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
3624
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
3625
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
3626
|
+
* wish to payment gate the commit balance.
|
|
3627
|
+
*/
|
|
3628
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
3629
|
+
/**
|
|
3630
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3631
|
+
*/
|
|
3632
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
3633
|
+
/**
|
|
3634
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3635
|
+
*/
|
|
3636
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
3637
|
+
/**
|
|
3638
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
3639
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
3640
|
+
* will default to NONE.
|
|
3641
|
+
*/
|
|
3642
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
3643
|
+
}
|
|
3644
|
+
namespace PaymentGateConfig {
|
|
3645
|
+
/**
|
|
3646
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3647
|
+
*/
|
|
3648
|
+
interface PrecalculatedTaxConfig {
|
|
3649
|
+
/**
|
|
3650
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
3651
|
+
* denomination as the commit's invoice schedule
|
|
3652
|
+
*/
|
|
3653
|
+
tax_amount: number;
|
|
3654
|
+
/**
|
|
3655
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
3656
|
+
* description.
|
|
3657
|
+
*/
|
|
3658
|
+
tax_name?: string;
|
|
3659
|
+
}
|
|
3660
|
+
/**
|
|
3661
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3662
|
+
*/
|
|
3663
|
+
interface StripeConfig {
|
|
3664
|
+
/**
|
|
3665
|
+
* If left blank, will default to INVOICE
|
|
3666
|
+
*/
|
|
3667
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
3668
|
+
/**
|
|
3669
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
3670
|
+
* your payment type.
|
|
3671
|
+
*/
|
|
3672
|
+
invoice_metadata?: {
|
|
3673
|
+
[key: string]: string;
|
|
3674
|
+
};
|
|
3675
|
+
}
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3678
|
+
interface UpdateRecurringCommit {
|
|
3679
|
+
id: string;
|
|
3680
|
+
access_amount?: UpdateRecurringCommit.AccessAmount;
|
|
3681
|
+
ending_before?: string;
|
|
3682
|
+
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
3683
|
+
}
|
|
3684
|
+
namespace UpdateRecurringCommit {
|
|
3685
|
+
interface AccessAmount {
|
|
3686
|
+
quantity?: number;
|
|
3687
|
+
unit_price?: number;
|
|
3688
|
+
}
|
|
3689
|
+
interface InvoiceAmount {
|
|
3690
|
+
quantity?: number;
|
|
3691
|
+
unit_price?: number;
|
|
3692
|
+
}
|
|
3693
|
+
}
|
|
3694
|
+
interface UpdateRecurringCredit {
|
|
3695
|
+
id: string;
|
|
3696
|
+
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
3697
|
+
ending_before?: string;
|
|
3698
|
+
}
|
|
3699
|
+
namespace UpdateRecurringCredit {
|
|
3700
|
+
interface AccessAmount {
|
|
3701
|
+
quantity?: number;
|
|
3702
|
+
unit_price?: number;
|
|
3703
|
+
}
|
|
3704
|
+
}
|
|
3705
|
+
interface UpdateRefundInvoice {
|
|
3706
|
+
date: string;
|
|
3707
|
+
invoice_id: string;
|
|
3708
|
+
}
|
|
3709
|
+
interface UpdateScheduledCharge {
|
|
3710
|
+
id: string;
|
|
3711
|
+
invoice_schedule?: UpdateScheduledCharge.InvoiceSchedule;
|
|
3712
|
+
name?: string;
|
|
3713
|
+
netsuite_sales_order_id?: string | null;
|
|
3714
|
+
}
|
|
3715
|
+
namespace UpdateScheduledCharge {
|
|
3716
|
+
interface InvoiceSchedule {
|
|
3717
|
+
add_schedule_items?: Array<InvoiceSchedule.AddScheduleItem>;
|
|
3718
|
+
remove_schedule_items?: Array<InvoiceSchedule.RemoveScheduleItem>;
|
|
3719
|
+
update_schedule_items?: Array<InvoiceSchedule.UpdateScheduleItem>;
|
|
3720
|
+
}
|
|
3721
|
+
namespace InvoiceSchedule {
|
|
3722
|
+
interface AddScheduleItem {
|
|
3723
|
+
timestamp: string;
|
|
3724
|
+
amount?: number;
|
|
3725
|
+
quantity?: number;
|
|
3726
|
+
unit_price?: number;
|
|
3727
|
+
}
|
|
3728
|
+
interface RemoveScheduleItem {
|
|
3729
|
+
id: string;
|
|
3730
|
+
}
|
|
3731
|
+
interface UpdateScheduleItem {
|
|
3732
|
+
id: string;
|
|
2100
3733
|
amount?: number;
|
|
2101
3734
|
quantity?: number;
|
|
2102
3735
|
timestamp?: string;
|
|
@@ -2104,6 +3737,104 @@ export declare namespace ContractGetEditHistoryResponse {
|
|
|
2104
3737
|
}
|
|
2105
3738
|
}
|
|
2106
3739
|
}
|
|
3740
|
+
interface UpdateSpendThresholdConfiguration {
|
|
3741
|
+
commit?: UpdateSpendThresholdConfiguration.Commit;
|
|
3742
|
+
/**
|
|
3743
|
+
* When set to false, the contract will not be evaluated against the
|
|
3744
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
3745
|
+
* regardless of prior state.
|
|
3746
|
+
*/
|
|
3747
|
+
is_enabled?: boolean;
|
|
3748
|
+
payment_gate_config?: UpdateSpendThresholdConfiguration.PaymentGateConfig;
|
|
3749
|
+
/**
|
|
3750
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
3751
|
+
* hits this amount, a threshold charge will be initiated.
|
|
3752
|
+
*/
|
|
3753
|
+
threshold_amount?: number;
|
|
3754
|
+
}
|
|
3755
|
+
namespace UpdateSpendThresholdConfiguration {
|
|
3756
|
+
interface Commit {
|
|
3757
|
+
description?: string;
|
|
3758
|
+
/**
|
|
3759
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
3760
|
+
* will default to the commit product name.
|
|
3761
|
+
*/
|
|
3762
|
+
name?: string;
|
|
3763
|
+
/**
|
|
3764
|
+
* The commit product that will be used to generate the line item for commit
|
|
3765
|
+
* payment.
|
|
3766
|
+
*/
|
|
3767
|
+
product_id?: string;
|
|
3768
|
+
}
|
|
3769
|
+
interface PaymentGateConfig {
|
|
3770
|
+
/**
|
|
3771
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
3772
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
3773
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
3774
|
+
* wish to payment gate the commit balance.
|
|
3775
|
+
*/
|
|
3776
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
3777
|
+
/**
|
|
3778
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3779
|
+
*/
|
|
3780
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
3781
|
+
/**
|
|
3782
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3783
|
+
*/
|
|
3784
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
3785
|
+
/**
|
|
3786
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
3787
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
3788
|
+
* will default to NONE.
|
|
3789
|
+
*/
|
|
3790
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
3791
|
+
}
|
|
3792
|
+
namespace PaymentGateConfig {
|
|
3793
|
+
/**
|
|
3794
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
3795
|
+
*/
|
|
3796
|
+
interface PrecalculatedTaxConfig {
|
|
3797
|
+
/**
|
|
3798
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
3799
|
+
* denomination as the commit's invoice schedule
|
|
3800
|
+
*/
|
|
3801
|
+
tax_amount: number;
|
|
3802
|
+
/**
|
|
3803
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
3804
|
+
* description.
|
|
3805
|
+
*/
|
|
3806
|
+
tax_name?: string;
|
|
3807
|
+
}
|
|
3808
|
+
/**
|
|
3809
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
3810
|
+
*/
|
|
3811
|
+
interface StripeConfig {
|
|
3812
|
+
/**
|
|
3813
|
+
* If left blank, will default to INVOICE
|
|
3814
|
+
*/
|
|
3815
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
3816
|
+
/**
|
|
3817
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
3818
|
+
* your payment type.
|
|
3819
|
+
*/
|
|
3820
|
+
invoice_metadata?: {
|
|
3821
|
+
[key: string]: string;
|
|
3822
|
+
};
|
|
3823
|
+
}
|
|
3824
|
+
}
|
|
3825
|
+
}
|
|
3826
|
+
interface UpdateSubscription {
|
|
3827
|
+
id: string;
|
|
3828
|
+
ending_before?: string;
|
|
3829
|
+
quantity_updates?: Array<UpdateSubscription.QuantityUpdate>;
|
|
3830
|
+
}
|
|
3831
|
+
namespace UpdateSubscription {
|
|
3832
|
+
interface QuantityUpdate {
|
|
3833
|
+
starting_at: string;
|
|
3834
|
+
quantity?: number;
|
|
3835
|
+
quantity_delta?: number;
|
|
3836
|
+
}
|
|
3837
|
+
}
|
|
2107
3838
|
}
|
|
2108
3839
|
}
|
|
2109
3840
|
export interface ContractRetrieveParams {
|
|
@@ -2165,6 +3896,7 @@ export interface ContractEditParams {
|
|
|
2165
3896
|
add_credits?: Array<ContractEditParams.AddCredit>;
|
|
2166
3897
|
add_discounts?: Array<ContractEditParams.AddDiscount>;
|
|
2167
3898
|
add_overrides?: Array<ContractEditParams.AddOverride>;
|
|
3899
|
+
add_prepaid_balance_threshold_configuration?: ContractEditParams.AddPrepaidBalanceThresholdConfiguration;
|
|
2168
3900
|
/**
|
|
2169
3901
|
* This field's availability is dependent on your client's configuration.
|
|
2170
3902
|
*/
|
|
@@ -2173,9 +3905,66 @@ export interface ContractEditParams {
|
|
|
2173
3905
|
add_recurring_credits?: Array<ContractEditParams.AddRecurringCredit>;
|
|
2174
3906
|
add_reseller_royalties?: Array<ContractEditParams.AddResellerRoyalty>;
|
|
2175
3907
|
add_scheduled_charges?: Array<ContractEditParams.AddScheduledCharge>;
|
|
3908
|
+
add_spend_threshold_configuration?: ContractEditParams.AddSpendThresholdConfiguration;
|
|
3909
|
+
/**
|
|
3910
|
+
* Optional list of
|
|
3911
|
+
* [subscriptions](https://docs.metronome.com/manage-product-access/create-subscription/)
|
|
3912
|
+
* to add to the contract.
|
|
3913
|
+
*/
|
|
3914
|
+
add_subscriptions?: Array<ContractEditParams.AddSubscription>;
|
|
3915
|
+
/**
|
|
3916
|
+
* If true, allows setting the contract end date earlier than the end_timestamp of
|
|
3917
|
+
* existing finalized invoices. Finalized invoices will be unchanged; if you want
|
|
3918
|
+
* to incorporate the new end date, you can void and regenerate finalized usage
|
|
3919
|
+
* invoices. Defaults to true.
|
|
3920
|
+
*/
|
|
3921
|
+
allow_contract_ending_before_finalized_invoice?: boolean;
|
|
3922
|
+
/**
|
|
3923
|
+
* IDs of commits to archive
|
|
3924
|
+
*/
|
|
3925
|
+
archive_commits?: Array<ContractEditParams.ArchiveCommit>;
|
|
3926
|
+
/**
|
|
3927
|
+
* IDs of credits to archive
|
|
3928
|
+
*/
|
|
3929
|
+
archive_credits?: Array<ContractEditParams.ArchiveCredit>;
|
|
3930
|
+
/**
|
|
3931
|
+
* IDs of scheduled charges to archive
|
|
3932
|
+
*/
|
|
3933
|
+
archive_scheduled_charges?: Array<ContractEditParams.ArchiveScheduledCharge>;
|
|
3934
|
+
/**
|
|
3935
|
+
* IDs of overrides to remove
|
|
3936
|
+
*/
|
|
3937
|
+
remove_overrides?: Array<ContractEditParams.RemoveOverride>;
|
|
2176
3938
|
update_commits?: Array<ContractEditParams.UpdateCommit>;
|
|
3939
|
+
/**
|
|
3940
|
+
* RFC 3339 timestamp indicating when the contract will end (exclusive).
|
|
3941
|
+
*/
|
|
3942
|
+
update_contract_end_date?: string | null;
|
|
3943
|
+
/**
|
|
3944
|
+
* Value to update the contract name to. If not provided, the contract name will
|
|
3945
|
+
* remain unchanged.
|
|
3946
|
+
*/
|
|
3947
|
+
update_contract_name?: string | null;
|
|
2177
3948
|
update_credits?: Array<ContractEditParams.UpdateCredit>;
|
|
3949
|
+
update_prepaid_balance_threshold_configuration?: ContractEditParams.UpdatePrepaidBalanceThresholdConfiguration;
|
|
3950
|
+
/**
|
|
3951
|
+
* Edits to these recurring commits will only affect commits whose access schedules
|
|
3952
|
+
* has not started. Expired commits, and commits with an active access schedule
|
|
3953
|
+
* will remain unchanged.
|
|
3954
|
+
*/
|
|
3955
|
+
update_recurring_commits?: Array<ContractEditParams.UpdateRecurringCommit>;
|
|
3956
|
+
/**
|
|
3957
|
+
* Edits to these recurring credits will only affect credits whose access schedules
|
|
3958
|
+
* has not started. Expired credits, and credits with an active access schedule
|
|
3959
|
+
* will remain unchanged.
|
|
3960
|
+
*/
|
|
3961
|
+
update_recurring_credits?: Array<ContractEditParams.UpdateRecurringCredit>;
|
|
2178
3962
|
update_scheduled_charges?: Array<ContractEditParams.UpdateScheduledCharge>;
|
|
3963
|
+
update_spend_threshold_configuration?: ContractEditParams.UpdateSpendThresholdConfiguration;
|
|
3964
|
+
/**
|
|
3965
|
+
* Optional list of subscriptions to update.
|
|
3966
|
+
*/
|
|
3967
|
+
update_subscriptions?: Array<ContractEditParams.UpdateSubscription>;
|
|
2179
3968
|
}
|
|
2180
3969
|
export declare namespace ContractEditParams {
|
|
2181
3970
|
interface AddCommit {
|
|
@@ -2192,20 +3981,28 @@ export declare namespace ContractEditParams {
|
|
|
2192
3981
|
*/
|
|
2193
3982
|
amount?: number;
|
|
2194
3983
|
/**
|
|
2195
|
-
* Which products the commit applies to. If
|
|
2196
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
3984
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
3985
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
3986
|
+
* all products.
|
|
2197
3987
|
*/
|
|
2198
3988
|
applicable_product_ids?: Array<string>;
|
|
2199
3989
|
/**
|
|
2200
|
-
* Which tags the commit applies to. If
|
|
2201
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
3990
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
3991
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
3992
|
+
* all products.
|
|
2202
3993
|
*/
|
|
2203
3994
|
applicable_product_tags?: Array<string>;
|
|
2204
|
-
custom_fields?:
|
|
3995
|
+
custom_fields?: {
|
|
3996
|
+
[key: string]: string;
|
|
3997
|
+
};
|
|
2205
3998
|
/**
|
|
2206
3999
|
* Used only in UI/API. It is not exposed to end customers.
|
|
2207
4000
|
*/
|
|
2208
4001
|
description?: string;
|
|
4002
|
+
/**
|
|
4003
|
+
* Optional configuration for commit hierarchy access control
|
|
4004
|
+
*/
|
|
4005
|
+
hierarchy_configuration?: AddCommit.HierarchyConfiguration;
|
|
2209
4006
|
/**
|
|
2210
4007
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
2211
4008
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -2221,6 +4018,10 @@ export declare namespace ContractEditParams {
|
|
|
2221
4018
|
* This field's availability is dependent on your client's configuration.
|
|
2222
4019
|
*/
|
|
2223
4020
|
netsuite_sales_order_id?: string;
|
|
4021
|
+
/**
|
|
4022
|
+
* optionally payment gate this commit
|
|
4023
|
+
*/
|
|
4024
|
+
payment_gate_config?: AddCommit.PaymentGateConfig;
|
|
2224
4025
|
/**
|
|
2225
4026
|
* If multiple commits are applicable, the one with the lower priority will apply
|
|
2226
4027
|
* first.
|
|
@@ -2231,6 +4032,13 @@ export declare namespace ContractEditParams {
|
|
|
2231
4032
|
* Fraction of unused segments that will be rolled over. Must be between 0 and 1.
|
|
2232
4033
|
*/
|
|
2233
4034
|
rollover_fraction?: number;
|
|
4035
|
+
/**
|
|
4036
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
4037
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
4038
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
4039
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
4040
|
+
*/
|
|
4041
|
+
specifiers?: Array<AddCommit.Specifier>;
|
|
2234
4042
|
/**
|
|
2235
4043
|
* A temporary ID for the commit that can be used to reference the commit for
|
|
2236
4044
|
* commit specific overrides.
|
|
@@ -2260,6 +4068,24 @@ export declare namespace ContractEditParams {
|
|
|
2260
4068
|
starting_at: string;
|
|
2261
4069
|
}
|
|
2262
4070
|
}
|
|
4071
|
+
/**
|
|
4072
|
+
* Optional configuration for commit hierarchy access control
|
|
4073
|
+
*/
|
|
4074
|
+
interface HierarchyConfiguration {
|
|
4075
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
4076
|
+
}
|
|
4077
|
+
namespace HierarchyConfiguration {
|
|
4078
|
+
interface CommitHierarchyChildAccessAll {
|
|
4079
|
+
type: 'ALL';
|
|
4080
|
+
}
|
|
4081
|
+
interface CommitHierarchyChildAccessNone {
|
|
4082
|
+
type: 'NONE';
|
|
4083
|
+
}
|
|
4084
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
4085
|
+
contract_ids: Array<string>;
|
|
4086
|
+
type: 'CONTRACT_IDS';
|
|
4087
|
+
}
|
|
4088
|
+
}
|
|
2263
4089
|
/**
|
|
2264
4090
|
* Required for "POSTPAID" commits: the true up invoice will be generated at this
|
|
2265
4091
|
* time and only one schedule item is allowed; the total must match access_schedule
|
|
@@ -2294,7 +4120,7 @@ export declare namespace ContractEditParams {
|
|
|
2294
4120
|
* RFC 3339 timestamp (exclusive).
|
|
2295
4121
|
*/
|
|
2296
4122
|
ending_before: string;
|
|
2297
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
|
|
4123
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
2298
4124
|
/**
|
|
2299
4125
|
* RFC 3339 timestamp (inclusive).
|
|
2300
4126
|
*/
|
|
@@ -2343,6 +4169,82 @@ export declare namespace ContractEditParams {
|
|
|
2343
4169
|
unit_price?: number;
|
|
2344
4170
|
}
|
|
2345
4171
|
}
|
|
4172
|
+
/**
|
|
4173
|
+
* optionally payment gate this commit
|
|
4174
|
+
*/
|
|
4175
|
+
interface PaymentGateConfig {
|
|
4176
|
+
/**
|
|
4177
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
4178
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
4179
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
4180
|
+
* wish to payment gate the commit balance.
|
|
4181
|
+
*/
|
|
4182
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
4183
|
+
/**
|
|
4184
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4185
|
+
*/
|
|
4186
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
4187
|
+
/**
|
|
4188
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4189
|
+
*/
|
|
4190
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
4191
|
+
/**
|
|
4192
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
4193
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
4194
|
+
* will default to NONE.
|
|
4195
|
+
*/
|
|
4196
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
4197
|
+
}
|
|
4198
|
+
namespace PaymentGateConfig {
|
|
4199
|
+
/**
|
|
4200
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4201
|
+
*/
|
|
4202
|
+
interface PrecalculatedTaxConfig {
|
|
4203
|
+
/**
|
|
4204
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
4205
|
+
* denomination as the commit's invoice schedule
|
|
4206
|
+
*/
|
|
4207
|
+
tax_amount: number;
|
|
4208
|
+
/**
|
|
4209
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
4210
|
+
* description.
|
|
4211
|
+
*/
|
|
4212
|
+
tax_name?: string;
|
|
4213
|
+
}
|
|
4214
|
+
/**
|
|
4215
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4216
|
+
*/
|
|
4217
|
+
interface StripeConfig {
|
|
4218
|
+
/**
|
|
4219
|
+
* If left blank, will default to INVOICE
|
|
4220
|
+
*/
|
|
4221
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
4222
|
+
/**
|
|
4223
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
4224
|
+
* your payment type.
|
|
4225
|
+
*/
|
|
4226
|
+
invoice_metadata?: {
|
|
4227
|
+
[key: string]: string;
|
|
4228
|
+
};
|
|
4229
|
+
}
|
|
4230
|
+
}
|
|
4231
|
+
interface Specifier {
|
|
4232
|
+
presentation_group_values?: {
|
|
4233
|
+
[key: string]: string;
|
|
4234
|
+
};
|
|
4235
|
+
pricing_group_values?: {
|
|
4236
|
+
[key: string]: string;
|
|
4237
|
+
};
|
|
4238
|
+
/**
|
|
4239
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
4240
|
+
*/
|
|
4241
|
+
product_id?: string;
|
|
4242
|
+
/**
|
|
4243
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
4244
|
+
* tags.
|
|
4245
|
+
*/
|
|
4246
|
+
product_tags?: Array<string>;
|
|
4247
|
+
}
|
|
2346
4248
|
}
|
|
2347
4249
|
interface AddCredit {
|
|
2348
4250
|
/**
|
|
@@ -2360,11 +4262,17 @@ export declare namespace ContractEditParams {
|
|
|
2360
4262
|
* applicable_product_tags are not provided, the credit applies to all products.
|
|
2361
4263
|
*/
|
|
2362
4264
|
applicable_product_tags?: Array<string>;
|
|
2363
|
-
custom_fields?:
|
|
4265
|
+
custom_fields?: {
|
|
4266
|
+
[key: string]: string;
|
|
4267
|
+
};
|
|
2364
4268
|
/**
|
|
2365
4269
|
* Used only in UI/API. It is not exposed to end customers.
|
|
2366
4270
|
*/
|
|
2367
4271
|
description?: string;
|
|
4272
|
+
/**
|
|
4273
|
+
* Optional configuration for credit hierarchy access control
|
|
4274
|
+
*/
|
|
4275
|
+
hierarchy_configuration?: AddCredit.HierarchyConfiguration;
|
|
2368
4276
|
/**
|
|
2369
4277
|
* displayed on invoices
|
|
2370
4278
|
*/
|
|
@@ -2379,6 +4287,13 @@ export declare namespace ContractEditParams {
|
|
|
2379
4287
|
*/
|
|
2380
4288
|
priority?: number;
|
|
2381
4289
|
rate_type?: 'COMMIT_RATE' | 'LIST_RATE';
|
|
4290
|
+
/**
|
|
4291
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
4292
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
4293
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
4294
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
4295
|
+
*/
|
|
4296
|
+
specifiers?: Array<AddCredit.Specifier>;
|
|
2382
4297
|
}
|
|
2383
4298
|
namespace AddCredit {
|
|
2384
4299
|
/**
|
|
@@ -2401,6 +4316,41 @@ export declare namespace ContractEditParams {
|
|
|
2401
4316
|
starting_at: string;
|
|
2402
4317
|
}
|
|
2403
4318
|
}
|
|
4319
|
+
/**
|
|
4320
|
+
* Optional configuration for credit 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
|
+
}
|
|
4337
|
+
interface Specifier {
|
|
4338
|
+
presentation_group_values?: {
|
|
4339
|
+
[key: string]: string;
|
|
4340
|
+
};
|
|
4341
|
+
pricing_group_values?: {
|
|
4342
|
+
[key: string]: string;
|
|
4343
|
+
};
|
|
4344
|
+
/**
|
|
4345
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
4346
|
+
*/
|
|
4347
|
+
product_id?: string;
|
|
4348
|
+
/**
|
|
4349
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
4350
|
+
* tags.
|
|
4351
|
+
*/
|
|
4352
|
+
product_tags?: Array<string>;
|
|
4353
|
+
}
|
|
2404
4354
|
}
|
|
2405
4355
|
interface AddDiscount {
|
|
2406
4356
|
product_id: string;
|
|
@@ -2408,7 +4358,9 @@ export declare namespace ContractEditParams {
|
|
|
2408
4358
|
* Must provide either schedule_items or recurring_schedule.
|
|
2409
4359
|
*/
|
|
2410
4360
|
schedule: AddDiscount.Schedule;
|
|
2411
|
-
custom_fields?:
|
|
4361
|
+
custom_fields?: {
|
|
4362
|
+
[key: string]: string;
|
|
4363
|
+
};
|
|
2412
4364
|
/**
|
|
2413
4365
|
* displayed on invoices
|
|
2414
4366
|
*/
|
|
@@ -2450,7 +4402,7 @@ export declare namespace ContractEditParams {
|
|
|
2450
4402
|
* RFC 3339 timestamp (exclusive).
|
|
2451
4403
|
*/
|
|
2452
4404
|
ending_before: string;
|
|
2453
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
|
|
4405
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
2454
4406
|
/**
|
|
2455
4407
|
* RFC 3339 timestamp (inclusive).
|
|
2456
4408
|
*/
|
|
@@ -2561,6 +4513,7 @@ export declare namespace ContractEditParams {
|
|
|
2561
4513
|
}
|
|
2562
4514
|
namespace AddOverride {
|
|
2563
4515
|
interface OverrideSpecifier {
|
|
4516
|
+
billing_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2564
4517
|
/**
|
|
2565
4518
|
* If provided, the override will only apply to the specified commits. Can only be
|
|
2566
4519
|
* used for commit specific overrides. If not provided, the override will apply to
|
|
@@ -2572,12 +4525,16 @@ export declare namespace ContractEditParams {
|
|
|
2572
4525
|
* the specified presentation group values. Can only be used for multiplier
|
|
2573
4526
|
* overrides.
|
|
2574
4527
|
*/
|
|
2575
|
-
presentation_group_values?:
|
|
4528
|
+
presentation_group_values?: {
|
|
4529
|
+
[key: string]: string;
|
|
4530
|
+
};
|
|
2576
4531
|
/**
|
|
2577
4532
|
* A map of pricing group names to values. The override will only apply to products
|
|
2578
4533
|
* with the specified pricing group values.
|
|
2579
4534
|
*/
|
|
2580
|
-
pricing_group_values?:
|
|
4535
|
+
pricing_group_values?: {
|
|
4536
|
+
[key: string]: string;
|
|
4537
|
+
};
|
|
2581
4538
|
/**
|
|
2582
4539
|
* If provided, the override will only apply to the product with the specified ID.
|
|
2583
4540
|
*/
|
|
@@ -2612,7 +4569,9 @@ export declare namespace ContractEditParams {
|
|
|
2612
4569
|
* Only set for CUSTOM rate_type. This field is interpreted by custom rate
|
|
2613
4570
|
* processors.
|
|
2614
4571
|
*/
|
|
2615
|
-
custom_rate?:
|
|
4572
|
+
custom_rate?: {
|
|
4573
|
+
[key: string]: unknown;
|
|
4574
|
+
};
|
|
2616
4575
|
/**
|
|
2617
4576
|
* Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be
|
|
2618
4577
|
* set to true.
|
|
@@ -2637,36 +4596,173 @@ export declare namespace ContractEditParams {
|
|
|
2637
4596
|
size?: number;
|
|
2638
4597
|
}
|
|
2639
4598
|
}
|
|
2640
|
-
interface
|
|
4599
|
+
interface AddPrepaidBalanceThresholdConfiguration {
|
|
4600
|
+
commit: AddPrepaidBalanceThresholdConfiguration.Commit;
|
|
2641
4601
|
/**
|
|
2642
|
-
*
|
|
4602
|
+
* When set to false, the contract will not be evaluated against the
|
|
4603
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
4604
|
+
* regardless of prior state.
|
|
2643
4605
|
*/
|
|
2644
|
-
|
|
2645
|
-
|
|
4606
|
+
is_enabled: boolean;
|
|
4607
|
+
payment_gate_config: AddPrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
2646
4608
|
/**
|
|
2647
|
-
*
|
|
2648
|
-
* amount.
|
|
4609
|
+
* Specify the amount the balance should be recharged to.
|
|
2649
4610
|
*/
|
|
2650
|
-
|
|
4611
|
+
recharge_to_amount: number;
|
|
2651
4612
|
/**
|
|
2652
|
-
*
|
|
2653
|
-
* amount
|
|
4613
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
4614
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
2654
4615
|
*/
|
|
2655
|
-
|
|
2656
|
-
custom_fields?: Record<string, string>;
|
|
2657
|
-
description?: string;
|
|
4616
|
+
threshold_amount: number;
|
|
2658
4617
|
/**
|
|
2659
|
-
*
|
|
4618
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
4619
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
2660
4620
|
*/
|
|
2661
|
-
|
|
4621
|
+
custom_credit_type_id?: string;
|
|
2662
4622
|
}
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
4623
|
+
namespace AddPrepaidBalanceThresholdConfiguration {
|
|
4624
|
+
interface Commit {
|
|
4625
|
+
/**
|
|
4626
|
+
* The commit product that will be used to generate the line item for commit
|
|
4627
|
+
* payment.
|
|
4628
|
+
*/
|
|
4629
|
+
product_id: string;
|
|
4630
|
+
/**
|
|
4631
|
+
* Which products the threshold commit applies to. If applicable_product_ids,
|
|
4632
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
4633
|
+
* all products.
|
|
4634
|
+
*/
|
|
4635
|
+
applicable_product_ids?: Array<string>;
|
|
4636
|
+
/**
|
|
4637
|
+
* Which tags the threshold commit applies to. If applicable_product_ids,
|
|
4638
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
4639
|
+
* all products.
|
|
4640
|
+
*/
|
|
4641
|
+
applicable_product_tags?: Array<string>;
|
|
4642
|
+
description?: string;
|
|
4643
|
+
/**
|
|
4644
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
4645
|
+
* will default to the commit product name.
|
|
4646
|
+
*/
|
|
4647
|
+
name?: string;
|
|
4648
|
+
/**
|
|
4649
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
4650
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
4651
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
4652
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
4653
|
+
*/
|
|
4654
|
+
specifiers?: Array<Commit.Specifier>;
|
|
4655
|
+
}
|
|
4656
|
+
namespace Commit {
|
|
4657
|
+
interface Specifier {
|
|
4658
|
+
presentation_group_values?: {
|
|
4659
|
+
[key: string]: string;
|
|
4660
|
+
};
|
|
4661
|
+
pricing_group_values?: {
|
|
4662
|
+
[key: string]: string;
|
|
4663
|
+
};
|
|
4664
|
+
/**
|
|
4665
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
4666
|
+
*/
|
|
4667
|
+
product_id?: string;
|
|
4668
|
+
/**
|
|
4669
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
4670
|
+
* tags.
|
|
4671
|
+
*/
|
|
4672
|
+
product_tags?: Array<string>;
|
|
4673
|
+
}
|
|
4674
|
+
}
|
|
4675
|
+
interface PaymentGateConfig {
|
|
4676
|
+
/**
|
|
4677
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
4678
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
4679
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
4680
|
+
* wish to payment gate the commit balance.
|
|
4681
|
+
*/
|
|
4682
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
4683
|
+
/**
|
|
4684
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4685
|
+
*/
|
|
4686
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
4687
|
+
/**
|
|
4688
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4689
|
+
*/
|
|
4690
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
4691
|
+
/**
|
|
4692
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
4693
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
4694
|
+
* will default to NONE.
|
|
4695
|
+
*/
|
|
4696
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
4697
|
+
}
|
|
4698
|
+
namespace PaymentGateConfig {
|
|
4699
|
+
/**
|
|
4700
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
4701
|
+
*/
|
|
4702
|
+
interface PrecalculatedTaxConfig {
|
|
4703
|
+
/**
|
|
4704
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
4705
|
+
* denomination as the commit's invoice schedule
|
|
4706
|
+
*/
|
|
4707
|
+
tax_amount: number;
|
|
4708
|
+
/**
|
|
4709
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
4710
|
+
* description.
|
|
4711
|
+
*/
|
|
4712
|
+
tax_name?: string;
|
|
4713
|
+
}
|
|
4714
|
+
/**
|
|
4715
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
4716
|
+
*/
|
|
4717
|
+
interface StripeConfig {
|
|
4718
|
+
/**
|
|
4719
|
+
* If left blank, will default to INVOICE
|
|
4720
|
+
*/
|
|
4721
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
4722
|
+
/**
|
|
4723
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
4724
|
+
* your payment type.
|
|
4725
|
+
*/
|
|
4726
|
+
invoice_metadata?: {
|
|
4727
|
+
[key: string]: string;
|
|
4728
|
+
};
|
|
4729
|
+
}
|
|
4730
|
+
}
|
|
4731
|
+
}
|
|
4732
|
+
interface AddProfessionalService {
|
|
4733
|
+
/**
|
|
4734
|
+
* Maximum amount for the term.
|
|
4735
|
+
*/
|
|
4736
|
+
max_amount: number;
|
|
4737
|
+
product_id: string;
|
|
4738
|
+
/**
|
|
4739
|
+
* Quantity for the charge. Will be multiplied by unit_price to determine the
|
|
4740
|
+
* amount.
|
|
4741
|
+
*/
|
|
4742
|
+
quantity: number;
|
|
4743
|
+
/**
|
|
4744
|
+
* Unit price for the charge. Will be multiplied by quantity to determine the
|
|
4745
|
+
* amount and must be specified.
|
|
4746
|
+
*/
|
|
4747
|
+
unit_price: number;
|
|
4748
|
+
custom_fields?: {
|
|
4749
|
+
[key: string]: string;
|
|
4750
|
+
};
|
|
4751
|
+
description?: string;
|
|
4752
|
+
/**
|
|
4753
|
+
* This field's availability is dependent on your client's configuration.
|
|
4754
|
+
*/
|
|
4755
|
+
netsuite_sales_order_id?: string;
|
|
4756
|
+
}
|
|
4757
|
+
interface AddRecurringCommit {
|
|
4758
|
+
/**
|
|
4759
|
+
* The amount of commit to grant.
|
|
2666
4760
|
*/
|
|
2667
4761
|
access_amount: AddRecurringCommit.AccessAmount;
|
|
2668
4762
|
/**
|
|
2669
|
-
*
|
|
4763
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
4764
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
4765
|
+
* length of a period is determined by the recurrence_frequency.
|
|
2670
4766
|
*/
|
|
2671
4767
|
commit_duration: AddRecurringCommit.CommitDuration;
|
|
2672
4768
|
/**
|
|
@@ -2694,6 +4790,10 @@ export declare namespace ContractEditParams {
|
|
|
2694
4790
|
* Determines when the contract will stop creating recurring commits. optional
|
|
2695
4791
|
*/
|
|
2696
4792
|
ending_before?: string;
|
|
4793
|
+
/**
|
|
4794
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
4795
|
+
*/
|
|
4796
|
+
hierarchy_configuration?: AddRecurringCommit.HierarchyConfiguration;
|
|
2697
4797
|
/**
|
|
2698
4798
|
* The amount the customer should be billed for the commit. Not required.
|
|
2699
4799
|
*/
|
|
@@ -2719,16 +4819,23 @@ export declare namespace ContractEditParams {
|
|
|
2719
4819
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
2720
4820
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
2721
4821
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
2722
|
-
* be created aligned with the recurring commit's
|
|
4822
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2723
4823
|
* invoice dates.
|
|
2724
4824
|
*/
|
|
2725
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
4825
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2726
4826
|
/**
|
|
2727
4827
|
* Will be passed down to the individual commits. This controls how much of an
|
|
2728
4828
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
2729
4829
|
* between 0 and 1.
|
|
2730
4830
|
*/
|
|
2731
4831
|
rollover_fraction?: number;
|
|
4832
|
+
/**
|
|
4833
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
4834
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
4835
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
4836
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
4837
|
+
*/
|
|
4838
|
+
specifiers?: Array<AddRecurringCommit.Specifier>;
|
|
2732
4839
|
/**
|
|
2733
4840
|
* A temporary ID that can be used to reference the recurring commit for commit
|
|
2734
4841
|
* specific overrides.
|
|
@@ -2741,15 +4848,39 @@ export declare namespace ContractEditParams {
|
|
|
2741
4848
|
*/
|
|
2742
4849
|
interface AccessAmount {
|
|
2743
4850
|
credit_type_id: string;
|
|
2744
|
-
quantity: number;
|
|
2745
4851
|
unit_price: number;
|
|
4852
|
+
/**
|
|
4853
|
+
* This field is currently required. Upcoming recurring commit/credit configuration
|
|
4854
|
+
* options will allow it to be optional.
|
|
4855
|
+
*/
|
|
4856
|
+
quantity?: number;
|
|
2746
4857
|
}
|
|
2747
4858
|
/**
|
|
2748
|
-
*
|
|
4859
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
4860
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
4861
|
+
* length of a period is determined by the recurrence_frequency.
|
|
2749
4862
|
*/
|
|
2750
4863
|
interface CommitDuration {
|
|
2751
|
-
unit: 'PERIODS';
|
|
2752
4864
|
value: number;
|
|
4865
|
+
unit?: 'PERIODS';
|
|
4866
|
+
}
|
|
4867
|
+
/**
|
|
4868
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
4869
|
+
*/
|
|
4870
|
+
interface HierarchyConfiguration {
|
|
4871
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
4872
|
+
}
|
|
4873
|
+
namespace HierarchyConfiguration {
|
|
4874
|
+
interface CommitHierarchyChildAccessAll {
|
|
4875
|
+
type: 'ALL';
|
|
4876
|
+
}
|
|
4877
|
+
interface CommitHierarchyChildAccessNone {
|
|
4878
|
+
type: 'NONE';
|
|
4879
|
+
}
|
|
4880
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
4881
|
+
contract_ids: Array<string>;
|
|
4882
|
+
type: 'CONTRACT_IDS';
|
|
4883
|
+
}
|
|
2753
4884
|
}
|
|
2754
4885
|
/**
|
|
2755
4886
|
* The amount the customer should be billed for the commit. Not required.
|
|
@@ -2759,6 +4890,23 @@ export declare namespace ContractEditParams {
|
|
|
2759
4890
|
quantity: number;
|
|
2760
4891
|
unit_price: number;
|
|
2761
4892
|
}
|
|
4893
|
+
interface Specifier {
|
|
4894
|
+
presentation_group_values?: {
|
|
4895
|
+
[key: string]: string;
|
|
4896
|
+
};
|
|
4897
|
+
pricing_group_values?: {
|
|
4898
|
+
[key: string]: string;
|
|
4899
|
+
};
|
|
4900
|
+
/**
|
|
4901
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
4902
|
+
*/
|
|
4903
|
+
product_id?: string;
|
|
4904
|
+
/**
|
|
4905
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
4906
|
+
* tags.
|
|
4907
|
+
*/
|
|
4908
|
+
product_tags?: Array<string>;
|
|
4909
|
+
}
|
|
2762
4910
|
}
|
|
2763
4911
|
interface AddRecurringCredit {
|
|
2764
4912
|
/**
|
|
@@ -2766,7 +4914,9 @@ export declare namespace ContractEditParams {
|
|
|
2766
4914
|
*/
|
|
2767
4915
|
access_amount: AddRecurringCredit.AccessAmount;
|
|
2768
4916
|
/**
|
|
2769
|
-
*
|
|
4917
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
4918
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
4919
|
+
* length of a period is determined by the recurrence_frequency.
|
|
2770
4920
|
*/
|
|
2771
4921
|
commit_duration: AddRecurringCredit.CommitDuration;
|
|
2772
4922
|
/**
|
|
@@ -2794,6 +4944,10 @@ export declare namespace ContractEditParams {
|
|
|
2794
4944
|
* Determines when the contract will stop creating recurring commits. optional
|
|
2795
4945
|
*/
|
|
2796
4946
|
ending_before?: string;
|
|
4947
|
+
/**
|
|
4948
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
4949
|
+
*/
|
|
4950
|
+
hierarchy_configuration?: AddRecurringCredit.HierarchyConfiguration;
|
|
2797
4951
|
/**
|
|
2798
4952
|
* displayed on invoices. will be passed through to the individual commits
|
|
2799
4953
|
*/
|
|
@@ -2815,16 +4969,23 @@ export declare namespace ContractEditParams {
|
|
|
2815
4969
|
* The frequency at which the recurring commits will be created. If not provided: -
|
|
2816
4970
|
* The commits will be created on the usage invoice frequency. If provided: - The
|
|
2817
4971
|
* period defined in the duration will correspond to this frequency. - Commits will
|
|
2818
|
-
* be created aligned with the recurring commit's
|
|
4972
|
+
* be created aligned with the recurring commit's starting_at rather than the usage
|
|
2819
4973
|
* invoice dates.
|
|
2820
4974
|
*/
|
|
2821
|
-
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL';
|
|
4975
|
+
recurrence_frequency?: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
2822
4976
|
/**
|
|
2823
4977
|
* Will be passed down to the individual commits. This controls how much of an
|
|
2824
4978
|
* individual unexpired commit will roll over upon contract transition. Must be
|
|
2825
4979
|
* between 0 and 1.
|
|
2826
4980
|
*/
|
|
2827
4981
|
rollover_fraction?: number;
|
|
4982
|
+
/**
|
|
4983
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
4984
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
4985
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
4986
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
4987
|
+
*/
|
|
4988
|
+
specifiers?: Array<AddRecurringCredit.Specifier>;
|
|
2828
4989
|
/**
|
|
2829
4990
|
* A temporary ID that can be used to reference the recurring commit for commit
|
|
2830
4991
|
* specific overrides.
|
|
@@ -2837,15 +4998,56 @@ export declare namespace ContractEditParams {
|
|
|
2837
4998
|
*/
|
|
2838
4999
|
interface AccessAmount {
|
|
2839
5000
|
credit_type_id: string;
|
|
2840
|
-
quantity: number;
|
|
2841
5001
|
unit_price: number;
|
|
5002
|
+
/**
|
|
5003
|
+
* This field is currently required. Upcoming recurring commit/credit configuration
|
|
5004
|
+
* options will allow it to be optional.
|
|
5005
|
+
*/
|
|
5006
|
+
quantity?: number;
|
|
2842
5007
|
}
|
|
2843
5008
|
/**
|
|
2844
|
-
*
|
|
5009
|
+
* Defines the length of the access schedule for each created commit/credit. The
|
|
5010
|
+
* value represents the number of units. Unit defaults to "PERIODS", where the
|
|
5011
|
+
* length of a period is determined by the recurrence_frequency.
|
|
2845
5012
|
*/
|
|
2846
5013
|
interface CommitDuration {
|
|
2847
|
-
unit: 'PERIODS';
|
|
2848
5014
|
value: number;
|
|
5015
|
+
unit?: 'PERIODS';
|
|
5016
|
+
}
|
|
5017
|
+
/**
|
|
5018
|
+
* Optional configuration for recurring commit/credit hierarchy access control
|
|
5019
|
+
*/
|
|
5020
|
+
interface HierarchyConfiguration {
|
|
5021
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
5022
|
+
}
|
|
5023
|
+
namespace HierarchyConfiguration {
|
|
5024
|
+
interface CommitHierarchyChildAccessAll {
|
|
5025
|
+
type: 'ALL';
|
|
5026
|
+
}
|
|
5027
|
+
interface CommitHierarchyChildAccessNone {
|
|
5028
|
+
type: 'NONE';
|
|
5029
|
+
}
|
|
5030
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
5031
|
+
contract_ids: Array<string>;
|
|
5032
|
+
type: 'CONTRACT_IDS';
|
|
5033
|
+
}
|
|
5034
|
+
}
|
|
5035
|
+
interface Specifier {
|
|
5036
|
+
presentation_group_values?: {
|
|
5037
|
+
[key: string]: string;
|
|
5038
|
+
};
|
|
5039
|
+
pricing_group_values?: {
|
|
5040
|
+
[key: string]: string;
|
|
5041
|
+
};
|
|
5042
|
+
/**
|
|
5043
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
5044
|
+
*/
|
|
5045
|
+
product_id?: string;
|
|
5046
|
+
/**
|
|
5047
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
5048
|
+
* tags.
|
|
5049
|
+
*/
|
|
5050
|
+
product_tags?: Array<string>;
|
|
2849
5051
|
}
|
|
2850
5052
|
}
|
|
2851
5053
|
interface AddResellerRoyalty {
|
|
@@ -2927,7 +5129,7 @@ export declare namespace ContractEditParams {
|
|
|
2927
5129
|
* RFC 3339 timestamp (exclusive).
|
|
2928
5130
|
*/
|
|
2929
5131
|
ending_before: string;
|
|
2930
|
-
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL';
|
|
5132
|
+
frequency: 'MONTHLY' | 'QUARTERLY' | 'SEMI_ANNUAL' | 'ANNUAL' | 'WEEKLY';
|
|
2931
5133
|
/**
|
|
2932
5134
|
* RFC 3339 timestamp (inclusive).
|
|
2933
5135
|
*/
|
|
@@ -2977,19 +5179,170 @@ export declare namespace ContractEditParams {
|
|
|
2977
5179
|
}
|
|
2978
5180
|
}
|
|
2979
5181
|
}
|
|
5182
|
+
interface AddSpendThresholdConfiguration {
|
|
5183
|
+
commit: AddSpendThresholdConfiguration.Commit;
|
|
5184
|
+
/**
|
|
5185
|
+
* When set to false, the contract will not be evaluated against the
|
|
5186
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
5187
|
+
* regardless of prior state.
|
|
5188
|
+
*/
|
|
5189
|
+
is_enabled: boolean;
|
|
5190
|
+
payment_gate_config: AddSpendThresholdConfiguration.PaymentGateConfig;
|
|
5191
|
+
/**
|
|
5192
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
5193
|
+
* hits this amount, a threshold charge will be initiated.
|
|
5194
|
+
*/
|
|
5195
|
+
threshold_amount: number;
|
|
5196
|
+
}
|
|
5197
|
+
namespace AddSpendThresholdConfiguration {
|
|
5198
|
+
interface Commit {
|
|
5199
|
+
/**
|
|
5200
|
+
* The commit product that will be used to generate the line item for commit
|
|
5201
|
+
* payment.
|
|
5202
|
+
*/
|
|
5203
|
+
product_id: string;
|
|
5204
|
+
description?: string;
|
|
5205
|
+
/**
|
|
5206
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
5207
|
+
* will default to the commit product name.
|
|
5208
|
+
*/
|
|
5209
|
+
name?: string;
|
|
5210
|
+
}
|
|
5211
|
+
interface PaymentGateConfig {
|
|
5212
|
+
/**
|
|
5213
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
5214
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
5215
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
5216
|
+
* wish to payment gate the commit balance.
|
|
5217
|
+
*/
|
|
5218
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
5219
|
+
/**
|
|
5220
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5221
|
+
*/
|
|
5222
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
5223
|
+
/**
|
|
5224
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5225
|
+
*/
|
|
5226
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
5227
|
+
/**
|
|
5228
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
5229
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
5230
|
+
* will default to NONE.
|
|
5231
|
+
*/
|
|
5232
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
5233
|
+
}
|
|
5234
|
+
namespace PaymentGateConfig {
|
|
5235
|
+
/**
|
|
5236
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5237
|
+
*/
|
|
5238
|
+
interface PrecalculatedTaxConfig {
|
|
5239
|
+
/**
|
|
5240
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
5241
|
+
* denomination as the commit's invoice schedule
|
|
5242
|
+
*/
|
|
5243
|
+
tax_amount: number;
|
|
5244
|
+
/**
|
|
5245
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
5246
|
+
* description.
|
|
5247
|
+
*/
|
|
5248
|
+
tax_name?: string;
|
|
5249
|
+
}
|
|
5250
|
+
/**
|
|
5251
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5252
|
+
*/
|
|
5253
|
+
interface StripeConfig {
|
|
5254
|
+
/**
|
|
5255
|
+
* If left blank, will default to INVOICE
|
|
5256
|
+
*/
|
|
5257
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
5258
|
+
/**
|
|
5259
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
5260
|
+
* your payment type.
|
|
5261
|
+
*/
|
|
5262
|
+
invoice_metadata?: {
|
|
5263
|
+
[key: string]: string;
|
|
5264
|
+
};
|
|
5265
|
+
}
|
|
5266
|
+
}
|
|
5267
|
+
}
|
|
5268
|
+
interface AddSubscription {
|
|
5269
|
+
collection_schedule: 'ADVANCE' | 'ARREARS';
|
|
5270
|
+
initial_quantity: number;
|
|
5271
|
+
proration: AddSubscription.Proration;
|
|
5272
|
+
subscription_rate: AddSubscription.SubscriptionRate;
|
|
5273
|
+
custom_fields?: {
|
|
5274
|
+
[key: string]: string;
|
|
5275
|
+
};
|
|
5276
|
+
description?: string;
|
|
5277
|
+
/**
|
|
5278
|
+
* Exclusive end time for the subscription. If not provided, subscription inherits
|
|
5279
|
+
* contract end date.
|
|
5280
|
+
*/
|
|
5281
|
+
ending_before?: string;
|
|
5282
|
+
name?: string;
|
|
5283
|
+
/**
|
|
5284
|
+
* Inclusive start time for the subscription. If not provided, defaults to contract
|
|
5285
|
+
* start date
|
|
5286
|
+
*/
|
|
5287
|
+
starting_at?: string;
|
|
5288
|
+
}
|
|
5289
|
+
namespace AddSubscription {
|
|
5290
|
+
interface Proration {
|
|
5291
|
+
/**
|
|
5292
|
+
* Indicates how mid-period quantity adjustments are invoiced. If BILL_IMMEDIATELY
|
|
5293
|
+
* is selected, the quantity increase will be billed on the scheduled date. If
|
|
5294
|
+
* BILL_ON_NEXT_COLLECTION_DATE is selected, the quantity increase will be billed
|
|
5295
|
+
* for in-arrears at the end of the period.
|
|
5296
|
+
*/
|
|
5297
|
+
invoice_behavior?: 'BILL_IMMEDIATELY' | 'BILL_ON_NEXT_COLLECTION_DATE';
|
|
5298
|
+
/**
|
|
5299
|
+
* Indicates if the partial period will be prorated or charged a full amount.
|
|
5300
|
+
*/
|
|
5301
|
+
is_prorated?: boolean;
|
|
5302
|
+
}
|
|
5303
|
+
interface SubscriptionRate {
|
|
5304
|
+
/**
|
|
5305
|
+
* Frequency to bill subscription with. Together with product_id, must match
|
|
5306
|
+
* existing rate on the rate card.
|
|
5307
|
+
*/
|
|
5308
|
+
billing_frequency: 'MONTHLY' | 'QUARTERLY' | 'ANNUAL' | 'WEEKLY';
|
|
5309
|
+
/**
|
|
5310
|
+
* Must be subscription type product
|
|
5311
|
+
*/
|
|
5312
|
+
product_id: string;
|
|
5313
|
+
}
|
|
5314
|
+
}
|
|
5315
|
+
interface ArchiveCommit {
|
|
5316
|
+
id: string;
|
|
5317
|
+
}
|
|
5318
|
+
interface ArchiveCredit {
|
|
5319
|
+
id: string;
|
|
5320
|
+
}
|
|
5321
|
+
interface ArchiveScheduledCharge {
|
|
5322
|
+
id: string;
|
|
5323
|
+
}
|
|
5324
|
+
interface RemoveOverride {
|
|
5325
|
+
id: string;
|
|
5326
|
+
}
|
|
2980
5327
|
interface UpdateCommit {
|
|
2981
5328
|
commit_id: string;
|
|
2982
5329
|
access_schedule?: UpdateCommit.AccessSchedule;
|
|
2983
5330
|
/**
|
|
2984
|
-
* Which products the commit applies to. If
|
|
2985
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5331
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
5332
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5333
|
+
* all products.
|
|
2986
5334
|
*/
|
|
2987
5335
|
applicable_product_ids?: Array<string> | null;
|
|
2988
5336
|
/**
|
|
2989
|
-
* Which tags the commit applies to. If
|
|
2990
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5337
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
5338
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5339
|
+
* all products.
|
|
2991
5340
|
*/
|
|
2992
5341
|
applicable_product_tags?: Array<string> | null;
|
|
5342
|
+
/**
|
|
5343
|
+
* Optional configuration for commit hierarchy access control
|
|
5344
|
+
*/
|
|
5345
|
+
hierarchy_configuration?: UpdateCommit.HierarchyConfiguration;
|
|
2993
5346
|
invoice_schedule?: UpdateCommit.InvoiceSchedule;
|
|
2994
5347
|
netsuite_sales_order_id?: string | null;
|
|
2995
5348
|
product_id?: string;
|
|
@@ -3017,6 +5370,24 @@ export declare namespace ContractEditParams {
|
|
|
3017
5370
|
starting_at?: string;
|
|
3018
5371
|
}
|
|
3019
5372
|
}
|
|
5373
|
+
/**
|
|
5374
|
+
* Optional configuration for commit hierarchy access control
|
|
5375
|
+
*/
|
|
5376
|
+
interface HierarchyConfiguration {
|
|
5377
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
5378
|
+
}
|
|
5379
|
+
namespace HierarchyConfiguration {
|
|
5380
|
+
interface CommitHierarchyChildAccessAll {
|
|
5381
|
+
type: 'ALL';
|
|
5382
|
+
}
|
|
5383
|
+
interface CommitHierarchyChildAccessNone {
|
|
5384
|
+
type: 'NONE';
|
|
5385
|
+
}
|
|
5386
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
5387
|
+
contract_ids: Array<string>;
|
|
5388
|
+
type: 'CONTRACT_IDS';
|
|
5389
|
+
}
|
|
5390
|
+
}
|
|
3020
5391
|
interface InvoiceSchedule {
|
|
3021
5392
|
add_schedule_items?: Array<InvoiceSchedule.AddScheduleItem>;
|
|
3022
5393
|
remove_schedule_items?: Array<InvoiceSchedule.RemoveScheduleItem>;
|
|
@@ -3045,15 +5416,21 @@ export declare namespace ContractEditParams {
|
|
|
3045
5416
|
credit_id: string;
|
|
3046
5417
|
access_schedule?: UpdateCredit.AccessSchedule;
|
|
3047
5418
|
/**
|
|
3048
|
-
* Which products the commit applies to. If
|
|
3049
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5419
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
5420
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5421
|
+
* all products.
|
|
3050
5422
|
*/
|
|
3051
5423
|
applicable_product_ids?: Array<string> | null;
|
|
3052
5424
|
/**
|
|
3053
|
-
* Which tags the commit applies to. If
|
|
3054
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5425
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
5426
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5427
|
+
* all products.
|
|
3055
5428
|
*/
|
|
3056
5429
|
applicable_product_tags?: Array<string> | null;
|
|
5430
|
+
/**
|
|
5431
|
+
* Optional configuration for commit hierarchy access control
|
|
5432
|
+
*/
|
|
5433
|
+
hierarchy_configuration?: UpdateCredit.HierarchyConfiguration;
|
|
3057
5434
|
netsuite_sales_order_id?: string | null;
|
|
3058
5435
|
product_id?: string;
|
|
3059
5436
|
}
|
|
@@ -3079,6 +5456,183 @@ export declare namespace ContractEditParams {
|
|
|
3079
5456
|
starting_at?: string;
|
|
3080
5457
|
}
|
|
3081
5458
|
}
|
|
5459
|
+
/**
|
|
5460
|
+
* Optional configuration for commit hierarchy access control
|
|
5461
|
+
*/
|
|
5462
|
+
interface HierarchyConfiguration {
|
|
5463
|
+
child_access: HierarchyConfiguration.CommitHierarchyChildAccessAll | HierarchyConfiguration.CommitHierarchyChildAccessNone | HierarchyConfiguration.CommitHierarchyChildAccessContractIDs;
|
|
5464
|
+
}
|
|
5465
|
+
namespace HierarchyConfiguration {
|
|
5466
|
+
interface CommitHierarchyChildAccessAll {
|
|
5467
|
+
type: 'ALL';
|
|
5468
|
+
}
|
|
5469
|
+
interface CommitHierarchyChildAccessNone {
|
|
5470
|
+
type: 'NONE';
|
|
5471
|
+
}
|
|
5472
|
+
interface CommitHierarchyChildAccessContractIDs {
|
|
5473
|
+
contract_ids: Array<string>;
|
|
5474
|
+
type: 'CONTRACT_IDS';
|
|
5475
|
+
}
|
|
5476
|
+
}
|
|
5477
|
+
}
|
|
5478
|
+
interface UpdatePrepaidBalanceThresholdConfiguration {
|
|
5479
|
+
commit?: UpdatePrepaidBalanceThresholdConfiguration.Commit;
|
|
5480
|
+
/**
|
|
5481
|
+
* If provided, the threshold, recharge-to amount, and the resulting threshold
|
|
5482
|
+
* commit amount will be in terms of this credit type instead of the fiat currency.
|
|
5483
|
+
*/
|
|
5484
|
+
custom_credit_type_id?: string | null;
|
|
5485
|
+
/**
|
|
5486
|
+
* When set to false, the contract will not be evaluated against the
|
|
5487
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
5488
|
+
* regardless of prior state.
|
|
5489
|
+
*/
|
|
5490
|
+
is_enabled?: boolean;
|
|
5491
|
+
payment_gate_config?: UpdatePrepaidBalanceThresholdConfiguration.PaymentGateConfig;
|
|
5492
|
+
/**
|
|
5493
|
+
* Specify the amount the balance should be recharged to.
|
|
5494
|
+
*/
|
|
5495
|
+
recharge_to_amount?: number;
|
|
5496
|
+
/**
|
|
5497
|
+
* Specify the threshold amount for the contract. Each time the contract's balance
|
|
5498
|
+
* lowers to this amount, a threshold charge will be initiated.
|
|
5499
|
+
*/
|
|
5500
|
+
threshold_amount?: number;
|
|
5501
|
+
}
|
|
5502
|
+
namespace UpdatePrepaidBalanceThresholdConfiguration {
|
|
5503
|
+
interface Commit {
|
|
5504
|
+
/**
|
|
5505
|
+
* Which products the threshold commit applies to. If both applicable_product_ids
|
|
5506
|
+
* and applicable_product_tags are not provided, the commit applies to all
|
|
5507
|
+
* products.
|
|
5508
|
+
*/
|
|
5509
|
+
applicable_product_ids?: Array<string> | null;
|
|
5510
|
+
/**
|
|
5511
|
+
* Which tags the threshold commit applies to. If both applicable_product_ids and
|
|
5512
|
+
* applicable_product_tags are not provided, the commit applies to all products.
|
|
5513
|
+
*/
|
|
5514
|
+
applicable_product_tags?: Array<string> | null;
|
|
5515
|
+
description?: string;
|
|
5516
|
+
/**
|
|
5517
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
5518
|
+
* will default to the commit product name.
|
|
5519
|
+
*/
|
|
5520
|
+
name?: string;
|
|
5521
|
+
/**
|
|
5522
|
+
* The commit product that will be used to generate the line item for commit
|
|
5523
|
+
* payment.
|
|
5524
|
+
*/
|
|
5525
|
+
product_id?: string;
|
|
5526
|
+
/**
|
|
5527
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
5528
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
5529
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
5530
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
5531
|
+
*/
|
|
5532
|
+
specifiers?: Array<Commit.Specifier> | null;
|
|
5533
|
+
}
|
|
5534
|
+
namespace Commit {
|
|
5535
|
+
interface Specifier {
|
|
5536
|
+
presentation_group_values?: {
|
|
5537
|
+
[key: string]: string;
|
|
5538
|
+
};
|
|
5539
|
+
pricing_group_values?: {
|
|
5540
|
+
[key: string]: string;
|
|
5541
|
+
};
|
|
5542
|
+
/**
|
|
5543
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
5544
|
+
*/
|
|
5545
|
+
product_id?: string;
|
|
5546
|
+
/**
|
|
5547
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
5548
|
+
* tags.
|
|
5549
|
+
*/
|
|
5550
|
+
product_tags?: Array<string>;
|
|
5551
|
+
}
|
|
5552
|
+
}
|
|
5553
|
+
interface PaymentGateConfig {
|
|
5554
|
+
/**
|
|
5555
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
5556
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
5557
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
5558
|
+
* wish to payment gate the commit balance.
|
|
5559
|
+
*/
|
|
5560
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
5561
|
+
/**
|
|
5562
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5563
|
+
*/
|
|
5564
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
5565
|
+
/**
|
|
5566
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5567
|
+
*/
|
|
5568
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
5569
|
+
/**
|
|
5570
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
5571
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
5572
|
+
* will default to NONE.
|
|
5573
|
+
*/
|
|
5574
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
5575
|
+
}
|
|
5576
|
+
namespace PaymentGateConfig {
|
|
5577
|
+
/**
|
|
5578
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5579
|
+
*/
|
|
5580
|
+
interface PrecalculatedTaxConfig {
|
|
5581
|
+
/**
|
|
5582
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
5583
|
+
* denomination as the commit's invoice schedule
|
|
5584
|
+
*/
|
|
5585
|
+
tax_amount: number;
|
|
5586
|
+
/**
|
|
5587
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
5588
|
+
* description.
|
|
5589
|
+
*/
|
|
5590
|
+
tax_name?: string;
|
|
5591
|
+
}
|
|
5592
|
+
/**
|
|
5593
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5594
|
+
*/
|
|
5595
|
+
interface StripeConfig {
|
|
5596
|
+
/**
|
|
5597
|
+
* If left blank, will default to INVOICE
|
|
5598
|
+
*/
|
|
5599
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
5600
|
+
/**
|
|
5601
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
5602
|
+
* your payment type.
|
|
5603
|
+
*/
|
|
5604
|
+
invoice_metadata?: {
|
|
5605
|
+
[key: string]: string;
|
|
5606
|
+
};
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
5610
|
+
interface UpdateRecurringCommit {
|
|
5611
|
+
recurring_commit_id: string;
|
|
5612
|
+
access_amount?: UpdateRecurringCommit.AccessAmount;
|
|
5613
|
+
ending_before?: string | null;
|
|
5614
|
+
invoice_amount?: UpdateRecurringCommit.InvoiceAmount;
|
|
5615
|
+
}
|
|
5616
|
+
namespace UpdateRecurringCommit {
|
|
5617
|
+
interface AccessAmount {
|
|
5618
|
+
quantity?: number;
|
|
5619
|
+
unit_price?: number;
|
|
5620
|
+
}
|
|
5621
|
+
interface InvoiceAmount {
|
|
5622
|
+
quantity?: number;
|
|
5623
|
+
unit_price?: number;
|
|
5624
|
+
}
|
|
5625
|
+
}
|
|
5626
|
+
interface UpdateRecurringCredit {
|
|
5627
|
+
recurring_credit_id: string;
|
|
5628
|
+
access_amount?: UpdateRecurringCredit.AccessAmount;
|
|
5629
|
+
ending_before?: string | null;
|
|
5630
|
+
}
|
|
5631
|
+
namespace UpdateRecurringCredit {
|
|
5632
|
+
interface AccessAmount {
|
|
5633
|
+
quantity?: number;
|
|
5634
|
+
unit_price?: number;
|
|
5635
|
+
}
|
|
3082
5636
|
}
|
|
3083
5637
|
interface UpdateScheduledCharge {
|
|
3084
5638
|
scheduled_charge_id: string;
|
|
@@ -3110,6 +5664,118 @@ export declare namespace ContractEditParams {
|
|
|
3110
5664
|
}
|
|
3111
5665
|
}
|
|
3112
5666
|
}
|
|
5667
|
+
interface UpdateSpendThresholdConfiguration {
|
|
5668
|
+
commit?: UpdateSpendThresholdConfiguration.Commit;
|
|
5669
|
+
/**
|
|
5670
|
+
* When set to false, the contract will not be evaluated against the
|
|
5671
|
+
* threshold_amount. Toggling to true will result an immediate evaluation,
|
|
5672
|
+
* regardless of prior state.
|
|
5673
|
+
*/
|
|
5674
|
+
is_enabled?: boolean;
|
|
5675
|
+
payment_gate_config?: UpdateSpendThresholdConfiguration.PaymentGateConfig;
|
|
5676
|
+
/**
|
|
5677
|
+
* Specify the threshold amount for the contract. Each time the contract's usage
|
|
5678
|
+
* hits this amount, a threshold charge will be initiated.
|
|
5679
|
+
*/
|
|
5680
|
+
threshold_amount?: number;
|
|
5681
|
+
}
|
|
5682
|
+
namespace UpdateSpendThresholdConfiguration {
|
|
5683
|
+
interface Commit {
|
|
5684
|
+
description?: string;
|
|
5685
|
+
/**
|
|
5686
|
+
* Specify the name of the line item for the threshold charge. If left blank, it
|
|
5687
|
+
* will default to the commit product name.
|
|
5688
|
+
*/
|
|
5689
|
+
name?: string;
|
|
5690
|
+
/**
|
|
5691
|
+
* The commit product that will be used to generate the line item for commit
|
|
5692
|
+
* payment.
|
|
5693
|
+
*/
|
|
5694
|
+
product_id?: string;
|
|
5695
|
+
}
|
|
5696
|
+
interface PaymentGateConfig {
|
|
5697
|
+
/**
|
|
5698
|
+
* Gate access to the commit balance based on successful collection of payment.
|
|
5699
|
+
* Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to
|
|
5700
|
+
* facilitate payment using your own payment integration. Select NONE if you do not
|
|
5701
|
+
* wish to payment gate the commit balance.
|
|
5702
|
+
*/
|
|
5703
|
+
payment_gate_type: 'NONE' | 'STRIPE' | 'EXTERNAL';
|
|
5704
|
+
/**
|
|
5705
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5706
|
+
*/
|
|
5707
|
+
precalculated_tax_config?: PaymentGateConfig.PrecalculatedTaxConfig;
|
|
5708
|
+
/**
|
|
5709
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5710
|
+
*/
|
|
5711
|
+
stripe_config?: PaymentGateConfig.StripeConfig;
|
|
5712
|
+
/**
|
|
5713
|
+
* Stripe tax is only supported for Stripe payment gateway. Select NONE if you do
|
|
5714
|
+
* not wish Metronome to calculate tax on your behalf. Leaving this field blank
|
|
5715
|
+
* will default to NONE.
|
|
5716
|
+
*/
|
|
5717
|
+
tax_type?: 'NONE' | 'STRIPE' | 'ANROK' | 'PRECALCULATED';
|
|
5718
|
+
}
|
|
5719
|
+
namespace PaymentGateConfig {
|
|
5720
|
+
/**
|
|
5721
|
+
* Only applicable if using PRECALCULATED as your tax type.
|
|
5722
|
+
*/
|
|
5723
|
+
interface PrecalculatedTaxConfig {
|
|
5724
|
+
/**
|
|
5725
|
+
* Amount of tax to be applied. This should be in the same currency and
|
|
5726
|
+
* denomination as the commit's invoice schedule
|
|
5727
|
+
*/
|
|
5728
|
+
tax_amount: number;
|
|
5729
|
+
/**
|
|
5730
|
+
* Name of the tax to be applied. This may be used in an invoice line item
|
|
5731
|
+
* description.
|
|
5732
|
+
*/
|
|
5733
|
+
tax_name?: string;
|
|
5734
|
+
}
|
|
5735
|
+
/**
|
|
5736
|
+
* Only applicable if using STRIPE as your payment gateway type.
|
|
5737
|
+
*/
|
|
5738
|
+
interface StripeConfig {
|
|
5739
|
+
/**
|
|
5740
|
+
* If left blank, will default to INVOICE
|
|
5741
|
+
*/
|
|
5742
|
+
payment_type: 'INVOICE' | 'PAYMENT_INTENT';
|
|
5743
|
+
/**
|
|
5744
|
+
* Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as
|
|
5745
|
+
* your payment type.
|
|
5746
|
+
*/
|
|
5747
|
+
invoice_metadata?: {
|
|
5748
|
+
[key: string]: string;
|
|
5749
|
+
};
|
|
5750
|
+
}
|
|
5751
|
+
}
|
|
5752
|
+
}
|
|
5753
|
+
interface UpdateSubscription {
|
|
5754
|
+
subscription_id: string;
|
|
5755
|
+
ending_before?: string | null;
|
|
5756
|
+
/**
|
|
5757
|
+
* Quantity changes are applied on the effective date based on the order which they
|
|
5758
|
+
* are sent. For example, if I scheduled the quantity to be 12 on May 21 and then
|
|
5759
|
+
* scheduled a quantity delta change of -1, the result from that day would be 11.
|
|
5760
|
+
*/
|
|
5761
|
+
quantity_updates?: Array<UpdateSubscription.QuantityUpdate>;
|
|
5762
|
+
}
|
|
5763
|
+
namespace UpdateSubscription {
|
|
5764
|
+
interface QuantityUpdate {
|
|
5765
|
+
starting_at: string;
|
|
5766
|
+
/**
|
|
5767
|
+
* The new quantity for the subscription. Must be provided if quantity_delta is not
|
|
5768
|
+
* provided. Must be non-negative.
|
|
5769
|
+
*/
|
|
5770
|
+
quantity?: number;
|
|
5771
|
+
/**
|
|
5772
|
+
* The delta to add to the subscription's quantity. Must be provided if quantity is
|
|
5773
|
+
* not provided. Can't be zero. It also can't result in a negative quantity on the
|
|
5774
|
+
* subscription.
|
|
5775
|
+
*/
|
|
5776
|
+
quantity_delta?: number;
|
|
5777
|
+
}
|
|
5778
|
+
}
|
|
3113
5779
|
}
|
|
3114
5780
|
export interface ContractEditCommitParams {
|
|
3115
5781
|
/**
|
|
@@ -3122,13 +5788,15 @@ export interface ContractEditCommitParams {
|
|
|
3122
5788
|
customer_id: string;
|
|
3123
5789
|
access_schedule?: ContractEditCommitParams.AccessSchedule;
|
|
3124
5790
|
/**
|
|
3125
|
-
* Which products the commit applies to. If
|
|
3126
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5791
|
+
* Which products the commit applies to. If applicable_product_ids,
|
|
5792
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5793
|
+
* all products.
|
|
3127
5794
|
*/
|
|
3128
5795
|
applicable_product_ids?: Array<string> | null;
|
|
3129
5796
|
/**
|
|
3130
|
-
* Which tags the commit applies to. If
|
|
3131
|
-
* applicable_product_tags are not provided, the commit applies to
|
|
5797
|
+
* Which tags the commit applies to. If applicable_product_ids,
|
|
5798
|
+
* applicable_product_tags or specifiers are not provided, the commit applies to
|
|
5799
|
+
* all products.
|
|
3132
5800
|
*/
|
|
3133
5801
|
applicable_product_tags?: Array<string> | null;
|
|
3134
5802
|
/**
|
|
@@ -3137,6 +5805,13 @@ export interface ContractEditCommitParams {
|
|
|
3137
5805
|
invoice_contract_id?: string;
|
|
3138
5806
|
invoice_schedule?: ContractEditCommitParams.InvoiceSchedule;
|
|
3139
5807
|
product_id?: string;
|
|
5808
|
+
/**
|
|
5809
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
5810
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
5811
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
5812
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
5813
|
+
*/
|
|
5814
|
+
specifiers?: Array<ContractEditCommitParams.Specifier> | null;
|
|
3140
5815
|
}
|
|
3141
5816
|
export declare namespace ContractEditCommitParams {
|
|
3142
5817
|
interface AccessSchedule {
|
|
@@ -3183,6 +5858,23 @@ export declare namespace ContractEditCommitParams {
|
|
|
3183
5858
|
unit_price?: number;
|
|
3184
5859
|
}
|
|
3185
5860
|
}
|
|
5861
|
+
interface Specifier {
|
|
5862
|
+
presentation_group_values?: {
|
|
5863
|
+
[key: string]: string;
|
|
5864
|
+
};
|
|
5865
|
+
pricing_group_values?: {
|
|
5866
|
+
[key: string]: string;
|
|
5867
|
+
};
|
|
5868
|
+
/**
|
|
5869
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
5870
|
+
*/
|
|
5871
|
+
product_id?: string;
|
|
5872
|
+
/**
|
|
5873
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
5874
|
+
* tags.
|
|
5875
|
+
*/
|
|
5876
|
+
product_tags?: Array<string>;
|
|
5877
|
+
}
|
|
3186
5878
|
}
|
|
3187
5879
|
export interface ContractEditCreditParams {
|
|
3188
5880
|
/**
|
|
@@ -3205,6 +5897,13 @@ export interface ContractEditCreditParams {
|
|
|
3205
5897
|
*/
|
|
3206
5898
|
applicable_product_tags?: Array<string> | null;
|
|
3207
5899
|
product_id?: string;
|
|
5900
|
+
/**
|
|
5901
|
+
* List of filters that determine what kind of customer usage draws down a commit
|
|
5902
|
+
* or credit. A customer's usage needs to meet the condition of at least one of the
|
|
5903
|
+
* specifiers to contribute to a commit's or credit's drawdown. This field cannot
|
|
5904
|
+
* be used together with `applicable_product_ids` or `applicable_product_tags`.
|
|
5905
|
+
*/
|
|
5906
|
+
specifiers?: Array<ContractEditCreditParams.Specifier> | null;
|
|
3208
5907
|
}
|
|
3209
5908
|
export declare namespace ContractEditCreditParams {
|
|
3210
5909
|
interface AccessSchedule {
|
|
@@ -3228,6 +5927,23 @@ export declare namespace ContractEditCreditParams {
|
|
|
3228
5927
|
starting_at?: string;
|
|
3229
5928
|
}
|
|
3230
5929
|
}
|
|
5930
|
+
interface Specifier {
|
|
5931
|
+
presentation_group_values?: {
|
|
5932
|
+
[key: string]: string;
|
|
5933
|
+
};
|
|
5934
|
+
pricing_group_values?: {
|
|
5935
|
+
[key: string]: string;
|
|
5936
|
+
};
|
|
5937
|
+
/**
|
|
5938
|
+
* If provided, the specifier will only apply to the product with the specified ID.
|
|
5939
|
+
*/
|
|
5940
|
+
product_id?: string;
|
|
5941
|
+
/**
|
|
5942
|
+
* If provided, the specifier will only apply to products with all the specified
|
|
5943
|
+
* tags.
|
|
5944
|
+
*/
|
|
5945
|
+
product_tags?: Array<string>;
|
|
5946
|
+
}
|
|
3231
5947
|
}
|
|
3232
5948
|
export interface ContractGetEditHistoryParams {
|
|
3233
5949
|
contract_id: string;
|