stripe 20.2.0-alpha.1 → 20.2.0-beta.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.
Files changed (261) hide show
  1. package/CHANGELOG.md +45 -460
  2. package/OPENAPI_VERSION +1 -1
  3. package/VERSION +1 -1
  4. package/cjs/Error.js +1 -9
  5. package/cjs/StripeEventNotificationHandler.js +118 -0
  6. package/cjs/resources/PaymentMethods.js +0 -4
  7. package/cjs/resources/Reserve/Holds.js +14 -0
  8. package/cjs/resources/{ProductCatalog/TrialOffers.js → Reserve/Plans.js} +3 -6
  9. package/cjs/resources/{SharedPayment/GrantedTokens.js → Reserve/Releases.js} +8 -3
  10. package/cjs/resources.js +11 -77
  11. package/cjs/stripe.core.js +5 -1
  12. package/esm/Error.js +0 -7
  13. package/esm/StripeEventNotificationHandler.js +114 -0
  14. package/esm/resources/PaymentMethods.js +0 -4
  15. package/esm/resources/Reserve/Holds.js +11 -0
  16. package/esm/resources/Reserve/Plans.js +6 -0
  17. package/esm/resources/Reserve/Releases.js +14 -0
  18. package/esm/resources.js +7 -72
  19. package/esm/stripe.core.js +5 -1
  20. package/package.json +1 -1
  21. package/types/AccountSessions.d.ts +0 -18
  22. package/types/AccountSessionsResource.d.ts +0 -21
  23. package/types/AccountsResource.d.ts +12 -136
  24. package/types/ApplicationFees.d.ts +1 -6
  25. package/types/Balance.d.ts +0 -82
  26. package/types/BalanceTransactions.d.ts +1 -2
  27. package/types/Billing/AlertTriggereds.d.ts +0 -15
  28. package/types/Billing/Alerts.d.ts +1 -116
  29. package/types/Billing/AlertsResource.d.ts +2 -149
  30. package/types/Billing/Analytics/MeterUsageResource.d.ts +0 -5
  31. package/types/Billing/Analytics/MeterUsageRows.d.ts +0 -7
  32. package/types/Billing/CreditBalanceSummary.d.ts +2 -118
  33. package/types/Billing/CreditBalanceSummaryResource.d.ts +0 -12
  34. package/types/Billing/CreditBalanceTransactions.d.ts +2 -118
  35. package/types/Billing/CreditGrants.d.ts +1 -71
  36. package/types/Billing/CreditGrantsResource.d.ts +1 -32
  37. package/types/Billing/MeterEventSummaries.d.ts +0 -7
  38. package/types/Billing/Meters.d.ts +0 -5
  39. package/types/Billing/MetersResource.d.ts +0 -17
  40. package/types/Cards.d.ts +0 -14
  41. package/types/Charges.d.ts +0 -14
  42. package/types/Checkout/Sessions.d.ts +0 -58
  43. package/types/Checkout/SessionsResource.d.ts +0 -78
  44. package/types/ConfirmationTokens.d.ts +0 -14
  45. package/types/Discounts.d.ts +0 -10
  46. package/types/Errors.d.ts +0 -6
  47. package/types/Identity/VerificationReports.d.ts +0 -10
  48. package/types/Identity/VerificationReportsResource.d.ts +0 -5
  49. package/types/InvoiceItems.d.ts +3 -118
  50. package/types/InvoiceLineItems.d.ts +8 -127
  51. package/types/Invoices.d.ts +0 -13
  52. package/types/InvoicesResource.d.ts +0 -201
  53. package/types/Issuing/Cards.d.ts +0 -10
  54. package/types/Issuing/CardsResource.d.ts +0 -33
  55. package/types/PaymentIntents.d.ts +1 -45
  56. package/types/PaymentIntentsResource.d.ts +5 -126
  57. package/types/PaymentLinksResource.d.ts +0 -14
  58. package/types/PaymentMethods.d.ts +0 -14
  59. package/types/PaymentMethodsResource.d.ts +0 -20
  60. package/types/Persons.d.ts +0 -28
  61. package/types/ProductsResource.d.ts +0 -24
  62. package/types/QuoteLines.d.ts +0 -17
  63. package/types/QuotePreviewInvoices.d.ts +0 -13
  64. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -126
  65. package/types/Quotes.d.ts +0 -282
  66. package/types/QuotesResource.d.ts +44 -662
  67. package/types/Reserve/Holds.d.ts +104 -0
  68. package/types/Reserve/HoldsResource.d.ts +76 -0
  69. package/types/Reserve/Plans.d.ts +103 -0
  70. package/types/{SharedPayment/GrantedTokensResource.d.ts → Reserve/PlansResource.d.ts} +7 -7
  71. package/types/Reserve/Releases.d.ts +105 -0
  72. package/types/Reserve/ReleasesResource.d.ts +60 -0
  73. package/types/SetupIntents.d.ts +0 -21
  74. package/types/SetupIntentsResource.d.ts +0 -90
  75. package/types/SubscriptionItems.d.ts +0 -13
  76. package/types/SubscriptionItemsResource.d.ts +0 -34
  77. package/types/SubscriptionSchedules.d.ts +0 -124
  78. package/types/SubscriptionSchedulesResource.d.ts +0 -238
  79. package/types/Subscriptions.d.ts +0 -22
  80. package/types/SubscriptionsResource.d.ts +0 -34
  81. package/types/TokensResource.d.ts +0 -68
  82. package/types/Transfers.d.ts +0 -4
  83. package/types/TransfersResource.d.ts +0 -2
  84. package/types/V2/Billing/Cadences.d.ts +0 -45
  85. package/types/V2/Billing/CadencesResource.d.ts +3 -32
  86. package/types/V2/Core/AccountTokensResource.d.ts +0 -245
  87. package/types/V2/Core/Accounts.d.ts +1 -1473
  88. package/types/V2/Core/AccountsResource.d.ts +0 -1644
  89. package/types/V2/Core/EventTypes.d.ts +702 -4551
  90. package/types/V2/Core/Events.d.ts +0 -61
  91. package/types/V2/Core/EventsResource.d.ts +1 -11
  92. package/types/V2/Core/Vault/GbBankAccounts.d.ts +0 -21
  93. package/types/V2/Core/Vault/UsBankAccounts.d.ts +0 -21
  94. package/types/V2/EventMisc.d.ts +37 -0
  95. package/types/V2/MoneyManagement/FinancialAccounts.d.ts +1 -31
  96. package/types/V2/MoneyManagement/FinancialAccountsResource.d.ts +0 -7
  97. package/types/V2/MoneyManagement/FinancialAddresses.d.ts +1 -4
  98. package/types/V2/MoneyManagement/FinancialAddressesResource.d.ts +1 -18
  99. package/types/V2/MoneyManagement/OutboundPaymentQuotes.d.ts +0 -8
  100. package/types/V2/MoneyManagement/OutboundPaymentQuotesResource.d.ts +0 -7
  101. package/types/V2/MoneyManagement/OutboundPayments.d.ts +0 -12
  102. package/types/V2/MoneyManagement/OutboundPaymentsResource.d.ts +0 -12
  103. package/types/V2/MoneyManagement/OutboundSetupIntentsResource.d.ts +0 -34
  104. package/types/V2/MoneyManagement/OutboundTransfers.d.ts +0 -5
  105. package/types/V2/MoneyManagement/OutboundTransfersResource.d.ts +0 -5
  106. package/types/V2/MoneyManagement/PayoutMethods.d.ts +0 -62
  107. package/types/V2/MoneyManagement/ReceivedCredits.d.ts +1 -34
  108. package/types/V2/MoneyManagement/ReceivedDebits.d.ts +1 -61
  109. package/types/V2/TestHelpers/FinancialAddressesResource.d.ts +1 -6
  110. package/types/WebhookEndpointsResource.d.ts +2 -1
  111. package/types/Webhooks.d.ts +0 -2
  112. package/types/index.d.ts +25 -122
  113. package/types/test/typescriptTest.ts +27 -0
  114. package/cjs/resources/BalanceTransfers.js +0 -9
  115. package/cjs/resources/DelegatedCheckout/RequestedSessions.js +0 -28
  116. package/cjs/resources/Identity/BlocklistEntries.js +0 -25
  117. package/cjs/resources/Issuing/Programs.js +0 -22
  118. package/cjs/resources/Radar/AccountEvaluations.js +0 -20
  119. package/cjs/resources/TestHelpers/Capital/FinancingOffers.js +0 -16
  120. package/cjs/resources/TestHelpers/SharedPayment/GrantedTokens.js +0 -16
  121. package/cjs/resources/V2/Billing/CustomPricingUnits.js +0 -25
  122. package/cjs/resources/V2/Billing/Intents/Actions.js +0 -17
  123. package/cjs/resources/V2/Billing/Intents.js +0 -36
  124. package/cjs/resources/V2/Billing/LicenseFeeSubscriptions.js +0 -12
  125. package/cjs/resources/V2/Billing/LicenseFees/Versions.js +0 -17
  126. package/cjs/resources/V2/Billing/LicenseFees.js +0 -27
  127. package/cjs/resources/V2/Billing/LicensedItems.js +0 -25
  128. package/cjs/resources/V2/Billing/MeteredItems.js +0 -22
  129. package/cjs/resources/V2/Billing/PricingPlanSubscriptions/Components.js +0 -12
  130. package/cjs/resources/V2/Billing/PricingPlanSubscriptions.js +0 -26
  131. package/cjs/resources/V2/Billing/PricingPlans/Components.js +0 -29
  132. package/cjs/resources/V2/Billing/PricingPlans/Versions.js +0 -17
  133. package/cjs/resources/V2/Billing/PricingPlans.js +0 -29
  134. package/cjs/resources/V2/Billing/RateCardSubscriptions.js +0 -29
  135. package/cjs/resources/V2/Billing/RateCards/Rates.js +0 -25
  136. package/cjs/resources/V2/Billing/RateCards/Versions.js +0 -17
  137. package/cjs/resources/V2/Billing/RateCards.js +0 -29
  138. package/cjs/resources/V2/Billing/ServiceActions.js +0 -20
  139. package/cjs/resources/V2/Core/ClaimableSandboxes.js +0 -16
  140. package/cjs/resources/V2/Iam/ApiKeys.js +0 -24
  141. package/cjs/resources/V2/MoneyManagement/CurrencyConversions.js +0 -21
  142. package/cjs/resources/V2/MoneyManagement/RecipientVerifications.js +0 -20
  143. package/cjs/resources/V2/Payments/OffSessionPayments.js +0 -29
  144. package/cjs/resources/V2/Payments/SettlementAllocationIntents/Splits.js +0 -20
  145. package/cjs/resources/V2/Payments/SettlementAllocationIntents.js +0 -33
  146. package/cjs/resources/V2/Reporting/ReportRuns.js +0 -13
  147. package/cjs/resources/V2/Reporting/Reports.js +0 -12
  148. package/cjs/resources/V2/Tax/ManualRules.js +0 -23
  149. package/cjs/resources/V2/TestHelpers/MoneyManagement.js +0 -12
  150. package/esm/resources/BalanceTransfers.js +0 -6
  151. package/esm/resources/DelegatedCheckout/RequestedSessions.js +0 -25
  152. package/esm/resources/Identity/BlocklistEntries.js +0 -22
  153. package/esm/resources/Issuing/Programs.js +0 -19
  154. package/esm/resources/ProductCatalog/TrialOffers.js +0 -9
  155. package/esm/resources/Radar/AccountEvaluations.js +0 -17
  156. package/esm/resources/SharedPayment/GrantedTokens.js +0 -9
  157. package/esm/resources/TestHelpers/Capital/FinancingOffers.js +0 -13
  158. package/esm/resources/TestHelpers/SharedPayment/GrantedTokens.js +0 -13
  159. package/esm/resources/V2/Billing/CustomPricingUnits.js +0 -22
  160. package/esm/resources/V2/Billing/Intents/Actions.js +0 -14
  161. package/esm/resources/V2/Billing/Intents.js +0 -33
  162. package/esm/resources/V2/Billing/LicenseFeeSubscriptions.js +0 -9
  163. package/esm/resources/V2/Billing/LicenseFees/Versions.js +0 -14
  164. package/esm/resources/V2/Billing/LicenseFees.js +0 -24
  165. package/esm/resources/V2/Billing/LicensedItems.js +0 -22
  166. package/esm/resources/V2/Billing/MeteredItems.js +0 -19
  167. package/esm/resources/V2/Billing/PricingPlanSubscriptions/Components.js +0 -9
  168. package/esm/resources/V2/Billing/PricingPlanSubscriptions.js +0 -23
  169. package/esm/resources/V2/Billing/PricingPlans/Components.js +0 -26
  170. package/esm/resources/V2/Billing/PricingPlans/Versions.js +0 -14
  171. package/esm/resources/V2/Billing/PricingPlans.js +0 -26
  172. package/esm/resources/V2/Billing/RateCardSubscriptions.js +0 -26
  173. package/esm/resources/V2/Billing/RateCards/Rates.js +0 -22
  174. package/esm/resources/V2/Billing/RateCards/Versions.js +0 -14
  175. package/esm/resources/V2/Billing/RateCards.js +0 -26
  176. package/esm/resources/V2/Billing/ServiceActions.js +0 -17
  177. package/esm/resources/V2/Core/ClaimableSandboxes.js +0 -13
  178. package/esm/resources/V2/Iam/ApiKeys.js +0 -21
  179. package/esm/resources/V2/MoneyManagement/CurrencyConversions.js +0 -18
  180. package/esm/resources/V2/MoneyManagement/RecipientVerifications.js +0 -17
  181. package/esm/resources/V2/Payments/OffSessionPayments.js +0 -26
  182. package/esm/resources/V2/Payments/SettlementAllocationIntents/Splits.js +0 -17
  183. package/esm/resources/V2/Payments/SettlementAllocationIntents.js +0 -30
  184. package/esm/resources/V2/Reporting/ReportRuns.js +0 -10
  185. package/esm/resources/V2/Reporting/Reports.js +0 -9
  186. package/esm/resources/V2/Tax/ManualRules.js +0 -20
  187. package/esm/resources/V2/TestHelpers/MoneyManagement.js +0 -9
  188. package/types/BalanceTransfers.d.ts +0 -122
  189. package/types/BalanceTransfersResource.d.ts +0 -87
  190. package/types/DelegatedCheckout/RequestedSessions.d.ts +0 -465
  191. package/types/DelegatedCheckout/RequestedSessionsResource.d.ts +0 -701
  192. package/types/Identity/BlocklistEntries.d.ts +0 -78
  193. package/types/Identity/BlocklistEntriesResource.d.ts +0 -146
  194. package/types/Issuing/Programs.d.ts +0 -42
  195. package/types/Issuing/ProgramsResource.d.ts +0 -96
  196. package/types/PaymentMethodBalances.d.ts +0 -63
  197. package/types/ProductCatalog/TrialOffers.d.ts +0 -77
  198. package/types/ProductCatalog/TrialOffersResource.d.ts +0 -80
  199. package/types/Radar/AccountEvaluations.d.ts +0 -88
  200. package/types/Radar/AccountEvaluationsResource.d.ts +0 -148
  201. package/types/SharedPayment/GrantedTokens.d.ts +0 -102
  202. package/types/TestHelpers/Capital/FinancingOffersResource.d.ts +0 -130
  203. package/types/TestHelpers/SharedPayment/GrantedTokensResource.d.ts +0 -87
  204. package/types/TransitBalances.d.ts +0 -40
  205. package/types/V2/Billing/CustomPricingUnits.d.ts +0 -56
  206. package/types/V2/Billing/CustomPricingUnitsResource.d.ts +0 -122
  207. package/types/V2/Billing/IntentActions.d.ts +0 -564
  208. package/types/V2/Billing/Intents/ActionsResource.d.ts +0 -58
  209. package/types/V2/Billing/Intents.d.ts +0 -117
  210. package/types/V2/Billing/IntentsResource.d.ts +0 -674
  211. package/types/V2/Billing/LicenseFeeSubscriptions.d.ts +0 -64
  212. package/types/V2/Billing/LicenseFeeSubscriptionsResource.d.ts +0 -28
  213. package/types/V2/Billing/LicenseFeeVersions.d.ts +0 -106
  214. package/types/V2/Billing/LicenseFees/VersionsResource.d.ts +0 -58
  215. package/types/V2/Billing/LicenseFees.d.ts +0 -164
  216. package/types/V2/Billing/LicenseFeesResource.d.ts +0 -290
  217. package/types/V2/Billing/LicensedItems.d.ts +0 -73
  218. package/types/V2/Billing/LicensedItemsResource.d.ts +0 -157
  219. package/types/V2/Billing/MeteredItems.d.ts +0 -101
  220. package/types/V2/Billing/MeteredItemsResource.d.ts +0 -189
  221. package/types/V2/Billing/PricingPlanComponents.d.ts +0 -109
  222. package/types/V2/Billing/PricingPlanSubscriptionComponents.d.ts +0 -57
  223. package/types/V2/Billing/PricingPlanSubscriptions/ComponentsResource.d.ts +0 -40
  224. package/types/V2/Billing/PricingPlanSubscriptions.d.ts +0 -144
  225. package/types/V2/Billing/PricingPlanSubscriptionsResource.d.ts +0 -120
  226. package/types/V2/Billing/PricingPlanVersions.d.ts +0 -49
  227. package/types/V2/Billing/PricingPlans/ComponentsResource.d.ts +0 -197
  228. package/types/V2/Billing/PricingPlans/VersionsResource.d.ts +0 -58
  229. package/types/V2/Billing/PricingPlans.d.ts +0 -84
  230. package/types/V2/Billing/PricingPlansResource.d.ts +0 -151
  231. package/types/V2/Billing/RateCardRates.d.ts +0 -144
  232. package/types/V2/Billing/RateCardSubscriptions.d.ts +0 -144
  233. package/types/V2/Billing/RateCardSubscriptionsResource.d.ts +0 -157
  234. package/types/V2/Billing/RateCardVersions.d.ts +0 -39
  235. package/types/V2/Billing/RateCards/RatesResource.d.ts +0 -203
  236. package/types/V2/Billing/RateCards/VersionsResource.d.ts +0 -58
  237. package/types/V2/Billing/RateCards.d.ts +0 -98
  238. package/types/V2/Billing/RateCardsResource.d.ts +0 -162
  239. package/types/V2/Billing/ServiceActions.d.ts +0 -298
  240. package/types/V2/Billing/ServiceActionsResource.d.ts +0 -394
  241. package/types/V2/Core/ClaimableSandboxes.d.ts +0 -132
  242. package/types/V2/Core/ClaimableSandboxesResource.d.ts +0 -74
  243. package/types/V2/Iam/ApiKeys.d.ts +0 -154
  244. package/types/V2/Iam/ApiKeysResource.d.ts +0 -215
  245. package/types/V2/MoneyManagement/CurrencyConversions.d.ts +0 -98
  246. package/types/V2/MoneyManagement/CurrencyConversionsResource.d.ts +0 -141
  247. package/types/V2/MoneyManagement/RecipientVerifications.d.ts +0 -112
  248. package/types/V2/MoneyManagement/RecipientVerificationsResource.d.ts +0 -77
  249. package/types/V2/Payments/OffSessionPayments.d.ts +0 -249
  250. package/types/V2/Payments/OffSessionPaymentsResource.d.ts +0 -306
  251. package/types/V2/Payments/SettlementAllocationIntentSplits.d.ts +0 -111
  252. package/types/V2/Payments/SettlementAllocationIntents/SplitsResource.d.ts +0 -126
  253. package/types/V2/Payments/SettlementAllocationIntents.d.ts +0 -122
  254. package/types/V2/Payments/SettlementAllocationIntentsResource.d.ts +0 -168
  255. package/types/V2/Reporting/ReportRuns.d.ts +0 -154
  256. package/types/V2/Reporting/ReportRunsResource.d.ts +0 -75
  257. package/types/V2/Reporting/Reports.d.ts +0 -120
  258. package/types/V2/Reporting/ReportsResource.d.ts +0 -30
  259. package/types/V2/Tax/ManualRules.d.ts +0 -142
  260. package/types/V2/Tax/ManualRulesResource.d.ts +0 -292
  261. package/types/V2/TestHelpers/MoneyManagementResource.d.ts +0 -49
