@metronome/sdk 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/client.d.mts +1 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +1 -1
- package/client.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/shared.d.mts +29 -2
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +29 -2
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.mts +20 -1
- package/resources/v1/alerts.d.mts.map +1 -1
- package/resources/v1/alerts.d.ts +20 -1
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.d.mts +60 -8
- package/resources/v1/contracts/contracts.d.mts.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +60 -8
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.mts +38 -0
- package/resources/v1/customers/alerts.d.mts.map +1 -1
- package/resources/v1/customers/alerts.d.ts +38 -0
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.d.mts +10 -0
- package/resources/v1/customers/billing-config.d.mts.map +1 -1
- package/resources/v1/customers/billing-config.d.ts +10 -0
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +70 -3
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +70 -3
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +8 -6
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +8 -6
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.mts +1 -1
- package/resources/v1/customers/index.d.mts.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.mts +10 -2
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +10 -2
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/plans.d.mts +1 -0
- package/resources/v1/customers/plans.d.mts.map +1 -1
- package/resources/v1/customers/plans.d.ts +1 -0
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- 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/settings/billing-providers.d.mts +1 -1
- package/resources/v1/settings/billing-providers.d.mts.map +1 -1
- package/resources/v1/settings/billing-providers.d.ts +1 -1
- package/resources/v1/settings/billing-providers.d.ts.map +1 -1
- package/resources/v1/settings/settings.d.mts +6 -0
- package/resources/v1/settings/settings.d.mts.map +1 -1
- package/resources/v1/settings/settings.d.ts +6 -0
- package/resources/v1/settings/settings.d.ts.map +1 -1
- package/resources/v1/settings/settings.js +1 -0
- package/resources/v1/settings/settings.js.map +1 -1
- package/resources/v1/settings/settings.mjs +1 -0
- package/resources/v1/settings/settings.mjs.map +1 -1
- package/resources/v1/usage.d.mts +3 -2
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +3 -2
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- 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.mts +200 -8
- package/resources/v2/contracts.d.mts.map +1 -1
- package/resources/v2/contracts.d.ts +200 -8
- package/resources/v2/contracts.d.ts.map +1 -1
- package/src/client.ts +1 -1
- package/src/resources/shared.ts +34 -2
- package/src/resources/v1/alerts.ts +24 -1
- package/src/resources/v1/contracts/contracts.ts +67 -8
- package/src/resources/v1/customers/alerts.ts +44 -0
- package/src/resources/v1/customers/billing-config.ts +14 -0
- package/src/resources/v1/customers/customers.ts +90 -7
- package/src/resources/v1/customers/index.ts +1 -0
- package/src/resources/v1/customers/invoices.ts +12 -0
- package/src/resources/v1/customers/plans.ts +2 -0
- package/src/resources/v1/index.ts +1 -0
- package/src/resources/v1/settings/billing-providers.ts +1 -1
- package/src/resources/v1/settings/settings.ts +7 -0
- package/src/resources/v1/usage.ts +3 -2
- package/src/resources/v1/v1.ts +2 -0
- package/src/resources/v2/contracts.ts +244 -8
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -137,7 +137,8 @@ export interface AlertCreateParams {
|
|
|
137
137
|
| 'low_remaining_contract_credit_balance_reached'
|
|
138
138
|
| 'low_remaining_contract_credit_percentage_reached'
|
|
139
139
|
| 'low_remaining_contract_credit_and_commit_balance_reached'
|
|
140
|
-
| 'invoice_total_reached'
|
|
140
|
+
| 'invoice_total_reached'
|
|
141
|
+
| 'low_remaining_seat_balance_reached';
|
|
141
142
|
|
|
142
143
|
/**
|
|
143
144
|
* Name of the threshold notification
|
|
@@ -209,6 +210,12 @@ export interface AlertCreateParams {
|
|
|
209
210
|
*/
|
|
210
211
|
plan_id?: string;
|
|
211
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Required for `low_remaining_seat_balance_reached` notifications. The alert is
|
|
215
|
+
* scoped to this seat group key-value pair.
|
|
216
|
+
*/
|
|
217
|
+
seat_filter?: AlertCreateParams.SeatFilter;
|
|
218
|
+
|
|
212
219
|
/**
|
|
213
220
|
* Prevents the creation of duplicates. If a request to create a record is made
|
|
214
221
|
* with a previously used uniqueness key, a new record will not be created and the
|
|
@@ -231,6 +238,22 @@ export namespace AlertCreateParams {
|
|
|
231
238
|
|
|
232
239
|
value?: string;
|
|
233
240
|
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Required for `low_remaining_seat_balance_reached` notifications. The alert is
|
|
244
|
+
* scoped to this seat group key-value pair.
|
|
245
|
+
*/
|
|
246
|
+
export interface SeatFilter {
|
|
247
|
+
/**
|
|
248
|
+
* The seat group key (e.g., "seat_id", "user_id")
|
|
249
|
+
*/
|
|
250
|
+
seat_group_key: string;
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Optional seat identifier the alert is scoped to.
|
|
254
|
+
*/
|
|
255
|
+
seat_group_value?: string;
|
|
256
|
+
}
|
|
234
257
|
}
|
|
235
258
|
|
|
236
259
|
export interface AlertArchiveParams {
|
|
@@ -792,6 +792,12 @@ export interface ContractCreateParams {
|
|
|
792
792
|
*/
|
|
793
793
|
reseller_royalties?: Array<ContractCreateParams.ResellerRoyalty>;
|
|
794
794
|
|
|
795
|
+
/**
|
|
796
|
+
* The revenue system configuration associated with a contract. Provide either an
|
|
797
|
+
* ID or the provider and delivery method.
|
|
798
|
+
*/
|
|
799
|
+
revenue_system_configuration?: ContractCreateParams.RevenueSystemConfiguration;
|
|
800
|
+
|
|
795
801
|
/**
|
|
796
802
|
* This field's availability is dependent on your client's configuration.
|
|
797
803
|
*/
|
|
@@ -1802,9 +1808,8 @@ export namespace ContractCreateParams {
|
|
|
1802
1808
|
subscription_id: string;
|
|
1803
1809
|
|
|
1804
1810
|
/**
|
|
1805
|
-
* If set to POOLED, allocation added per seat is pooled across the account.
|
|
1806
|
-
*
|
|
1807
|
-
* allocation.
|
|
1811
|
+
* If set to POOLED, allocation added per seat is pooled across the account. If set
|
|
1812
|
+
* to INDIVIDUAL, each seat in the subscription will have its own allocation.
|
|
1808
1813
|
*/
|
|
1809
1814
|
allocation?: 'INDIVIDUAL' | 'POOLED';
|
|
1810
1815
|
}
|
|
@@ -1965,9 +1970,8 @@ export namespace ContractCreateParams {
|
|
|
1965
1970
|
subscription_id: string;
|
|
1966
1971
|
|
|
1967
1972
|
/**
|
|
1968
|
-
* If set to POOLED, allocation added per seat is pooled across the account.
|
|
1969
|
-
*
|
|
1970
|
-
* allocation.
|
|
1973
|
+
* If set to POOLED, allocation added per seat is pooled across the account. If set
|
|
1974
|
+
* to INDIVIDUAL, each seat in the subscription will have its own allocation.
|
|
1971
1975
|
*/
|
|
1972
1976
|
allocation?: 'INDIVIDUAL' | 'POOLED';
|
|
1973
1977
|
}
|
|
@@ -2026,6 +2030,31 @@ export namespace ContractCreateParams {
|
|
|
2026
2030
|
}
|
|
2027
2031
|
}
|
|
2028
2032
|
|
|
2033
|
+
/**
|
|
2034
|
+
* The revenue system configuration associated with a contract. Provide either an
|
|
2035
|
+
* ID or the provider and delivery method.
|
|
2036
|
+
*/
|
|
2037
|
+
export interface RevenueSystemConfiguration {
|
|
2038
|
+
/**
|
|
2039
|
+
* How revenue recognition records should be delivered to the revenue system. Do
|
|
2040
|
+
* not specify if using revenue_system_configuration_id.
|
|
2041
|
+
*/
|
|
2042
|
+
delivery_method?: 'direct_to_billing_provider';
|
|
2043
|
+
|
|
2044
|
+
/**
|
|
2045
|
+
* The system that is providing services for revenue recognition. Do not specify if
|
|
2046
|
+
* using revenue_system_configuration_id.
|
|
2047
|
+
*/
|
|
2048
|
+
provider?: 'netsuite';
|
|
2049
|
+
|
|
2050
|
+
/**
|
|
2051
|
+
* The Metronome ID of the revenue system configuration. Use when a customer has
|
|
2052
|
+
* multiple configurations with the same provider and delivery method. Otherwise,
|
|
2053
|
+
* specify the provider and delivery_method.
|
|
2054
|
+
*/
|
|
2055
|
+
revenue_system_configuration_id?: string;
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2029
2058
|
export interface ScheduledCharge {
|
|
2030
2059
|
product_id: string;
|
|
2031
2060
|
|
|
@@ -2185,14 +2214,16 @@ export namespace ContractCreateParams {
|
|
|
2185
2214
|
* QUANTITY_ONLY. **QUANTITY_ONLY**: The subscription quantity is specified
|
|
2186
2215
|
* directly on the subscription. `initial_quantity` must be provided with this
|
|
2187
2216
|
* option. Compatible with recurring commits/credits that use POOLED allocation.
|
|
2188
|
-
* **SEAT_BASED**:
|
|
2189
|
-
*
|
|
2217
|
+
* **SEAT_BASED**: Use when you want to pass specific seat identifiers (e.g. add
|
|
2218
|
+
* user_123) to increment and decrement a subscription quantity, rather than
|
|
2190
2219
|
* directly providing the quantity. You must use a **SEAT_BASED** subscription to
|
|
2191
2220
|
* use a linked recurring credit with an allocation per seat. `seat_config` must be
|
|
2192
2221
|
* provided with this option.
|
|
2193
2222
|
*/
|
|
2194
2223
|
quantity_management_mode?: 'SEAT_BASED' | 'QUANTITY_ONLY';
|
|
2195
2224
|
|
|
2225
|
+
seat_config?: Subscription.SeatConfig;
|
|
2226
|
+
|
|
2196
2227
|
/**
|
|
2197
2228
|
* Inclusive start time for the subscription. If not provided, defaults to contract
|
|
2198
2229
|
* start date
|
|
@@ -2235,6 +2266,28 @@ export namespace ContractCreateParams {
|
|
|
2235
2266
|
*/
|
|
2236
2267
|
product_id: string;
|
|
2237
2268
|
}
|
|
2269
|
+
|
|
2270
|
+
export interface SeatConfig {
|
|
2271
|
+
/**
|
|
2272
|
+
* The initial assigned seats on this subscription.
|
|
2273
|
+
*/
|
|
2274
|
+
initial_seat_ids: Array<string>;
|
|
2275
|
+
|
|
2276
|
+
/**
|
|
2277
|
+
* The property name, sent on usage events, that identifies the seat ID associated
|
|
2278
|
+
* with the usage event. For example, the property name might be seat_id or
|
|
2279
|
+
* user_id. The property must be set as a group key on billable metrics and a
|
|
2280
|
+
* presentation/pricing group key on contract products. This allows linked
|
|
2281
|
+
* recurring credits with an allocation per seat to be consumed by only one seat's
|
|
2282
|
+
* usage.
|
|
2283
|
+
*/
|
|
2284
|
+
seat_group_key: string;
|
|
2285
|
+
|
|
2286
|
+
/**
|
|
2287
|
+
* The initial amount of unassigned seats on this subscription.
|
|
2288
|
+
*/
|
|
2289
|
+
initial_unassigned_seats?: number;
|
|
2290
|
+
}
|
|
2238
2291
|
}
|
|
2239
2292
|
|
|
2240
2293
|
export interface Transition {
|
|
@@ -2369,6 +2422,12 @@ export interface ContractAddManualBalanceEntryParams {
|
|
|
2369
2422
|
*/
|
|
2370
2423
|
contract_id?: string;
|
|
2371
2424
|
|
|
2425
|
+
/**
|
|
2426
|
+
* If using individually configured commits/credits attached to seat managed
|
|
2427
|
+
* subscriptions, the amount to add for each seat. Must sum to total amount.
|
|
2428
|
+
*/
|
|
2429
|
+
per_group_amounts?: { [key: string]: number };
|
|
2430
|
+
|
|
2372
2431
|
/**
|
|
2373
2432
|
* RFC 3339 timestamp indicating when the manual adjustment takes place. If not
|
|
2374
2433
|
* provided, it will default to the start of the segment.
|
|
@@ -283,6 +283,12 @@ export namespace CustomerAlert {
|
|
|
283
283
|
*/
|
|
284
284
|
invoice_types_filter?: Array<string>;
|
|
285
285
|
|
|
286
|
+
/**
|
|
287
|
+
* Only present for low_remaining_seat_balance_reached notifications. The seat
|
|
288
|
+
* group key or seat group key-value pair the alert is scoped to.
|
|
289
|
+
*/
|
|
290
|
+
seat_filter?: Alert.SeatFilter;
|
|
291
|
+
|
|
286
292
|
/**
|
|
287
293
|
* Prevents the creation of duplicates. If a request to create a record is made
|
|
288
294
|
* with a previously used uniqueness key, a new record will not be created and the
|
|
@@ -315,6 +321,22 @@ export namespace CustomerAlert {
|
|
|
315
321
|
|
|
316
322
|
value?: string;
|
|
317
323
|
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Only present for low_remaining_seat_balance_reached notifications. The seat
|
|
327
|
+
* group key or seat group key-value pair the alert is scoped to.
|
|
328
|
+
*/
|
|
329
|
+
export interface SeatFilter {
|
|
330
|
+
/**
|
|
331
|
+
* The seat group key (e.g., "seat_id", "user_id") that the alert is scoped to.
|
|
332
|
+
*/
|
|
333
|
+
seat_group_key: string;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* The seat group value that the alert is scoped to.
|
|
337
|
+
*/
|
|
338
|
+
seat_group_value?: string;
|
|
339
|
+
}
|
|
318
340
|
}
|
|
319
341
|
}
|
|
320
342
|
|
|
@@ -344,6 +366,12 @@ export interface AlertRetrieveParams {
|
|
|
344
366
|
* denotes whether to fetch notifications for plans or contracts.
|
|
345
367
|
*/
|
|
346
368
|
plans_or_contracts?: 'PLANS' | 'CONTRACTS';
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Only allowed for `low_remaining_seat_balance_reached` notifications. This
|
|
372
|
+
* filters alerts by the seat group key-value pair.
|
|
373
|
+
*/
|
|
374
|
+
seat_filter?: AlertRetrieveParams.SeatFilter;
|
|
347
375
|
}
|
|
348
376
|
|
|
349
377
|
export namespace AlertRetrieveParams {
|
|
@@ -356,6 +384,22 @@ export namespace AlertRetrieveParams {
|
|
|
356
384
|
|
|
357
385
|
value: string;
|
|
358
386
|
}
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* Only allowed for `low_remaining_seat_balance_reached` notifications. This
|
|
390
|
+
* filters alerts by the seat group key-value pair.
|
|
391
|
+
*/
|
|
392
|
+
export interface SeatFilter {
|
|
393
|
+
/**
|
|
394
|
+
* The seat group key (e.g., "seat_id", "user_id")
|
|
395
|
+
*/
|
|
396
|
+
seat_group_key: string;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* The specific seat identifier to filter by
|
|
400
|
+
*/
|
|
401
|
+
seat_group_value: string;
|
|
402
|
+
}
|
|
359
403
|
}
|
|
360
404
|
|
|
361
405
|
export interface AlertListParams extends CursorPageWithoutLimitParams {
|
|
@@ -82,6 +82,10 @@ export interface BillingConfigRetrieveResponse {
|
|
|
82
82
|
|
|
83
83
|
export namespace BillingConfigRetrieveResponse {
|
|
84
84
|
export interface Data {
|
|
85
|
+
aws_customer_account_id?: string;
|
|
86
|
+
|
|
87
|
+
aws_customer_id?: string;
|
|
88
|
+
|
|
85
89
|
/**
|
|
86
90
|
* Contract expiration date for the customer. The expected format is RFC 3339 and
|
|
87
91
|
* can be retrieved from
|
|
@@ -181,6 +185,16 @@ export interface BillingConfigCreateParams {
|
|
|
181
185
|
*/
|
|
182
186
|
billing_provider_customer_id: string;
|
|
183
187
|
|
|
188
|
+
/**
|
|
189
|
+
* Body param:
|
|
190
|
+
*/
|
|
191
|
+
aws_customer_account_id?: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Body param:
|
|
195
|
+
*/
|
|
196
|
+
aws_customer_id?: string;
|
|
197
|
+
|
|
184
198
|
/**
|
|
185
199
|
* Body param:
|
|
186
200
|
*/
|
|
@@ -372,7 +372,7 @@ export class Customers extends APIResource {
|
|
|
372
372
|
*
|
|
373
373
|
* @example
|
|
374
374
|
* ```ts
|
|
375
|
-
* await client.v1.customers.setBillingConfigurations({
|
|
375
|
+
* const response = await client.v1.customers.setBillingConfigurations({
|
|
376
376
|
* data: [
|
|
377
377
|
* {
|
|
378
378
|
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
@@ -398,6 +398,12 @@ export class Customers extends APIResource {
|
|
|
398
398
|
* configuration: { ... },
|
|
399
399
|
* delivery_method: 'direct_to_billing_provider',
|
|
400
400
|
* },
|
|
401
|
+
* {
|
|
402
|
+
* customer_id: '4db51251-61de-4bfe-b9ce-495e244f3491',
|
|
403
|
+
* billing_provider: 'gcp_marketplace',
|
|
404
|
+
* configuration: { ... },
|
|
405
|
+
* delivery_method: 'direct_to_billing_provider',
|
|
406
|
+
* },
|
|
401
407
|
* ],
|
|
402
408
|
* });
|
|
403
409
|
* ```
|
|
@@ -405,12 +411,8 @@ export class Customers extends APIResource {
|
|
|
405
411
|
setBillingConfigurations(
|
|
406
412
|
body: CustomerSetBillingConfigurationsParams,
|
|
407
413
|
options?: RequestOptions,
|
|
408
|
-
): APIPromise<
|
|
409
|
-
return this._client.post('/v1/setCustomerBillingProviderConfigurations', {
|
|
410
|
-
body,
|
|
411
|
-
...options,
|
|
412
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
413
|
-
});
|
|
414
|
+
): APIPromise<CustomerSetBillingConfigurationsResponse> {
|
|
415
|
+
return this._client.post('/v1/setCustomerBillingProviderConfigurations', { body, ...options });
|
|
414
416
|
}
|
|
415
417
|
|
|
416
418
|
/**
|
|
@@ -760,6 +762,54 @@ export namespace CustomerRetrieveBillingConfigurationsResponse {
|
|
|
760
762
|
}
|
|
761
763
|
}
|
|
762
764
|
|
|
765
|
+
export interface CustomerSetBillingConfigurationsResponse {
|
|
766
|
+
data: Array<CustomerSetBillingConfigurationsResponse.Data>;
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
export namespace CustomerSetBillingConfigurationsResponse {
|
|
770
|
+
export interface Data {
|
|
771
|
+
/**
|
|
772
|
+
* ID of the created configuration
|
|
773
|
+
*/
|
|
774
|
+
id?: string;
|
|
775
|
+
|
|
776
|
+
/**
|
|
777
|
+
* The billing provider set for this configuration.
|
|
778
|
+
*/
|
|
779
|
+
billing_provider?:
|
|
780
|
+
| 'aws_marketplace'
|
|
781
|
+
| 'stripe'
|
|
782
|
+
| 'netsuite'
|
|
783
|
+
| 'custom'
|
|
784
|
+
| 'azure_marketplace'
|
|
785
|
+
| 'quickbooks_online'
|
|
786
|
+
| 'workday'
|
|
787
|
+
| 'gcp_marketplace'
|
|
788
|
+
| 'metronome';
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* Configuration for the billing provider. The structure of this object is specific
|
|
792
|
+
* to the billing provider and delivery method combination.
|
|
793
|
+
*/
|
|
794
|
+
configuration?: { [key: string]: unknown };
|
|
795
|
+
|
|
796
|
+
/**
|
|
797
|
+
* ID of the customer this configuration is associated with.
|
|
798
|
+
*/
|
|
799
|
+
customer_id?: string;
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* ID of the delivery method used for this customer configuration.
|
|
803
|
+
*/
|
|
804
|
+
delivery_method_id?: string;
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* The tax provider set for this configuration.
|
|
808
|
+
*/
|
|
809
|
+
tax_provider?: 'anrok' | 'avalara' | 'stripe';
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
|
|
763
813
|
export interface CustomerSetNameResponse {
|
|
764
814
|
data: Customer;
|
|
765
815
|
}
|
|
@@ -779,6 +829,8 @@ export interface CustomerCreateParams {
|
|
|
779
829
|
|
|
780
830
|
customer_billing_provider_configurations?: Array<CustomerCreateParams.CustomerBillingProviderConfiguration>;
|
|
781
831
|
|
|
832
|
+
customer_revenue_system_configurations?: Array<CustomerCreateParams.CustomerRevenueSystemConfiguration>;
|
|
833
|
+
|
|
782
834
|
/**
|
|
783
835
|
* (deprecated, use ingest_aliases instead) an alias that can be used to refer to
|
|
784
836
|
* this customer in usage events
|
|
@@ -806,6 +858,10 @@ export namespace CustomerCreateParams {
|
|
|
806
858
|
| 'gcp_marketplace'
|
|
807
859
|
| 'metronome';
|
|
808
860
|
|
|
861
|
+
aws_customer_account_id?: string;
|
|
862
|
+
|
|
863
|
+
aws_customer_id?: string;
|
|
864
|
+
|
|
809
865
|
/**
|
|
810
866
|
* True if the aws_product_code is a SAAS subscription product, false otherwise.
|
|
811
867
|
*/
|
|
@@ -885,6 +941,32 @@ export namespace CustomerCreateParams {
|
|
|
885
941
|
*/
|
|
886
942
|
tax_provider?: 'anrok' | 'avalara' | 'stripe';
|
|
887
943
|
}
|
|
944
|
+
|
|
945
|
+
export interface CustomerRevenueSystemConfiguration {
|
|
946
|
+
/**
|
|
947
|
+
* The revenue system provider set for this configuration.
|
|
948
|
+
*/
|
|
949
|
+
provider: 'netsuite';
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Configuration for the revenue system provider. The structure of this object is
|
|
953
|
+
* specific to the revenue system provider. For NetSuite, this should contain
|
|
954
|
+
* `netsuite_customer_id`.
|
|
955
|
+
*/
|
|
956
|
+
configuration?: { [key: string]: unknown };
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* The method to use for delivering invoices to this customer. If not provided, the
|
|
960
|
+
* `delivery_method_id` must be provided.
|
|
961
|
+
*/
|
|
962
|
+
delivery_method?: 'direct_to_billing_provider';
|
|
963
|
+
|
|
964
|
+
/**
|
|
965
|
+
* ID of the delivery method to use for this customer. If not provided, the
|
|
966
|
+
* `delivery_method` must be provided.
|
|
967
|
+
*/
|
|
968
|
+
delivery_method_id?: string;
|
|
969
|
+
}
|
|
888
970
|
}
|
|
889
971
|
|
|
890
972
|
export interface CustomerRetrieveParams {
|
|
@@ -1124,6 +1206,7 @@ export declare namespace Customers {
|
|
|
1124
1206
|
type CustomerListCostsResponse as CustomerListCostsResponse,
|
|
1125
1207
|
type CustomerPreviewEventsResponse as CustomerPreviewEventsResponse,
|
|
1126
1208
|
type CustomerRetrieveBillingConfigurationsResponse as CustomerRetrieveBillingConfigurationsResponse,
|
|
1209
|
+
type CustomerSetBillingConfigurationsResponse as CustomerSetBillingConfigurationsResponse,
|
|
1127
1210
|
type CustomerSetNameResponse as CustomerSetNameResponse,
|
|
1128
1211
|
type CustomerDetailsCursorPage as CustomerDetailsCursorPage,
|
|
1129
1212
|
type CustomerListBillableMetricsResponsesCursorPage as CustomerListBillableMetricsResponsesCursorPage,
|
|
@@ -43,6 +43,7 @@ export {
|
|
|
43
43
|
type CustomerListCostsResponse,
|
|
44
44
|
type CustomerPreviewEventsResponse,
|
|
45
45
|
type CustomerRetrieveBillingConfigurationsResponse,
|
|
46
|
+
type CustomerSetBillingConfigurationsResponse,
|
|
46
47
|
type CustomerSetNameResponse,
|
|
47
48
|
type CustomerCreateParams,
|
|
48
49
|
type CustomerRetrieveParams,
|
|
@@ -738,10 +738,16 @@ export namespace Invoice {
|
|
|
738
738
|
*/
|
|
739
739
|
billing_provider_error?: string;
|
|
740
740
|
|
|
741
|
+
/**
|
|
742
|
+
* The ID of the payment in the external system, if available.
|
|
743
|
+
*/
|
|
744
|
+
external_payment_id?: string;
|
|
745
|
+
|
|
741
746
|
external_status?:
|
|
742
747
|
| 'DRAFT'
|
|
743
748
|
| 'FINALIZED'
|
|
744
749
|
| 'PAID'
|
|
750
|
+
| 'PARTIALLY_PAID'
|
|
745
751
|
| 'UNCOLLECTIBLE'
|
|
746
752
|
| 'VOID'
|
|
747
753
|
| 'DELETED'
|
|
@@ -816,10 +822,16 @@ export namespace Invoice {
|
|
|
816
822
|
*/
|
|
817
823
|
billing_provider_error?: string;
|
|
818
824
|
|
|
825
|
+
/**
|
|
826
|
+
* The ID of the payment in the external system, if available.
|
|
827
|
+
*/
|
|
828
|
+
external_payment_id?: string;
|
|
829
|
+
|
|
819
830
|
external_status?:
|
|
820
831
|
| 'DRAFT'
|
|
821
832
|
| 'FINALIZED'
|
|
822
833
|
| 'PAID'
|
|
834
|
+
| 'PARTIALLY_PAID'
|
|
823
835
|
| 'UNCOLLECTIBLE'
|
|
824
836
|
| 'VOID'
|
|
825
837
|
| 'DELETED'
|
|
@@ -184,6 +184,8 @@ export namespace PlanListPriceAdjustmentsResponse {
|
|
|
184
184
|
*/
|
|
185
185
|
adjustment_type: 'fixed' | 'quantity' | 'percentage' | 'override';
|
|
186
186
|
|
|
187
|
+
quantity?: number;
|
|
188
|
+
|
|
187
189
|
/**
|
|
188
190
|
* Used in pricing tiers. Indicates at what metric value the price applies.
|
|
189
191
|
*/
|
|
@@ -92,6 +92,7 @@ export {
|
|
|
92
92
|
type CustomerListCostsResponse,
|
|
93
93
|
type CustomerPreviewEventsResponse,
|
|
94
94
|
type CustomerRetrieveBillingConfigurationsResponse,
|
|
95
|
+
type CustomerSetBillingConfigurationsResponse,
|
|
95
96
|
type CustomerSetNameResponse,
|
|
96
97
|
type CustomerCreateParams,
|
|
97
98
|
type CustomerRetrieveParams,
|
|
@@ -107,7 +107,7 @@ export interface BillingProviderCreateParams {
|
|
|
107
107
|
/**
|
|
108
108
|
* The billing provider set for this configuration.
|
|
109
109
|
*/
|
|
110
|
-
billing_provider: 'aws_marketplace' | 'azure_marketplace';
|
|
110
|
+
billing_provider: 'aws_marketplace' | 'azure_marketplace' | 'gcp_marketplace';
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
113
|
* Account-level configuration for the billing provider. The structure of this
|
|
@@ -33,6 +33,7 @@ export class Settings extends APIResource {
|
|
|
33
33
|
* delivery_method_ids: [
|
|
34
34
|
* '9a906ebb-fbc7-42e8-8e29-53bfd2db3aca',
|
|
35
35
|
* ],
|
|
36
|
+
* commit_transactions: true,
|
|
36
37
|
* });
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
@@ -67,6 +68,12 @@ export interface SettingUpsertAvalaraCredentialsParams {
|
|
|
67
68
|
* found in the response of the `/listConfiguredBillingProviders` endpoint.
|
|
68
69
|
*/
|
|
69
70
|
delivery_method_ids: Array<string>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Commit transactions if you want Metronome tax calculations used for reporting
|
|
74
|
+
* and tax filings.
|
|
75
|
+
*/
|
|
76
|
+
commit_transactions?: boolean;
|
|
70
77
|
}
|
|
71
78
|
|
|
72
79
|
Settings.BillingProviders = BillingProviders;
|
|
@@ -388,9 +388,10 @@ export namespace UsageSearchResponse {
|
|
|
388
388
|
aggregation_key?: string;
|
|
389
389
|
|
|
390
390
|
/**
|
|
391
|
-
* Specifies the type of aggregation performed on matching events.
|
|
391
|
+
* Specifies the type of aggregation performed on matching events. Includes
|
|
392
|
+
* "custom_sql" for events search endpoint responses.
|
|
392
393
|
*/
|
|
393
|
-
aggregation_type?: 'COUNT' | 'LATEST' | 'MAX' | 'SUM' | 'UNIQUE';
|
|
394
|
+
aggregation_type?: 'COUNT' | 'LATEST' | 'MAX' | 'SUM' | 'UNIQUE' | 'custom_sql';
|
|
394
395
|
|
|
395
396
|
/**
|
|
396
397
|
* RFC 3339 timestamp indicating when the billable metric was archived. If not
|
package/src/resources/v1/v1.ts
CHANGED
|
@@ -171,6 +171,7 @@ import {
|
|
|
171
171
|
CustomerRetrieveParams,
|
|
172
172
|
CustomerRetrieveResponse,
|
|
173
173
|
CustomerSetBillingConfigurationsParams,
|
|
174
|
+
CustomerSetBillingConfigurationsResponse,
|
|
174
175
|
CustomerSetIngestAliasesParams,
|
|
175
176
|
CustomerSetNameParams,
|
|
176
177
|
CustomerSetNameResponse,
|
|
@@ -280,6 +281,7 @@ export declare namespace V1 {
|
|
|
280
281
|
type CustomerListCostsResponse as CustomerListCostsResponse,
|
|
281
282
|
type CustomerPreviewEventsResponse as CustomerPreviewEventsResponse,
|
|
282
283
|
type CustomerRetrieveBillingConfigurationsResponse as CustomerRetrieveBillingConfigurationsResponse,
|
|
284
|
+
type CustomerSetBillingConfigurationsResponse as CustomerSetBillingConfigurationsResponse,
|
|
283
285
|
type CustomerSetNameResponse as CustomerSetNameResponse,
|
|
284
286
|
type CustomerDetailsCursorPage as CustomerDetailsCursorPage,
|
|
285
287
|
type CustomerListBillableMetricsResponsesCursorPage as CustomerListBillableMetricsResponsesCursorPage,
|