@metronome/sdk 2.1.0 → 3.0.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 +109 -0
- package/LICENSE +1 -1
- package/README.md +26 -4
- 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 +91 -8
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +91 -8
- 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/contracts/rate-cards/rate-cards.d.mts +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.mts +0 -18
- package/resources/v1/contracts/rate-cards/rates.d.mts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts +0 -18
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/custom-fields.d.mts +6 -6
- package/resources/v1/custom-fields.d.mts.map +1 -1
- package/resources/v1/custom-fields.d.ts +6 -6
- package/resources/v1/custom-fields.d.ts.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 +13 -3
- package/resources/v1/customers/billing-config.d.mts.map +1 -1
- package/resources/v1/customers/billing-config.d.ts +13 -3
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/customers.d.mts +77 -10
- package/resources/v1/customers/customers.d.mts.map +1 -1
- package/resources/v1/customers/customers.d.ts +77 -10
- 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 +28 -9
- package/resources/v1/customers/invoices.d.mts.map +1 -1
- package/resources/v1/customers/invoices.d.ts +28 -9
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/plans.d.mts +6 -5
- package/resources/v1/customers/plans.d.mts.map +1 -1
- package/resources/v1/customers/plans.d.ts +6 -5
- 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/payments.d.mts +10 -0
- package/resources/v1/payments.d.mts.map +1 -1
- package/resources/v1/payments.d.ts +10 -0
- package/resources/v1/payments.d.ts.map +1 -1
- package/resources/v1/plans.d.mts +2 -2
- package/resources/v1/plans.d.ts +2 -2
- 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 +10 -9
- package/resources/v1/usage.d.mts.map +1 -1
- package/resources/v1/usage.d.ts +10 -9
- 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 +110 -9
- package/src/resources/v1/alerts.ts +24 -1
- package/src/resources/v1/contracts/contracts.ts +67 -8
- package/src/resources/v1/contracts/rate-cards/rate-cards.ts +1 -1
- package/src/resources/v1/contracts/rate-cards/rates.ts +0 -21
- package/src/resources/v1/custom-fields.ts +29 -5
- package/src/resources/v1/customers/alerts.ts +44 -0
- package/src/resources/v1/customers/billing-config.ts +17 -3
- package/src/resources/v1/customers/customers.ts +97 -14
- package/src/resources/v1/customers/index.ts +1 -0
- package/src/resources/v1/customers/invoices.ts +36 -7
- package/src/resources/v1/customers/plans.ts +7 -5
- package/src/resources/v1/index.ts +1 -0
- package/src/resources/v1/payments.ts +15 -0
- package/src/resources/v1/plans.ts +2 -2
- 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 +10 -9
- 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
|
@@ -180,7 +180,11 @@ export interface CustomFieldListKeysResponse {
|
|
|
180
180
|
| 'product'
|
|
181
181
|
| 'rate_card'
|
|
182
182
|
| 'scheduled_charge'
|
|
183
|
-
| 'subscription'
|
|
183
|
+
| 'subscription'
|
|
184
|
+
| 'package_commit'
|
|
185
|
+
| 'package_credit'
|
|
186
|
+
| 'package_subscription'
|
|
187
|
+
| 'package_scheduled_charge';
|
|
184
188
|
|
|
185
189
|
key: string;
|
|
186
190
|
}
|
|
@@ -206,7 +210,11 @@ export interface CustomFieldAddKeyParams {
|
|
|
206
210
|
| 'product'
|
|
207
211
|
| 'rate_card'
|
|
208
212
|
| 'scheduled_charge'
|
|
209
|
-
| 'subscription'
|
|
213
|
+
| 'subscription'
|
|
214
|
+
| 'package_commit'
|
|
215
|
+
| 'package_credit'
|
|
216
|
+
| 'package_subscription'
|
|
217
|
+
| 'package_scheduled_charge';
|
|
210
218
|
|
|
211
219
|
key: string;
|
|
212
220
|
}
|
|
@@ -230,7 +238,11 @@ export interface CustomFieldDeleteValuesParams {
|
|
|
230
238
|
| 'product'
|
|
231
239
|
| 'rate_card'
|
|
232
240
|
| 'scheduled_charge'
|
|
233
|
-
| 'subscription'
|
|
241
|
+
| 'subscription'
|
|
242
|
+
| 'package_commit'
|
|
243
|
+
| 'package_credit'
|
|
244
|
+
| 'package_subscription'
|
|
245
|
+
| 'package_scheduled_charge';
|
|
234
246
|
|
|
235
247
|
entity_id: string;
|
|
236
248
|
|
|
@@ -260,6 +272,10 @@ export interface CustomFieldListKeysParams extends CursorPageWithoutLimitParams
|
|
|
260
272
|
| 'rate_card'
|
|
261
273
|
| 'scheduled_charge'
|
|
262
274
|
| 'subscription'
|
|
275
|
+
| 'package_commit'
|
|
276
|
+
| 'package_credit'
|
|
277
|
+
| 'package_subscription'
|
|
278
|
+
| 'package_scheduled_charge'
|
|
263
279
|
>;
|
|
264
280
|
}
|
|
265
281
|
|
|
@@ -282,7 +298,11 @@ export interface CustomFieldRemoveKeyParams {
|
|
|
282
298
|
| 'product'
|
|
283
299
|
| 'rate_card'
|
|
284
300
|
| 'scheduled_charge'
|
|
285
|
-
| 'subscription'
|
|
301
|
+
| 'subscription'
|
|
302
|
+
| 'package_commit'
|
|
303
|
+
| 'package_credit'
|
|
304
|
+
| 'package_subscription'
|
|
305
|
+
| 'package_scheduled_charge';
|
|
286
306
|
|
|
287
307
|
key: string;
|
|
288
308
|
}
|
|
@@ -311,7 +331,11 @@ export interface CustomFieldSetValuesParams {
|
|
|
311
331
|
| 'product'
|
|
312
332
|
| 'rate_card'
|
|
313
333
|
| 'scheduled_charge'
|
|
314
|
-
| 'subscription'
|
|
334
|
+
| 'subscription'
|
|
335
|
+
| 'package_commit'
|
|
336
|
+
| 'package_credit'
|
|
337
|
+
| 'package_subscription'
|
|
338
|
+
| 'package_scheduled_charge';
|
|
315
339
|
|
|
316
340
|
entity_id: string;
|
|
317
341
|
}
|
|
@@ -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
|
|
@@ -157,7 +161,7 @@ export namespace BillingConfigRetrieveResponse {
|
|
|
157
161
|
|
|
158
162
|
export interface BillingConfigCreateParams {
|
|
159
163
|
/**
|
|
160
|
-
* Path param
|
|
164
|
+
* Path param
|
|
161
165
|
*/
|
|
162
166
|
customer_id: string;
|
|
163
167
|
|
|
@@ -182,12 +186,22 @@ export interface BillingConfigCreateParams {
|
|
|
182
186
|
billing_provider_customer_id: string;
|
|
183
187
|
|
|
184
188
|
/**
|
|
185
|
-
* Body param
|
|
189
|
+
* Body param
|
|
190
|
+
*/
|
|
191
|
+
aws_customer_account_id?: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Body param
|
|
195
|
+
*/
|
|
196
|
+
aws_customer_id?: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Body param
|
|
186
200
|
*/
|
|
187
201
|
aws_product_code?: string;
|
|
188
202
|
|
|
189
203
|
/**
|
|
190
|
-
* Body param
|
|
204
|
+
* Body param
|
|
191
205
|
*/
|
|
192
206
|
aws_region?:
|
|
193
207
|
| 'af-south-1'
|
|
@@ -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 {
|
|
@@ -921,7 +1003,7 @@ export interface CustomerArchiveParams {
|
|
|
921
1003
|
|
|
922
1004
|
export interface CustomerListBillableMetricsParams extends CursorPageParams {
|
|
923
1005
|
/**
|
|
924
|
-
* Path param
|
|
1006
|
+
* Path param
|
|
925
1007
|
*/
|
|
926
1008
|
customer_id: string;
|
|
927
1009
|
|
|
@@ -939,7 +1021,7 @@ export interface CustomerListBillableMetricsParams extends CursorPageParams {
|
|
|
939
1021
|
|
|
940
1022
|
export interface CustomerListCostsParams extends CursorPageParams {
|
|
941
1023
|
/**
|
|
942
|
-
* Path param
|
|
1024
|
+
* Path param
|
|
943
1025
|
*/
|
|
944
1026
|
customer_id: string;
|
|
945
1027
|
|
|
@@ -956,7 +1038,7 @@ export interface CustomerListCostsParams extends CursorPageParams {
|
|
|
956
1038
|
|
|
957
1039
|
export interface CustomerPreviewEventsParams {
|
|
958
1040
|
/**
|
|
959
|
-
* Path param
|
|
1041
|
+
* Path param
|
|
960
1042
|
*/
|
|
961
1043
|
customer_id: string;
|
|
962
1044
|
|
|
@@ -1064,19 +1146,19 @@ export namespace CustomerSetBillingConfigurationsParams {
|
|
|
1064
1146
|
|
|
1065
1147
|
export interface CustomerSetIngestAliasesParams {
|
|
1066
1148
|
/**
|
|
1067
|
-
* Path param
|
|
1149
|
+
* Path param
|
|
1068
1150
|
*/
|
|
1069
1151
|
customer_id: string;
|
|
1070
1152
|
|
|
1071
1153
|
/**
|
|
1072
|
-
* Body param
|
|
1154
|
+
* Body param
|
|
1073
1155
|
*/
|
|
1074
1156
|
ingest_aliases: Array<string>;
|
|
1075
1157
|
}
|
|
1076
1158
|
|
|
1077
1159
|
export interface CustomerSetNameParams {
|
|
1078
1160
|
/**
|
|
1079
|
-
* Path param
|
|
1161
|
+
* Path param
|
|
1080
1162
|
*/
|
|
1081
1163
|
customer_id: string;
|
|
1082
1164
|
|
|
@@ -1089,7 +1171,7 @@ export interface CustomerSetNameParams {
|
|
|
1089
1171
|
|
|
1090
1172
|
export interface CustomerUpdateConfigParams {
|
|
1091
1173
|
/**
|
|
1092
|
-
* Path param
|
|
1174
|
+
* Path param
|
|
1093
1175
|
*/
|
|
1094
1176
|
customer_id: string;
|
|
1095
1177
|
|
|
@@ -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,
|
|
@@ -367,6 +367,8 @@ export interface Invoice {
|
|
|
367
367
|
*/
|
|
368
368
|
reseller_royalty?: Invoice.ResellerRoyalty;
|
|
369
369
|
|
|
370
|
+
revenue_system_invoices?: Array<Invoice.RevenueSystemInvoice> | null;
|
|
371
|
+
|
|
370
372
|
/**
|
|
371
373
|
* This field's availability is dependent on your client's configuration.
|
|
372
374
|
*/
|
|
@@ -738,10 +740,16 @@ export namespace Invoice {
|
|
|
738
740
|
*/
|
|
739
741
|
billing_provider_error?: string;
|
|
740
742
|
|
|
743
|
+
/**
|
|
744
|
+
* The ID of the payment in the external system, if available.
|
|
745
|
+
*/
|
|
746
|
+
external_payment_id?: string;
|
|
747
|
+
|
|
741
748
|
external_status?:
|
|
742
749
|
| 'DRAFT'
|
|
743
750
|
| 'FINALIZED'
|
|
744
751
|
| 'PAID'
|
|
752
|
+
| 'PARTIALLY_PAID'
|
|
745
753
|
| 'UNCOLLECTIBLE'
|
|
746
754
|
| 'VOID'
|
|
747
755
|
| 'DELETED'
|
|
@@ -816,10 +824,16 @@ export namespace Invoice {
|
|
|
816
824
|
*/
|
|
817
825
|
billing_provider_error?: string;
|
|
818
826
|
|
|
827
|
+
/**
|
|
828
|
+
* The ID of the payment in the external system, if available.
|
|
829
|
+
*/
|
|
830
|
+
external_payment_id?: string;
|
|
831
|
+
|
|
819
832
|
external_status?:
|
|
820
833
|
| 'DRAFT'
|
|
821
834
|
| 'FINALIZED'
|
|
822
835
|
| 'PAID'
|
|
836
|
+
| 'PARTIALLY_PAID'
|
|
823
837
|
| 'UNCOLLECTIBLE'
|
|
824
838
|
| 'VOID'
|
|
825
839
|
| 'DELETED'
|
|
@@ -931,6 +945,21 @@ export namespace Invoice {
|
|
|
931
945
|
gcp_offer_id?: string;
|
|
932
946
|
}
|
|
933
947
|
}
|
|
948
|
+
|
|
949
|
+
export interface RevenueSystemInvoice {
|
|
950
|
+
revenue_system_external_entity_type: string;
|
|
951
|
+
|
|
952
|
+
revenue_system_provider: string;
|
|
953
|
+
|
|
954
|
+
sync_status: string;
|
|
955
|
+
|
|
956
|
+
/**
|
|
957
|
+
* The error message from the revenue system, if available.
|
|
958
|
+
*/
|
|
959
|
+
error_message?: string;
|
|
960
|
+
|
|
961
|
+
revenue_system_external_entity_id?: string;
|
|
962
|
+
}
|
|
934
963
|
}
|
|
935
964
|
|
|
936
965
|
export interface InvoiceRetrieveResponse {
|
|
@@ -947,12 +976,12 @@ export interface InvoiceListBreakdownsResponse extends Invoice {
|
|
|
947
976
|
|
|
948
977
|
export interface InvoiceRetrieveParams {
|
|
949
978
|
/**
|
|
950
|
-
* Path param
|
|
979
|
+
* Path param
|
|
951
980
|
*/
|
|
952
981
|
customer_id: string;
|
|
953
982
|
|
|
954
983
|
/**
|
|
955
|
-
* Path param
|
|
984
|
+
* Path param
|
|
956
985
|
*/
|
|
957
986
|
invoice_id: string;
|
|
958
987
|
|
|
@@ -965,7 +994,7 @@ export interface InvoiceRetrieveParams {
|
|
|
965
994
|
|
|
966
995
|
export interface InvoiceListParams extends CursorPageParams {
|
|
967
996
|
/**
|
|
968
|
-
* Path param
|
|
997
|
+
* Path param
|
|
969
998
|
*/
|
|
970
999
|
customer_id: string;
|
|
971
1000
|
|
|
@@ -1006,7 +1035,7 @@ export interface InvoiceListParams extends CursorPageParams {
|
|
|
1006
1035
|
|
|
1007
1036
|
export interface InvoiceAddChargeParams {
|
|
1008
1037
|
/**
|
|
1009
|
-
* Path param
|
|
1038
|
+
* Path param
|
|
1010
1039
|
*/
|
|
1011
1040
|
customer_id: string;
|
|
1012
1041
|
|
|
@@ -1023,7 +1052,7 @@ export interface InvoiceAddChargeParams {
|
|
|
1023
1052
|
customer_plan_id: string;
|
|
1024
1053
|
|
|
1025
1054
|
/**
|
|
1026
|
-
* Body param
|
|
1055
|
+
* Body param
|
|
1027
1056
|
*/
|
|
1028
1057
|
description: string;
|
|
1029
1058
|
|
|
@@ -1039,14 +1068,14 @@ export interface InvoiceAddChargeParams {
|
|
|
1039
1068
|
price: number;
|
|
1040
1069
|
|
|
1041
1070
|
/**
|
|
1042
|
-
* Body param
|
|
1071
|
+
* Body param
|
|
1043
1072
|
*/
|
|
1044
1073
|
quantity: number;
|
|
1045
1074
|
}
|
|
1046
1075
|
|
|
1047
1076
|
export interface InvoiceListBreakdownsParams extends CursorPageParams {
|
|
1048
1077
|
/**
|
|
1049
|
-
* Path param
|
|
1078
|
+
* Path param
|
|
1050
1079
|
*/
|
|
1051
1080
|
customer_id: string;
|
|
1052
1081
|
|
|
@@ -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
|
*/
|
|
@@ -195,19 +197,19 @@ export namespace PlanListPriceAdjustmentsResponse {
|
|
|
195
197
|
|
|
196
198
|
export interface PlanListParams extends CursorPageParams {
|
|
197
199
|
/**
|
|
198
|
-
* Path param
|
|
200
|
+
* Path param
|
|
199
201
|
*/
|
|
200
202
|
customer_id: string;
|
|
201
203
|
}
|
|
202
204
|
|
|
203
205
|
export interface PlanAddParams {
|
|
204
206
|
/**
|
|
205
|
-
* Path param
|
|
207
|
+
* Path param
|
|
206
208
|
*/
|
|
207
209
|
customer_id: string;
|
|
208
210
|
|
|
209
211
|
/**
|
|
210
|
-
* Body param
|
|
212
|
+
* Body param
|
|
211
213
|
*/
|
|
212
214
|
plan_id: string;
|
|
213
215
|
|
|
@@ -324,7 +326,7 @@ export namespace PlanAddParams {
|
|
|
324
326
|
|
|
325
327
|
export interface PlanEndParams {
|
|
326
328
|
/**
|
|
327
|
-
* Path param
|
|
329
|
+
* Path param
|
|
328
330
|
*/
|
|
329
331
|
customer_id: string;
|
|
330
332
|
|
|
@@ -357,7 +359,7 @@ export interface PlanEndParams {
|
|
|
357
359
|
|
|
358
360
|
export interface PlanListPriceAdjustmentsParams extends CursorPageParams {
|
|
359
361
|
/**
|
|
360
|
-
* Path param
|
|
362
|
+
* Path param
|
|
361
363
|
*/
|
|
362
364
|
customer_id: string;
|
|
363
365
|
|
|
@@ -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,
|
|
@@ -95,6 +95,8 @@ export interface Payment {
|
|
|
95
95
|
|
|
96
96
|
payment_gateway?: Payment.PaymentGateway;
|
|
97
97
|
|
|
98
|
+
revenue_system_payments?: Array<Payment.RevenueSystemPayment>;
|
|
99
|
+
|
|
98
100
|
status?: PaymentStatus;
|
|
99
101
|
|
|
100
102
|
updated_at?: string;
|
|
@@ -126,6 +128,19 @@ export namespace Payment {
|
|
|
126
128
|
}
|
|
127
129
|
}
|
|
128
130
|
}
|
|
131
|
+
|
|
132
|
+
export interface RevenueSystemPayment {
|
|
133
|
+
revenue_system_provider: string;
|
|
134
|
+
|
|
135
|
+
sync_status: string;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* The error message from the revenue system, if available.
|
|
139
|
+
*/
|
|
140
|
+
error_message?: string;
|
|
141
|
+
|
|
142
|
+
revenue_system_external_payment_id?: string;
|
|
143
|
+
}
|
|
129
144
|
}
|
|
130
145
|
|
|
131
146
|
export type PaymentStatus = 'pending' | 'requires_intervention' | 'paid' | 'canceled';
|
|
@@ -306,14 +306,14 @@ export interface PlanGetDetailsParams {
|
|
|
306
306
|
|
|
307
307
|
export interface PlanListChargesParams extends CursorPageParams {
|
|
308
308
|
/**
|
|
309
|
-
* Path param
|
|
309
|
+
* Path param
|
|
310
310
|
*/
|
|
311
311
|
plan_id: string;
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
export interface PlanListCustomersParams extends CursorPageParams {
|
|
315
315
|
/**
|
|
316
|
-
* Path param
|
|
316
|
+
* Path param
|
|
317
317
|
*/
|
|
318
318
|
plan_id: string;
|
|
319
319
|
|
|
@@ -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;
|