@openmeter/client 1.0.0-beta.230 → 1.0.0-beta.232
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/LICENSE +202 -0
- package/README.md +365 -76
- package/dist/core.d.ts +0 -1
- package/dist/core.js +11 -1
- package/dist/funcs/addons.d.ts +49 -1
- package/dist/funcs/addons.js +109 -12
- package/dist/funcs/apps.d.ts +55 -2
- package/dist/funcs/apps.js +179 -4
- package/dist/funcs/billing.d.ts +46 -1
- package/dist/funcs/billing.js +81 -8
- package/dist/funcs/currencies.d.ts +39 -2
- package/dist/funcs/currencies.js +93 -6
- package/dist/funcs/customers.d.ts +165 -2
- package/dist/funcs/customers.js +402 -40
- package/dist/funcs/defaults.d.ts +10 -1
- package/dist/funcs/defaults.js +11 -1
- package/dist/funcs/entitlements.d.ts +5 -1
- package/dist/funcs/entitlements.js +18 -4
- package/dist/funcs/events.d.ts +14 -1
- package/dist/funcs/events.js +18 -1
- package/dist/funcs/features.d.ts +42 -1
- package/dist/funcs/features.js +91 -10
- package/dist/funcs/governance.d.ts +14 -1
- package/dist/funcs/governance.js +15 -1
- package/dist/funcs/index.d.ts +0 -1
- package/dist/funcs/index.js +1 -1
- package/dist/funcs/invoices.d.ts +102 -2
- package/dist/funcs/invoices.js +247 -8
- package/dist/funcs/llmCost.d.ts +36 -1
- package/dist/funcs/llmCost.js +63 -6
- package/dist/funcs/meters.d.ts +53 -1
- package/dist/funcs/meters.js +113 -12
- package/dist/funcs/planAddons.d.ts +35 -1
- package/dist/funcs/planAddons.js +101 -18
- package/dist/funcs/plans.d.ts +49 -1
- package/dist/funcs/plans.js +109 -12
- package/dist/funcs/subscriptions.d.ts +59 -1
- package/dist/funcs/subscriptions.js +147 -18
- package/dist/funcs/tax.d.ts +25 -1
- package/dist/funcs/tax.js +60 -8
- package/dist/index.d.ts +4 -7
- package/dist/index.js +4 -6
- package/dist/lib/config.d.ts +2 -3
- package/dist/lib/config.js +1 -1
- package/dist/lib/encodings.d.ts +0 -1
- package/dist/lib/encodings.js +1 -1
- package/dist/lib/paginate.d.ts +56 -0
- package/dist/lib/paginate.js +60 -0
- package/dist/lib/request.d.ts +0 -1
- package/dist/lib/request.js +1 -1
- package/dist/lib/to-error.d.ts +0 -1
- package/dist/lib/to-error.js +1 -1
- package/dist/lib/types.d.ts +0 -1
- package/dist/lib/types.js +1 -1
- package/dist/lib/version.d.ts +1 -0
- package/dist/lib/version.js +5 -0
- package/dist/lib/wire.d.ts +4 -1
- package/dist/lib/wire.js +118 -7
- package/dist/models/errors.d.ts +13 -2
- package/dist/models/errors.js +31 -4
- package/dist/models/operations/addons.d.ts +0 -1
- package/dist/models/operations/addons.js +1 -1
- package/dist/models/operations/apps.d.ts +26 -5
- package/dist/models/operations/apps.js +1 -1
- package/dist/models/operations/billing.d.ts +0 -1
- package/dist/models/operations/billing.js +1 -1
- package/dist/models/operations/currencies.d.ts +10 -1
- package/dist/models/operations/currencies.js +1 -1
- package/dist/models/operations/customers.d.ts +11 -7
- package/dist/models/operations/customers.js +1 -1
- package/dist/models/operations/defaults.d.ts +0 -1
- package/dist/models/operations/defaults.js +1 -1
- package/dist/models/operations/entitlements.d.ts +0 -1
- package/dist/models/operations/entitlements.js +1 -1
- package/dist/models/operations/events.d.ts +0 -1
- package/dist/models/operations/events.js +1 -1
- package/dist/models/operations/features.d.ts +0 -1
- package/dist/models/operations/features.js +1 -1
- package/dist/models/operations/governance.d.ts +0 -1
- package/dist/models/operations/governance.js +1 -1
- package/dist/models/operations/invoices.d.ts +20 -7
- package/dist/models/operations/invoices.js +1 -1
- package/dist/models/operations/llmCost.d.ts +0 -1
- package/dist/models/operations/llmCost.js +1 -1
- package/dist/models/operations/meters.d.ts +0 -1
- package/dist/models/operations/meters.js +1 -1
- package/dist/models/operations/planAddons.d.ts +0 -1
- package/dist/models/operations/planAddons.js +1 -1
- package/dist/models/operations/plans.d.ts +0 -1
- package/dist/models/operations/plans.js +1 -1
- package/dist/models/operations/subscriptions.d.ts +0 -1
- package/dist/models/operations/subscriptions.js +1 -1
- package/dist/models/operations/tax.d.ts +0 -1
- package/dist/models/operations/tax.js +1 -1
- package/dist/models/schemas.d.ts +11651 -6090
- package/dist/models/schemas.js +991 -468
- package/dist/models/types.d.ts +941 -810
- package/dist/models/types.js +1 -1
- package/dist/sdk/addons.d.ts +60 -1
- package/dist/sdk/addons.js +63 -1
- package/dist/sdk/apps.d.ts +68 -2
- package/dist/sdk/apps.js +81 -2
- package/dist/sdk/billing.d.ts +57 -1
- package/dist/sdk/billing.js +60 -1
- package/dist/sdk/customers.d.ts +211 -2
- package/dist/sdk/customers.js +222 -2
- package/dist/sdk/defaults.d.ts +10 -1
- package/dist/sdk/defaults.js +11 -1
- package/dist/sdk/entitlements.d.ts +5 -1
- package/dist/sdk/entitlements.js +6 -1
- package/dist/sdk/events.d.ts +25 -1
- package/dist/sdk/events.js +28 -1
- package/dist/sdk/features.d.ts +53 -1
- package/dist/sdk/features.js +56 -1
- package/dist/sdk/internal.d.ts +328 -0
- package/dist/sdk/internal.js +404 -0
- package/dist/sdk/invoices.d.ts +5 -2
- package/dist/sdk/invoices.js +13 -2
- package/dist/sdk/llmCost.d.ts +57 -1
- package/dist/sdk/llmCost.js +62 -1
- package/dist/sdk/meters.d.ts +64 -1
- package/dist/sdk/meters.js +67 -1
- package/dist/sdk/planAddons.d.ts +46 -1
- package/dist/sdk/planAddons.js +49 -1
- package/dist/sdk/plans.d.ts +60 -1
- package/dist/sdk/plans.js +63 -1
- package/dist/sdk/sdk.d.ts +9 -13
- package/dist/sdk/sdk.js +11 -20
- package/dist/sdk/subscriptions.d.ts +72 -3
- package/dist/sdk/subscriptions.js +77 -5
- package/dist/sdk/tax.d.ts +34 -1
- package/dist/sdk/tax.js +37 -1
- package/package.json +30 -6
- package/dist/sdk/currencies.d.ts +0 -12
- package/dist/sdk/currencies.js +0 -21
- package/dist/sdk/governance.d.ts +0 -9
- package/dist/sdk/governance.js +0 -12
package/dist/models/types.d.ts
CHANGED
|
@@ -43,11 +43,11 @@ export interface CursorMetaPage {
|
|
|
43
43
|
/** URI to the last page. */
|
|
44
44
|
last?: string;
|
|
45
45
|
/** URI to the next page. */
|
|
46
|
-
next
|
|
46
|
+
next: string | null;
|
|
47
47
|
/** URI to the previous page. */
|
|
48
|
-
previous
|
|
48
|
+
previous: string | null;
|
|
49
49
|
/** Requested page size. */
|
|
50
|
-
size
|
|
50
|
+
size: number;
|
|
51
51
|
}
|
|
52
52
|
/** Standard error response. */
|
|
53
53
|
export interface BaseError {
|
|
@@ -188,6 +188,52 @@ export interface RateCardBooleanEntitlement {
|
|
|
188
188
|
/** The type of the entitlement template. */
|
|
189
189
|
type: 'boolean';
|
|
190
190
|
}
|
|
191
|
+
/**
|
|
192
|
+
* Labels store metadata of an entity that can be used for filtering an entity list
|
|
193
|
+
* or for searching across entity types.
|
|
194
|
+
*
|
|
195
|
+
* Keys must be of length 1-63 characters, and cannot start with "kong", "konnect",
|
|
196
|
+
* "mesh", "kic", or "\_".
|
|
197
|
+
*/
|
|
198
|
+
export type UpdateLabels = Record<string, string>;
|
|
199
|
+
/** Model for installing an app from the catalog with an API key. */
|
|
200
|
+
export interface InstallAppStripeWithApiKey {
|
|
201
|
+
/** Type of the app. */
|
|
202
|
+
type: 'stripe';
|
|
203
|
+
/** Name of the app. */
|
|
204
|
+
name: string;
|
|
205
|
+
/**
|
|
206
|
+
* If true, a billing profile will be created for the app. The Stripe app will be
|
|
207
|
+
* also set as the default billing profile if the current default is a Sandbox app.
|
|
208
|
+
*/
|
|
209
|
+
createBillingProfile: boolean;
|
|
210
|
+
/** API key for the app. */
|
|
211
|
+
apiKey: string;
|
|
212
|
+
}
|
|
213
|
+
/** Base model for installing an app from the catalog. */
|
|
214
|
+
export interface InstallAppSandbox {
|
|
215
|
+
/** Type of the app. */
|
|
216
|
+
type: 'sandbox';
|
|
217
|
+
/** Name of the app. */
|
|
218
|
+
name: string;
|
|
219
|
+
/**
|
|
220
|
+
* If true, a billing profile will be created for the app. The Stripe app will be
|
|
221
|
+
* also set as the default billing profile if the current default is a Sandbox app.
|
|
222
|
+
*/
|
|
223
|
+
createBillingProfile: boolean;
|
|
224
|
+
}
|
|
225
|
+
/** Base model for installing an app from the catalog. */
|
|
226
|
+
export interface InstallAppExternalInvoicing {
|
|
227
|
+
/** Type of the app. */
|
|
228
|
+
type: 'external_invoicing';
|
|
229
|
+
/** Name of the app. */
|
|
230
|
+
name: string;
|
|
231
|
+
/**
|
|
232
|
+
* If true, a billing profile will be created for the app. The Stripe app will be
|
|
233
|
+
* also set as the default billing profile if the current default is a Sandbox app.
|
|
234
|
+
*/
|
|
235
|
+
createBillingProfile: boolean;
|
|
236
|
+
}
|
|
191
237
|
/**
|
|
192
238
|
* BillingWorkflowCollectionAlignmentSubscription specifies the alignment for
|
|
193
239
|
* collecting the pending line items into an invoice.
|
|
@@ -249,14 +295,6 @@ export interface InvoiceLineExternalReferences {
|
|
|
249
295
|
/** The ID assigned by the external invoicing app. */
|
|
250
296
|
invoicingId?: string;
|
|
251
297
|
}
|
|
252
|
-
/**
|
|
253
|
-
* Labels store metadata of an entity that can be used for filtering an entity list
|
|
254
|
-
* or for searching across entity types.
|
|
255
|
-
*
|
|
256
|
-
* Keys must be of length 1-63 characters, and cannot start with "kong", "konnect",
|
|
257
|
-
* "mesh", "kic", or "\_".
|
|
258
|
-
*/
|
|
259
|
-
export type UpdateLabels = Record<string, string>;
|
|
260
298
|
/**
|
|
261
299
|
* Invoice-level invoicing settings.
|
|
262
300
|
*
|
|
@@ -484,6 +522,22 @@ export interface CurrencyFiat {
|
|
|
484
522
|
* the currency, such as "$" for US Dollar or "€" for Euro.
|
|
485
523
|
*/
|
|
486
524
|
symbol?: string;
|
|
525
|
+
/**
|
|
526
|
+
* The precision of the currency. It should be a number that represents the number
|
|
527
|
+
* of decimal places used for the currency, such as 2 for US Dollar or Euro.
|
|
528
|
+
*/
|
|
529
|
+
precision: number;
|
|
530
|
+
/**
|
|
531
|
+
* The decimal mark for the currency. It should be a string that represents the
|
|
532
|
+
* decimal mark of the currency, such as "." for US Dollar or "," for Euro.
|
|
533
|
+
*/
|
|
534
|
+
decimalMark: string;
|
|
535
|
+
/**
|
|
536
|
+
* The thousand separator for the currency. It should be a string that represents
|
|
537
|
+
* the thousand separator of the currency, such as "," for US Dollar or "." for
|
|
538
|
+
* Euro.
|
|
539
|
+
*/
|
|
540
|
+
thousandSeparator: string;
|
|
487
541
|
code: string;
|
|
488
542
|
}
|
|
489
543
|
/** Filter options for listing cost bases. */
|
|
@@ -491,6 +545,36 @@ export interface ListCostBasesParamsFilter {
|
|
|
491
545
|
/** Filter cost bases by fiat currency code. */
|
|
492
546
|
fiatCode?: string;
|
|
493
547
|
}
|
|
548
|
+
/** CurrencyCustom create request. */
|
|
549
|
+
export interface CreateCurrencyCustomRequest {
|
|
550
|
+
/**
|
|
551
|
+
* The name of the currency. It should be a human-readable string that represents
|
|
552
|
+
* the name of the currency, such as "US Dollar" or "Euro".
|
|
553
|
+
*/
|
|
554
|
+
name: string;
|
|
555
|
+
/**
|
|
556
|
+
* The symbol of the currency. It should be a string that represents the symbol of
|
|
557
|
+
* the currency, such as "$" for US Dollar or "€" for Euro.
|
|
558
|
+
*/
|
|
559
|
+
symbol?: string;
|
|
560
|
+
/**
|
|
561
|
+
* The precision of the currency. It should be a number that represents the number
|
|
562
|
+
* of decimal places used for the currency, such as 2 for US Dollar or Euro.
|
|
563
|
+
*/
|
|
564
|
+
precision: number;
|
|
565
|
+
/**
|
|
566
|
+
* The decimal mark for the currency. It should be a string that represents the
|
|
567
|
+
* decimal mark of the currency, such as "." for US Dollar or "," for Euro.
|
|
568
|
+
*/
|
|
569
|
+
decimalMark: string;
|
|
570
|
+
/**
|
|
571
|
+
* The thousand separator for the currency. It should be a string that represents
|
|
572
|
+
* the thousand separator of the currency, such as "," for US Dollar or "." for
|
|
573
|
+
* Euro.
|
|
574
|
+
*/
|
|
575
|
+
thousandSeparator: string;
|
|
576
|
+
code: string;
|
|
577
|
+
}
|
|
494
578
|
/** Monetary amount in a specific currency. */
|
|
495
579
|
export interface CurrencyAmount {
|
|
496
580
|
amount: string;
|
|
@@ -650,99 +734,22 @@ export interface CursorPaginationQuery {
|
|
|
650
734
|
/** Filter options for listing meters. */
|
|
651
735
|
export interface ListMetersParamsFilter {
|
|
652
736
|
/** Filter meters by key. */
|
|
653
|
-
key?:
|
|
654
|
-
eq?: string;
|
|
655
|
-
neq?: string;
|
|
656
|
-
contains?: string;
|
|
657
|
-
ocontains?: string[];
|
|
658
|
-
oeq?: string[];
|
|
659
|
-
gt?: string;
|
|
660
|
-
gte?: string;
|
|
661
|
-
lt?: string;
|
|
662
|
-
lte?: string;
|
|
663
|
-
exists?: boolean;
|
|
664
|
-
};
|
|
737
|
+
key?: StringFieldFilter;
|
|
665
738
|
/** Filter meters by name. */
|
|
666
|
-
name?:
|
|
667
|
-
eq?: string;
|
|
668
|
-
neq?: string;
|
|
669
|
-
contains?: string;
|
|
670
|
-
ocontains?: string[];
|
|
671
|
-
oeq?: string[];
|
|
672
|
-
gt?: string;
|
|
673
|
-
gte?: string;
|
|
674
|
-
lt?: string;
|
|
675
|
-
lte?: string;
|
|
676
|
-
exists?: boolean;
|
|
677
|
-
};
|
|
739
|
+
name?: StringFieldFilter;
|
|
678
740
|
}
|
|
679
741
|
/** Filter options for listing LLM cost prices. */
|
|
680
742
|
export interface ListLlmCostPricesParamsFilter {
|
|
681
743
|
/** Filter by provider. e.g. ?filter[provider][eq]=openai */
|
|
682
|
-
provider?:
|
|
683
|
-
eq?: string;
|
|
684
|
-
neq?: string;
|
|
685
|
-
contains?: string;
|
|
686
|
-
ocontains?: string[];
|
|
687
|
-
oeq?: string[];
|
|
688
|
-
gt?: string;
|
|
689
|
-
gte?: string;
|
|
690
|
-
lt?: string;
|
|
691
|
-
lte?: string;
|
|
692
|
-
exists?: boolean;
|
|
693
|
-
};
|
|
744
|
+
provider?: StringFieldFilter;
|
|
694
745
|
/** Filter by model ID. e.g. ?filter[model_id][eq]=gpt-4 */
|
|
695
|
-
modelId?:
|
|
696
|
-
eq?: string;
|
|
697
|
-
neq?: string;
|
|
698
|
-
contains?: string;
|
|
699
|
-
ocontains?: string[];
|
|
700
|
-
oeq?: string[];
|
|
701
|
-
gt?: string;
|
|
702
|
-
gte?: string;
|
|
703
|
-
lt?: string;
|
|
704
|
-
lte?: string;
|
|
705
|
-
exists?: boolean;
|
|
706
|
-
};
|
|
746
|
+
modelId?: StringFieldFilter;
|
|
707
747
|
/** Filter by model name. e.g. ?filter[model_name][contains]=gpt */
|
|
708
|
-
modelName?:
|
|
709
|
-
eq?: string;
|
|
710
|
-
neq?: string;
|
|
711
|
-
contains?: string;
|
|
712
|
-
ocontains?: string[];
|
|
713
|
-
oeq?: string[];
|
|
714
|
-
gt?: string;
|
|
715
|
-
gte?: string;
|
|
716
|
-
lt?: string;
|
|
717
|
-
lte?: string;
|
|
718
|
-
exists?: boolean;
|
|
719
|
-
};
|
|
748
|
+
modelName?: StringFieldFilter;
|
|
720
749
|
/** Filter by currency code. e.g. ?filter[currency][eq]=USD */
|
|
721
|
-
currency?:
|
|
722
|
-
eq?: string;
|
|
723
|
-
neq?: string;
|
|
724
|
-
contains?: string;
|
|
725
|
-
ocontains?: string[];
|
|
726
|
-
oeq?: string[];
|
|
727
|
-
gt?: string;
|
|
728
|
-
gte?: string;
|
|
729
|
-
lt?: string;
|
|
730
|
-
lte?: string;
|
|
731
|
-
exists?: boolean;
|
|
732
|
-
};
|
|
750
|
+
currency?: StringFieldFilter;
|
|
733
751
|
/** Filter by source. e.g. ?filter[source][eq]=system */
|
|
734
|
-
source?:
|
|
735
|
-
eq?: string;
|
|
736
|
-
neq?: string;
|
|
737
|
-
contains?: string;
|
|
738
|
-
ocontains?: string[];
|
|
739
|
-
oeq?: string[];
|
|
740
|
-
gt?: string;
|
|
741
|
-
gte?: string;
|
|
742
|
-
lt?: string;
|
|
743
|
-
lte?: string;
|
|
744
|
-
exists?: boolean;
|
|
745
|
-
};
|
|
752
|
+
source?: StringFieldFilter;
|
|
746
753
|
}
|
|
747
754
|
/**
|
|
748
755
|
* Filters on the resource's `labels` field.
|
|
@@ -752,18 +759,7 @@ export interface ListLlmCostPricesParamsFilter {
|
|
|
752
759
|
* `filter[labels][key]=value` (nested) and `filter[labels.key]=value`
|
|
753
760
|
* (dot-notation).
|
|
754
761
|
*/
|
|
755
|
-
export type LabelsFieldFilter = Record<string,
|
|
756
|
-
eq?: string;
|
|
757
|
-
neq?: string;
|
|
758
|
-
contains?: string;
|
|
759
|
-
ocontains?: string[];
|
|
760
|
-
oeq?: string[];
|
|
761
|
-
gt?: string;
|
|
762
|
-
gte?: string;
|
|
763
|
-
lt?: string;
|
|
764
|
-
lte?: string;
|
|
765
|
-
exists?: boolean;
|
|
766
|
-
}>;
|
|
762
|
+
export type LabelsFieldFilter = Record<string, StringFieldFilter>;
|
|
767
763
|
/** Customer reference. */
|
|
768
764
|
export interface CustomerReference {
|
|
769
765
|
id: string;
|
|
@@ -1293,7 +1289,7 @@ export interface CreateMeterRequest {
|
|
|
1293
1289
|
labels?: Labels;
|
|
1294
1290
|
key: string;
|
|
1295
1291
|
/** The aggregation type to use for the meter. */
|
|
1296
|
-
aggregation:
|
|
1292
|
+
aggregation: MeterAggregation;
|
|
1297
1293
|
/** The event type to include in the aggregation. */
|
|
1298
1294
|
eventType: string;
|
|
1299
1295
|
/**
|
|
@@ -1343,7 +1339,7 @@ export interface Meter {
|
|
|
1343
1339
|
deletedAt?: Date;
|
|
1344
1340
|
key: string;
|
|
1345
1341
|
/** The aggregation type to use for the meter. */
|
|
1346
|
-
aggregation:
|
|
1342
|
+
aggregation: MeterAggregation;
|
|
1347
1343
|
/** The event type to include in the aggregation. */
|
|
1348
1344
|
eventType: string;
|
|
1349
1345
|
/**
|
|
@@ -1602,9 +1598,10 @@ export interface CreateCreditGrantPurchase {
|
|
|
1602
1598
|
/**
|
|
1603
1599
|
* Cost basis per credit unit used to calculate the purchase amount.
|
|
1604
1600
|
*
|
|
1605
|
-
* If `per_unit_cost_basis` is 0.50 and credit amount is
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
1601
|
+
* If `per_unit_cost_basis` is 0.50 and credit amount is
|
|
1602
|
+
* $100.00, the total
|
|
1603
|
+
* charge is $50.00. The value must be greater than 0. If the
|
|
1604
|
+
* cost basis is 0, use `funding_method=none` instead.
|
|
1608
1605
|
*
|
|
1609
1606
|
* Defaults to 1.0.
|
|
1610
1607
|
*/
|
|
@@ -1652,9 +1649,10 @@ export interface CreditGrantPurchase {
|
|
|
1652
1649
|
/**
|
|
1653
1650
|
* Cost basis per credit unit used to calculate the purchase amount.
|
|
1654
1651
|
*
|
|
1655
|
-
* If `per_unit_cost_basis` is 0.50 and credit amount is
|
|
1656
|
-
*
|
|
1657
|
-
*
|
|
1652
|
+
* If `per_unit_cost_basis` is 0.50 and credit amount is
|
|
1653
|
+
* $100.00, the total
|
|
1654
|
+
* charge is $50.00. The value must be greater than 0. If the
|
|
1655
|
+
* cost basis is 0, use `funding_method=none` instead.
|
|
1658
1656
|
*
|
|
1659
1657
|
* Defaults to 1.0.
|
|
1660
1658
|
*/
|
|
@@ -1685,43 +1683,17 @@ export interface ListCreditGrantsParamsFilter {
|
|
|
1685
1683
|
/** Filter credit grants by currency. */
|
|
1686
1684
|
currency?: string;
|
|
1687
1685
|
/** Filter credit grants by key. */
|
|
1688
|
-
key?:
|
|
1689
|
-
eq?: string;
|
|
1690
|
-
neq?: string;
|
|
1691
|
-
contains?: string;
|
|
1692
|
-
ocontains?: string[];
|
|
1693
|
-
oeq?: string[];
|
|
1694
|
-
gt?: string;
|
|
1695
|
-
gte?: string;
|
|
1696
|
-
lt?: string;
|
|
1697
|
-
lte?: string;
|
|
1698
|
-
exists?: boolean;
|
|
1699
|
-
};
|
|
1686
|
+
key?: StringFieldFilter;
|
|
1700
1687
|
}
|
|
1701
1688
|
/** Filter options for getting a credit balance. */
|
|
1702
1689
|
export interface GetCreditBalanceParamsFilter {
|
|
1703
1690
|
/** Filter credit balance by currency. */
|
|
1704
|
-
currency?:
|
|
1705
|
-
eq?: string;
|
|
1706
|
-
oeq?: string[];
|
|
1707
|
-
neq?: string;
|
|
1708
|
-
};
|
|
1691
|
+
currency?: StringFieldFilterExact;
|
|
1709
1692
|
/**
|
|
1710
1693
|
* Filter credit balance by feature key. Omit to return the total portfolio value.
|
|
1711
1694
|
* Use `exists=false` to return only unrestricted balance.
|
|
1712
1695
|
*/
|
|
1713
|
-
featureKey?:
|
|
1714
|
-
eq?: string;
|
|
1715
|
-
neq?: string;
|
|
1716
|
-
contains?: string;
|
|
1717
|
-
ocontains?: string[];
|
|
1718
|
-
oeq?: string[];
|
|
1719
|
-
gt?: string;
|
|
1720
|
-
gte?: string;
|
|
1721
|
-
lt?: string;
|
|
1722
|
-
lte?: string;
|
|
1723
|
-
exists?: boolean;
|
|
1724
|
-
};
|
|
1696
|
+
featureKey?: StringFieldFilter;
|
|
1725
1697
|
}
|
|
1726
1698
|
/** Filter options for listing charges. */
|
|
1727
1699
|
export interface ListChargesParamsFilter {
|
|
@@ -1737,48 +1709,25 @@ export interface ListChargesParamsFilter {
|
|
|
1737
1709
|
*
|
|
1738
1710
|
* If omitted, all statuses are returned except for `deleted`.
|
|
1739
1711
|
*/
|
|
1740
|
-
status?:
|
|
1741
|
-
eq?: string;
|
|
1742
|
-
oeq?: string[];
|
|
1743
|
-
neq?: string;
|
|
1744
|
-
};
|
|
1712
|
+
status?: StringFieldFilterExact;
|
|
1745
1713
|
}
|
|
1746
1714
|
/** Filter options for listing plans. */
|
|
1747
1715
|
export interface ListPlansParamsFilter {
|
|
1748
|
-
key?:
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
contains?: string;
|
|
1764
|
-
ocontains?: string[];
|
|
1765
|
-
oeq?: string[];
|
|
1766
|
-
gt?: string;
|
|
1767
|
-
gte?: string;
|
|
1768
|
-
lt?: string;
|
|
1769
|
-
lte?: string;
|
|
1770
|
-
exists?: boolean;
|
|
1771
|
-
};
|
|
1772
|
-
status?: string | {
|
|
1773
|
-
eq?: string;
|
|
1774
|
-
oeq?: string[];
|
|
1775
|
-
neq?: string;
|
|
1776
|
-
};
|
|
1777
|
-
currency?: string | {
|
|
1778
|
-
eq?: string;
|
|
1779
|
-
oeq?: string[];
|
|
1780
|
-
neq?: string;
|
|
1781
|
-
};
|
|
1716
|
+
key?: StringFieldFilter;
|
|
1717
|
+
name?: StringFieldFilter;
|
|
1718
|
+
status?: StringFieldFilterExact;
|
|
1719
|
+
currency?: StringFieldFilterExact;
|
|
1720
|
+
}
|
|
1721
|
+
/** Request body for voiding a credit grant. */
|
|
1722
|
+
export interface VoidCreditGrantRequest {
|
|
1723
|
+
/**
|
|
1724
|
+
* How voiding adjusts payment state related to the grant.
|
|
1725
|
+
*
|
|
1726
|
+
* Currently only `none` is supported: voiding does not adjust invoices, payment
|
|
1727
|
+
* authorization, settlement, payment intents, or external collection state. If
|
|
1728
|
+
* payment later completes, the original invoiced amount may still be collected.
|
|
1729
|
+
*/
|
|
1730
|
+
paymentAdjustment: 'none';
|
|
1782
1731
|
}
|
|
1783
1732
|
/** Subscription create request. */
|
|
1784
1733
|
export interface SubscriptionCreate {
|
|
@@ -1918,20 +1867,6 @@ export interface UnitConfig {
|
|
|
1918
1867
|
*/
|
|
1919
1868
|
displayUnit?: string;
|
|
1920
1869
|
}
|
|
1921
|
-
/**
|
|
1922
|
-
* Available apps for billing integrations to connect with third-party services.
|
|
1923
|
-
* Apps can have various capabilities like syncing data from or to external
|
|
1924
|
-
* systems, integrating with third-party services for tax calculation, delivery of
|
|
1925
|
-
* invoices, collection of payments, etc.
|
|
1926
|
-
*/
|
|
1927
|
-
export interface AppCatalogItem {
|
|
1928
|
-
/** Type of the app. */
|
|
1929
|
-
type: 'sandbox' | 'stripe' | 'external_invoicing';
|
|
1930
|
-
/** Name of the app. */
|
|
1931
|
-
name: string;
|
|
1932
|
-
/** Description of the app. */
|
|
1933
|
-
description: string;
|
|
1934
|
-
}
|
|
1935
1870
|
/** Mapping of app types to tax codes. */
|
|
1936
1871
|
export interface TaxCodeAppMapping {
|
|
1937
1872
|
/** The app type that the tax code is associated with. */
|
|
@@ -1939,6 +1874,97 @@ export interface TaxCodeAppMapping {
|
|
|
1939
1874
|
/** Tax code. */
|
|
1940
1875
|
taxCode: string;
|
|
1941
1876
|
}
|
|
1877
|
+
/** App capability describes a function that an App can perform. */
|
|
1878
|
+
export interface AppCapability {
|
|
1879
|
+
/** Type of the capability. */
|
|
1880
|
+
type: 'report_usage' | 'report_events' | 'calculate_tax' | 'invoice_customers' | 'collect_payments';
|
|
1881
|
+
/** Key of the capability. */
|
|
1882
|
+
key: string;
|
|
1883
|
+
/** Name of the capability. */
|
|
1884
|
+
name: string;
|
|
1885
|
+
/** Description of the capability. */
|
|
1886
|
+
description: string;
|
|
1887
|
+
}
|
|
1888
|
+
/** AppStripe update request. */
|
|
1889
|
+
export interface UpdateAppStripeRequest {
|
|
1890
|
+
/**
|
|
1891
|
+
* Display name of the resource.
|
|
1892
|
+
*
|
|
1893
|
+
* Between 1 and 256 characters.
|
|
1894
|
+
*/
|
|
1895
|
+
name: string;
|
|
1896
|
+
/**
|
|
1897
|
+
* Optional description of the resource.
|
|
1898
|
+
*
|
|
1899
|
+
* Maximum 1024 characters.
|
|
1900
|
+
*/
|
|
1901
|
+
description?: string;
|
|
1902
|
+
labels?: UpdateLabels;
|
|
1903
|
+
/** The app type. */
|
|
1904
|
+
type: 'stripe';
|
|
1905
|
+
/** The Stripe secret API key used to authenticate API requests. */
|
|
1906
|
+
secretApiKey?: string;
|
|
1907
|
+
}
|
|
1908
|
+
/** AppSandbox update request. */
|
|
1909
|
+
export interface UpdateAppSandboxRequest {
|
|
1910
|
+
/**
|
|
1911
|
+
* Display name of the resource.
|
|
1912
|
+
*
|
|
1913
|
+
* Between 1 and 256 characters.
|
|
1914
|
+
*/
|
|
1915
|
+
name: string;
|
|
1916
|
+
/**
|
|
1917
|
+
* Optional description of the resource.
|
|
1918
|
+
*
|
|
1919
|
+
* Maximum 1024 characters.
|
|
1920
|
+
*/
|
|
1921
|
+
description?: string;
|
|
1922
|
+
labels?: UpdateLabels;
|
|
1923
|
+
/** The app type. */
|
|
1924
|
+
type: 'sandbox';
|
|
1925
|
+
}
|
|
1926
|
+
/** AppExternalInvoicing update request. */
|
|
1927
|
+
export interface UpdateAppExternalInvoicingRequest {
|
|
1928
|
+
/**
|
|
1929
|
+
* Display name of the resource.
|
|
1930
|
+
*
|
|
1931
|
+
* Between 1 and 256 characters.
|
|
1932
|
+
*/
|
|
1933
|
+
name: string;
|
|
1934
|
+
/**
|
|
1935
|
+
* Optional description of the resource.
|
|
1936
|
+
*
|
|
1937
|
+
* Maximum 1024 characters.
|
|
1938
|
+
*/
|
|
1939
|
+
description?: string;
|
|
1940
|
+
labels?: UpdateLabels;
|
|
1941
|
+
/** The app type. */
|
|
1942
|
+
type: 'external_invoicing';
|
|
1943
|
+
/**
|
|
1944
|
+
* Enable draft synchronization hook.
|
|
1945
|
+
*
|
|
1946
|
+
* When enabled, invoices will pause at the draft state and wait for the
|
|
1947
|
+
* integration to call the draft synchronized endpoint before progressing to the
|
|
1948
|
+
* issuing state. This allows the external system to validate and prepare the
|
|
1949
|
+
* invoice data.
|
|
1950
|
+
*
|
|
1951
|
+
* When disabled, invoices automatically progress through the draft state based on
|
|
1952
|
+
* the configured workflow timing.
|
|
1953
|
+
*/
|
|
1954
|
+
enableDraftSyncHook: boolean;
|
|
1955
|
+
/**
|
|
1956
|
+
* Enable issuing synchronization hook.
|
|
1957
|
+
*
|
|
1958
|
+
* When enabled, invoices will pause at the issuing state and wait for the
|
|
1959
|
+
* integration to call the issuing synchronized endpoint before progressing to the
|
|
1960
|
+
* issued state. This ensures the external invoicing system has successfully
|
|
1961
|
+
* created and finalized the invoice before it is marked as issued.
|
|
1962
|
+
*
|
|
1963
|
+
* When disabled, invoices automatically progress through the issuing state and are
|
|
1964
|
+
* immediately marked as issued.
|
|
1965
|
+
*/
|
|
1966
|
+
enableIssuingSyncHook: boolean;
|
|
1967
|
+
}
|
|
1942
1968
|
/**
|
|
1943
1969
|
* Identity stores the details required to identify an entity for tax purposes in a
|
|
1944
1970
|
* specific country.
|
|
@@ -2047,51 +2073,7 @@ export interface InvoiceLineBaseDiscount {
|
|
|
2047
2073
|
/** Filter options for listing currencies. */
|
|
2048
2074
|
export interface ListCurrenciesParamsFilter {
|
|
2049
2075
|
type?: 'fiat' | 'custom';
|
|
2050
|
-
code?:
|
|
2051
|
-
eq?: string;
|
|
2052
|
-
neq?: string;
|
|
2053
|
-
contains?: string;
|
|
2054
|
-
ocontains?: string[];
|
|
2055
|
-
oeq?: string[];
|
|
2056
|
-
gt?: string;
|
|
2057
|
-
gte?: string;
|
|
2058
|
-
lt?: string;
|
|
2059
|
-
lte?: string;
|
|
2060
|
-
exists?: boolean;
|
|
2061
|
-
};
|
|
2062
|
-
}
|
|
2063
|
-
/** Describes custom currency. */
|
|
2064
|
-
export interface CurrencyCustom {
|
|
2065
|
-
/** The type of the currency. */
|
|
2066
|
-
type: 'custom';
|
|
2067
|
-
/**
|
|
2068
|
-
* The name of the currency. It should be a human-readable string that represents
|
|
2069
|
-
* the name of the currency, such as "US Dollar" or "Euro".
|
|
2070
|
-
*/
|
|
2071
|
-
name: string;
|
|
2072
|
-
/**
|
|
2073
|
-
* The symbol of the currency. It should be a string that represents the symbol of
|
|
2074
|
-
* the currency, such as "$" for US Dollar or "€" for Euro.
|
|
2075
|
-
*/
|
|
2076
|
-
symbol?: string;
|
|
2077
|
-
id: string;
|
|
2078
|
-
code: string;
|
|
2079
|
-
/** An ISO-8601 timestamp representation of the custom currency creation date. */
|
|
2080
|
-
createdAt: Date;
|
|
2081
|
-
}
|
|
2082
|
-
/** CurrencyCustom create request. */
|
|
2083
|
-
export interface CreateCurrencyCustomRequest {
|
|
2084
|
-
/**
|
|
2085
|
-
* The name of the currency. It should be a human-readable string that represents
|
|
2086
|
-
* the name of the currency, such as "US Dollar" or "Euro".
|
|
2087
|
-
*/
|
|
2088
|
-
name: string;
|
|
2089
|
-
/**
|
|
2090
|
-
* The symbol of the currency. It should be a string that represents the symbol of
|
|
2091
|
-
* the currency, such as "$" for US Dollar or "€" for Euro.
|
|
2092
|
-
*/
|
|
2093
|
-
symbol?: string;
|
|
2094
|
-
code: string;
|
|
2076
|
+
code?: StringFieldFilter;
|
|
2095
2077
|
}
|
|
2096
2078
|
/** Query to evaluate feature access for a list of customers. */
|
|
2097
2079
|
export interface GovernanceQueryRequest {
|
|
@@ -2164,8 +2146,13 @@ export interface CreditAdjustment {
|
|
|
2164
2146
|
}
|
|
2165
2147
|
/** The credit balance by currency. */
|
|
2166
2148
|
export interface CreditBalance {
|
|
2167
|
-
currency:
|
|
2168
|
-
/**
|
|
2149
|
+
currency: BillingCurrencyCode;
|
|
2150
|
+
/**
|
|
2151
|
+
* Credits available after applying currently live charge impacts.
|
|
2152
|
+
*
|
|
2153
|
+
* Always zero for historical balance queries using the `timestamp` parameter
|
|
2154
|
+
* because live charge impacts cannot be reconstructed historically.
|
|
2155
|
+
*/
|
|
2169
2156
|
live: string;
|
|
2170
2157
|
/** Credits that have been booked on the ledger as of the balance timestamp. */
|
|
2171
2158
|
settled: string;
|
|
@@ -2191,33 +2178,22 @@ export interface CreateCreditAdjustmentRequest {
|
|
|
2191
2178
|
description?: string;
|
|
2192
2179
|
labels?: Labels;
|
|
2193
2180
|
/** The currency of the granted credits. */
|
|
2194
|
-
currency:
|
|
2181
|
+
currency: BillingCurrencyCode;
|
|
2195
2182
|
/** Granted credit amount. */
|
|
2196
2183
|
amount: string;
|
|
2197
2184
|
}
|
|
2198
2185
|
/** Filter options for listing credit transactions. */
|
|
2199
2186
|
export interface ListCreditTransactionsParamsFilter {
|
|
2200
2187
|
/** Filter credit transactions by type. */
|
|
2201
|
-
type?: 'funded' | 'consumed' | 'expired';
|
|
2188
|
+
type?: 'funded' | 'consumed' | 'expired' | 'voided';
|
|
2202
2189
|
/** Filter credit transactions by currency. */
|
|
2203
|
-
currency?:
|
|
2190
|
+
currency?: BillingCurrencyCode;
|
|
2204
2191
|
/**
|
|
2205
2192
|
* Filter credit transactions by feature key. Omit to return all credit
|
|
2206
2193
|
* transactions. Use `exists=false` to return only unrestricted credit
|
|
2207
2194
|
* transactions.
|
|
2208
2195
|
*/
|
|
2209
|
-
featureKey?:
|
|
2210
|
-
eq?: string;
|
|
2211
|
-
neq?: string;
|
|
2212
|
-
contains?: string;
|
|
2213
|
-
ocontains?: string[];
|
|
2214
|
-
oeq?: string[];
|
|
2215
|
-
gt?: string;
|
|
2216
|
-
gte?: string;
|
|
2217
|
-
lt?: string;
|
|
2218
|
-
lte?: string;
|
|
2219
|
-
exists?: boolean;
|
|
2220
|
-
};
|
|
2196
|
+
featureKey?: StringFieldFilter;
|
|
2221
2197
|
}
|
|
2222
2198
|
/**
|
|
2223
2199
|
* A credit transaction represents a single credit movement on the customer's
|
|
@@ -2245,9 +2221,9 @@ export interface CreditTransaction {
|
|
|
2245
2221
|
/** The date and time the transaction was booked. */
|
|
2246
2222
|
bookedAt: Date;
|
|
2247
2223
|
/** The type of credit transaction. */
|
|
2248
|
-
type: 'funded' | 'consumed' | 'expired';
|
|
2224
|
+
type: 'funded' | 'consumed' | 'expired' | 'voided';
|
|
2249
2225
|
/** Currency of the balance affected by the transaction. */
|
|
2250
|
-
currency:
|
|
2226
|
+
currency: BillingCurrencyCode;
|
|
2251
2227
|
/**
|
|
2252
2228
|
* Signed amount of the credit movement. Positive values add balance, negative
|
|
2253
2229
|
* values reduce balance.
|
|
@@ -2405,173 +2381,34 @@ export interface LlmCostOverrideCreate {
|
|
|
2405
2381
|
}
|
|
2406
2382
|
/** Filter options for listing customers. */
|
|
2407
2383
|
export interface ListCustomersParamsFilter {
|
|
2408
|
-
key?:
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
gt?: string;
|
|
2415
|
-
gte?: string;
|
|
2416
|
-
lt?: string;
|
|
2417
|
-
lte?: string;
|
|
2418
|
-
exists?: boolean;
|
|
2419
|
-
};
|
|
2420
|
-
name?: string | {
|
|
2421
|
-
eq?: string;
|
|
2422
|
-
neq?: string;
|
|
2423
|
-
contains?: string;
|
|
2424
|
-
ocontains?: string[];
|
|
2425
|
-
oeq?: string[];
|
|
2426
|
-
gt?: string;
|
|
2427
|
-
gte?: string;
|
|
2428
|
-
lt?: string;
|
|
2429
|
-
lte?: string;
|
|
2430
|
-
exists?: boolean;
|
|
2431
|
-
};
|
|
2432
|
-
primaryEmail?: string | {
|
|
2433
|
-
eq?: string;
|
|
2434
|
-
neq?: string;
|
|
2435
|
-
contains?: string;
|
|
2436
|
-
ocontains?: string[];
|
|
2437
|
-
oeq?: string[];
|
|
2438
|
-
gt?: string;
|
|
2439
|
-
gte?: string;
|
|
2440
|
-
lt?: string;
|
|
2441
|
-
lte?: string;
|
|
2442
|
-
exists?: boolean;
|
|
2443
|
-
};
|
|
2444
|
-
usageAttributionSubjectKey?: string | {
|
|
2445
|
-
eq?: string;
|
|
2446
|
-
neq?: string;
|
|
2447
|
-
contains?: string;
|
|
2448
|
-
ocontains?: string[];
|
|
2449
|
-
oeq?: string[];
|
|
2450
|
-
gt?: string;
|
|
2451
|
-
gte?: string;
|
|
2452
|
-
lt?: string;
|
|
2453
|
-
lte?: string;
|
|
2454
|
-
exists?: boolean;
|
|
2455
|
-
};
|
|
2456
|
-
planKey?: string | {
|
|
2457
|
-
eq?: string;
|
|
2458
|
-
neq?: string;
|
|
2459
|
-
contains?: string;
|
|
2460
|
-
ocontains?: string[];
|
|
2461
|
-
oeq?: string[];
|
|
2462
|
-
gt?: string;
|
|
2463
|
-
gte?: string;
|
|
2464
|
-
lt?: string;
|
|
2465
|
-
lte?: string;
|
|
2466
|
-
exists?: boolean;
|
|
2467
|
-
};
|
|
2468
|
-
billingProfileId?: string | {
|
|
2469
|
-
eq?: string;
|
|
2470
|
-
oeq?: string[];
|
|
2471
|
-
neq?: string;
|
|
2472
|
-
};
|
|
2384
|
+
key?: StringFieldFilter;
|
|
2385
|
+
name?: StringFieldFilter;
|
|
2386
|
+
primaryEmail?: StringFieldFilter;
|
|
2387
|
+
usageAttributionSubjectKey?: StringFieldFilter;
|
|
2388
|
+
planKey?: StringFieldFilter;
|
|
2389
|
+
billingProfileId?: UlidFieldFilter;
|
|
2473
2390
|
}
|
|
2474
2391
|
/** Filter options for listing subscriptions. */
|
|
2475
2392
|
export interface ListSubscriptionsParamsFilter {
|
|
2476
|
-
id?:
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
customerId?: string | {
|
|
2482
|
-
eq?: string;
|
|
2483
|
-
oeq?: string[];
|
|
2484
|
-
neq?: string;
|
|
2485
|
-
};
|
|
2486
|
-
status?: string | {
|
|
2487
|
-
eq?: string;
|
|
2488
|
-
oeq?: string[];
|
|
2489
|
-
neq?: string;
|
|
2490
|
-
};
|
|
2491
|
-
planId?: string | {
|
|
2492
|
-
eq?: string;
|
|
2493
|
-
oeq?: string[];
|
|
2494
|
-
neq?: string;
|
|
2495
|
-
};
|
|
2496
|
-
planKey?: string | {
|
|
2497
|
-
eq?: string;
|
|
2498
|
-
oeq?: string[];
|
|
2499
|
-
neq?: string;
|
|
2500
|
-
};
|
|
2393
|
+
id?: UlidFieldFilter;
|
|
2394
|
+
customerId?: UlidFieldFilter;
|
|
2395
|
+
status?: StringFieldFilterExact;
|
|
2396
|
+
planId?: UlidFieldFilter;
|
|
2397
|
+
planKey?: StringFieldFilterExact;
|
|
2501
2398
|
}
|
|
2502
2399
|
/** Filter options for listing features. */
|
|
2503
2400
|
export interface ListFeatureParamsFilter {
|
|
2504
|
-
meterId?:
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
neq?: string;
|
|
2508
|
-
};
|
|
2509
|
-
key?: string | {
|
|
2510
|
-
eq?: string;
|
|
2511
|
-
neq?: string;
|
|
2512
|
-
contains?: string;
|
|
2513
|
-
ocontains?: string[];
|
|
2514
|
-
oeq?: string[];
|
|
2515
|
-
gt?: string;
|
|
2516
|
-
gte?: string;
|
|
2517
|
-
lt?: string;
|
|
2518
|
-
lte?: string;
|
|
2519
|
-
exists?: boolean;
|
|
2520
|
-
};
|
|
2521
|
-
name?: string | {
|
|
2522
|
-
eq?: string;
|
|
2523
|
-
neq?: string;
|
|
2524
|
-
contains?: string;
|
|
2525
|
-
ocontains?: string[];
|
|
2526
|
-
oeq?: string[];
|
|
2527
|
-
gt?: string;
|
|
2528
|
-
gte?: string;
|
|
2529
|
-
lt?: string;
|
|
2530
|
-
lte?: string;
|
|
2531
|
-
exists?: boolean;
|
|
2532
|
-
};
|
|
2401
|
+
meterId?: UlidFieldFilter;
|
|
2402
|
+
key?: StringFieldFilter;
|
|
2403
|
+
name?: StringFieldFilter;
|
|
2533
2404
|
}
|
|
2534
2405
|
/** Filter options for listing add-ons. */
|
|
2535
2406
|
export interface ListAddonsParamsFilter {
|
|
2536
|
-
id?:
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
key?: string | {
|
|
2542
|
-
eq?: string;
|
|
2543
|
-
neq?: string;
|
|
2544
|
-
contains?: string;
|
|
2545
|
-
ocontains?: string[];
|
|
2546
|
-
oeq?: string[];
|
|
2547
|
-
gt?: string;
|
|
2548
|
-
gte?: string;
|
|
2549
|
-
lt?: string;
|
|
2550
|
-
lte?: string;
|
|
2551
|
-
exists?: boolean;
|
|
2552
|
-
};
|
|
2553
|
-
name?: string | {
|
|
2554
|
-
eq?: string;
|
|
2555
|
-
neq?: string;
|
|
2556
|
-
contains?: string;
|
|
2557
|
-
ocontains?: string[];
|
|
2558
|
-
oeq?: string[];
|
|
2559
|
-
gt?: string;
|
|
2560
|
-
gte?: string;
|
|
2561
|
-
lt?: string;
|
|
2562
|
-
lte?: string;
|
|
2563
|
-
exists?: boolean;
|
|
2564
|
-
};
|
|
2565
|
-
status?: string | {
|
|
2566
|
-
eq?: string;
|
|
2567
|
-
oeq?: string[];
|
|
2568
|
-
neq?: string;
|
|
2569
|
-
};
|
|
2570
|
-
currency?: string | {
|
|
2571
|
-
eq?: string;
|
|
2572
|
-
oeq?: string[];
|
|
2573
|
-
neq?: string;
|
|
2574
|
-
};
|
|
2407
|
+
id?: UlidFieldFilter;
|
|
2408
|
+
key?: StringFieldFilter;
|
|
2409
|
+
name?: StringFieldFilter;
|
|
2410
|
+
status?: StringFieldFilterExact;
|
|
2411
|
+
currency?: StringFieldFilterExact;
|
|
2575
2412
|
}
|
|
2576
2413
|
/**
|
|
2577
2414
|
* Tax configuration for a credit grant.
|
|
@@ -2742,164 +2579,43 @@ export interface UpdateRateCardTaxConfig {
|
|
|
2742
2579
|
/** Filter options for listing ingested events. */
|
|
2743
2580
|
export interface ListEventsParamsFilter {
|
|
2744
2581
|
/** Filter events by ID. */
|
|
2745
|
-
id?:
|
|
2746
|
-
eq?: string;
|
|
2747
|
-
neq?: string;
|
|
2748
|
-
contains?: string;
|
|
2749
|
-
ocontains?: string[];
|
|
2750
|
-
oeq?: string[];
|
|
2751
|
-
gt?: string;
|
|
2752
|
-
gte?: string;
|
|
2753
|
-
lt?: string;
|
|
2754
|
-
lte?: string;
|
|
2755
|
-
exists?: boolean;
|
|
2756
|
-
};
|
|
2582
|
+
id?: StringFieldFilter;
|
|
2757
2583
|
/** Filter events by source. */
|
|
2758
|
-
source?:
|
|
2759
|
-
eq?: string;
|
|
2760
|
-
neq?: string;
|
|
2761
|
-
contains?: string;
|
|
2762
|
-
ocontains?: string[];
|
|
2763
|
-
oeq?: string[];
|
|
2764
|
-
gt?: string;
|
|
2765
|
-
gte?: string;
|
|
2766
|
-
lt?: string;
|
|
2767
|
-
lte?: string;
|
|
2768
|
-
exists?: boolean;
|
|
2769
|
-
};
|
|
2584
|
+
source?: StringFieldFilter;
|
|
2770
2585
|
/** Filter events by subject. */
|
|
2771
|
-
subject?:
|
|
2772
|
-
eq?: string;
|
|
2773
|
-
neq?: string;
|
|
2774
|
-
contains?: string;
|
|
2775
|
-
ocontains?: string[];
|
|
2776
|
-
oeq?: string[];
|
|
2777
|
-
gt?: string;
|
|
2778
|
-
gte?: string;
|
|
2779
|
-
lt?: string;
|
|
2780
|
-
lte?: string;
|
|
2781
|
-
exists?: boolean;
|
|
2782
|
-
};
|
|
2586
|
+
subject?: StringFieldFilter;
|
|
2783
2587
|
/** Filter events by type. */
|
|
2784
|
-
type?:
|
|
2785
|
-
eq?: string;
|
|
2786
|
-
neq?: string;
|
|
2787
|
-
contains?: string;
|
|
2788
|
-
ocontains?: string[];
|
|
2789
|
-
oeq?: string[];
|
|
2790
|
-
gt?: string;
|
|
2791
|
-
gte?: string;
|
|
2792
|
-
lt?: string;
|
|
2793
|
-
lte?: string;
|
|
2794
|
-
exists?: boolean;
|
|
2795
|
-
};
|
|
2588
|
+
type?: StringFieldFilter;
|
|
2796
2589
|
/** Filter events by the associated customer ID. */
|
|
2797
|
-
customerId?:
|
|
2798
|
-
eq?: string;
|
|
2799
|
-
oeq?: string[];
|
|
2800
|
-
neq?: string;
|
|
2801
|
-
};
|
|
2590
|
+
customerId?: UlidFieldFilter;
|
|
2802
2591
|
/** Filter events by event time. */
|
|
2803
|
-
time?:
|
|
2804
|
-
eq?: Date;
|
|
2805
|
-
lt?: Date;
|
|
2806
|
-
lte?: Date;
|
|
2807
|
-
gt?: Date;
|
|
2808
|
-
gte?: Date;
|
|
2809
|
-
};
|
|
2592
|
+
time?: DateTimeFieldFilter;
|
|
2810
2593
|
/** Filter events by the time the event was ingested. */
|
|
2811
|
-
ingestedAt?:
|
|
2812
|
-
eq?: Date;
|
|
2813
|
-
lt?: Date;
|
|
2814
|
-
lte?: Date;
|
|
2815
|
-
gt?: Date;
|
|
2816
|
-
gte?: Date;
|
|
2817
|
-
};
|
|
2594
|
+
ingestedAt?: DateTimeFieldFilter;
|
|
2818
2595
|
/** Filter events by the time the event was stored. */
|
|
2819
|
-
storedAt?:
|
|
2820
|
-
eq?: Date;
|
|
2821
|
-
lt?: Date;
|
|
2822
|
-
lte?: Date;
|
|
2823
|
-
gt?: Date;
|
|
2824
|
-
gte?: Date;
|
|
2825
|
-
};
|
|
2596
|
+
storedAt?: DateTimeFieldFilter;
|
|
2826
2597
|
}
|
|
2827
2598
|
/** Filter options for listing invoices. */
|
|
2828
2599
|
export interface ListInvoicesParamsFilter {
|
|
2829
2600
|
/** Filter by invoice status. */
|
|
2830
|
-
status?:
|
|
2831
|
-
eq?: string;
|
|
2832
|
-
oeq?: string[];
|
|
2833
|
-
neq?: string;
|
|
2834
|
-
};
|
|
2601
|
+
status?: StringFieldFilterExact;
|
|
2835
2602
|
/** Filter by customer ID. */
|
|
2836
|
-
customerId?:
|
|
2837
|
-
eq?: string;
|
|
2838
|
-
oeq?: string[];
|
|
2839
|
-
neq?: string;
|
|
2840
|
-
};
|
|
2603
|
+
customerId?: UlidFieldFilter;
|
|
2841
2604
|
/** Filter by the time the invoice was issued. */
|
|
2842
|
-
issuedAt?:
|
|
2843
|
-
eq?: Date;
|
|
2844
|
-
lt?: Date;
|
|
2845
|
-
lte?: Date;
|
|
2846
|
-
gt?: Date;
|
|
2847
|
-
gte?: Date;
|
|
2848
|
-
};
|
|
2605
|
+
issuedAt?: DateTimeFieldFilter;
|
|
2849
2606
|
/** Filter by service period start. */
|
|
2850
|
-
servicePeriodStart?:
|
|
2851
|
-
eq?: Date;
|
|
2852
|
-
lt?: Date;
|
|
2853
|
-
lte?: Date;
|
|
2854
|
-
gt?: Date;
|
|
2855
|
-
gte?: Date;
|
|
2856
|
-
};
|
|
2607
|
+
servicePeriodStart?: DateTimeFieldFilter;
|
|
2857
2608
|
/** Filter by invoice creation time. */
|
|
2858
|
-
createdAt?:
|
|
2859
|
-
eq?: Date;
|
|
2860
|
-
lt?: Date;
|
|
2861
|
-
lte?: Date;
|
|
2862
|
-
gt?: Date;
|
|
2863
|
-
gte?: Date;
|
|
2864
|
-
};
|
|
2609
|
+
createdAt?: DateTimeFieldFilter;
|
|
2865
2610
|
}
|
|
2866
2611
|
/** Resource filters. */
|
|
2867
2612
|
export interface ResourceFilters {
|
|
2868
|
-
name?:
|
|
2869
|
-
eq?: string;
|
|
2870
|
-
neq?: string;
|
|
2871
|
-
contains?: string;
|
|
2872
|
-
ocontains?: string[];
|
|
2873
|
-
oeq?: string[];
|
|
2874
|
-
gt?: string;
|
|
2875
|
-
gte?: string;
|
|
2876
|
-
lt?: string;
|
|
2877
|
-
lte?: string;
|
|
2878
|
-
exists?: boolean;
|
|
2879
|
-
};
|
|
2613
|
+
name?: StringFieldFilter;
|
|
2880
2614
|
labels?: LabelsFieldFilter;
|
|
2881
2615
|
publicLabels?: LabelsFieldFilter;
|
|
2882
|
-
createdAt?:
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
lte?: Date;
|
|
2886
|
-
gt?: Date;
|
|
2887
|
-
gte?: Date;
|
|
2888
|
-
};
|
|
2889
|
-
updatedAt?: Date | {
|
|
2890
|
-
eq?: Date;
|
|
2891
|
-
lt?: Date;
|
|
2892
|
-
lte?: Date;
|
|
2893
|
-
gt?: Date;
|
|
2894
|
-
gte?: Date;
|
|
2895
|
-
};
|
|
2896
|
-
deletedAt?: Date | {
|
|
2897
|
-
eq?: Date;
|
|
2898
|
-
lt?: Date;
|
|
2899
|
-
lte?: Date;
|
|
2900
|
-
gt?: Date;
|
|
2901
|
-
gte?: Date;
|
|
2902
|
-
};
|
|
2616
|
+
createdAt?: DateTimeFieldFilter;
|
|
2617
|
+
updatedAt?: DateTimeFieldFilter;
|
|
2618
|
+
deletedAt?: DateTimeFieldFilter;
|
|
2903
2619
|
}
|
|
2904
2620
|
/** Field filters with all supported types. */
|
|
2905
2621
|
export interface FieldFilters {
|
|
@@ -2915,35 +2631,10 @@ export interface FieldFilters {
|
|
|
2915
2631
|
gt?: number;
|
|
2916
2632
|
gte?: number;
|
|
2917
2633
|
};
|
|
2918
|
-
string?:
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
ocontains?: string[];
|
|
2923
|
-
oeq?: string[];
|
|
2924
|
-
gt?: string;
|
|
2925
|
-
gte?: string;
|
|
2926
|
-
lt?: string;
|
|
2927
|
-
lte?: string;
|
|
2928
|
-
exists?: boolean;
|
|
2929
|
-
};
|
|
2930
|
-
stringExact?: string | {
|
|
2931
|
-
eq?: string;
|
|
2932
|
-
oeq?: string[];
|
|
2933
|
-
neq?: string;
|
|
2934
|
-
};
|
|
2935
|
-
ulid?: string | {
|
|
2936
|
-
eq?: string;
|
|
2937
|
-
oeq?: string[];
|
|
2938
|
-
neq?: string;
|
|
2939
|
-
};
|
|
2940
|
-
datetime?: Date | {
|
|
2941
|
-
eq?: Date;
|
|
2942
|
-
lt?: Date;
|
|
2943
|
-
lte?: Date;
|
|
2944
|
-
gt?: Date;
|
|
2945
|
-
gte?: Date;
|
|
2946
|
-
};
|
|
2634
|
+
string?: StringFieldFilter;
|
|
2635
|
+
stringExact?: StringFieldFilterExact;
|
|
2636
|
+
ulid?: UlidFieldFilter;
|
|
2637
|
+
datetime?: DateTimeFieldFilter;
|
|
2947
2638
|
labels?: LabelsFieldFilter;
|
|
2948
2639
|
}
|
|
2949
2640
|
/** An ingested metering event with ingestion metadata. */
|
|
@@ -2968,6 +2659,46 @@ export interface MeterQueryResult {
|
|
|
2968
2659
|
/** The usage data. If no data is available, an empty array is returned. */
|
|
2969
2660
|
data: MeterQueryRow[];
|
|
2970
2661
|
}
|
|
2662
|
+
/** Describes custom currency. */
|
|
2663
|
+
export interface CurrencyCustom {
|
|
2664
|
+
/** The type of the currency. */
|
|
2665
|
+
type: 'custom';
|
|
2666
|
+
/**
|
|
2667
|
+
* The name of the currency. It should be a human-readable string that represents
|
|
2668
|
+
* the name of the currency, such as "US Dollar" or "Euro".
|
|
2669
|
+
*/
|
|
2670
|
+
name: string;
|
|
2671
|
+
/**
|
|
2672
|
+
* The symbol of the currency. It should be a string that represents the symbol of
|
|
2673
|
+
* the currency, such as "$" for US Dollar or "€" for Euro.
|
|
2674
|
+
*/
|
|
2675
|
+
symbol?: string;
|
|
2676
|
+
/**
|
|
2677
|
+
* The precision of the currency. It should be a number that represents the number
|
|
2678
|
+
* of decimal places used for the currency, such as 2 for US Dollar or Euro.
|
|
2679
|
+
*/
|
|
2680
|
+
precision: number;
|
|
2681
|
+
/**
|
|
2682
|
+
* The decimal mark for the currency. It should be a string that represents the
|
|
2683
|
+
* decimal mark of the currency, such as "." for US Dollar or "," for Euro.
|
|
2684
|
+
*/
|
|
2685
|
+
decimalMark: string;
|
|
2686
|
+
/**
|
|
2687
|
+
* The thousand separator for the currency. It should be a string that represents
|
|
2688
|
+
* the thousand separator of the currency, such as "," for US Dollar or "." for
|
|
2689
|
+
* Euro.
|
|
2690
|
+
*/
|
|
2691
|
+
thousandSeparator: string;
|
|
2692
|
+
id: string;
|
|
2693
|
+
code: string;
|
|
2694
|
+
/** An ISO-8601 timestamp representation of the custom currency creation date. */
|
|
2695
|
+
createdAt: Date;
|
|
2696
|
+
/**
|
|
2697
|
+
* The list of active and scheduled cost bases for the custom currency. Expired and
|
|
2698
|
+
* deleted cost bases are excluded.
|
|
2699
|
+
*/
|
|
2700
|
+
costBasis?: CostBasis[];
|
|
2701
|
+
}
|
|
2971
2702
|
/** Result of a feature cost query. */
|
|
2972
2703
|
export interface FeatureCostQueryResult {
|
|
2973
2704
|
/** Start of the queried period. */
|
|
@@ -3200,7 +2931,7 @@ export interface ChargeFlatFeeSystemIntent {
|
|
|
3200
2931
|
/** The billing period the charge belongs to. */
|
|
3201
2932
|
billingPeriod: ClosedPeriod;
|
|
3202
2933
|
/** Payment term of the flat fee charge. */
|
|
3203
|
-
paymentTerm:
|
|
2934
|
+
paymentTerm: PricePaymentTerm;
|
|
3204
2935
|
/** The discounts applied to the charge. */
|
|
3205
2936
|
discounts?: ChargeFlatFeeDiscounts;
|
|
3206
2937
|
/** The proration configuration of the charge. */
|
|
@@ -3228,7 +2959,7 @@ export interface SubscriptionChangeResponse {
|
|
|
3228
2959
|
/** Request for canceling a subscription. */
|
|
3229
2960
|
export interface SubscriptionCancel {
|
|
3230
2961
|
/** If not provided the subscription is canceled immediately. */
|
|
3231
|
-
timing:
|
|
2962
|
+
timing: SubscriptionEditTiming;
|
|
3232
2963
|
}
|
|
3233
2964
|
/** Request for changing a subscription. */
|
|
3234
2965
|
export interface SubscriptionChange {
|
|
@@ -3272,7 +3003,7 @@ export interface SubscriptionChange {
|
|
|
3272
3003
|
* changing a subscription, the accepted values depend on the subscription
|
|
3273
3004
|
* configuration.
|
|
3274
3005
|
*/
|
|
3275
|
-
timing:
|
|
3006
|
+
timing: SubscriptionEditTiming;
|
|
3276
3007
|
}
|
|
3277
3008
|
/** SubscriptionAddon create request. */
|
|
3278
3009
|
export interface CreateSubscriptionAddonRequest {
|
|
@@ -3285,7 +3016,7 @@ export interface CreateSubscriptionAddonRequest {
|
|
|
3285
3016
|
* The timing of the operation. After the create or update, a new entry will be
|
|
3286
3017
|
* created in the timeline.
|
|
3287
3018
|
*/
|
|
3288
|
-
timing:
|
|
3019
|
+
timing: SubscriptionEditTiming;
|
|
3289
3020
|
}
|
|
3290
3021
|
/**
|
|
3291
3022
|
* Usage quantity details on an invoice line item when UnitConfig is in effect.
|
|
@@ -3310,141 +3041,6 @@ export interface InvoiceUsageQuantityDetail {
|
|
|
3310
3041
|
*/
|
|
3311
3042
|
appliedUnitConfig: UnitConfig;
|
|
3312
3043
|
}
|
|
3313
|
-
/** Stripe app. */
|
|
3314
|
-
export interface AppStripe {
|
|
3315
|
-
id: string;
|
|
3316
|
-
/**
|
|
3317
|
-
* Display name of the resource.
|
|
3318
|
-
*
|
|
3319
|
-
* Between 1 and 256 characters.
|
|
3320
|
-
*/
|
|
3321
|
-
name: string;
|
|
3322
|
-
/**
|
|
3323
|
-
* Optional description of the resource.
|
|
3324
|
-
*
|
|
3325
|
-
* Maximum 1024 characters.
|
|
3326
|
-
*/
|
|
3327
|
-
description?: string;
|
|
3328
|
-
labels?: Labels;
|
|
3329
|
-
/** An ISO-8601 timestamp representation of entity creation date. */
|
|
3330
|
-
createdAt: Date;
|
|
3331
|
-
/** An ISO-8601 timestamp representation of entity last update date. */
|
|
3332
|
-
updatedAt: Date;
|
|
3333
|
-
/** An ISO-8601 timestamp representation of entity deletion date. */
|
|
3334
|
-
deletedAt?: Date;
|
|
3335
|
-
/** The app type. */
|
|
3336
|
-
type: 'stripe';
|
|
3337
|
-
/** The app catalog definition that this installed app is based on. */
|
|
3338
|
-
definition: AppCatalogItem;
|
|
3339
|
-
/** Status of the app connection. */
|
|
3340
|
-
status: 'ready' | 'unauthorized';
|
|
3341
|
-
/** The Stripe account ID associated with the connected Stripe account. */
|
|
3342
|
-
accountId: string;
|
|
3343
|
-
/** Indicates whether the app is connected to a live Stripe account. */
|
|
3344
|
-
livemode: boolean;
|
|
3345
|
-
/** The masked Stripe API key that only exposes the first and last few characters. */
|
|
3346
|
-
maskedApiKey: string;
|
|
3347
|
-
}
|
|
3348
|
-
/** Sandbox app can be used for testing billing features. */
|
|
3349
|
-
export interface AppSandbox {
|
|
3350
|
-
id: string;
|
|
3351
|
-
/**
|
|
3352
|
-
* Display name of the resource.
|
|
3353
|
-
*
|
|
3354
|
-
* Between 1 and 256 characters.
|
|
3355
|
-
*/
|
|
3356
|
-
name: string;
|
|
3357
|
-
/**
|
|
3358
|
-
* Optional description of the resource.
|
|
3359
|
-
*
|
|
3360
|
-
* Maximum 1024 characters.
|
|
3361
|
-
*/
|
|
3362
|
-
description?: string;
|
|
3363
|
-
labels?: Labels;
|
|
3364
|
-
/** An ISO-8601 timestamp representation of entity creation date. */
|
|
3365
|
-
createdAt: Date;
|
|
3366
|
-
/** An ISO-8601 timestamp representation of entity last update date. */
|
|
3367
|
-
updatedAt: Date;
|
|
3368
|
-
/** An ISO-8601 timestamp representation of entity deletion date. */
|
|
3369
|
-
deletedAt?: Date;
|
|
3370
|
-
/** The app type. */
|
|
3371
|
-
type: 'sandbox';
|
|
3372
|
-
/** The app catalog definition that this installed app is based on. */
|
|
3373
|
-
definition: AppCatalogItem;
|
|
3374
|
-
/** Status of the app connection. */
|
|
3375
|
-
status: 'ready' | 'unauthorized';
|
|
3376
|
-
}
|
|
3377
|
-
/**
|
|
3378
|
-
* External Invoicing app enables integration with third-party invoicing or payment
|
|
3379
|
-
* system.
|
|
3380
|
-
*
|
|
3381
|
-
* The app supports a bi-directional synchronization pattern where OpenMeter
|
|
3382
|
-
* Billing manages the invoice lifecycle while the external system handles invoice
|
|
3383
|
-
* presentation and payment collection.
|
|
3384
|
-
*
|
|
3385
|
-
* Integration workflow:
|
|
3386
|
-
*
|
|
3387
|
-
* 1. The billing system creates invoices and transitions them through lifecycle
|
|
3388
|
-
* states (draft → issuing → issued)
|
|
3389
|
-
* 2. The integration receives webhook notifications about invoice state changes
|
|
3390
|
-
* 3. The integration calls back to provide external system IDs and metadata
|
|
3391
|
-
* 4. The integration reports payment events back via the payment status API
|
|
3392
|
-
*
|
|
3393
|
-
* State synchronization is controlled by hooks that pause invoice progression
|
|
3394
|
-
* until the external system confirms synchronization via API callbacks.
|
|
3395
|
-
*/
|
|
3396
|
-
export interface AppExternalInvoicing {
|
|
3397
|
-
id: string;
|
|
3398
|
-
/**
|
|
3399
|
-
* Display name of the resource.
|
|
3400
|
-
*
|
|
3401
|
-
* Between 1 and 256 characters.
|
|
3402
|
-
*/
|
|
3403
|
-
name: string;
|
|
3404
|
-
/**
|
|
3405
|
-
* Optional description of the resource.
|
|
3406
|
-
*
|
|
3407
|
-
* Maximum 1024 characters.
|
|
3408
|
-
*/
|
|
3409
|
-
description?: string;
|
|
3410
|
-
labels?: Labels;
|
|
3411
|
-
/** An ISO-8601 timestamp representation of entity creation date. */
|
|
3412
|
-
createdAt: Date;
|
|
3413
|
-
/** An ISO-8601 timestamp representation of entity last update date. */
|
|
3414
|
-
updatedAt: Date;
|
|
3415
|
-
/** An ISO-8601 timestamp representation of entity deletion date. */
|
|
3416
|
-
deletedAt?: Date;
|
|
3417
|
-
/** The app type. */
|
|
3418
|
-
type: 'external_invoicing';
|
|
3419
|
-
/** The app catalog definition that this installed app is based on. */
|
|
3420
|
-
definition: AppCatalogItem;
|
|
3421
|
-
/** Status of the app connection. */
|
|
3422
|
-
status: 'ready' | 'unauthorized';
|
|
3423
|
-
/**
|
|
3424
|
-
* Enable draft synchronization hook.
|
|
3425
|
-
*
|
|
3426
|
-
* When enabled, invoices will pause at the draft state and wait for the
|
|
3427
|
-
* integration to call the draft synchronized endpoint before progressing to the
|
|
3428
|
-
* issuing state. This allows the external system to validate and prepare the
|
|
3429
|
-
* invoice data.
|
|
3430
|
-
*
|
|
3431
|
-
* When disabled, invoices automatically progress through the draft state based on
|
|
3432
|
-
* the configured workflow timing.
|
|
3433
|
-
*/
|
|
3434
|
-
enableDraftSyncHook: boolean;
|
|
3435
|
-
/**
|
|
3436
|
-
* Enable issuing synchronization hook.
|
|
3437
|
-
*
|
|
3438
|
-
* When enabled, invoices will pause at the issuing state and wait for the
|
|
3439
|
-
* integration to call the issuing synchronized endpoint before progressing to the
|
|
3440
|
-
* issued state. This ensures the external invoicing system has successfully
|
|
3441
|
-
* created and finalized the invoice before it is marked as issued.
|
|
3442
|
-
*
|
|
3443
|
-
* When disabled, invoices automatically progress through the issuing state and are
|
|
3444
|
-
* immediately marked as issued.
|
|
3445
|
-
*/
|
|
3446
|
-
enableIssuingSyncHook: boolean;
|
|
3447
|
-
}
|
|
3448
3044
|
/** TaxCode create request. */
|
|
3449
3045
|
export interface CreateTaxCodeRequest {
|
|
3450
3046
|
/**
|
|
@@ -3508,6 +3104,24 @@ export interface UpsertTaxCodeRequest {
|
|
|
3508
3104
|
/** Mapping of app types to tax codes. */
|
|
3509
3105
|
appMappings: TaxCodeAppMapping[];
|
|
3510
3106
|
}
|
|
3107
|
+
/**
|
|
3108
|
+
* Available apps for billing integrations to connect with third-party services.
|
|
3109
|
+
* Apps can have various capabilities like syncing data from or to external
|
|
3110
|
+
* systems, integrating with third-party services for tax calculation, delivery of
|
|
3111
|
+
* invoices, collection of payments, etc.
|
|
3112
|
+
*/
|
|
3113
|
+
export interface AppCatalogItem {
|
|
3114
|
+
/** Type of the app. */
|
|
3115
|
+
type: 'sandbox' | 'stripe' | 'external_invoicing';
|
|
3116
|
+
/** Name of the app. */
|
|
3117
|
+
name: string;
|
|
3118
|
+
/** Description of the app. */
|
|
3119
|
+
description: string;
|
|
3120
|
+
/** Capabilities of the app. */
|
|
3121
|
+
capabilities: AppCapability[];
|
|
3122
|
+
/** Available install methods of the app. */
|
|
3123
|
+
installMethods: ('with_oauth2' | 'with_api_key' | 'no_credentials_required')[];
|
|
3124
|
+
}
|
|
3511
3125
|
/**
|
|
3512
3126
|
* Invoice-level snapshot of the workflow configuration.
|
|
3513
3127
|
*
|
|
@@ -3519,7 +3133,7 @@ export interface InvoiceWorkflow {
|
|
|
3519
3133
|
/** Invoicing settings for this invoice. */
|
|
3520
3134
|
invoicing?: InvoiceWorkflowInvoicingSettings;
|
|
3521
3135
|
/** Payment settings for this invoice. */
|
|
3522
|
-
payment?:
|
|
3136
|
+
payment?: WorkflowPaymentSettings;
|
|
3523
3137
|
}
|
|
3524
3138
|
/** Detailed status information for a standard invoice. */
|
|
3525
3139
|
export interface InvoiceStatusDetails {
|
|
@@ -3553,7 +3167,7 @@ export interface UpdateBillingInvoiceWorkflow {
|
|
|
3553
3167
|
/** Invoicing settings for this invoice. */
|
|
3554
3168
|
invoicing?: UpdateBillingInvoiceWorkflowInvoicingSettings;
|
|
3555
3169
|
/** Payment settings for this invoice. */
|
|
3556
|
-
payment?:
|
|
3170
|
+
payment?: UpdateBillingWorkflowPaymentSettings;
|
|
3557
3171
|
}
|
|
3558
3172
|
/** Access status for a single feature. */
|
|
3559
3173
|
export interface GovernanceFeatureAccess {
|
|
@@ -3689,7 +3303,7 @@ export interface CreateCreditGrantRequest {
|
|
|
3689
3303
|
/** Funding method of the grant. */
|
|
3690
3304
|
fundingMethod: 'none' | 'invoice' | 'external';
|
|
3691
3305
|
/** The currency of the granted credits. */
|
|
3692
|
-
currency:
|
|
3306
|
+
currency: CreateCurrencyCode;
|
|
3693
3307
|
/** Granted credit amount. */
|
|
3694
3308
|
amount: string;
|
|
3695
3309
|
/** Present when a funding workflow applies (funding_method is not `none`). */
|
|
@@ -3721,8 +3335,9 @@ export interface CreateCreditGrantRequest {
|
|
|
3721
3335
|
/**
|
|
3722
3336
|
* Idempotency key for the credit grant creation request.
|
|
3723
3337
|
*
|
|
3724
|
-
*
|
|
3725
|
-
* creating a duplicate grant, which makes create requests
|
|
3338
|
+
* Unique per customer: reusing the same key for the same customer returns an HTTP
|
|
3339
|
+
* 409 Conflict instead of creating a duplicate grant, which makes create requests
|
|
3340
|
+
* safe to retry. The same key may be reused across different customers.
|
|
3726
3341
|
*/
|
|
3727
3342
|
key?: string;
|
|
3728
3343
|
}
|
|
@@ -3756,7 +3371,7 @@ export interface CreditGrant {
|
|
|
3756
3371
|
/** Funding method of the grant. */
|
|
3757
3372
|
fundingMethod: 'none' | 'invoice' | 'external';
|
|
3758
3373
|
/** The currency of the granted credits. */
|
|
3759
|
-
currency:
|
|
3374
|
+
currency: BillingCurrencyCode;
|
|
3760
3375
|
/** Granted credit amount. */
|
|
3761
3376
|
amount: string;
|
|
3762
3377
|
/** Present when a funding workflow applies (funding_method is not `none`). */
|
|
@@ -3784,8 +3399,9 @@ export interface CreditGrant {
|
|
|
3784
3399
|
/**
|
|
3785
3400
|
* Idempotency key for the credit grant creation request.
|
|
3786
3401
|
*
|
|
3787
|
-
*
|
|
3788
|
-
* creating a duplicate grant, which makes create requests
|
|
3402
|
+
* Unique per customer: reusing the same key for the same customer returns an HTTP
|
|
3403
|
+
* 409 Conflict instead of creating a duplicate grant, which makes create requests
|
|
3404
|
+
* safe to retry. The same key may be reused across different customers.
|
|
3789
3405
|
*/
|
|
3790
3406
|
key?: string;
|
|
3791
3407
|
/**
|
|
@@ -3829,7 +3445,7 @@ export interface CreateChargeFlatFeeRequest {
|
|
|
3829
3445
|
/** Tax configuration of the charge. */
|
|
3830
3446
|
taxConfig?: TaxConfig;
|
|
3831
3447
|
/** Payment term of the flat fee charge. */
|
|
3832
|
-
paymentTerm:
|
|
3448
|
+
paymentTerm: PricePaymentTerm;
|
|
3833
3449
|
/** The discounts applied to the charge. */
|
|
3834
3450
|
discounts?: ChargeFlatFeeDiscounts;
|
|
3835
3451
|
/** The feature associated with the charge, when applicable. */
|
|
@@ -3878,7 +3494,7 @@ export interface IngestedEventPaginatedResponse {
|
|
|
3878
3494
|
meta: CursorMeta;
|
|
3879
3495
|
}
|
|
3880
3496
|
/** The list of parameters that failed validation. */
|
|
3881
|
-
export type InvalidParameters =
|
|
3497
|
+
export type InvalidParameters = InvalidParameter[];
|
|
3882
3498
|
/** A meter query request. */
|
|
3883
3499
|
export interface MeterQueryRequest {
|
|
3884
3500
|
/** The start of the period the usage is queried from. */
|
|
@@ -3889,7 +3505,7 @@ export interface MeterQueryRequest {
|
|
|
3889
3505
|
* The size of the time buckets to group the usage into. If not specified, the
|
|
3890
3506
|
* usage is aggregated over the entire period.
|
|
3891
3507
|
*/
|
|
3892
|
-
granularity?:
|
|
3508
|
+
granularity?: MeterQueryGranularity;
|
|
3893
3509
|
/**
|
|
3894
3510
|
* The value is the name of the time zone as defined in the IANA Time Zone Database
|
|
3895
3511
|
* (http://www.iana.org/time-zones). The time zone is used to determine the start
|
|
@@ -4060,6 +3676,146 @@ export interface TaxCodePagePaginatedResponse {
|
|
|
4060
3676
|
data: TaxCode[];
|
|
4061
3677
|
meta: PaginatedMeta;
|
|
4062
3678
|
}
|
|
3679
|
+
/** Stripe app. */
|
|
3680
|
+
export interface AppStripe {
|
|
3681
|
+
id: string;
|
|
3682
|
+
/**
|
|
3683
|
+
* Display name of the resource.
|
|
3684
|
+
*
|
|
3685
|
+
* Between 1 and 256 characters.
|
|
3686
|
+
*/
|
|
3687
|
+
name: string;
|
|
3688
|
+
/**
|
|
3689
|
+
* Optional description of the resource.
|
|
3690
|
+
*
|
|
3691
|
+
* Maximum 1024 characters.
|
|
3692
|
+
*/
|
|
3693
|
+
description?: string;
|
|
3694
|
+
labels?: Labels;
|
|
3695
|
+
/** An ISO-8601 timestamp representation of entity creation date. */
|
|
3696
|
+
createdAt: Date;
|
|
3697
|
+
/** An ISO-8601 timestamp representation of entity last update date. */
|
|
3698
|
+
updatedAt: Date;
|
|
3699
|
+
/** An ISO-8601 timestamp representation of entity deletion date. */
|
|
3700
|
+
deletedAt?: Date;
|
|
3701
|
+
/** The app type. */
|
|
3702
|
+
type: 'stripe';
|
|
3703
|
+
/** The app catalog definition that this installed app is based on. */
|
|
3704
|
+
definition: AppCatalogItem;
|
|
3705
|
+
/** Status of the app connection. */
|
|
3706
|
+
status: 'ready' | 'unauthorized';
|
|
3707
|
+
/** The Stripe account ID associated with the connected Stripe account. */
|
|
3708
|
+
accountId: string;
|
|
3709
|
+
/** Indicates whether the app is connected to a live Stripe account. */
|
|
3710
|
+
livemode: boolean;
|
|
3711
|
+
/** The masked Stripe API key that only exposes the first and last few characters. */
|
|
3712
|
+
maskedApiKey: string;
|
|
3713
|
+
}
|
|
3714
|
+
/** Sandbox app can be used for testing billing features. */
|
|
3715
|
+
export interface AppSandbox {
|
|
3716
|
+
id: string;
|
|
3717
|
+
/**
|
|
3718
|
+
* Display name of the resource.
|
|
3719
|
+
*
|
|
3720
|
+
* Between 1 and 256 characters.
|
|
3721
|
+
*/
|
|
3722
|
+
name: string;
|
|
3723
|
+
/**
|
|
3724
|
+
* Optional description of the resource.
|
|
3725
|
+
*
|
|
3726
|
+
* Maximum 1024 characters.
|
|
3727
|
+
*/
|
|
3728
|
+
description?: string;
|
|
3729
|
+
labels?: Labels;
|
|
3730
|
+
/** An ISO-8601 timestamp representation of entity creation date. */
|
|
3731
|
+
createdAt: Date;
|
|
3732
|
+
/** An ISO-8601 timestamp representation of entity last update date. */
|
|
3733
|
+
updatedAt: Date;
|
|
3734
|
+
/** An ISO-8601 timestamp representation of entity deletion date. */
|
|
3735
|
+
deletedAt?: Date;
|
|
3736
|
+
/** The app type. */
|
|
3737
|
+
type: 'sandbox';
|
|
3738
|
+
/** The app catalog definition that this installed app is based on. */
|
|
3739
|
+
definition: AppCatalogItem;
|
|
3740
|
+
/** Status of the app connection. */
|
|
3741
|
+
status: 'ready' | 'unauthorized';
|
|
3742
|
+
}
|
|
3743
|
+
/**
|
|
3744
|
+
* External Invoicing app enables integration with third-party invoicing or payment
|
|
3745
|
+
* system.
|
|
3746
|
+
*
|
|
3747
|
+
* The app supports a bi-directional synchronization pattern where OpenMeter
|
|
3748
|
+
* Billing manages the invoice lifecycle while the external system handles invoice
|
|
3749
|
+
* presentation and payment collection.
|
|
3750
|
+
*
|
|
3751
|
+
* Integration workflow:
|
|
3752
|
+
*
|
|
3753
|
+
* 1. The billing system creates invoices and transitions them through lifecycle
|
|
3754
|
+
* states (draft → issuing → issued)
|
|
3755
|
+
* 2. The integration receives webhook notifications about invoice state changes
|
|
3756
|
+
* 3. The integration calls back to provide external system IDs and metadata
|
|
3757
|
+
* 4. The integration reports payment events back via the payment status API
|
|
3758
|
+
*
|
|
3759
|
+
* State synchronization is controlled by hooks that pause invoice progression
|
|
3760
|
+
* until the external system confirms synchronization via API callbacks.
|
|
3761
|
+
*/
|
|
3762
|
+
export interface AppExternalInvoicing {
|
|
3763
|
+
id: string;
|
|
3764
|
+
/**
|
|
3765
|
+
* Display name of the resource.
|
|
3766
|
+
*
|
|
3767
|
+
* Between 1 and 256 characters.
|
|
3768
|
+
*/
|
|
3769
|
+
name: string;
|
|
3770
|
+
/**
|
|
3771
|
+
* Optional description of the resource.
|
|
3772
|
+
*
|
|
3773
|
+
* Maximum 1024 characters.
|
|
3774
|
+
*/
|
|
3775
|
+
description?: string;
|
|
3776
|
+
labels?: Labels;
|
|
3777
|
+
/** An ISO-8601 timestamp representation of entity creation date. */
|
|
3778
|
+
createdAt: Date;
|
|
3779
|
+
/** An ISO-8601 timestamp representation of entity last update date. */
|
|
3780
|
+
updatedAt: Date;
|
|
3781
|
+
/** An ISO-8601 timestamp representation of entity deletion date. */
|
|
3782
|
+
deletedAt?: Date;
|
|
3783
|
+
/** The app type. */
|
|
3784
|
+
type: 'external_invoicing';
|
|
3785
|
+
/** The app catalog definition that this installed app is based on. */
|
|
3786
|
+
definition: AppCatalogItem;
|
|
3787
|
+
/** Status of the app connection. */
|
|
3788
|
+
status: 'ready' | 'unauthorized';
|
|
3789
|
+
/**
|
|
3790
|
+
* Enable draft synchronization hook.
|
|
3791
|
+
*
|
|
3792
|
+
* When enabled, invoices will pause at the draft state and wait for the
|
|
3793
|
+
* integration to call the draft synchronized endpoint before progressing to the
|
|
3794
|
+
* issuing state. This allows the external system to validate and prepare the
|
|
3795
|
+
* invoice data.
|
|
3796
|
+
*
|
|
3797
|
+
* When disabled, invoices automatically progress through the draft state based on
|
|
3798
|
+
* the configured workflow timing.
|
|
3799
|
+
*/
|
|
3800
|
+
enableDraftSyncHook: boolean;
|
|
3801
|
+
/**
|
|
3802
|
+
* Enable issuing synchronization hook.
|
|
3803
|
+
*
|
|
3804
|
+
* When enabled, invoices will pause at the issuing state and wait for the
|
|
3805
|
+
* integration to call the issuing synchronized endpoint before progressing to the
|
|
3806
|
+
* issued state. This ensures the external invoicing system has successfully
|
|
3807
|
+
* created and finalized the invoice before it is marked as issued.
|
|
3808
|
+
*
|
|
3809
|
+
* When disabled, invoices automatically progress through the issuing state and are
|
|
3810
|
+
* immediately marked as issued.
|
|
3811
|
+
*/
|
|
3812
|
+
enableIssuingSyncHook: boolean;
|
|
3813
|
+
}
|
|
3814
|
+
/** Page paginated response. */
|
|
3815
|
+
export interface AppCatalogItemPagePaginatedResponse {
|
|
3816
|
+
data: AppCatalogItem[];
|
|
3817
|
+
meta: PaginatedMeta;
|
|
3818
|
+
}
|
|
4063
3819
|
/** Snapshot of the billing workflow configuration captured at invoice creation. */
|
|
4064
3820
|
export interface InvoiceWorkflowSettings {
|
|
4065
3821
|
/** The apps that will be used to orchestrate the invoice's workflow. */
|
|
@@ -4132,11 +3888,6 @@ export interface UpdateInvoiceWorkflowSettings {
|
|
|
4132
3888
|
*/
|
|
4133
3889
|
workflow: UpdateBillingInvoiceWorkflow;
|
|
4134
3890
|
}
|
|
4135
|
-
/** Page paginated response. */
|
|
4136
|
-
export interface CurrencyPagePaginatedResponse {
|
|
4137
|
-
data: (CurrencyFiat | CurrencyCustom)[];
|
|
4138
|
-
meta: PaginatedMeta;
|
|
4139
|
-
}
|
|
4140
3891
|
/** Access evaluation result for a single resolved customer. */
|
|
4141
3892
|
export interface GovernanceQueryResult {
|
|
4142
3893
|
/**
|
|
@@ -4196,7 +3947,7 @@ export interface Feature {
|
|
|
4196
3947
|
* "llm" to look up cost from the LLM cost database based on meter group-by
|
|
4197
3948
|
* properties.
|
|
4198
3949
|
*/
|
|
4199
|
-
unitCost?:
|
|
3950
|
+
unitCost?: FeatureUnitCost;
|
|
4200
3951
|
}
|
|
4201
3952
|
/** Feature create request. */
|
|
4202
3953
|
export interface CreateFeatureRequest {
|
|
@@ -4224,7 +3975,7 @@ export interface CreateFeatureRequest {
|
|
|
4224
3975
|
* "llm" to look up cost from the LLM cost database based on meter group-by
|
|
4225
3976
|
* properties.
|
|
4226
3977
|
*/
|
|
4227
|
-
unitCost?:
|
|
3978
|
+
unitCost?: FeatureUnitCost;
|
|
4228
3979
|
}
|
|
4229
3980
|
/**
|
|
4230
3981
|
* Request body for updating a feature. Currently only the unit_cost field can be
|
|
@@ -4237,17 +3988,22 @@ export interface UpdateFeatureRequest {
|
|
|
4237
3988
|
* properties. Set to `null` to clear the existing unit cost; omit to leave it
|
|
4238
3989
|
* unchanged.
|
|
4239
3990
|
*/
|
|
4240
|
-
unitCost?:
|
|
3991
|
+
unitCost?: FeatureUnitCost | null;
|
|
4241
3992
|
}
|
|
4242
3993
|
/** Page paginated response. */
|
|
4243
3994
|
export interface CreditGrantPagePaginatedResponse {
|
|
4244
3995
|
data: CreditGrant[];
|
|
4245
3996
|
meta: PaginatedMeta;
|
|
4246
3997
|
}
|
|
3998
|
+
/** Page paginated response. */
|
|
3999
|
+
export interface CurrencyPagePaginatedResponse {
|
|
4000
|
+
data: Currency[];
|
|
4001
|
+
meta: PaginatedMeta;
|
|
4002
|
+
}
|
|
4247
4003
|
/** Bad Request. */
|
|
4248
4004
|
export interface BadRequest extends BaseError {
|
|
4249
4005
|
/** The list of parameters that failed validation. */
|
|
4250
|
-
invalidParameters:
|
|
4006
|
+
invalidParameters: InvalidParameter[];
|
|
4251
4007
|
}
|
|
4252
4008
|
/**
|
|
4253
4009
|
* Base fields shared by all invoice types.
|
|
@@ -4322,7 +4078,7 @@ export interface CustomerStripeCreateCheckoutSessionRequest {
|
|
|
4322
4078
|
*/
|
|
4323
4079
|
export interface WorkflowCollectionSettings {
|
|
4324
4080
|
/** The alignment for collecting the pending line items into an invoice. */
|
|
4325
|
-
alignment:
|
|
4081
|
+
alignment: WorkflowCollectionAlignment;
|
|
4326
4082
|
/**
|
|
4327
4083
|
* This grace period can be used to delay the collection of the pending line items
|
|
4328
4084
|
* specified in alignment.
|
|
@@ -4332,20 +4088,6 @@ export interface WorkflowCollectionSettings {
|
|
|
4332
4088
|
*/
|
|
4333
4089
|
interval: string;
|
|
4334
4090
|
}
|
|
4335
|
-
/** Page paginated response. */
|
|
4336
|
-
export interface AppPagePaginatedResponse {
|
|
4337
|
-
data: (AppStripe | AppSandbox | AppExternalInvoicing)[];
|
|
4338
|
-
meta: PaginatedMeta;
|
|
4339
|
-
}
|
|
4340
|
-
/** Applications used by a billing profile. */
|
|
4341
|
-
export interface ProfileApps {
|
|
4342
|
-
/** The tax app used for this workflow. */
|
|
4343
|
-
tax: AppStripe | AppSandbox | AppExternalInvoicing;
|
|
4344
|
-
/** The invoicing app used for this workflow. */
|
|
4345
|
-
invoicing: AppStripe | AppSandbox | AppExternalInvoicing;
|
|
4346
|
-
/** The payment app used for this workflow. */
|
|
4347
|
-
payment: AppStripe | AppSandbox | AppExternalInvoicing;
|
|
4348
|
-
}
|
|
4349
4091
|
/** Response of the governance query. */
|
|
4350
4092
|
export interface GovernanceQueryResponse {
|
|
4351
4093
|
/** Access evaluation results, one entry per resolved customer. */
|
|
@@ -4418,7 +4160,7 @@ export interface ChargeFlatFee {
|
|
|
4418
4160
|
/** Tax configuration of the charge. */
|
|
4419
4161
|
taxConfig?: TaxConfig;
|
|
4420
4162
|
/** Payment term of the flat fee charge. */
|
|
4421
|
-
paymentTerm:
|
|
4163
|
+
paymentTerm: PricePaymentTerm;
|
|
4422
4164
|
/** The discounts applied to the charge. */
|
|
4423
4165
|
discounts?: ChargeFlatFeeDiscounts;
|
|
4424
4166
|
/** The feature associated with the charge, when applicable. */
|
|
@@ -4428,7 +4170,7 @@ export interface ChargeFlatFee {
|
|
|
4428
4170
|
/** The amount after proration of the charge. */
|
|
4429
4171
|
amountAfterProration: CurrencyAmount;
|
|
4430
4172
|
/** The price of the charge. */
|
|
4431
|
-
price:
|
|
4173
|
+
price: Price;
|
|
4432
4174
|
/**
|
|
4433
4175
|
* Current intent from the system lifecycle controller for a charge that has an
|
|
4434
4176
|
* active manual override. The top-level charge fields remain the effective
|
|
@@ -4465,7 +4207,7 @@ export interface ChargeUsageBasedSystemIntent {
|
|
|
4465
4207
|
/** Discounts applied to the usage-based charge. */
|
|
4466
4208
|
discounts?: RateCardDiscounts;
|
|
4467
4209
|
/** The price of the charge. */
|
|
4468
|
-
price:
|
|
4210
|
+
price: Price;
|
|
4469
4211
|
/**
|
|
4470
4212
|
* The timestamp when the system lifecycle controller intent was deleted. The
|
|
4471
4213
|
* effective charge can remain visible while a manual override is active.
|
|
@@ -4506,7 +4248,7 @@ export interface CreateChargeUsageBasedRequest {
|
|
|
4506
4248
|
/** The feature associated with the charge. */
|
|
4507
4249
|
featureKey: string;
|
|
4508
4250
|
/** The price of the charge. */
|
|
4509
|
-
price:
|
|
4251
|
+
price: Price;
|
|
4510
4252
|
/** The full, unprorated service period of the charge. */
|
|
4511
4253
|
fullServicePeriod?: ClosedPeriod;
|
|
4512
4254
|
/** The billing period the charge belongs to. */
|
|
@@ -4530,13 +4272,18 @@ export interface RateCard {
|
|
|
4530
4272
|
key: string;
|
|
4531
4273
|
/** The feature associated with the rate card. */
|
|
4532
4274
|
feature?: FeatureReference;
|
|
4275
|
+
/**
|
|
4276
|
+
* Overrides the containing plan or add-on currency for this rate card. When
|
|
4277
|
+
* omitted, the containing resource currency applies.
|
|
4278
|
+
*/
|
|
4279
|
+
currency?: BillingCurrencyCode;
|
|
4533
4280
|
/**
|
|
4534
4281
|
* The billing cadence of the rate card. When null, the charge is one-time
|
|
4535
4282
|
* (non-recurring). Only valid for flat prices.
|
|
4536
4283
|
*/
|
|
4537
4284
|
billingCadence?: string;
|
|
4538
4285
|
/** The price of the rate card. */
|
|
4539
|
-
price:
|
|
4286
|
+
price: Price;
|
|
4540
4287
|
/**
|
|
4541
4288
|
* Unit conversion configuration for the rate card.
|
|
4542
4289
|
*
|
|
@@ -4552,7 +4299,7 @@ export interface RateCard {
|
|
|
4552
4299
|
* The payment term of the rate card. In advance payment term can only be used for
|
|
4553
4300
|
* flat prices.
|
|
4554
4301
|
*/
|
|
4555
|
-
paymentTerm:
|
|
4302
|
+
paymentTerm: PricePaymentTerm;
|
|
4556
4303
|
/**
|
|
4557
4304
|
* Spend commitments for this rate card. Only applicable to usage-based prices
|
|
4558
4305
|
* (unit, graduated, volume).
|
|
@@ -4566,23 +4313,28 @@ export interface RateCard {
|
|
|
4566
4313
|
* The entitlement template granted to subscribers of a plan or addon containing
|
|
4567
4314
|
* this rate card. Requires `feature` to be set.
|
|
4568
4315
|
*/
|
|
4569
|
-
entitlement?:
|
|
4316
|
+
entitlement?: RateCardEntitlement;
|
|
4570
4317
|
}
|
|
4571
4318
|
/** Rate card configuration snapshot for a usage-based invoice line. */
|
|
4572
4319
|
export interface InvoiceLineRateCard {
|
|
4573
4320
|
/** The price definition used to calculate charges for this line. */
|
|
4574
|
-
price:
|
|
4321
|
+
price: Price;
|
|
4575
4322
|
/** Tax configuration snapshot for this line. */
|
|
4576
4323
|
taxConfig?: RateCardTaxConfig;
|
|
4577
4324
|
/** The feature key associated with this line's rate card. */
|
|
4578
4325
|
featureKey?: string;
|
|
4579
4326
|
/** Discount configuration from the rate card. */
|
|
4580
4327
|
discounts?: RateCardDiscounts;
|
|
4328
|
+
/**
|
|
4329
|
+
* Unit config snapshot applied when this line was billed, converting the raw
|
|
4330
|
+
* metered quantity into the billed quantity. Frozen at billing time; read-only.
|
|
4331
|
+
*/
|
|
4332
|
+
unitConfig?: UnitConfig;
|
|
4581
4333
|
}
|
|
4582
4334
|
/** Rate card configuration snapshot for a usage-based invoice line. */
|
|
4583
4335
|
export interface UpdateInvoiceLineRateCard {
|
|
4584
4336
|
/** The price definition used to calculate charges for this line. */
|
|
4585
|
-
price:
|
|
4337
|
+
price: UpdatePrice;
|
|
4586
4338
|
/** Tax configuration snapshot for this line. */
|
|
4587
4339
|
taxConfig?: UpdateRateCardTaxConfig;
|
|
4588
4340
|
/** The feature key associated with this line's rate card. */
|
|
@@ -4602,10 +4354,29 @@ export interface Workflow {
|
|
|
4602
4354
|
/** The invoicing settings for this workflow */
|
|
4603
4355
|
invoicing?: WorkflowInvoicingSettings;
|
|
4604
4356
|
/** The payment settings for this workflow */
|
|
4605
|
-
payment?:
|
|
4357
|
+
payment?: WorkflowPaymentSettings;
|
|
4606
4358
|
/** The tax settings for this workflow */
|
|
4607
4359
|
tax?: WorkflowTaxSettings;
|
|
4608
4360
|
}
|
|
4361
|
+
/** Page paginated response. */
|
|
4362
|
+
export interface AppPagePaginatedResponse {
|
|
4363
|
+
data: App[];
|
|
4364
|
+
meta: PaginatedMeta;
|
|
4365
|
+
}
|
|
4366
|
+
/** Response of the app install. */
|
|
4367
|
+
export interface BillingInstallAppResponse {
|
|
4368
|
+
app: App;
|
|
4369
|
+
defaultForCapabilityTypes: ('report_usage' | 'report_events' | 'calculate_tax' | 'invoice_customers' | 'collect_payments')[];
|
|
4370
|
+
}
|
|
4371
|
+
/** Applications used by a billing profile. */
|
|
4372
|
+
export interface ProfileApps {
|
|
4373
|
+
/** The tax app used for this workflow. */
|
|
4374
|
+
tax: App;
|
|
4375
|
+
/** The invoicing app used for this workflow. */
|
|
4376
|
+
invoicing: App;
|
|
4377
|
+
/** The payment app used for this workflow. */
|
|
4378
|
+
payment: App;
|
|
4379
|
+
}
|
|
4609
4380
|
/** A usage-based charge for a customer. */
|
|
4610
4381
|
export interface ChargeUsageBased {
|
|
4611
4382
|
id: string;
|
|
@@ -4672,7 +4443,7 @@ export interface ChargeUsageBased {
|
|
|
4672
4443
|
/** Aggregated booked and realtime totals for the charge. */
|
|
4673
4444
|
totals: ChargeTotals;
|
|
4674
4445
|
/** The price of the charge. */
|
|
4675
|
-
price:
|
|
4446
|
+
price: Price;
|
|
4676
4447
|
/**
|
|
4677
4448
|
* Current intent from the system lifecycle controller for a charge that has an
|
|
4678
4449
|
* active manual override. The top-level charge fields remain the effective
|
|
@@ -4750,7 +4521,7 @@ export interface Addon {
|
|
|
4750
4521
|
/** The InstanceType of the add-ons. Can be "single" or "multiple". */
|
|
4751
4522
|
instanceType: 'single' | 'multiple';
|
|
4752
4523
|
/** The currency code of the add-on. */
|
|
4753
|
-
currency:
|
|
4524
|
+
currency: BillingCurrencyCode;
|
|
4754
4525
|
/**
|
|
4755
4526
|
* The date and time when the add-on becomes effective. When not specified, the
|
|
4756
4527
|
* add-on is a draft.
|
|
@@ -4799,7 +4570,7 @@ export interface CreateAddonRequest {
|
|
|
4799
4570
|
/** The InstanceType of the add-ons. Can be "single" or "multiple". */
|
|
4800
4571
|
instanceType: 'single' | 'multiple';
|
|
4801
4572
|
/** The currency code of the add-on. */
|
|
4802
|
-
currency:
|
|
4573
|
+
currency: BillingCurrencyCode;
|
|
4803
4574
|
/** The rate cards of the add-on. */
|
|
4804
4575
|
rateCards: RateCard[];
|
|
4805
4576
|
}
|
|
@@ -5099,7 +4870,7 @@ export interface Plan {
|
|
|
5099
4870
|
*/
|
|
5100
4871
|
version: number;
|
|
5101
4872
|
/** The currency code of the plan. */
|
|
5102
|
-
currency:
|
|
4873
|
+
currency: BillingCurrencyCode;
|
|
5103
4874
|
/** The billing cadence for subscriptions using this plan. */
|
|
5104
4875
|
billingCadence: string;
|
|
5105
4876
|
/** Whether pro-rating is enabled for this plan. */
|
|
@@ -5167,7 +4938,7 @@ export interface CreatePlanRequest {
|
|
|
5167
4938
|
*/
|
|
5168
4939
|
key: string;
|
|
5169
4940
|
/** The currency code of the plan. */
|
|
5170
|
-
currency:
|
|
4941
|
+
currency: BillingCurrencyCode;
|
|
5171
4942
|
/** The billing cadence for subscriptions using this plan. */
|
|
5172
4943
|
billingCadence: string;
|
|
5173
4944
|
/** Whether pro-rating is enabled for this plan. */
|
|
@@ -5213,7 +4984,7 @@ export interface ProfilePagePaginatedResponse {
|
|
|
5213
4984
|
}
|
|
5214
4985
|
/** Page paginated response. */
|
|
5215
4986
|
export interface ChargePagePaginatedResponse {
|
|
5216
|
-
data:
|
|
4987
|
+
data: Charge[];
|
|
5217
4988
|
meta: PaginatedMeta;
|
|
5218
4989
|
}
|
|
5219
4990
|
/** Page paginated response. */
|
|
@@ -5305,7 +5076,7 @@ export interface InvoiceStandard {
|
|
|
5305
5076
|
* from the update request are deleted. Detailed (child) lines are always computed
|
|
5306
5077
|
* and cannot be edited directly.
|
|
5307
5078
|
*/
|
|
5308
|
-
lines?:
|
|
5079
|
+
lines?: InvoiceLine[];
|
|
5309
5080
|
}
|
|
5310
5081
|
/** InvoiceStandard update request. */
|
|
5311
5082
|
export interface UpdateInvoiceStandardRequest {
|
|
@@ -5336,19 +5107,156 @@ export interface UpdateInvoiceStandardRequest {
|
|
|
5336
5107
|
* from the update request are deleted. Detailed (child) lines are always computed
|
|
5337
5108
|
* and cannot be edited directly.
|
|
5338
5109
|
*/
|
|
5339
|
-
lines?:
|
|
5110
|
+
lines?: UpdateInvoiceLine[];
|
|
5340
5111
|
}
|
|
5341
5112
|
/** Page paginated response. */
|
|
5342
5113
|
export interface InvoicePagePaginatedResponse {
|
|
5343
|
-
data:
|
|
5114
|
+
data: Invoice[];
|
|
5344
5115
|
meta: PaginatedMeta;
|
|
5345
5116
|
}
|
|
5117
|
+
/**
|
|
5118
|
+
* Filters on the given string field value by either exact or fuzzy match. All
|
|
5119
|
+
* properties are optional; provide exactly one to specify the comparison.
|
|
5120
|
+
*/
|
|
5121
|
+
export type StringFieldFilter = string | {
|
|
5122
|
+
eq?: string;
|
|
5123
|
+
neq?: string;
|
|
5124
|
+
contains?: string;
|
|
5125
|
+
ocontains?: string[];
|
|
5126
|
+
oeq?: string[];
|
|
5127
|
+
gt?: string;
|
|
5128
|
+
gte?: string;
|
|
5129
|
+
lt?: string;
|
|
5130
|
+
lte?: string;
|
|
5131
|
+
exists?: boolean;
|
|
5132
|
+
};
|
|
5133
|
+
/** The aggregation type to use for the meter. */
|
|
5134
|
+
export type MeterAggregation = 'sum' | 'count' | 'unique_count' | 'avg' | 'min' | 'max' | 'latest';
|
|
5135
|
+
/**
|
|
5136
|
+
* The granularity of the time grouping. Time durations are specified in ISO 8601
|
|
5137
|
+
* format.
|
|
5138
|
+
*/
|
|
5139
|
+
export type MeterQueryGranularity = 'PT1M' | 'PT1H' | 'P1D' | 'P1M';
|
|
5140
|
+
/**
|
|
5141
|
+
* Filters on the given string field value by exact match. All properties are
|
|
5142
|
+
* optional; provide exactly one to specify the comparison.
|
|
5143
|
+
*/
|
|
5144
|
+
export type StringFieldFilterExact = string | {
|
|
5145
|
+
eq?: string;
|
|
5146
|
+
oeq?: string[];
|
|
5147
|
+
neq?: string;
|
|
5148
|
+
};
|
|
5149
|
+
/** The payment term of a flat price. */
|
|
5150
|
+
export type PricePaymentTerm = 'in_advance' | 'in_arrears';
|
|
5151
|
+
/** Fiat or custom currency code. */
|
|
5152
|
+
export type BillingCurrencyCode = string | string;
|
|
5153
|
+
/** Fiat or custom currency code. */
|
|
5154
|
+
export type CreateCurrencyCode = string | string;
|
|
5155
|
+
/**
|
|
5156
|
+
* Filters on the given ULID field value by exact match. All properties are
|
|
5157
|
+
* optional; provide exactly one to specify the comparison.
|
|
5158
|
+
*/
|
|
5159
|
+
export type UlidFieldFilter = string | {
|
|
5160
|
+
eq?: string;
|
|
5161
|
+
oeq?: string[];
|
|
5162
|
+
neq?: string;
|
|
5163
|
+
};
|
|
5164
|
+
/**
|
|
5165
|
+
* Filters on the given datetime (RFC-3339) field value. All properties are
|
|
5166
|
+
* optional; provide exactly one to specify the comparison.
|
|
5167
|
+
*/
|
|
5168
|
+
export type DateTimeFieldFilter = Date | {
|
|
5169
|
+
eq?: Date;
|
|
5170
|
+
lt?: Date;
|
|
5171
|
+
lte?: Date;
|
|
5172
|
+
gt?: Date;
|
|
5173
|
+
gte?: Date;
|
|
5174
|
+
};
|
|
5175
|
+
/**
|
|
5176
|
+
* Subscription edit timing defined when the changes should take effect. If the
|
|
5177
|
+
* provided configuration is not supported by the subscription, an error will be
|
|
5178
|
+
* returned.
|
|
5179
|
+
*/
|
|
5180
|
+
export type SubscriptionEditTiming = 'immediate' | 'next_billing_cycle' | Date;
|
|
5181
|
+
/** Request to install an app from the catalog. */
|
|
5182
|
+
export type InstallAppRequest = InstallAppStripeWithApiKey | InstallAppSandbox | InstallAppExternalInvoicing;
|
|
5183
|
+
/** Payment settings for a billing workflow. */
|
|
5184
|
+
export type WorkflowPaymentSettings = WorkflowPaymentChargeAutomaticallySettings | WorkflowPaymentSendInvoiceSettings;
|
|
5185
|
+
/** Payment settings for a billing workflow. */
|
|
5186
|
+
export type UpdateBillingWorkflowPaymentSettings = UpdateBillingWorkflowPaymentChargeAutomaticallySettings | UpdateBillingWorkflowPaymentSendInvoiceSettings;
|
|
5187
|
+
/** A parameter that failed validation. */
|
|
5188
|
+
export type InvalidParameter = InvalidParameterStandard | InvalidParameterMinimumLength | InvalidParameterMaximumLength | InvalidParameterChoiceItem | InvalidParameterDependentItem;
|
|
5189
|
+
/**
|
|
5190
|
+
* Entitlement template configured on a rate card. The feature is taken from the
|
|
5191
|
+
* rate card itself, so it is omitted here.
|
|
5192
|
+
*/
|
|
5193
|
+
export type RateCardEntitlement = RateCardMeteredEntitlement | RateCardStaticEntitlement | RateCardBooleanEntitlement;
|
|
5194
|
+
/** Request to update an installed app. */
|
|
5195
|
+
export type UpdateAppRequest = UpdateAppStripeRequest | UpdateAppSandboxRequest | UpdateAppExternalInvoicingRequest;
|
|
5196
|
+
/**
|
|
5197
|
+
* Per-unit cost configuration for a feature. Either a fixed manual amount or a
|
|
5198
|
+
* dynamic LLM cost lookup.
|
|
5199
|
+
*/
|
|
5200
|
+
export type FeatureUnitCost = FeatureManualUnitCost | FeatureLlmUnitCost;
|
|
5201
|
+
/** Fiat or custom currency. */
|
|
5202
|
+
export type Currency = CurrencyFiat | CurrencyCustom;
|
|
5203
|
+
/**
|
|
5204
|
+
* The alignment for collecting the pending line items into an invoice.
|
|
5205
|
+
*
|
|
5206
|
+
* Defaults to subscription, which means that we are to create a new invoice every
|
|
5207
|
+
* time the a subscription period starts (for in advance items) or ends (for in
|
|
5208
|
+
* arrears items).
|
|
5209
|
+
*/
|
|
5210
|
+
export type WorkflowCollectionAlignment = WorkflowCollectionAlignmentSubscription | WorkflowCollectionAlignmentAnchored;
|
|
5211
|
+
/** Price. */
|
|
5212
|
+
export type Price = PriceFree | PriceFlat | PriceUnit | PriceGraduated | PriceVolume;
|
|
5213
|
+
/** Price. */
|
|
5214
|
+
export type UpdatePrice = UpdatePriceFree | UpdatePriceFlat | UpdatePriceUnit | UpdatePriceGraduated | UpdatePriceVolume;
|
|
5215
|
+
/** Installed application. */
|
|
5216
|
+
export type App = AppStripe | AppSandbox | AppExternalInvoicing;
|
|
5217
|
+
/** Customer charge. */
|
|
5218
|
+
export type CreateChargeRequest = CreateChargeFlatFeeRequest | CreateChargeUsageBasedRequest;
|
|
5219
|
+
/** Customer charge. */
|
|
5220
|
+
export type Charge = ChargeFlatFee | ChargeUsageBased;
|
|
5221
|
+
/**
|
|
5222
|
+
* A top-level line item on an invoice.
|
|
5223
|
+
*
|
|
5224
|
+
* Each line represents a single charge, typically associated with a rate card from
|
|
5225
|
+
* a subscription. Detailed (child) lines are nested under `detailed_lines` when
|
|
5226
|
+
* present.
|
|
5227
|
+
*/
|
|
5228
|
+
export type InvoiceLine = InvoiceStandardLine;
|
|
5229
|
+
/**
|
|
5230
|
+
* A top-level line item on an invoice.
|
|
5231
|
+
*
|
|
5232
|
+
* Each line represents a single charge, typically associated with a rate card from
|
|
5233
|
+
* a subscription. Detailed (child) lines are nested under `detailed_lines` when
|
|
5234
|
+
* present.
|
|
5235
|
+
*/
|
|
5236
|
+
export type UpdateInvoiceLine = UpdateInvoiceStandardLine;
|
|
5237
|
+
/**
|
|
5238
|
+
* An invoice issued to a customer.
|
|
5239
|
+
*
|
|
5240
|
+
* The `type` field determines the concrete variant:
|
|
5241
|
+
*
|
|
5242
|
+
* - `standard`: a standard invoice for charges owed.
|
|
5243
|
+
*/
|
|
5244
|
+
export type Invoice = InvoiceStandard;
|
|
5245
|
+
/** UpdateInvoiceRequest update request. */
|
|
5246
|
+
export type UpdateInvoiceRequest = UpdateInvoiceStandardRequest;
|
|
5247
|
+
/**
|
|
5248
|
+
* Sort query.
|
|
5249
|
+
*
|
|
5250
|
+
* The `asc` suffix is optional as the default sort order is ascending. The `desc`
|
|
5251
|
+
* suffix is used to specify a descending order.
|
|
5252
|
+
*/
|
|
5346
5253
|
export interface SortQueryInput {
|
|
5347
5254
|
/** The attribute to sort by. */
|
|
5348
5255
|
by: string;
|
|
5349
5256
|
/** The sort order. `asc` for ascending, `desc` for descending. */
|
|
5350
5257
|
order?: 'asc' | 'desc';
|
|
5351
5258
|
}
|
|
5259
|
+
/** Standard error response. */
|
|
5352
5260
|
export interface BaseErrorInput {
|
|
5353
5261
|
/** Type contains a URI that identifies the problem type. */
|
|
5354
5262
|
type?: string;
|
|
@@ -5365,6 +5273,10 @@ export interface BaseErrorInput {
|
|
|
5365
5273
|
instance: string;
|
|
5366
5274
|
[key: string]: unknown;
|
|
5367
5275
|
}
|
|
5276
|
+
/**
|
|
5277
|
+
* Payment settings for a billing workflow when the collection method is send
|
|
5278
|
+
* invoice.
|
|
5279
|
+
*/
|
|
5368
5280
|
export interface WorkflowPaymentSendInvoiceSettingsInput {
|
|
5369
5281
|
/** The collection method for the invoice. */
|
|
5370
5282
|
collectionMethod: 'send_invoice';
|
|
@@ -5374,6 +5286,13 @@ export interface WorkflowPaymentSendInvoiceSettingsInput {
|
|
|
5374
5286
|
*/
|
|
5375
5287
|
dueAfter?: string;
|
|
5376
5288
|
}
|
|
5289
|
+
/**
|
|
5290
|
+
* Invoice-level invoicing settings.
|
|
5291
|
+
*
|
|
5292
|
+
* A subset of BillingWorkflowInvoicingSettings limited to fields that are
|
|
5293
|
+
* meaningful per-invoice. progressive_billing is omitted as it is a gather-time /
|
|
5294
|
+
* profile-level decision.
|
|
5295
|
+
*/
|
|
5377
5296
|
export interface InvoiceWorkflowInvoicingSettingsInput {
|
|
5378
5297
|
/** Whether to automatically issue the invoice after the draft_period has passed. */
|
|
5379
5298
|
autoAdvance?: boolean;
|
|
@@ -5382,12 +5301,23 @@ export interface InvoiceWorkflowInvoicingSettingsInput {
|
|
|
5382
5301
|
/** The period after which the invoice is considered overdue if not paid. */
|
|
5383
5302
|
dueAfter?: string;
|
|
5384
5303
|
}
|
|
5304
|
+
/**
|
|
5305
|
+
* Invoice-level invoicing settings.
|
|
5306
|
+
*
|
|
5307
|
+
* A subset of BillingWorkflowInvoicingSettings limited to fields that are
|
|
5308
|
+
* meaningful per-invoice. progressive_billing is omitted as it is a gather-time /
|
|
5309
|
+
* profile-level decision.
|
|
5310
|
+
*/
|
|
5385
5311
|
export interface UpdateBillingInvoiceWorkflowInvoicingSettingsInput {
|
|
5386
5312
|
/** Whether to automatically issue the invoice after the draft_period has passed. */
|
|
5387
5313
|
autoAdvance?: boolean;
|
|
5388
5314
|
/** The period for the invoice to be kept in draft status for manual reviews. */
|
|
5389
5315
|
draftPeriod?: string;
|
|
5390
5316
|
}
|
|
5317
|
+
/**
|
|
5318
|
+
* Payment settings for a billing workflow when the collection method is send
|
|
5319
|
+
* invoice.
|
|
5320
|
+
*/
|
|
5391
5321
|
export interface UpdateBillingWorkflowPaymentSendInvoiceSettingsInput {
|
|
5392
5322
|
/** The collection method for the invoice. */
|
|
5393
5323
|
collectionMethod: 'send_invoice';
|
|
@@ -5397,6 +5327,7 @@ export interface UpdateBillingWorkflowPaymentSendInvoiceSettingsInput {
|
|
|
5397
5327
|
*/
|
|
5398
5328
|
dueAfter?: string;
|
|
5399
5329
|
}
|
|
5330
|
+
/** Metering event following the CloudEvents specification. */
|
|
5400
5331
|
export interface EventInput {
|
|
5401
5332
|
/** Identifies the event. */
|
|
5402
5333
|
id: string;
|
|
@@ -5426,30 +5357,43 @@ export interface EventInput {
|
|
|
5426
5357
|
/** The event payload. Optional, if present it must be a JSON object. */
|
|
5427
5358
|
data?: Record<string, unknown> | null;
|
|
5428
5359
|
}
|
|
5360
|
+
/** Unauthorized. */
|
|
5429
5361
|
export interface UnauthorizedInput extends BaseErrorInput {
|
|
5430
5362
|
}
|
|
5363
|
+
/** Forbidden. */
|
|
5431
5364
|
export interface ForbiddenInput extends BaseErrorInput {
|
|
5432
5365
|
}
|
|
5366
|
+
/** Not Found. */
|
|
5433
5367
|
export interface NotFoundInput extends BaseErrorInput {
|
|
5434
5368
|
}
|
|
5369
|
+
/** Gone. */
|
|
5435
5370
|
export interface GoneInput extends BaseErrorInput {
|
|
5436
5371
|
}
|
|
5372
|
+
/** Conflict. */
|
|
5437
5373
|
export interface ConflictInput extends BaseErrorInput {
|
|
5438
5374
|
}
|
|
5375
|
+
/** Payload Too Large. */
|
|
5439
5376
|
export interface PayloadTooLargeInput extends BaseErrorInput {
|
|
5440
5377
|
}
|
|
5378
|
+
/** Unsupported Media Type. */
|
|
5441
5379
|
export interface UnsupportedMediaTypeInput extends BaseErrorInput {
|
|
5442
5380
|
}
|
|
5381
|
+
/** Unprocessable Content. */
|
|
5443
5382
|
export interface UnprocessableContentInput extends BaseErrorInput {
|
|
5444
5383
|
}
|
|
5384
|
+
/** Too Many Requests. */
|
|
5445
5385
|
export interface TooManyRequestsInput extends BaseErrorInput {
|
|
5446
5386
|
}
|
|
5387
|
+
/** Internal Server Error. */
|
|
5447
5388
|
export interface InternalInput extends BaseErrorInput {
|
|
5448
5389
|
}
|
|
5390
|
+
/** Not Implemented. */
|
|
5449
5391
|
export interface NotImplementedInput extends BaseErrorInput {
|
|
5450
5392
|
}
|
|
5393
|
+
/** Not Available. */
|
|
5451
5394
|
export interface NotAvailableInput extends BaseErrorInput {
|
|
5452
5395
|
}
|
|
5396
|
+
/** Controls which customer fields can be updated by the checkout session. */
|
|
5453
5397
|
export interface AppStripeCreateCheckoutSessionCustomerUpdateInput {
|
|
5454
5398
|
/**
|
|
5455
5399
|
* Whether to save the billing address to customer.address.
|
|
@@ -5470,6 +5414,7 @@ export interface AppStripeCreateCheckoutSessionCustomerUpdateInput {
|
|
|
5470
5414
|
*/
|
|
5471
5415
|
shipping?: 'auto' | 'never';
|
|
5472
5416
|
}
|
|
5417
|
+
/** Tax ID collection configuration for checkout sessions. */
|
|
5473
5418
|
export interface AppStripeCreateCheckoutSessionTaxIdCollectionInput {
|
|
5474
5419
|
/**
|
|
5475
5420
|
* Enable tax ID collection during checkout.
|
|
@@ -5484,15 +5429,17 @@ export interface AppStripeCreateCheckoutSessionTaxIdCollectionInput {
|
|
|
5484
5429
|
*/
|
|
5485
5430
|
required?: 'if_supported' | 'never';
|
|
5486
5431
|
}
|
|
5432
|
+
/** Purchase and payment terms of the grant. */
|
|
5487
5433
|
export interface CreateCreditGrantPurchaseInput {
|
|
5488
5434
|
/** Currency of the purchase amount. */
|
|
5489
5435
|
currency: string;
|
|
5490
5436
|
/**
|
|
5491
5437
|
* Cost basis per credit unit used to calculate the purchase amount.
|
|
5492
5438
|
*
|
|
5493
|
-
* If `per_unit_cost_basis` is 0.50 and credit amount is
|
|
5494
|
-
*
|
|
5495
|
-
*
|
|
5439
|
+
* If `per_unit_cost_basis` is 0.50 and credit amount is
|
|
5440
|
+
* $100.00, the total
|
|
5441
|
+
* charge is $50.00. The value must be greater than 0. If the
|
|
5442
|
+
* cost basis is 0, use `funding_method=none` instead.
|
|
5496
5443
|
*
|
|
5497
5444
|
* Defaults to 1.0.
|
|
5498
5445
|
*/
|
|
@@ -5504,6 +5451,7 @@ export interface CreateCreditGrantPurchaseInput {
|
|
|
5504
5451
|
*/
|
|
5505
5452
|
availabilityPolicy?: 'on_creation';
|
|
5506
5453
|
}
|
|
5454
|
+
/** The entitlement template of a metered entitlement. */
|
|
5507
5455
|
export interface RateCardMeteredEntitlementInput {
|
|
5508
5456
|
/** The type of the entitlement template. */
|
|
5509
5457
|
type: 'metered';
|
|
@@ -5525,15 +5473,17 @@ export interface RateCardMeteredEntitlementInput {
|
|
|
5525
5473
|
*/
|
|
5526
5474
|
usagePeriod?: string;
|
|
5527
5475
|
}
|
|
5476
|
+
/** Purchase and payment terms of the grant. */
|
|
5528
5477
|
export interface CreditGrantPurchaseInput {
|
|
5529
5478
|
/** Currency of the purchase amount. */
|
|
5530
5479
|
currency: string;
|
|
5531
5480
|
/**
|
|
5532
5481
|
* Cost basis per credit unit used to calculate the purchase amount.
|
|
5533
5482
|
*
|
|
5534
|
-
* If `per_unit_cost_basis` is 0.50 and credit amount is
|
|
5535
|
-
*
|
|
5536
|
-
*
|
|
5483
|
+
* If `per_unit_cost_basis` is 0.50 and credit amount is
|
|
5484
|
+
* $100.00, the total
|
|
5485
|
+
* charge is $50.00. The value must be greater than 0. If the
|
|
5486
|
+
* cost basis is 0, use `funding_method=none` instead.
|
|
5537
5487
|
*
|
|
5538
5488
|
* Defaults to 1.0.
|
|
5539
5489
|
*/
|
|
@@ -5549,6 +5499,41 @@ export interface CreditGrantPurchaseInput {
|
|
|
5549
5499
|
/** Current payment settlement status. */
|
|
5550
5500
|
settlementStatus?: 'pending' | 'authorized' | 'settled';
|
|
5551
5501
|
}
|
|
5502
|
+
/** Request body for voiding a credit grant. */
|
|
5503
|
+
export interface VoidCreditGrantRequestInput {
|
|
5504
|
+
/**
|
|
5505
|
+
* How voiding adjusts payment state related to the grant.
|
|
5506
|
+
*
|
|
5507
|
+
* Currently only `none` is supported: voiding does not adjust invoices, payment
|
|
5508
|
+
* authorization, settlement, payment intents, or external collection state. If
|
|
5509
|
+
* payment later completes, the original invoiced amount may still be collected.
|
|
5510
|
+
*/
|
|
5511
|
+
paymentAdjustment?: 'none';
|
|
5512
|
+
}
|
|
5513
|
+
/**
|
|
5514
|
+
* Unit conversion configuration.
|
|
5515
|
+
*
|
|
5516
|
+
* Transforms raw metered quantities into billing-ready units before pricing and
|
|
5517
|
+
* entitlement evaluation. Applied at the rate card level so the same feature can
|
|
5518
|
+
* be billed in different units across plans.
|
|
5519
|
+
*
|
|
5520
|
+
* Examples:
|
|
5521
|
+
*
|
|
5522
|
+
* - Meter bytes, bill GB: operation=divide, conversionFactor=1e9,
|
|
5523
|
+
* rounding=ceiling, displayUnit="GB"
|
|
5524
|
+
* - Meter seconds, bill hours: operation=divide, conversionFactor=3600,
|
|
5525
|
+
* rounding=ceiling, displayUnit="hours"
|
|
5526
|
+
* - Cost + 20% margin: operation=multiply, conversionFactor=1.2
|
|
5527
|
+
* - Bill per million tokens: operation=divide, conversionFactor=1e6,
|
|
5528
|
+
* rounding=ceiling, displayUnit="M"
|
|
5529
|
+
*
|
|
5530
|
+
* v1 equivalents:
|
|
5531
|
+
*
|
|
5532
|
+
* - DynamicPrice(multiplier): operation=multiply, conversionFactor=multiplier +
|
|
5533
|
+
* UnitPrice(amount=1)
|
|
5534
|
+
* - PackagePrice(amount, quantityPerPkg): operation=divide,
|
|
5535
|
+
* conversionFactor=quantityPerPkg, rounding=ceiling + UnitPrice(amount)
|
|
5536
|
+
*/
|
|
5552
5537
|
export interface UnitConfigInput {
|
|
5553
5538
|
/** The arithmetic operation to apply to the raw metered quantity. */
|
|
5554
5539
|
operation: 'divide' | 'multiply';
|
|
@@ -5583,6 +5568,7 @@ export interface UnitConfigInput {
|
|
|
5583
5568
|
*/
|
|
5584
5569
|
displayUnit?: string;
|
|
5585
5570
|
}
|
|
5571
|
+
/** Invoice settings for a billing workflow. */
|
|
5586
5572
|
export interface WorkflowInvoicingSettingsInput {
|
|
5587
5573
|
/** Whether to automatically issue the invoice after the draftPeriod has passed. */
|
|
5588
5574
|
autoAdvance?: boolean;
|
|
@@ -5593,6 +5579,7 @@ export interface WorkflowInvoicingSettingsInput {
|
|
|
5593
5579
|
/** Controls how subscription-ending shortened service periods are billed. */
|
|
5594
5580
|
subscriptionEndProrationMode?: 'bill_full_period' | 'bill_actual_period';
|
|
5595
5581
|
}
|
|
5582
|
+
/** Query to evaluate feature access for a list of customers. */
|
|
5596
5583
|
export interface GovernanceQueryRequestInput {
|
|
5597
5584
|
/**
|
|
5598
5585
|
* Whether to include credit balance availability for each resolved customer. When
|
|
@@ -5604,6 +5591,7 @@ export interface GovernanceQueryRequestInput {
|
|
|
5604
5591
|
customer: GovernanceQueryRequestCustomers;
|
|
5605
5592
|
feature?: GovernanceQueryRequestFeatures;
|
|
5606
5593
|
}
|
|
5594
|
+
/** An ingested metering event with ingestion metadata. */
|
|
5607
5595
|
export interface IngestedEventInput {
|
|
5608
5596
|
/** The original event ingested. */
|
|
5609
5597
|
event: EventInput;
|
|
@@ -5616,10 +5604,16 @@ export interface IngestedEventInput {
|
|
|
5616
5604
|
/** The validation errors of the ingested event. */
|
|
5617
5605
|
validationErrors?: IngestedEventValidationError[];
|
|
5618
5606
|
}
|
|
5607
|
+
/** Request for canceling a subscription. */
|
|
5619
5608
|
export interface SubscriptionCancelInput {
|
|
5620
5609
|
/** If not provided the subscription is canceled immediately. */
|
|
5621
|
-
timing?:
|
|
5610
|
+
timing?: SubscriptionEditTiming;
|
|
5622
5611
|
}
|
|
5612
|
+
/**
|
|
5613
|
+
* Usage quantity details on an invoice line item when UnitConfig is in effect.
|
|
5614
|
+
*
|
|
5615
|
+
* Provides the full audit trail from raw meter output to the invoiced amount.
|
|
5616
|
+
*/
|
|
5623
5617
|
export interface InvoiceUsageQuantityDetailInput {
|
|
5624
5618
|
/** The raw quantity as reported by the meter (native units). */
|
|
5625
5619
|
rawQuantity: string;
|
|
@@ -5638,18 +5632,33 @@ export interface InvoiceUsageQuantityDetailInput {
|
|
|
5638
5632
|
*/
|
|
5639
5633
|
appliedUnitConfig: UnitConfigInput;
|
|
5640
5634
|
}
|
|
5635
|
+
/**
|
|
5636
|
+
* Invoice-level snapshot of the workflow configuration.
|
|
5637
|
+
*
|
|
5638
|
+
* Contains only the settings that are meaningful for an already-created invoice:
|
|
5639
|
+
* invoicing behaviour and payment settings. Collection alignment and tax policy
|
|
5640
|
+
* are gather-time / profile-wide concerns and are not included.
|
|
5641
|
+
*/
|
|
5641
5642
|
export interface InvoiceWorkflowInput {
|
|
5642
5643
|
/** Invoicing settings for this invoice. */
|
|
5643
5644
|
invoicing?: InvoiceWorkflowInvoicingSettingsInput;
|
|
5644
5645
|
/** Payment settings for this invoice. */
|
|
5645
|
-
payment?:
|
|
5646
|
+
payment?: WorkflowPaymentSettingsInput;
|
|
5646
5647
|
}
|
|
5648
|
+
/**
|
|
5649
|
+
* Invoice-level snapshot of the workflow configuration.
|
|
5650
|
+
*
|
|
5651
|
+
* Contains only the settings that are meaningful for an already-created invoice:
|
|
5652
|
+
* invoicing behaviour and payment settings. Collection alignment and tax policy
|
|
5653
|
+
* are gather-time / profile-wide concerns and are not included.
|
|
5654
|
+
*/
|
|
5647
5655
|
export interface UpdateBillingInvoiceWorkflowInput {
|
|
5648
5656
|
/** Invoicing settings for this invoice. */
|
|
5649
5657
|
invoicing?: UpdateBillingInvoiceWorkflowInvoicingSettingsInput;
|
|
5650
5658
|
/** Payment settings for this invoice. */
|
|
5651
|
-
payment?:
|
|
5659
|
+
payment?: UpdateBillingWorkflowPaymentSettingsInput;
|
|
5652
5660
|
}
|
|
5661
|
+
/** CreditGrant create request. */
|
|
5653
5662
|
export interface CreateCreditGrantRequestInput {
|
|
5654
5663
|
/**
|
|
5655
5664
|
* Display name of the resource.
|
|
@@ -5667,7 +5676,7 @@ export interface CreateCreditGrantRequestInput {
|
|
|
5667
5676
|
/** Funding method of the grant. */
|
|
5668
5677
|
fundingMethod: 'none' | 'invoice' | 'external';
|
|
5669
5678
|
/** The currency of the granted credits. */
|
|
5670
|
-
currency:
|
|
5679
|
+
currency: CreateCurrencyCode;
|
|
5671
5680
|
/** Granted credit amount. */
|
|
5672
5681
|
amount: string;
|
|
5673
5682
|
/** Present when a funding workflow applies (funding_method is not `none`). */
|
|
@@ -5699,11 +5708,18 @@ export interface CreateCreditGrantRequestInput {
|
|
|
5699
5708
|
/**
|
|
5700
5709
|
* Idempotency key for the credit grant creation request.
|
|
5701
5710
|
*
|
|
5702
|
-
*
|
|
5703
|
-
* creating a duplicate grant, which makes create requests
|
|
5711
|
+
* Unique per customer: reusing the same key for the same customer returns an HTTP
|
|
5712
|
+
* 409 Conflict instead of creating a duplicate grant, which makes create requests
|
|
5713
|
+
* safe to retry. The same key may be reused across different customers.
|
|
5704
5714
|
*/
|
|
5705
5715
|
key?: string;
|
|
5706
5716
|
}
|
|
5717
|
+
/**
|
|
5718
|
+
* A credit grant allocates credits to a customer.
|
|
5719
|
+
*
|
|
5720
|
+
* Credits are drawn down against charges according to the settlement mode
|
|
5721
|
+
* configured on the rate card.
|
|
5722
|
+
*/
|
|
5707
5723
|
export interface CreditGrantInput {
|
|
5708
5724
|
id: string;
|
|
5709
5725
|
/**
|
|
@@ -5728,7 +5744,7 @@ export interface CreditGrantInput {
|
|
|
5728
5744
|
/** Funding method of the grant. */
|
|
5729
5745
|
fundingMethod: 'none' | 'invoice' | 'external';
|
|
5730
5746
|
/** The currency of the granted credits. */
|
|
5731
|
-
currency:
|
|
5747
|
+
currency: BillingCurrencyCode;
|
|
5732
5748
|
/** Granted credit amount. */
|
|
5733
5749
|
amount: string;
|
|
5734
5750
|
/** Present when a funding workflow applies (funding_method is not `none`). */
|
|
@@ -5756,8 +5772,9 @@ export interface CreditGrantInput {
|
|
|
5756
5772
|
/**
|
|
5757
5773
|
* Idempotency key for the credit grant creation request.
|
|
5758
5774
|
*
|
|
5759
|
-
*
|
|
5760
|
-
* creating a duplicate grant, which makes create requests
|
|
5775
|
+
* Unique per customer: reusing the same key for the same customer returns an HTTP
|
|
5776
|
+
* 409 Conflict instead of creating a duplicate grant, which makes create requests
|
|
5777
|
+
* safe to retry. The same key may be reused across different customers.
|
|
5761
5778
|
*/
|
|
5762
5779
|
key?: string;
|
|
5763
5780
|
/**
|
|
@@ -5771,6 +5788,7 @@ export interface CreditGrantInput {
|
|
|
5771
5788
|
/** Current lifecycle status of the grant. */
|
|
5772
5789
|
status: 'pending' | 'active' | 'expired' | 'voided';
|
|
5773
5790
|
}
|
|
5791
|
+
/** Tax settings for a billing workflow. */
|
|
5774
5792
|
export interface WorkflowTaxSettingsInput {
|
|
5775
5793
|
/**
|
|
5776
5794
|
* Enable automatic tax calculation when tax is supported by the app. For example,
|
|
@@ -5794,10 +5812,12 @@ export interface WorkflowTaxSettingsInput {
|
|
|
5794
5812
|
*/
|
|
5795
5813
|
defaultTaxConfig?: TaxConfig;
|
|
5796
5814
|
}
|
|
5815
|
+
/** Cursor paginated response. */
|
|
5797
5816
|
export interface IngestedEventPaginatedResponseInput {
|
|
5798
5817
|
data: IngestedEventInput[];
|
|
5799
5818
|
meta: CursorMeta;
|
|
5800
5819
|
}
|
|
5820
|
+
/** A meter query request. */
|
|
5801
5821
|
export interface MeterQueryRequestInput {
|
|
5802
5822
|
/** The start of the period the usage is queried from. */
|
|
5803
5823
|
from?: Date;
|
|
@@ -5807,7 +5827,7 @@ export interface MeterQueryRequestInput {
|
|
|
5807
5827
|
* The size of the time buckets to group the usage into. If not specified, the
|
|
5808
5828
|
* usage is aggregated over the entire period.
|
|
5809
5829
|
*/
|
|
5810
|
-
granularity?:
|
|
5830
|
+
granularity?: MeterQueryGranularity;
|
|
5811
5831
|
/**
|
|
5812
5832
|
* The value is the name of the time zone as defined in the IANA Time Zone Database
|
|
5813
5833
|
* (http://www.iana.org/time-zones). The time zone is used to determine the start
|
|
@@ -5819,6 +5839,12 @@ export interface MeterQueryRequestInput {
|
|
|
5819
5839
|
/** Filters to apply to the query. */
|
|
5820
5840
|
filters?: MeterQueryFilters;
|
|
5821
5841
|
}
|
|
5842
|
+
/**
|
|
5843
|
+
* Configuration options for creating a Stripe Checkout Session.
|
|
5844
|
+
*
|
|
5845
|
+
* Based on Stripe's
|
|
5846
|
+
* [Checkout Session API parameters](https://docs.stripe.com/api/checkout/sessions/create).
|
|
5847
|
+
*/
|
|
5822
5848
|
export interface AppStripeCreateCheckoutSessionRequestOptionsInput {
|
|
5823
5849
|
/**
|
|
5824
5850
|
* Whether to collect the customer's billing address.
|
|
@@ -5906,6 +5932,7 @@ export interface AppStripeCreateCheckoutSessionRequestOptionsInput {
|
|
|
5906
5932
|
/** Configuration for collecting tax IDs during checkout. */
|
|
5907
5933
|
taxIdCollection?: AppStripeCreateCheckoutSessionTaxIdCollectionInput;
|
|
5908
5934
|
}
|
|
5935
|
+
/** Snapshot of the billing workflow configuration captured at invoice creation. */
|
|
5909
5936
|
export interface InvoiceWorkflowSettingsInput {
|
|
5910
5937
|
/** The apps that will be used to orchestrate the invoice's workflow. */
|
|
5911
5938
|
apps?: InvoiceWorkflowAppsReferences;
|
|
@@ -5921,6 +5948,12 @@ export interface InvoiceWorkflowSettingsInput {
|
|
|
5921
5948
|
*/
|
|
5922
5949
|
workflow: InvoiceWorkflowInput;
|
|
5923
5950
|
}
|
|
5951
|
+
/**
|
|
5952
|
+
* A detailed (child) sub-line belonging to a parent invoice line.
|
|
5953
|
+
*
|
|
5954
|
+
* Detailed lines represent the individual flat-fee components that make up a
|
|
5955
|
+
* usage-based parent line after quantity snapshotting.
|
|
5956
|
+
*/
|
|
5924
5957
|
export interface InvoiceDetailedLineInput {
|
|
5925
5958
|
id: string;
|
|
5926
5959
|
/**
|
|
@@ -5959,6 +5992,7 @@ export interface InvoiceDetailedLineInput {
|
|
|
5959
5992
|
/** The unit price of the detailed line. */
|
|
5960
5993
|
unitPrice: string;
|
|
5961
5994
|
}
|
|
5995
|
+
/** Snapshot of the billing workflow configuration captured at invoice creation. */
|
|
5962
5996
|
export interface UpdateInvoiceWorkflowSettingsInput {
|
|
5963
5997
|
/**
|
|
5964
5998
|
* The workflow configuration that was active when the invoice was created.
|
|
@@ -5970,14 +6004,23 @@ export interface UpdateInvoiceWorkflowSettingsInput {
|
|
|
5970
6004
|
*/
|
|
5971
6005
|
workflow: UpdateBillingInvoiceWorkflowInput;
|
|
5972
6006
|
}
|
|
6007
|
+
/** Page paginated response. */
|
|
5973
6008
|
export interface CreditGrantPagePaginatedResponseInput {
|
|
5974
6009
|
data: CreditGrantInput[];
|
|
5975
6010
|
meta: PaginatedMeta;
|
|
5976
6011
|
}
|
|
6012
|
+
/** Bad Request. */
|
|
5977
6013
|
export interface BadRequestInput extends BaseErrorInput {
|
|
5978
6014
|
/** The list of parameters that failed validation. */
|
|
5979
|
-
invalidParameters:
|
|
6015
|
+
invalidParameters: InvalidParameter[];
|
|
5980
6016
|
}
|
|
6017
|
+
/**
|
|
6018
|
+
* Request to create a Stripe Checkout Session for the customer.
|
|
6019
|
+
*
|
|
6020
|
+
* Checkout Sessions are used to collect payment method information from customers
|
|
6021
|
+
* in a secure, Stripe-hosted interface. This integration uses setup mode to
|
|
6022
|
+
* collect payment methods that can be charged later for subscription billing.
|
|
6023
|
+
*/
|
|
5981
6024
|
export interface CustomerStripeCreateCheckoutSessionRequestInput {
|
|
5982
6025
|
/**
|
|
5983
6026
|
* Options for configuring the Stripe Checkout Session.
|
|
@@ -5987,9 +6030,13 @@ export interface CustomerStripeCreateCheckoutSessionRequestInput {
|
|
|
5987
6030
|
*/
|
|
5988
6031
|
stripeOptions: AppStripeCreateCheckoutSessionRequestOptionsInput;
|
|
5989
6032
|
}
|
|
6033
|
+
/**
|
|
6034
|
+
* Workflow collection specifies how to collect the pending line items for an
|
|
6035
|
+
* invoice.
|
|
6036
|
+
*/
|
|
5990
6037
|
export interface WorkflowCollectionSettingsInput {
|
|
5991
6038
|
/** The alignment for collecting the pending line items into an invoice. */
|
|
5992
|
-
alignment?:
|
|
6039
|
+
alignment?: WorkflowCollectionAlignment;
|
|
5993
6040
|
/**
|
|
5994
6041
|
* This grace period can be used to delay the collection of the pending line items
|
|
5995
6042
|
* specified in alignment.
|
|
@@ -5999,6 +6046,7 @@ export interface WorkflowCollectionSettingsInput {
|
|
|
5999
6046
|
*/
|
|
6000
6047
|
interval?: string;
|
|
6001
6048
|
}
|
|
6049
|
+
/** A rate card defines the pricing and entitlement of a feature or service. */
|
|
6002
6050
|
export interface RateCardInput {
|
|
6003
6051
|
/**
|
|
6004
6052
|
* Display name of the resource.
|
|
@@ -6016,13 +6064,18 @@ export interface RateCardInput {
|
|
|
6016
6064
|
key: string;
|
|
6017
6065
|
/** The feature associated with the rate card. */
|
|
6018
6066
|
feature?: FeatureReference;
|
|
6067
|
+
/**
|
|
6068
|
+
* Overrides the containing plan or add-on currency for this rate card. When
|
|
6069
|
+
* omitted, the containing resource currency applies.
|
|
6070
|
+
*/
|
|
6071
|
+
currency?: BillingCurrencyCode;
|
|
6019
6072
|
/**
|
|
6020
6073
|
* The billing cadence of the rate card. When null, the charge is one-time
|
|
6021
6074
|
* (non-recurring). Only valid for flat prices.
|
|
6022
6075
|
*/
|
|
6023
6076
|
billingCadence?: string;
|
|
6024
6077
|
/** The price of the rate card. */
|
|
6025
|
-
price:
|
|
6078
|
+
price: Price;
|
|
6026
6079
|
/**
|
|
6027
6080
|
* Unit conversion configuration for the rate card.
|
|
6028
6081
|
*
|
|
@@ -6038,7 +6091,7 @@ export interface RateCardInput {
|
|
|
6038
6091
|
* The payment term of the rate card. In advance payment term can only be used for
|
|
6039
6092
|
* flat prices.
|
|
6040
6093
|
*/
|
|
6041
|
-
paymentTerm?:
|
|
6094
|
+
paymentTerm?: PricePaymentTerm;
|
|
6042
6095
|
/**
|
|
6043
6096
|
* Spend commitments for this rate card. Only applicable to usage-based prices
|
|
6044
6097
|
* (unit, graduated, volume).
|
|
@@ -6052,24 +6105,46 @@ export interface RateCardInput {
|
|
|
6052
6105
|
* The entitlement template granted to subscribers of a plan or addon containing
|
|
6053
6106
|
* this rate card. Requires `feature` to be set.
|
|
6054
6107
|
*/
|
|
6055
|
-
entitlement?:
|
|
6108
|
+
entitlement?: RateCardEntitlementInput;
|
|
6109
|
+
}
|
|
6110
|
+
/** Rate card configuration snapshot for a usage-based invoice line. */
|
|
6111
|
+
export interface InvoiceLineRateCardInput {
|
|
6112
|
+
/** The price definition used to calculate charges for this line. */
|
|
6113
|
+
price: Price;
|
|
6114
|
+
/** Tax configuration snapshot for this line. */
|
|
6115
|
+
taxConfig?: RateCardTaxConfig;
|
|
6116
|
+
/** The feature key associated with this line's rate card. */
|
|
6117
|
+
featureKey?: string;
|
|
6118
|
+
/** Discount configuration from the rate card. */
|
|
6119
|
+
discounts?: RateCardDiscounts;
|
|
6120
|
+
/**
|
|
6121
|
+
* Unit config snapshot applied when this line was billed, converting the raw
|
|
6122
|
+
* metered quantity into the billed quantity. Frozen at billing time; read-only.
|
|
6123
|
+
*/
|
|
6124
|
+
unitConfig?: UnitConfigInput;
|
|
6056
6125
|
}
|
|
6126
|
+
/** Billing workflow settings. */
|
|
6057
6127
|
export interface WorkflowInput {
|
|
6058
6128
|
/** The collection settings for this workflow */
|
|
6059
6129
|
collection?: WorkflowCollectionSettingsInput;
|
|
6060
6130
|
/** The invoicing settings for this workflow */
|
|
6061
6131
|
invoicing?: WorkflowInvoicingSettingsInput;
|
|
6062
6132
|
/** The payment settings for this workflow */
|
|
6063
|
-
payment?:
|
|
6133
|
+
payment?: WorkflowPaymentSettingsInput;
|
|
6064
6134
|
/** The tax settings for this workflow */
|
|
6065
6135
|
tax?: WorkflowTaxSettingsInput;
|
|
6066
6136
|
}
|
|
6137
|
+
/** A rate card for a subscription add-on. */
|
|
6067
6138
|
export interface SubscriptionAddonRateCardInput {
|
|
6068
6139
|
/** The rate card. */
|
|
6069
6140
|
rateCard: RateCardInput;
|
|
6070
6141
|
/** The IDs of the subscription items that this rate card belongs to. */
|
|
6071
6142
|
affectedSubscriptionItemIds: string[];
|
|
6072
6143
|
}
|
|
6144
|
+
/**
|
|
6145
|
+
* The plan phase or pricing ramp allows changing a plan's rate cards over time as
|
|
6146
|
+
* a subscription progresses.
|
|
6147
|
+
*/
|
|
6073
6148
|
export interface PlanPhaseInput {
|
|
6074
6149
|
/**
|
|
6075
6150
|
* Display name of the resource.
|
|
@@ -6093,6 +6168,10 @@ export interface PlanPhaseInput {
|
|
|
6093
6168
|
/** The rate cards of the plan. */
|
|
6094
6169
|
rateCards: RateCardInput[];
|
|
6095
6170
|
}
|
|
6171
|
+
/**
|
|
6172
|
+
* Add-on allows extending subscriptions with compatible plans with additional
|
|
6173
|
+
* ratecards.
|
|
6174
|
+
*/
|
|
6096
6175
|
export interface AddonInput {
|
|
6097
6176
|
id: string;
|
|
6098
6177
|
/**
|
|
@@ -6125,7 +6204,7 @@ export interface AddonInput {
|
|
|
6125
6204
|
/** The InstanceType of the add-ons. Can be "single" or "multiple". */
|
|
6126
6205
|
instanceType: 'single' | 'multiple';
|
|
6127
6206
|
/** The currency code of the add-on. */
|
|
6128
|
-
currency:
|
|
6207
|
+
currency: BillingCurrencyCode;
|
|
6129
6208
|
/**
|
|
6130
6209
|
* The date and time when the add-on becomes effective. When not specified, the
|
|
6131
6210
|
* add-on is a draft.
|
|
@@ -6150,6 +6229,7 @@ export interface AddonInput {
|
|
|
6150
6229
|
/** List of validation errors. */
|
|
6151
6230
|
validationErrors?: ProductCatalogValidationError[];
|
|
6152
6231
|
}
|
|
6232
|
+
/** Addon create request. */
|
|
6153
6233
|
export interface CreateAddonRequestInput {
|
|
6154
6234
|
/**
|
|
6155
6235
|
* Display name of the resource.
|
|
@@ -6173,10 +6253,11 @@ export interface CreateAddonRequestInput {
|
|
|
6173
6253
|
/** The InstanceType of the add-ons. Can be "single" or "multiple". */
|
|
6174
6254
|
instanceType: 'single' | 'multiple';
|
|
6175
6255
|
/** The currency code of the add-on. */
|
|
6176
|
-
currency:
|
|
6256
|
+
currency: BillingCurrencyCode;
|
|
6177
6257
|
/** The rate cards of the add-on. */
|
|
6178
6258
|
rateCards: RateCardInput[];
|
|
6179
6259
|
}
|
|
6260
|
+
/** Addon upsert request. */
|
|
6180
6261
|
export interface UpsertAddonRequestInput {
|
|
6181
6262
|
/**
|
|
6182
6263
|
* Display name of the resource.
|
|
@@ -6196,6 +6277,13 @@ export interface UpsertAddonRequestInput {
|
|
|
6196
6277
|
/** The rate cards of the add-on. */
|
|
6197
6278
|
rateCards: RateCardInput[];
|
|
6198
6279
|
}
|
|
6280
|
+
/**
|
|
6281
|
+
* A top-level line item on an invoice.
|
|
6282
|
+
*
|
|
6283
|
+
* Each line represents a single charge, typically associated with a rate card from
|
|
6284
|
+
* a subscription. Detailed (child) lines are nested under `detailed_lines` when
|
|
6285
|
+
* present.
|
|
6286
|
+
*/
|
|
6199
6287
|
export interface InvoiceStandardLineInput {
|
|
6200
6288
|
/**
|
|
6201
6289
|
* Display name of the resource.
|
|
@@ -6250,7 +6338,7 @@ export interface InvoiceStandardLineInput {
|
|
|
6250
6338
|
/** Reference to the subscription item that generated this line. */
|
|
6251
6339
|
subscription?: SubscriptionReference;
|
|
6252
6340
|
/** The rate card configuration snapshot used to price this line item. */
|
|
6253
|
-
rateCard:
|
|
6341
|
+
rateCard: InvoiceLineRateCardInput;
|
|
6254
6342
|
/**
|
|
6255
6343
|
* Detailed sub-lines that this line has been broken down into.
|
|
6256
6344
|
*
|
|
@@ -6260,6 +6348,10 @@ export interface InvoiceStandardLineInput {
|
|
|
6260
6348
|
/** Reference to the charge associated with this line item. */
|
|
6261
6349
|
charge?: ChargeReference;
|
|
6262
6350
|
}
|
|
6351
|
+
/**
|
|
6352
|
+
* Billing profiles contain the settings for billing and controls invoice
|
|
6353
|
+
* generation.
|
|
6354
|
+
*/
|
|
6263
6355
|
export interface ProfileInput {
|
|
6264
6356
|
id: string;
|
|
6265
6357
|
/**
|
|
@@ -6293,6 +6385,7 @@ export interface ProfileInput {
|
|
|
6293
6385
|
/** Whether this is the default profile. */
|
|
6294
6386
|
default: boolean;
|
|
6295
6387
|
}
|
|
6388
|
+
/** BillingProfile create request. */
|
|
6296
6389
|
export interface CreateBillingProfileRequestInput {
|
|
6297
6390
|
/**
|
|
6298
6391
|
* Display name of the resource.
|
|
@@ -6319,6 +6412,7 @@ export interface CreateBillingProfileRequestInput {
|
|
|
6319
6412
|
/** Whether this is the default profile. */
|
|
6320
6413
|
default: boolean;
|
|
6321
6414
|
}
|
|
6415
|
+
/** BillingProfile upsert request. */
|
|
6322
6416
|
export interface UpsertBillingProfileRequestInput {
|
|
6323
6417
|
/**
|
|
6324
6418
|
* Display name of the resource.
|
|
@@ -6343,6 +6437,7 @@ export interface UpsertBillingProfileRequestInput {
|
|
|
6343
6437
|
/** Whether this is the default profile. */
|
|
6344
6438
|
default: boolean;
|
|
6345
6439
|
}
|
|
6440
|
+
/** Addon purchased with a subscription. */
|
|
6346
6441
|
export interface SubscriptionAddonInput {
|
|
6347
6442
|
id: string;
|
|
6348
6443
|
labels?: Labels;
|
|
@@ -6382,6 +6477,7 @@ export interface SubscriptionAddonInput {
|
|
|
6382
6477
|
/** The rate cards of the add-on. */
|
|
6383
6478
|
rateCards: SubscriptionAddonRateCardInput[];
|
|
6384
6479
|
}
|
|
6480
|
+
/** Plans provide a template for subscriptions. */
|
|
6385
6481
|
export interface PlanInput {
|
|
6386
6482
|
id: string;
|
|
6387
6483
|
/**
|
|
@@ -6415,7 +6511,7 @@ export interface PlanInput {
|
|
|
6415
6511
|
*/
|
|
6416
6512
|
version?: number;
|
|
6417
6513
|
/** The currency code of the plan. */
|
|
6418
|
-
currency:
|
|
6514
|
+
currency: BillingCurrencyCode;
|
|
6419
6515
|
/** The billing cadence for subscriptions using this plan. */
|
|
6420
6516
|
billingCadence: string;
|
|
6421
6517
|
/** Whether pro-rating is enabled for this plan. */
|
|
@@ -6461,6 +6557,7 @@ export interface PlanInput {
|
|
|
6461
6557
|
*/
|
|
6462
6558
|
validationErrors?: ProductCatalogValidationError[];
|
|
6463
6559
|
}
|
|
6560
|
+
/** Plan create request. */
|
|
6464
6561
|
export interface CreatePlanRequestInput {
|
|
6465
6562
|
/**
|
|
6466
6563
|
* Display name of the resource.
|
|
@@ -6482,7 +6579,7 @@ export interface CreatePlanRequestInput {
|
|
|
6482
6579
|
*/
|
|
6483
6580
|
key: string;
|
|
6484
6581
|
/** The currency code of the plan. */
|
|
6485
|
-
currency:
|
|
6582
|
+
currency: BillingCurrencyCode;
|
|
6486
6583
|
/** The billing cadence for subscriptions using this plan. */
|
|
6487
6584
|
billingCadence: string;
|
|
6488
6585
|
/** Whether pro-rating is enabled for this plan. */
|
|
@@ -6493,6 +6590,7 @@ export interface CreatePlanRequestInput {
|
|
|
6493
6590
|
*/
|
|
6494
6591
|
phases: PlanPhaseInput[];
|
|
6495
6592
|
}
|
|
6593
|
+
/** Plan upsert request. */
|
|
6496
6594
|
export interface UpsertPlanRequestInput {
|
|
6497
6595
|
/**
|
|
6498
6596
|
* Display name of the resource.
|
|
@@ -6515,22 +6613,27 @@ export interface UpsertPlanRequestInput {
|
|
|
6515
6613
|
*/
|
|
6516
6614
|
phases: PlanPhaseInput[];
|
|
6517
6615
|
}
|
|
6616
|
+
/** Page paginated response. */
|
|
6518
6617
|
export interface AddonPagePaginatedResponseInput {
|
|
6519
6618
|
data: AddonInput[];
|
|
6520
6619
|
meta: PaginatedMeta;
|
|
6521
6620
|
}
|
|
6621
|
+
/** Page paginated response. */
|
|
6522
6622
|
export interface ProfilePagePaginatedResponseInput {
|
|
6523
6623
|
data: ProfileInput[];
|
|
6524
6624
|
meta: PaginatedMeta;
|
|
6525
6625
|
}
|
|
6626
|
+
/** Page paginated response. */
|
|
6526
6627
|
export interface SubscriptionAddonPagePaginatedResponseInput {
|
|
6527
6628
|
data: SubscriptionAddonInput[];
|
|
6528
6629
|
meta: PaginatedMeta;
|
|
6529
6630
|
}
|
|
6631
|
+
/** Page paginated response. */
|
|
6530
6632
|
export interface PlanPagePaginatedResponseInput {
|
|
6531
6633
|
data: PlanInput[];
|
|
6532
6634
|
meta: PaginatedMeta;
|
|
6533
6635
|
}
|
|
6636
|
+
/** A standard invoice for charges owed by the customer. */
|
|
6534
6637
|
export interface InvoiceStandardInput {
|
|
6535
6638
|
id: string;
|
|
6536
6639
|
/**
|
|
@@ -6609,8 +6712,9 @@ export interface InvoiceStandardInput {
|
|
|
6609
6712
|
* from the update request are deleted. Detailed (child) lines are always computed
|
|
6610
6713
|
* and cannot be edited directly.
|
|
6611
6714
|
*/
|
|
6612
|
-
lines?:
|
|
6715
|
+
lines?: InvoiceLineInput[];
|
|
6613
6716
|
}
|
|
6717
|
+
/** InvoiceStandard update request. */
|
|
6614
6718
|
export interface UpdateInvoiceStandardRequestInput {
|
|
6615
6719
|
/**
|
|
6616
6720
|
* Optional description of the resource.
|
|
@@ -6639,10 +6743,37 @@ export interface UpdateInvoiceStandardRequestInput {
|
|
|
6639
6743
|
* from the update request are deleted. Detailed (child) lines are always computed
|
|
6640
6744
|
* and cannot be edited directly.
|
|
6641
6745
|
*/
|
|
6642
|
-
lines?:
|
|
6746
|
+
lines?: UpdateInvoiceLine[];
|
|
6643
6747
|
}
|
|
6748
|
+
/** Page paginated response. */
|
|
6644
6749
|
export interface InvoicePagePaginatedResponseInput {
|
|
6645
|
-
data:
|
|
6750
|
+
data: InvoiceInput[];
|
|
6646
6751
|
meta: PaginatedMeta;
|
|
6647
6752
|
}
|
|
6648
|
-
|
|
6753
|
+
/** Payment settings for a billing workflow. */
|
|
6754
|
+
export type WorkflowPaymentSettingsInput = WorkflowPaymentChargeAutomaticallySettings | WorkflowPaymentSendInvoiceSettingsInput;
|
|
6755
|
+
/** Payment settings for a billing workflow. */
|
|
6756
|
+
export type UpdateBillingWorkflowPaymentSettingsInput = UpdateBillingWorkflowPaymentChargeAutomaticallySettings | UpdateBillingWorkflowPaymentSendInvoiceSettingsInput;
|
|
6757
|
+
/**
|
|
6758
|
+
* Entitlement template configured on a rate card. The feature is taken from the
|
|
6759
|
+
* rate card itself, so it is omitted here.
|
|
6760
|
+
*/
|
|
6761
|
+
export type RateCardEntitlementInput = RateCardMeteredEntitlementInput | RateCardStaticEntitlement | RateCardBooleanEntitlement;
|
|
6762
|
+
/**
|
|
6763
|
+
* A top-level line item on an invoice.
|
|
6764
|
+
*
|
|
6765
|
+
* Each line represents a single charge, typically associated with a rate card from
|
|
6766
|
+
* a subscription. Detailed (child) lines are nested under `detailed_lines` when
|
|
6767
|
+
* present.
|
|
6768
|
+
*/
|
|
6769
|
+
export type InvoiceLineInput = InvoiceStandardLineInput;
|
|
6770
|
+
/**
|
|
6771
|
+
* An invoice issued to a customer.
|
|
6772
|
+
*
|
|
6773
|
+
* The `type` field determines the concrete variant:
|
|
6774
|
+
*
|
|
6775
|
+
* - `standard`: a standard invoice for charges owed.
|
|
6776
|
+
*/
|
|
6777
|
+
export type InvoiceInput = InvoiceStandardInput;
|
|
6778
|
+
/** UpdateInvoiceRequest update request. */
|
|
6779
|
+
export type UpdateInvoiceRequestInput = UpdateInvoiceStandardRequestInput;
|