@@ -1,564 +0,0 @@
1
- // File generated from our OpenAPI spec
2
-
3
- declare module 'stripe' {
4
- namespace Stripe {
5
- namespace V2 {
6
- namespace Billing {
7
- /**
8
- * The IntentAction object.
9
- */
10
- interface IntentAction {
11
- /**
12
- * Unique identifier for the object.
13
- */
14
- id: string;
15
-
16
- /**
17
- * String representing the object's type. Objects of the same type share the same value of the object field.
18
- */
19
- object: 'v2.billing.intent_action';
20
-
21
- /**
22
- * Details for an apply action.
23
- */
24
- apply?: IntentAction.Apply;
25
-
26
- /**
27
- * Time at which the object was created.
28
- */
29
- created: string;
30
-
31
- /**
32
- * Details for a deactivate action.
33
- */
34
- deactivate?: IntentAction.Deactivate;
35
-
36
- /**
37
- * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
38
- */
39
- livemode: boolean;
40
-
41
- /**
42
- * Details for a modify action.
43
- */
44
- modify?: IntentAction.Modify;
45
-
46
- /**
47
- * Details for a remove action.
48
- */
49
- remove?: IntentAction.Remove;
50
-
51
- /**
52
- * Details for a subscribe action.
53
- */
54
- subscribe?: IntentAction.Subscribe;
55
-
56
- /**
57
- * Type of the Billing Intent Action.
58
- */
59
- type: IntentAction.Type;
60
- }
61
-
62
- namespace IntentAction {
63
- interface Apply {
64
- /**
65
- * Type of the apply action details.
66
- */
67
- type: 'invoice_discount_rule';
68
-
69
- /**
70
- * Details for applying a discount rule to future invoices.
71
- */
72
- invoice_discount_rule?: Apply.InvoiceDiscountRule;
73
- }
74
-
75
- namespace Apply {
76
- interface InvoiceDiscountRule {
77
- /**
78
- * The entity that the discount rule applies to, for example, the Billing Cadence.
79
- */
80
- applies_to: 'cadence';
81
-
82
- /**
83
- * The ID of the created discount rule. This is only present once the Billing Intent is committed and the discount rule is created.
84
- */
85
- invoice_discount_rule?: string;
86
-
87
- /**
88
- * Type of the discount rule.
89
- */
90
- type: 'percent_off';
91
-
92
- /**
93
- * Configuration for percentage off discount.
94
- */
95
- percent_off?: InvoiceDiscountRule.PercentOff;
96
- }
97
-
98
- namespace InvoiceDiscountRule {
99
- interface PercentOff {
100
- /**
101
- * The maximum number of times this discount can be applied for this Billing Cadence.
102
- */
103
- maximum_applications: PercentOff.MaximumApplications;
104
-
105
- /**
106
- * Percent that will be taken off of the amount. For example, percent_off of 50.0 will make $100 amount $50 instead.
107
- */
108
- percent_off: string;
109
- }
110
-
111
- namespace PercentOff {
112
- interface MaximumApplications {
113
- /**
114
- * The type of maximum applications configuration.
115
- */
116
- type: 'indefinite';
117
- }
118
- }
119
- }
120
- }
121
-
122
- interface Deactivate {
123
- /**
124
- * Allows users to override the collect at behavior.
125
- */
126
- collect_at: Deactivate.CollectAt;
127
-
128
- /**
129
- * When the deactivate action will take effect. If not specified, the default behavior is on_reserve.
130
- */
131
- effective_at: Deactivate.EffectiveAt;
132
-
133
- /**
134
- * Type of the action details.
135
- */
136
- type: Deactivate.Type;
137
-
138
- /**
139
- * Details for deactivating a Pricing Plan Subscription.
140
- */
141
- pricing_plan_subscription_details?: Deactivate.PricingPlanSubscriptionDetails;
142
- }
143
-
144
- namespace Deactivate {
145
- type CollectAt = 'next_billing_date' | 'on_effective_at';
146
-
147
- interface EffectiveAt {
148
- /**
149
- * The timestamp at which the deactivate action will take effect. Only present if type is timestamp.
150
- */
151
- timestamp?: string;
152
-
153
- /**
154
- * When the deactivate action will take effect.
155
- */
156
- type: EffectiveAt.Type;
157
- }
158
-
159
- namespace EffectiveAt {
160
- type Type =
161
- | 'current_billing_period_end'
162
- | 'current_billing_period_start'
163
- | 'on_reserve'
164
- | 'timestamp';
165
- }
166
-
167
- interface PricingPlanSubscriptionDetails {
168
- /**
169
- * Allows users to override the partial period behavior.
170
- */
171
- overrides?: PricingPlanSubscriptionDetails.Overrides;
172
-
173
- /**
174
- * ID of the Pricing Plan Subscription to deactivate.
175
- */
176
- pricing_plan_subscription: string;
177
- }
178
-
179
- namespace PricingPlanSubscriptionDetails {
180
- interface Overrides {
181
- /**
182
- * Override for the partial period behavior.
183
- */
184
- partial_period_behaviors: Array<
185
- Overrides.PartialPeriodBehavior
186
- >;
187
- }
188
-
189
- namespace Overrides {
190
- interface PartialPeriodBehavior {
191
- /**
192
- * Type of the partial period behavior override.
193
- */
194
- type: 'license_fee';
195
-
196
- /**
197
- * Override for the license fee.
198
- */
199
- license_fee?: PartialPeriodBehavior.LicenseFee;
200
- }
201
-
202
- namespace PartialPeriodBehavior {
203
- interface LicenseFee {
204
- /**
205
- * The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user is deactivating.
206
- */
207
- credit_proration_behavior: LicenseFee.CreditProrationBehavior;
208
- }
209
-
210
- namespace LicenseFee {
211
- type CreditProrationBehavior = 'none' | 'prorated';
212
- }
213
- }
214
- }
215
- }
216
-
217
- type Type =
218
- | 'pricing_plan_subscription_details'
219
- | 'v1_subscription_details';
220
- }
221
-
222
- interface Modify {
223
- /**
224
- * Allows users to override the collect at behavior.
225
- */
226
- collect_at: Modify.CollectAt;
227
-
228
- /**
229
- * When the modify action will take effect. If not specified, the default behavior is on_reserve.
230
- */
231
- effective_at: Modify.EffectiveAt;
232
-
233
- /**
234
- * Type of the action details.
235
- */
236
- type: Modify.Type;
237
-
238
- /**
239
- * Details for modifying a Pricing Plan Subscription.
240
- */
241
- pricing_plan_subscription_details?: Modify.PricingPlanSubscriptionDetails;
242
- }
243
-
244
- namespace Modify {
245
- type CollectAt = 'next_billing_date' | 'on_effective_at';
246
-
247
- interface EffectiveAt {
248
- /**
249
- * The timestamp at which the modify action will take effect. Only present if type is timestamp.
250
- */
251
- timestamp?: string;
252
-
253
- /**
254
- * When the modify action will take effect.
255
- */
256
- type: EffectiveAt.Type;
257
- }
258
-
259
- namespace EffectiveAt {
260
- type Type =
261
- | 'current_billing_period_start'
262
- | 'on_reserve'
263
- | 'timestamp';
264
- }
265
-
266
- interface PricingPlanSubscriptionDetails {
267
- /**
268
- * New configurations for the components of the Pricing Plan.
269
- */
270
- component_configurations: Array<
271
- PricingPlanSubscriptionDetails.ComponentConfiguration
272
- >;
273
-
274
- /**
275
- * ID of the new Pricing Plan.
276
- */
277
- new_pricing_plan: string;
278
-
279
- /**
280
- * Version of the Pricing Plan to use.
281
- */
282
- new_pricing_plan_version: string;
283
-
284
- /**
285
- * Allows users to override the partial period behavior.
286
- */
287
- overrides?: PricingPlanSubscriptionDetails.Overrides;
288
-
289
- /**
290
- * ID of the Pricing Plan Subscription to modify.
291
- */
292
- pricing_plan_subscription: string;
293
- }
294
-
295
- namespace PricingPlanSubscriptionDetails {
296
- interface ComponentConfiguration {
297
- /**
298
- * Quantity of the component to be used.
299
- */
300
- quantity?: number;
301
-
302
- /**
303
- * Lookup key for the pricing plan component.
304
- */
305
- lookup_key?: string;
306
-
307
- /**
308
- * ID of the pricing plan component.
309
- */
310
- pricing_plan_component?: string;
311
- }
312
-
313
- interface Overrides {
314
- /**
315
- * Override for the partial period behavior.
316
- */
317
- partial_period_behaviors: Array<
318
- Overrides.PartialPeriodBehavior
319
- >;
320
- }
321
-
322
- namespace Overrides {
323
- interface PartialPeriodBehavior {
324
- /**
325
- * Type of the partial period behavior override.
326
- */
327
- type: 'license_fee';
328
-
329
- /**
330
- * Override for the license fee.
331
- */
332
- license_fee?: PartialPeriodBehavior.LicenseFee;
333
- }
334
-
335
- namespace PartialPeriodBehavior {
336
- interface LicenseFee {
337
- /**
338
- * The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user is upgrading.
339
- */
340
- credit_proration_behavior: LicenseFee.CreditProrationBehavior;
341
-
342
- /**
343
- * The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user is downgrading.
344
- */
345
- debit_proration_behavior: LicenseFee.DebitProrationBehavior;
346
- }
347
-
348
- namespace LicenseFee {
349
- type CreditProrationBehavior = 'none' | 'prorated';
350
-
351
- type DebitProrationBehavior = 'none' | 'prorated';
352
- }
353
- }
354
- }
355
- }
356
-
357
- type Type =
358
- | 'pricing_plan_subscription_details'
359
- | 'v1_subscription_details';
360
- }
361
-
362
- interface Remove {
363
- /**
364
- * Type of the remove action.
365
- */
366
- type: 'invoice_discount_rule';
367
-
368
- /**
369
- * The ID of the discount rule to remove for future invoices.
370
- */
371
- invoice_discount_rule?: string;
372
- }
373
-
374
- interface Subscribe {
375
- /**
376
- * Allows users to override the collect at behavior.
377
- */
378
- collect_at: Subscribe.CollectAt;
379
-
380
- /**
381
- * When the subscribe action will take effect. If not specified, the default behavior is on_reserve.
382
- */
383
- effective_at: Subscribe.EffectiveAt;
384
-
385
- /**
386
- * Type of the action details.
387
- */
388
- type: Subscribe.Type;
389
-
390
- /**
391
- * Details for subscribing to a Pricing Plan.
392
- */
393
- pricing_plan_subscription_details?: Subscribe.PricingPlanSubscriptionDetails;
394
-
395
- /**
396
- * Details for subscribing to a V1 subscription.
397
- */
398
- v1_subscription_details?: Subscribe.V1SubscriptionDetails;
399
- }
400
-
401
- namespace Subscribe {
402
- type CollectAt = 'next_billing_date' | 'on_effective_at';
403
-
404
- interface EffectiveAt {
405
- /**
406
- * The timestamp at which the subscribe action will take effect. Only present if type is timestamp.
407
- */
408
- timestamp?: string;
409
-
410
- /**
411
- * When the subscribe action will take effect.
412
- */
413
- type: EffectiveAt.Type;
414
- }
415
-
416
- namespace EffectiveAt {
417
- type Type =
418
- | 'current_billing_period_start'
419
- | 'on_reserve'
420
- | 'timestamp';
421
- }
422
-
423
- interface PricingPlanSubscriptionDetails {
424
- /**
425
- * Configurations for the components of the Pricing Plan.
426
- */
427
- component_configurations: Array<
428
- PricingPlanSubscriptionDetails.ComponentConfiguration
429
- >;
430
-
431
- /**
432
- * Set of [key-value pairs](https://docs.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.
433
- */
434
- metadata?: Stripe.Metadata;
435
-
436
- /**
437
- * Allows users to override the partial period behavior.
438
- */
439
- overrides?: PricingPlanSubscriptionDetails.Overrides;
440
-
441
- /**
442
- * ID of the Pricing Plan to subscribe to.
443
- */
444
- pricing_plan: string;
445
-
446
- /**
447
- * ID of the created Pricing Plan Subscription. This is only present once the Billing Intent is committed and the Pricing Plan Subscription is created.
448
- */
449
- pricing_plan_subscription?: string;
450
-
451
- /**
452
- * Version of the Pricing Plan to use.
453
- */
454
- pricing_plan_version: string;
455
- }
456
-
457
- namespace PricingPlanSubscriptionDetails {
458
- interface ComponentConfiguration {
459
- /**
460
- * Quantity of the component to be used.
461
- */
462
- quantity?: number;
463
-
464
- /**
465
- * Lookup key for the pricing plan component.
466
- */
467
- lookup_key?: string;
468
-
469
- /**
470
- * ID of the pricing plan component.
471
- */
472
- pricing_plan_component?: string;
473
- }
474
-
475
- interface Overrides {
476
- /**
477
- * Override for the partial period behavior.
478
- */
479
- partial_period_behaviors: Array<
480
- Overrides.PartialPeriodBehavior
481
- >;
482
- }
483
-
484
- namespace Overrides {
485
- interface PartialPeriodBehavior {
486
- /**
487
- * Type of the partial period behavior override.
488
- */
489
- type: 'license_fee';
490
-
491
- /**
492
- * Override for the license fee.
493
- */
494
- license_fee?: PartialPeriodBehavior.LicenseFee;
495
- }
496
-
497
- namespace PartialPeriodBehavior {
498
- interface LicenseFee {
499
- /**
500
- * The proration behavior for the partial servicing period. Defines how we prorate the license fee when the user is subscribing.
501
- */
502
- debit_proration_behavior: LicenseFee.DebitProrationBehavior;
503
- }
504
-
505
- namespace LicenseFee {
506
- type DebitProrationBehavior = 'none' | 'prorated';
507
- }
508
- }
509
- }
510
- }
511
-
512
- type Type =
513
- | 'pricing_plan_subscription_details'
514
- | 'v1_subscription_details';
515
-
516
- interface V1SubscriptionDetails {
517
- /**
518
- * The subscription's description, meant to be displayable to the customer.
519
- * Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.
520
- */
521
- description?: string;
522
-
523
- /**
524
- * A list of up to 20 subscription items, each with an attached price.
525
- */
526
- items: Array<V1SubscriptionDetails.Item>;
527
-
528
- /**
529
- * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
530
- */
531
- metadata?: Stripe.Metadata;
532
- }
533
-
534
- namespace V1SubscriptionDetails {
535
- interface Item {
536
- /**
537
- * Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
538
- */
539
- metadata?: Stripe.Metadata;
540
-
541
- /**
542
- * The ID of the price object.
543
- */
544
- price: string;
545
-
546
- /**
547
- * Quantity for this item. If not provided, will default to 1.
548
- */
549
- quantity?: number;
550
- }
551
- }
552
- }
553
-
554
- type Type =
555
- | 'apply'
556
- | 'deactivate'
557
- | 'modify'
558
- | 'remove'
559
- | 'subscribe';
560
- }
561
- }
562
- }
563
- }
564
- }
@@ -1,58 +0,0 @@
1
- // File generated from our OpenAPI spec
2
-
3
- declare module 'stripe' {
4
- namespace Stripe {
5
- namespace V2 {
6
- namespace Billing {
7
- namespace Intents {
8
- interface ActionRetrieveParams {}
9
- }
10
- }
11
-
12
- namespace Billing {
13
- namespace Intents {
14
- interface ActionListParams {
15
- /**
16
- * Optionally set the maximum number of results per page. Defaults to 10.
17
- */
18
- limit?: number;
19
- }
20
- }
21
- }
22
-
23
- namespace Billing {
24
- namespace Intents {
25
- class ActionsResource {
26
- /**
27
- * Retrieve a Billing Intent Action.
28
- */
29
- retrieve(
30
- intentId: string,
31
- id: string,
32
- params?: ActionRetrieveParams,
33
- options?: RequestOptions
34
- ): Promise<Stripe.Response<Stripe.V2.Billing.IntentAction>>;
35
- retrieve(
36
- intentId: string,
37
- id: string,
38
- options?: RequestOptions
39
- ): Promise<Stripe.Response<Stripe.V2.Billing.IntentAction>>;
40
-
41
- /**
42
- * List Billing Intent Actions.
43
- */
44
- list(
45
- id: string,
46
- params?: ActionListParams,
47
- options?: RequestOptions
48
- ): ApiListPromise<Stripe.V2.Billing.IntentAction>;
49
- list(
50
- id: string,
51
- options?: RequestOptions
52
- ): ApiListPromise<Stripe.V2.Billing.IntentAction>;
53
- }
54
- }
55
- }
56
- }
57
- }
58
- }