stripe 19.3.0-beta.1 → 19.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +235 -1
- package/OPENAPI_VERSION +1 -1
- package/VERSION +1 -1
- package/cjs/RequestSender.js +1 -1
- package/cjs/apiVersion.js +1 -1
- package/cjs/resources/DelegatedCheckout/RequestedSessions.js +28 -0
- package/cjs/resources/Identity/BlocklistEntries.js +25 -0
- package/cjs/resources/PaymentMethods.js +4 -0
- package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +16 -0
- package/cjs/resources/V2/Billing/CustomPricingUnits.js +25 -0
- package/cjs/resources/V2/Billing/Intents/Actions.js +17 -0
- package/cjs/resources/V2/Billing/Intents.js +36 -0
- package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +12 -0
- package/cjs/resources/V2/Billing/LicenseFees/Versions.js +17 -0
- package/cjs/resources/V2/Billing/LicenseFees.js +27 -0
- package/cjs/resources/V2/Billing/LicensedItems.js +25 -0
- package/cjs/resources/V2/Billing/MeteredItems.js +22 -0
- package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +12 -0
- package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +26 -0
- package/cjs/resources/V2/Billing/PricingPlans/Components.js +29 -0
- package/cjs/resources/V2/Billing/PricingPlans/Versions.js +17 -0
- package/cjs/resources/V2/Billing/PricingPlans.js +29 -0
- package/cjs/resources/V2/Billing/RateCardSubscriptions.js +29 -0
- package/cjs/resources/V2/Billing/RateCards/Rates.js +25 -0
- package/cjs/resources/V2/Billing/RateCards/Versions.js +17 -0
- package/cjs/resources/V2/Billing/RateCards.js +29 -0
- package/cjs/resources/V2/Billing/ServiceActions.js +20 -0
- package/cjs/resources/V2/Core/ClaimableSandboxes.js +16 -0
- package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +20 -0
- package/cjs/resources/V2/Reporting/ReportRuns.js +13 -0
- package/cjs/resources/V2/Reporting/Reports.js +12 -0
- package/cjs/resources/V2/Tax/AutomaticRules.js +22 -0
- package/cjs/resources/V2/TestHelpers/MoneyManagement.js +12 -0
- package/cjs/resources.js +47 -1
- package/cjs/stripe.core.js +1 -1
- package/esm/RequestSender.js +1 -1
- package/esm/apiVersion.js +1 -1
- package/esm/resources/DelegatedCheckout/RequestedSessions.js +25 -0
- package/esm/resources/Identity/BlocklistEntries.js +22 -0
- package/esm/resources/PaymentMethods.js +4 -0
- package/esm/resources/TestHelpers/Capital/FinancingOffers.js +13 -0
- package/esm/resources/V2/Billing/CustomPricingUnits.js +22 -0
- package/esm/resources/V2/Billing/Intents/Actions.js +14 -0
- package/esm/resources/V2/Billing/Intents.js +33 -0
- package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +9 -0
- package/esm/resources/V2/Billing/LicenseFees/Versions.js +14 -0
- package/esm/resources/V2/Billing/LicenseFees.js +24 -0
- package/esm/resources/V2/Billing/LicensedItems.js +22 -0
- package/esm/resources/V2/Billing/MeteredItems.js +19 -0
- package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +9 -0
- package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +23 -0
- package/esm/resources/V2/Billing/PricingPlans/Components.js +26 -0
- package/esm/resources/V2/Billing/PricingPlans/Versions.js +14 -0
- package/esm/resources/V2/Billing/PricingPlans.js +26 -0
- package/esm/resources/V2/Billing/RateCardSubscriptions.js +26 -0
- package/esm/resources/V2/Billing/RateCards/Rates.js +22 -0
- package/esm/resources/V2/Billing/RateCards/Versions.js +14 -0
- package/esm/resources/V2/Billing/RateCards.js +26 -0
- package/esm/resources/V2/Billing/ServiceActions.js +17 -0
- package/esm/resources/V2/Core/ClaimableSandboxes.js +13 -0
- package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +17 -0
- package/esm/resources/V2/Reporting/ReportRuns.js +10 -0
- package/esm/resources/V2/Reporting/Reports.js +9 -0
- package/esm/resources/V2/Tax/AutomaticRules.js +19 -0
- package/esm/resources/V2/TestHelpers/MoneyManagement.js +9 -0
- package/esm/resources.js +46 -0
- package/esm/stripe.core.js +1 -1
- package/package.json +1 -1
- package/types/ApplicationFees.d.ts +6 -1
- package/types/Balance.d.ts +82 -0
- package/types/BalanceTransactions.d.ts +2 -1
- package/types/Billing/AlertTriggereds.d.ts +15 -0
- package/types/Billing/Alerts.d.ts +116 -1
- package/types/Billing/AlertsResource.d.ts +149 -2
- package/types/Billing/Analytics/MeterUsageResource.d.ts +5 -0
- package/types/Billing/Analytics/MeterUsageRows.d.ts +7 -0
- package/types/Billing/CreditBalanceSummary.d.ts +118 -2
- package/types/Billing/CreditBalanceSummaryResource.d.ts +12 -0
- package/types/Billing/CreditBalanceTransactions.d.ts +118 -2
- package/types/Billing/CreditGrants.d.ts +71 -1
- package/types/Billing/CreditGrantsResource.d.ts +32 -1
- package/types/Billing/MeterEventSummaries.d.ts +7 -0
- package/types/Billing/Meters.d.ts +5 -0
- package/types/Billing/MetersResource.d.ts +17 -0
- package/types/Cards.d.ts +14 -0
- package/types/Charges.d.ts +14 -0
- package/types/ChargesResource.d.ts +4 -16
- package/types/Checkout/Sessions.d.ts +58 -0
- package/types/Checkout/SessionsResource.d.ts +50 -0
- package/types/ConfirmationTokens.d.ts +14 -0
- package/types/Coupons.d.ts +3 -1
- package/types/CouponsResource.d.ts +3 -1
- package/types/DelegatedCheckout/RequestedSessions.d.ts +360 -0
- package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +593 -0
- package/types/Identity/BlocklistEntries.d.ts +78 -0
- package/types/Identity/BlocklistEntriesResource.d.ts +146 -0
- package/types/Identity/VerificationReports.d.ts +10 -0
- package/types/Identity/VerificationReportsResource.d.ts +5 -0
- package/types/InvoiceItems.d.ts +104 -2
- package/types/InvoiceLineItems.d.ts +113 -2
- package/types/InvoicePayments.d.ts +1 -1
- package/types/InvoicesResource.d.ts +5 -0
- package/types/PaymentIntentAmountDetailsLineItems.d.ts +7 -13
- package/types/PaymentIntents.d.ts +37 -18
- package/types/PaymentIntentsResource.d.ts +164 -145
- package/types/PaymentMethodBalances.d.ts +63 -0
- package/types/PaymentMethods.d.ts +14 -0
- package/types/PaymentMethodsResource.d.ts +20 -0
- package/types/SetupIntents.d.ts +24 -1
- package/types/SetupIntentsResource.d.ts +90 -0
- package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +100 -0
- package/types/Transfers.d.ts +4 -0
- package/types/TransfersResource.d.ts +2 -0
- package/types/TransitBalances.d.ts +40 -0
- package/types/V2/Billing/Cadences.d.ts +51 -2
- package/types/V2/Billing/CadencesResource.d.ts +32 -3
- package/types/V2/Billing/CollectionSettingVersions.d.ts +6 -2
- package/types/V2/Billing/CollectionSettings.d.ts +6 -2
- package/types/V2/Billing/CollectionSettingsResource.d.ts +12 -4
- package/types/V2/Billing/CustomPricingUnits.d.ts +56 -0
- package/types/V2/Billing/CustomPricingUnitsResource.d.ts +122 -0
- package/types/V2/Billing/IntentActions.d.ts +459 -0
- package/types/V2/Billing/Intents/ActionsResource.d.ts +58 -0
- package/types/V2/Billing/Intents.d.ts +117 -0
- package/types/V2/Billing/IntentsResource.d.ts +575 -0
- package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +64 -0
- package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +28 -0
- package/types/V2/Billing/LicenseFeeVersions.d.ts +106 -0
- package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/LicenseFees.d.ts +164 -0
- package/types/V2/Billing/LicenseFeesResource.d.ts +290 -0
- package/types/V2/Billing/LicensedItems.d.ts +73 -0
- package/types/V2/Billing/LicensedItemsResource.d.ts +157 -0
- package/types/V2/Billing/MeteredItems.d.ts +101 -0
- package/types/V2/Billing/MeteredItemsResource.d.ts +189 -0
- package/types/V2/Billing/PricingPlanComponents.d.ts +109 -0
- package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +57 -0
- package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +40 -0
- package/types/V2/Billing/PricingPlanSubscriptions.d.ts +144 -0
- package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +120 -0
- package/types/V2/Billing/PricingPlanVersions.d.ts +49 -0
- package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +197 -0
- package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/PricingPlans.d.ts +84 -0
- package/types/V2/Billing/PricingPlansResource.d.ts +151 -0
- package/types/V2/Billing/RateCardRates.d.ts +144 -0
- package/types/V2/Billing/RateCardSubscriptions.d.ts +144 -0
- package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +157 -0
- package/types/V2/Billing/RateCardVersions.d.ts +39 -0
- package/types/V2/Billing/RateCards/RatesResource.d.ts +203 -0
- package/types/V2/Billing/RateCards/VersionsResource.d.ts +58 -0
- package/types/V2/Billing/RateCards.d.ts +98 -0
- package/types/V2/Billing/RateCardsResource.d.ts +162 -0
- package/types/V2/Billing/ServiceActions.d.ts +274 -0
- package/types/V2/Billing/ServiceActionsResource.d.ts +370 -0
- package/types/V2/Core/Accounts.d.ts +1491 -23
- package/types/V2/Core/AccountsResource.d.ts +1619 -0
- package/types/V2/Core/ClaimableSandboxes.d.ts +132 -0
- package/types/V2/Core/ClaimableSandboxesResource.d.ts +74 -0
- package/types/V2/Core/EventTypes.d.ts +7399 -343
- package/types/V2/Core/Events.d.ts +14 -0
- package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +14 -0
- package/types/V2/MoneyManagement/InboundTransfers.d.ts +9 -3
- package/types/V2/MoneyManagement/OutboundPayments.d.ts +5 -0
- package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +5 -0
- package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +34 -0
- package/types/V2/MoneyManagement/OutboundTransfers.d.ts +5 -0
- package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +5 -0
- package/types/V2/MoneyManagement/PayoutMethods.d.ts +41 -0
- package/types/V2/MoneyManagement/ReceivedCredits.d.ts +5 -0
- package/types/V2/MoneyManagement/ReceivedDebits.d.ts +10 -0
- package/types/V2/MoneyManagement/RecipientVerifications.d.ts +112 -0
- package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +77 -0
- package/types/V2/Reporting/ReportRuns.d.ts +154 -0
- package/types/V2/Reporting/ReportRunsResource.d.ts +75 -0
- package/types/V2/Reporting/Reports.d.ts +120 -0
- package/types/V2/Reporting/ReportsResource.d.ts +30 -0
- package/types/V2/Tax/AutomaticRules.d.ts +53 -0
- package/types/V2/Tax/AutomaticRulesResource.d.ts +102 -0
- package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +6 -1
- package/types/V2/TestHelpers/MoneyManagementResource.d.ts +49 -0
- package/types/Webhooks.d.ts +2 -0
- package/types/apiVersion.d.ts +1 -1
- package/types/index.d.ts +82 -0
|
@@ -98,10 +98,15 @@ declare module 'stripe' {
|
|
|
98
98
|
* Type of object that created the application fee.
|
|
99
99
|
*/
|
|
100
100
|
type: FeeSource.Type;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Transfer ID that created this application fee.
|
|
104
|
+
*/
|
|
105
|
+
transfer?: string;
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
namespace FeeSource {
|
|
104
|
-
type Type = 'charge' | 'payout';
|
|
109
|
+
type Type = 'charge' | 'payout' | 'transfer';
|
|
105
110
|
}
|
|
106
111
|
}
|
|
107
112
|
}
|
package/types/Balance.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ declare module 'stripe' {
|
|
|
44
44
|
pending: Array<Balance.Pending>;
|
|
45
45
|
|
|
46
46
|
refund_and_dispute_prefunding?: Balance.RefundAndDisputePrefunding;
|
|
47
|
+
|
|
48
|
+
transit_balances_total?: Balance.TransitBalancesTotal;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
namespace Balance {
|
|
@@ -338,6 +340,86 @@ declare module 'stripe' {
|
|
|
338
340
|
}
|
|
339
341
|
}
|
|
340
342
|
}
|
|
343
|
+
|
|
344
|
+
interface TransitBalancesTotal {
|
|
345
|
+
/**
|
|
346
|
+
* Funds that are available for use.
|
|
347
|
+
*/
|
|
348
|
+
available: Array<TransitBalancesTotal.Available>;
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Funds that are pending
|
|
352
|
+
*/
|
|
353
|
+
pending: Array<TransitBalancesTotal.Pending>;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
namespace TransitBalancesTotal {
|
|
357
|
+
interface Available {
|
|
358
|
+
/**
|
|
359
|
+
* Balance amount.
|
|
360
|
+
*/
|
|
361
|
+
amount: number;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
365
|
+
*/
|
|
366
|
+
currency: string;
|
|
367
|
+
|
|
368
|
+
source_types?: Available.SourceTypes;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
namespace Available {
|
|
372
|
+
interface SourceTypes {
|
|
373
|
+
/**
|
|
374
|
+
* Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
|
|
375
|
+
*/
|
|
376
|
+
bank_account?: number;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
|
|
380
|
+
*/
|
|
381
|
+
card?: number;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
|
|
385
|
+
*/
|
|
386
|
+
fpx?: number;
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
interface Pending {
|
|
391
|
+
/**
|
|
392
|
+
* Balance amount.
|
|
393
|
+
*/
|
|
394
|
+
amount: number;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
398
|
+
*/
|
|
399
|
+
currency: string;
|
|
400
|
+
|
|
401
|
+
source_types?: Pending.SourceTypes;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
namespace Pending {
|
|
405
|
+
interface SourceTypes {
|
|
406
|
+
/**
|
|
407
|
+
* Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
|
|
408
|
+
*/
|
|
409
|
+
bank_account?: number;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
|
|
413
|
+
*/
|
|
414
|
+
card?: number;
|
|
415
|
+
|
|
416
|
+
/**
|
|
417
|
+
* Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
|
|
418
|
+
*/
|
|
419
|
+
fpx?: number;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
341
423
|
}
|
|
342
424
|
}
|
|
343
425
|
}
|
|
@@ -22,11 +22,26 @@ declare module 'stripe' {
|
|
|
22
22
|
*/
|
|
23
23
|
created: number;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Currency for the threshold value
|
|
27
|
+
*/
|
|
28
|
+
currency?: string | null;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Custom pricing unit for the threshold value
|
|
32
|
+
*/
|
|
33
|
+
custom_pricing_unit?: string | null;
|
|
34
|
+
|
|
25
35
|
/**
|
|
26
36
|
* ID of customer for which the alert triggered
|
|
27
37
|
*/
|
|
28
38
|
customer: string;
|
|
29
39
|
|
|
40
|
+
/**
|
|
41
|
+
* External customer ID for the customer for which the alert triggered
|
|
42
|
+
*/
|
|
43
|
+
external_customer_id?: string | null;
|
|
44
|
+
|
|
30
45
|
/**
|
|
31
46
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
32
47
|
*/
|
|
@@ -20,7 +20,12 @@ declare module 'stripe' {
|
|
|
20
20
|
/**
|
|
21
21
|
* Defines the type of the alert.
|
|
22
22
|
*/
|
|
23
|
-
alert_type:
|
|
23
|
+
alert_type: Alert.AlertType;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Encapsulates configuration of the alert to monitor billing credit balance.
|
|
27
|
+
*/
|
|
28
|
+
credit_balance_threshold?: Alert.CreditBalanceThreshold | null;
|
|
24
29
|
|
|
25
30
|
/**
|
|
26
31
|
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
|
|
@@ -44,6 +49,116 @@ declare module 'stripe' {
|
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
namespace Alert {
|
|
52
|
+
type AlertType = 'credit_balance_threshold' | 'usage_threshold';
|
|
53
|
+
|
|
54
|
+
interface CreditBalanceThreshold {
|
|
55
|
+
/**
|
|
56
|
+
* The filters allow limiting the scope of this credit balance alert. You must specify only a customer filter at this time.
|
|
57
|
+
*/
|
|
58
|
+
filters: Array<CreditBalanceThreshold.Filter> | null;
|
|
59
|
+
|
|
60
|
+
lte: CreditBalanceThreshold.Lte;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
namespace CreditBalanceThreshold {
|
|
64
|
+
interface Filter {
|
|
65
|
+
/**
|
|
66
|
+
* Limit the scope of the alert to this customer ID
|
|
67
|
+
*/
|
|
68
|
+
customer: string | Stripe.Customer | null;
|
|
69
|
+
|
|
70
|
+
type: Filter.Type;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
namespace Filter {
|
|
74
|
+
type Type = 'customer' | 'tenant';
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface Lte {
|
|
78
|
+
/**
|
|
79
|
+
* The type of this balance. We currently only support `monetary` amounts.
|
|
80
|
+
*/
|
|
81
|
+
balance_type: Lte.BalanceType;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The custom pricing unit amount.
|
|
85
|
+
*/
|
|
86
|
+
custom_pricing_unit?: Lte.CustomPricingUnit | null;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* The monetary amount.
|
|
90
|
+
*/
|
|
91
|
+
monetary: Lte.Monetary | null;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
namespace Lte {
|
|
95
|
+
type BalanceType = 'custom_pricing_unit' | 'monetary';
|
|
96
|
+
|
|
97
|
+
interface CustomPricingUnit {
|
|
98
|
+
/**
|
|
99
|
+
* The custom pricing unit object.
|
|
100
|
+
*/
|
|
101
|
+
custom_pricing_unit_details: CustomPricingUnit.CustomPricingUnitDetails | null;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Unique identifier for the object.
|
|
105
|
+
*/
|
|
106
|
+
id: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* A positive decimal string representing the amount.
|
|
110
|
+
*/
|
|
111
|
+
value: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
namespace CustomPricingUnit {
|
|
115
|
+
interface CustomPricingUnitDetails {
|
|
116
|
+
/**
|
|
117
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
118
|
+
*/
|
|
119
|
+
created: number;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The name of the custom pricing unit.
|
|
123
|
+
*/
|
|
124
|
+
display_name: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Unique identifier for the object.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* A lookup key for the custom pricing unit.
|
|
133
|
+
*/
|
|
134
|
+
lookup_key: string | null;
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
138
|
+
*/
|
|
139
|
+
metadata: Stripe.Metadata;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The status of the custom pricing unit.
|
|
143
|
+
*/
|
|
144
|
+
status: string;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
interface Monetary {
|
|
149
|
+
/**
|
|
150
|
+
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
151
|
+
*/
|
|
152
|
+
currency: string;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* A positive integer representing the amount.
|
|
156
|
+
*/
|
|
157
|
+
value: number;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
47
162
|
type Status = 'active' | 'archived' | 'inactive';
|
|
48
163
|
|
|
49
164
|
interface UsageThreshold {
|
|
@@ -7,13 +7,18 @@ declare module 'stripe' {
|
|
|
7
7
|
/**
|
|
8
8
|
* The type of alert to create.
|
|
9
9
|
*/
|
|
10
|
-
alert_type:
|
|
10
|
+
alert_type: AlertCreateParams.AlertType;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* The title of the alert.
|
|
14
14
|
*/
|
|
15
15
|
title: string;
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* The configuration of the credit balance threshold.
|
|
19
|
+
*/
|
|
20
|
+
credit_balance_threshold?: AlertCreateParams.CreditBalanceThreshold;
|
|
21
|
+
|
|
17
22
|
/**
|
|
18
23
|
* Specifies which fields in the response should be expanded.
|
|
19
24
|
*/
|
|
@@ -26,6 +31,139 @@ declare module 'stripe' {
|
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
namespace AlertCreateParams {
|
|
34
|
+
type AlertType = 'credit_balance_threshold' | 'usage_threshold';
|
|
35
|
+
|
|
36
|
+
interface CreditBalanceThreshold {
|
|
37
|
+
/**
|
|
38
|
+
* The filters allows limiting the scope of this credit balance alert. You must specify a customer filter at this time.
|
|
39
|
+
*/
|
|
40
|
+
filters?: Array<CreditBalanceThreshold.Filter>;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Defines at which value the alert will fire.
|
|
44
|
+
*/
|
|
45
|
+
lte: CreditBalanceThreshold.Lte;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
namespace CreditBalanceThreshold {
|
|
49
|
+
interface Filter {
|
|
50
|
+
/**
|
|
51
|
+
* The credit grants for which to configure the credit balance alert.
|
|
52
|
+
*/
|
|
53
|
+
credit_grants?: Filter.CreditGrants;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Limit the scope to this credit balance alert only to this customer.
|
|
57
|
+
*/
|
|
58
|
+
customer?: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* What type of filter is being applied to this credit balance alert.
|
|
62
|
+
*/
|
|
63
|
+
type: Filter.Type;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
namespace Filter {
|
|
67
|
+
interface CreditGrants {
|
|
68
|
+
/**
|
|
69
|
+
* The applicability configuration for this credit grants filter.
|
|
70
|
+
*/
|
|
71
|
+
applicability_config: CreditGrants.ApplicabilityConfig;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
namespace CreditGrants {
|
|
75
|
+
interface ApplicabilityConfig {
|
|
76
|
+
/**
|
|
77
|
+
* Specify the scope of this applicability config.
|
|
78
|
+
*/
|
|
79
|
+
scope: ApplicabilityConfig.Scope;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
namespace ApplicabilityConfig {
|
|
83
|
+
interface Scope {
|
|
84
|
+
/**
|
|
85
|
+
* A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`.
|
|
86
|
+
*/
|
|
87
|
+
billable_items?: Array<Scope.BillableItem>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
|
|
91
|
+
*/
|
|
92
|
+
price_type?: 'metered';
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* A list of prices that the credit grant can apply to. We currently only support the `metered` prices. Cannot be used in combination with `price_type`.
|
|
96
|
+
*/
|
|
97
|
+
prices?: Array<Scope.Price>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
namespace Scope {
|
|
101
|
+
interface BillableItem {
|
|
102
|
+
/**
|
|
103
|
+
* The billable item ID this credit grant should apply to.
|
|
104
|
+
*/
|
|
105
|
+
id: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface Price {
|
|
109
|
+
/**
|
|
110
|
+
* The price ID this credit grant should apply to.
|
|
111
|
+
*/
|
|
112
|
+
id: string;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
type Type = 'customer' | 'tenant';
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
interface Lte {
|
|
122
|
+
/**
|
|
123
|
+
* Specify the type of this balance. We currently only support `monetary` billing credits.
|
|
124
|
+
*/
|
|
125
|
+
balance_type: Lte.BalanceType;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The custom pricing unit amount.
|
|
129
|
+
*/
|
|
130
|
+
custom_pricing_unit?: Lte.CustomPricingUnit;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* The monetary amount.
|
|
134
|
+
*/
|
|
135
|
+
monetary?: Lte.Monetary;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
namespace Lte {
|
|
139
|
+
type BalanceType = 'custom_pricing_unit' | 'monetary';
|
|
140
|
+
|
|
141
|
+
interface CustomPricingUnit {
|
|
142
|
+
/**
|
|
143
|
+
* The ID of the custom pricing unit.
|
|
144
|
+
*/
|
|
145
|
+
id: string;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* A positive decimal string representing the amount of the custom pricing unit threshold.
|
|
149
|
+
*/
|
|
150
|
+
value: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
interface Monetary {
|
|
154
|
+
/**
|
|
155
|
+
* Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter.
|
|
156
|
+
*/
|
|
157
|
+
currency: string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* An integer representing the amount of the threshold.
|
|
161
|
+
*/
|
|
162
|
+
value: number;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
29
167
|
interface UsageThreshold {
|
|
30
168
|
/**
|
|
31
169
|
* The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time.
|
|
@@ -74,7 +212,12 @@ declare module 'stripe' {
|
|
|
74
212
|
/**
|
|
75
213
|
* Filter results to only include this type of alert.
|
|
76
214
|
*/
|
|
77
|
-
alert_type?:
|
|
215
|
+
alert_type?: AlertListParams.AlertType;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Filter results to only include alerts for the given customer.
|
|
219
|
+
*/
|
|
220
|
+
customer?: string;
|
|
78
221
|
|
|
79
222
|
/**
|
|
80
223
|
* Specifies which fields in the response should be expanded.
|
|
@@ -87,6 +230,10 @@ declare module 'stripe' {
|
|
|
87
230
|
meter?: string;
|
|
88
231
|
}
|
|
89
232
|
|
|
233
|
+
namespace AlertListParams {
|
|
234
|
+
type AlertType = 'credit_balance_threshold' | 'usage_threshold';
|
|
235
|
+
}
|
|
236
|
+
|
|
90
237
|
interface AlertActivateParams {
|
|
91
238
|
/**
|
|
92
239
|
* Specifies which fields in the response should be expanded.
|
|
@@ -66,6 +66,11 @@ declare module 'stripe' {
|
|
|
66
66
|
tenant_filters?: {
|
|
67
67
|
[key: string]: string;
|
|
68
68
|
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* List of high cardinality tenant dimension keys to group by. If specified, usage events will be grouped by the given tenant dimension key's values.
|
|
72
|
+
*/
|
|
73
|
+
tenant_group_by_keys?: Array<string>;
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
type Timezone =
|
|
@@ -40,6 +40,13 @@ declare module 'stripe' {
|
|
|
40
40
|
*/
|
|
41
41
|
starts_at: number;
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* A set of key-value pairs representing the tenants of the meter usage.
|
|
45
|
+
*/
|
|
46
|
+
tenants?: {
|
|
47
|
+
[key: string]: string;
|
|
48
|
+
} | null;
|
|
49
|
+
|
|
43
50
|
/**
|
|
44
51
|
* The aggregated meter usage value for the specified bucket.
|
|
45
52
|
*/
|
|
@@ -42,6 +42,11 @@ declare module 'stripe' {
|
|
|
42
42
|
|
|
43
43
|
namespace Balance {
|
|
44
44
|
interface AvailableBalance {
|
|
45
|
+
/**
|
|
46
|
+
* The custom pricing unit amount.
|
|
47
|
+
*/
|
|
48
|
+
custom_pricing_unit?: AvailableBalance.CustomPricingUnit | null;
|
|
49
|
+
|
|
45
50
|
/**
|
|
46
51
|
* The monetary amount.
|
|
47
52
|
*/
|
|
@@ -50,10 +55,61 @@ declare module 'stripe' {
|
|
|
50
55
|
/**
|
|
51
56
|
* The type of this amount. We currently only support `monetary` billing credits.
|
|
52
57
|
*/
|
|
53
|
-
type:
|
|
58
|
+
type: AvailableBalance.Type;
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
namespace AvailableBalance {
|
|
62
|
+
interface CustomPricingUnit {
|
|
63
|
+
/**
|
|
64
|
+
* The custom pricing unit object.
|
|
65
|
+
*/
|
|
66
|
+
custom_pricing_unit_details: CustomPricingUnit.CustomPricingUnitDetails | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Unique identifier for the object.
|
|
70
|
+
*/
|
|
71
|
+
id: string;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* A positive integer representing the amount.
|
|
75
|
+
*/
|
|
76
|
+
value: string;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
namespace CustomPricingUnit {
|
|
80
|
+
interface CustomPricingUnitDetails {
|
|
81
|
+
/**
|
|
82
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
83
|
+
*/
|
|
84
|
+
created: number;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The name of the custom pricing unit.
|
|
88
|
+
*/
|
|
89
|
+
display_name: string;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Unique identifier for the object.
|
|
93
|
+
*/
|
|
94
|
+
id: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* A lookup key for the custom pricing unit.
|
|
98
|
+
*/
|
|
99
|
+
lookup_key: string | null;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
103
|
+
*/
|
|
104
|
+
metadata: Stripe.Metadata;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* The status of the custom pricing unit.
|
|
108
|
+
*/
|
|
109
|
+
status: string;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
57
113
|
interface Monetary {
|
|
58
114
|
/**
|
|
59
115
|
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
@@ -65,9 +121,16 @@ declare module 'stripe' {
|
|
|
65
121
|
*/
|
|
66
122
|
value: number;
|
|
67
123
|
}
|
|
124
|
+
|
|
125
|
+
type Type = 'custom_pricing_unit' | 'monetary';
|
|
68
126
|
}
|
|
69
127
|
|
|
70
128
|
interface LedgerBalance {
|
|
129
|
+
/**
|
|
130
|
+
* The custom pricing unit amount.
|
|
131
|
+
*/
|
|
132
|
+
custom_pricing_unit?: LedgerBalance.CustomPricingUnit | null;
|
|
133
|
+
|
|
71
134
|
/**
|
|
72
135
|
* The monetary amount.
|
|
73
136
|
*/
|
|
@@ -76,10 +139,61 @@ declare module 'stripe' {
|
|
|
76
139
|
/**
|
|
77
140
|
* The type of this amount. We currently only support `monetary` billing credits.
|
|
78
141
|
*/
|
|
79
|
-
type:
|
|
142
|
+
type: LedgerBalance.Type;
|
|
80
143
|
}
|
|
81
144
|
|
|
82
145
|
namespace LedgerBalance {
|
|
146
|
+
interface CustomPricingUnit {
|
|
147
|
+
/**
|
|
148
|
+
* The custom pricing unit object.
|
|
149
|
+
*/
|
|
150
|
+
custom_pricing_unit_details: CustomPricingUnit.CustomPricingUnitDetails | null;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Unique identifier for the object.
|
|
154
|
+
*/
|
|
155
|
+
id: string;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* A positive integer representing the amount.
|
|
159
|
+
*/
|
|
160
|
+
value: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
namespace CustomPricingUnit {
|
|
164
|
+
interface CustomPricingUnitDetails {
|
|
165
|
+
/**
|
|
166
|
+
* Time at which the object was created. Measured in seconds since the Unix epoch.
|
|
167
|
+
*/
|
|
168
|
+
created: number;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* The name of the custom pricing unit.
|
|
172
|
+
*/
|
|
173
|
+
display_name: string;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Unique identifier for the object.
|
|
177
|
+
*/
|
|
178
|
+
id: string;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* A lookup key for the custom pricing unit.
|
|
182
|
+
*/
|
|
183
|
+
lookup_key: string | null;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
|
|
187
|
+
*/
|
|
188
|
+
metadata: Stripe.Metadata;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* The status of the custom pricing unit.
|
|
192
|
+
*/
|
|
193
|
+
status: string;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
83
197
|
interface Monetary {
|
|
84
198
|
/**
|
|
85
199
|
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
|
|
@@ -91,6 +205,8 @@ declare module 'stripe' {
|
|
|
91
205
|
*/
|
|
92
206
|
value: number;
|
|
93
207
|
}
|
|
208
|
+
|
|
209
|
+
type Type = 'custom_pricing_unit' | 'monetary';
|
|
94
210
|
}
|
|
95
211
|
}
|
|
96
212
|
}
|
|
@@ -45,6 +45,11 @@ declare module 'stripe' {
|
|
|
45
45
|
|
|
46
46
|
namespace Filter {
|
|
47
47
|
interface ApplicabilityScope {
|
|
48
|
+
/**
|
|
49
|
+
* A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with `price_type` or `prices`.
|
|
50
|
+
*/
|
|
51
|
+
billable_items?: Array<ApplicabilityScope.BillableItem>;
|
|
52
|
+
|
|
48
53
|
/**
|
|
49
54
|
* The price type that credit grants can apply to. We currently only support the `metered` price type. Cannot be used in combination with `prices`.
|
|
50
55
|
*/
|
|
@@ -57,6 +62,13 @@ declare module 'stripe' {
|
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
namespace ApplicabilityScope {
|
|
65
|
+
interface BillableItem {
|
|
66
|
+
/**
|
|
67
|
+
* The billable item ID this credit grant should apply to.
|
|
68
|
+
*/
|
|
69
|
+
id: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
60
72
|
interface Price {
|
|
61
73
|
/**
|
|
62
74
|
* The price ID this credit grant should apply to.
|