stripe 16.12.0-beta.1 → 16.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/CHANGELOG.md +130 -841
  2. package/README.md +0 -33
  3. package/VERSION +1 -1
  4. package/cjs/RequestSender.js +5 -66
  5. package/cjs/StripeResource.js +1 -1
  6. package/cjs/apiVersion.js +1 -2
  7. package/cjs/multipart.js +1 -1
  8. package/cjs/resources/FinancialConnections/Accounts.js +0 -5
  9. package/cjs/resources/Invoices.js +0 -17
  10. package/cjs/resources/OAuth.js +1 -1
  11. package/cjs/resources/PaymentIntents.js +0 -4
  12. package/cjs/resources/Quotes.js +0 -32
  13. package/cjs/resources/SubscriptionSchedules.js +0 -4
  14. package/cjs/resources/Terminal/Readers.js +0 -12
  15. package/cjs/resources.js +10 -44
  16. package/cjs/stripe.core.js +3 -6
  17. package/cjs/utils.js +3 -30
  18. package/esm/RequestSender.js +6 -67
  19. package/esm/StripeResource.js +2 -2
  20. package/esm/apiVersion.js +0 -1
  21. package/esm/multipart.js +2 -2
  22. package/esm/resources/FinancialConnections/Accounts.js +0 -5
  23. package/esm/resources/Invoices.js +0 -17
  24. package/esm/resources/OAuth.js +2 -2
  25. package/esm/resources/PaymentIntents.js +0 -4
  26. package/esm/resources/Quotes.js +0 -32
  27. package/esm/resources/SubscriptionSchedules.js +0 -4
  28. package/esm/resources/Terminal/Readers.js +0 -12
  29. package/esm/resources.js +0 -30
  30. package/esm/stripe.core.js +3 -6
  31. package/esm/utils.js +1 -27
  32. package/package.json +1 -1
  33. package/types/AccountLinksResource.d.ts +1 -5
  34. package/types/AccountSessions.d.ts +0 -45
  35. package/types/AccountSessionsResource.d.ts +0 -278
  36. package/types/Accounts.d.ts +5 -115
  37. package/types/AccountsResource.d.ts +0 -270
  38. package/types/BankAccounts.d.ts +4 -2
  39. package/types/Capabilities.d.ts +4 -2
  40. package/types/Charges.d.ts +23 -71
  41. package/types/ChargesResource.d.ts +0 -1294
  42. package/types/Checkout/Sessions.d.ts +4 -296
  43. package/types/Checkout/SessionsResource.d.ts +5 -351
  44. package/types/ConfirmationTokens.d.ts +0 -67
  45. package/types/Coupons.d.ts +1 -1
  46. package/types/CouponsResource.d.ts +1 -1
  47. package/types/CreditNotes.d.ts +0 -21
  48. package/types/CreditNotesResource.d.ts +0 -51
  49. package/types/CustomersResource.d.ts +0 -3
  50. package/types/Disputes.d.ts +14 -153
  51. package/types/DisputesResource.d.ts +0 -120
  52. package/types/EventTypes.d.ts +0 -545
  53. package/types/Events.d.ts +0 -90
  54. package/types/FinancialConnections/Accounts.d.ts +1 -29
  55. package/types/FinancialConnections/AccountsResource.d.ts +3 -35
  56. package/types/FinancialConnections/Sessions.d.ts +1 -49
  57. package/types/FinancialConnections/SessionsResource.d.ts +1 -38
  58. package/types/InvoiceItems.d.ts +0 -5
  59. package/types/InvoiceItemsResource.d.ts +0 -98
  60. package/types/InvoiceLineItems.d.ts +0 -22
  61. package/types/InvoiceRenderingTemplates.d.ts +2 -1
  62. package/types/Invoices.d.ts +7 -117
  63. package/types/InvoicesResource.d.ts +1835 -5493
  64. package/types/Issuing/CardholdersResource.d.ts +1 -2
  65. package/types/Issuing/Transactions.d.ts +0 -2
  66. package/types/Issuing/TransactionsResource.d.ts +0 -5
  67. package/types/LineItems.d.ts +0 -7
  68. package/types/Mandates.d.ts +0 -77
  69. package/types/PaymentIntents.d.ts +2 -503
  70. package/types/PaymentIntentsResource.d.ts +3464 -7064
  71. package/types/PaymentLinks.d.ts +0 -2
  72. package/types/PaymentLinksResource.d.ts +0 -4
  73. package/types/PaymentMethodConfigurations.d.ts +0 -36
  74. package/types/PaymentMethodConfigurationsResource.d.ts +0 -50
  75. package/types/PaymentMethods.d.ts +0 -67
  76. package/types/PaymentMethodsResource.d.ts +0 -88
  77. package/types/Persons.d.ts +4 -2
  78. package/types/Prices.d.ts +0 -22
  79. package/types/PricesResource.d.ts +0 -22
  80. package/types/Products.d.ts +0 -39
  81. package/types/ProductsResource.d.ts +0 -36
  82. package/types/Quotes.d.ts +1 -596
  83. package/types/QuotesResource.d.ts +199 -2531
  84. package/types/SetupAttempts.d.ts +1 -10
  85. package/types/SetupIntents.d.ts +2 -111
  86. package/types/SetupIntentsResource.d.ts +3 -522
  87. package/types/Sources.d.ts +0 -23
  88. package/types/SubscriptionItems.d.ts +0 -21
  89. package/types/SubscriptionItemsResource.d.ts +0 -109
  90. package/types/SubscriptionSchedules.d.ts +0 -200
  91. package/types/SubscriptionSchedulesResource.d.ts +13 -1231
  92. package/types/Subscriptions.d.ts +1 -82
  93. package/types/SubscriptionsResource.d.ts +2 -347
  94. package/types/Tax/Registrations.d.ts +30 -0
  95. package/types/Tax/RegistrationsResource.d.ts +33 -0
  96. package/types/Terminal/Readers.d.ts +0 -278
  97. package/types/Terminal/ReadersResource.d.ts +0 -208
  98. package/types/TestHelpers/ConfirmationTokensResource.d.ts +0 -63
  99. package/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +0 -26
  100. package/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +0 -26
  101. package/types/Treasury/FinancialAccounts.d.ts +0 -5
  102. package/types/Treasury/FinancialAccountsResource.d.ts +0 -10
  103. package/types/Treasury/OutboundTransfers.d.ts +0 -26
  104. package/types/Treasury/OutboundTransfersResource.d.ts +0 -26
  105. package/types/Treasury/ReceivedCredits.d.ts +0 -26
  106. package/types/Treasury/ReceivedDebits.d.ts +1 -31
  107. package/types/WebhookEndpointsResource.d.ts +0 -64
  108. package/types/index.d.ts +0 -75
  109. package/types/lib.d.ts +0 -12
  110. package/cjs/resources/AccountNotices.js +0 -21
  111. package/cjs/resources/Capital/FinancingOffers.js +0 -21
  112. package/cjs/resources/Capital/FinancingSummary.js +0 -12
  113. package/cjs/resources/Capital/FinancingTransactions.js +0 -17
  114. package/cjs/resources/FinancialConnections/Institutions.js +0 -17
  115. package/cjs/resources/GiftCards/Cards.js +0 -23
  116. package/cjs/resources/GiftCards/Transactions.js +0 -33
  117. package/cjs/resources/Issuing/CreditUnderwritingRecords.js +0 -33
  118. package/cjs/resources/Issuing/DisputeSettlementDetails.js +0 -17
  119. package/cjs/resources/Margins.js +0 -22
  120. package/cjs/resources/Orders.js +0 -24
  121. package/cjs/resources/QuotePhases.js +0 -17
  122. package/cjs/resources/Tax/Associations.js +0 -9
  123. package/cjs/resources/Tax/Forms.js +0 -20
  124. package/cjs/resources/Terminal/ReaderCollectedData.js +0 -12
  125. package/esm/resources/AccountNotices.js +0 -18
  126. package/esm/resources/Capital/FinancingOffers.js +0 -18
  127. package/esm/resources/Capital/FinancingSummary.js +0 -9
  128. package/esm/resources/Capital/FinancingTransactions.js +0 -14
  129. package/esm/resources/FinancialConnections/Institutions.js +0 -14
  130. package/esm/resources/GiftCards/Cards.js +0 -20
  131. package/esm/resources/GiftCards/Transactions.js +0 -30
  132. package/esm/resources/Issuing/CreditUnderwritingRecords.js +0 -30
  133. package/esm/resources/Issuing/DisputeSettlementDetails.js +0 -14
  134. package/esm/resources/Margins.js +0 -19
  135. package/esm/resources/Orders.js +0 -21
  136. package/esm/resources/QuotePhases.js +0 -14
  137. package/esm/resources/Tax/Associations.js +0 -6
  138. package/esm/resources/Tax/Forms.js +0 -17
  139. package/esm/resources/Terminal/ReaderCollectedData.js +0 -9
  140. package/types/AccountNotices.d.ts +0 -113
  141. package/types/AccountNoticesResource.d.ts +0 -98
  142. package/types/Billing/MeterErrorReports.d.ts +0 -106
  143. package/types/Capital/FinancingOffers.d.ts +0 -188
  144. package/types/Capital/FinancingOffersResource.d.ts +0 -97
  145. package/types/Capital/FinancingSummary.d.ts +0 -106
  146. package/types/Capital/FinancingSummaryResource.d.ts +0 -27
  147. package/types/Capital/FinancingTransactions.d.ts +0 -135
  148. package/types/Capital/FinancingTransactionsResource.d.ts +0 -68
  149. package/types/FinancialConnections/AccountInferredBalances.d.ts +0 -38
  150. package/types/FinancialConnections/Institutions.d.ts +0 -93
  151. package/types/FinancialConnections/InstitutionsResource.d.ts +0 -47
  152. package/types/GiftCards/Cards.d.ts +0 -118
  153. package/types/GiftCards/CardsResource.d.ts +0 -159
  154. package/types/GiftCards/Transactions.d.ts +0 -129
  155. package/types/GiftCards/TransactionsResource.d.ts +0 -201
  156. package/types/InvoicePayments.d.ts +0 -138
  157. package/types/Issuing/CreditUnderwritingRecords.d.ts +0 -451
  158. package/types/Issuing/CreditUnderwritingRecordsResource.d.ts +0 -1032
  159. package/types/Issuing/DisputeSettlementDetails.d.ts +0 -73
  160. package/types/Issuing/DisputeSettlementDetailsResource.d.ts +0 -52
  161. package/types/Issuing/Settlements.d.ts +0 -103
  162. package/types/Margins.d.ts +0 -56
  163. package/types/MarginsResource.d.ts +0 -114
  164. package/types/Orders.d.ts +0 -1084
  165. package/types/OrdersResource.d.ts +0 -2765
  166. package/types/QuoteLines.d.ts +0 -634
  167. package/types/QuotePhases.d.ts +0 -198
  168. package/types/QuotePhasesResource.d.ts +0 -47
  169. package/types/QuotePreviewInvoices.d.ts +0 -1542
  170. package/types/QuotePreviewSubscriptionSchedules.d.ts +0 -814
  171. package/types/Tax/Associations.d.ts +0 -126
  172. package/types/Tax/AssociationsResource.d.ts +0 -29
  173. package/types/Tax/Forms.d.ts +0 -133
  174. package/types/Tax/FormsResource.d.ts +0 -90
  175. package/types/Terminal/ReaderCollectedData.d.ts +0 -51
  176. package/types/Terminal/ReaderCollectedDataResource.d.ts +0 -29
@@ -1,198 +0,0 @@
1
- // File generated from our OpenAPI spec
2
-
3
- declare module 'stripe' {
4
- namespace Stripe {
5
- /**
6
- * A quote phase describes the line items, coupons, and trialing status of a subscription for a predefined time period.
7
- */
8
- interface QuotePhase {
9
- /**
10
- * Unique identifier for the object.
11
- */
12
- id: string;
13
-
14
- /**
15
- * String representing the object's type. Objects of the same type share the same value.
16
- */
17
- object: 'quote_phase';
18
-
19
- /**
20
- * Total before any discounts or taxes are applied.
21
- */
22
- amount_subtotal: number;
23
-
24
- /**
25
- * Total after discounts and taxes are applied.
26
- */
27
- amount_total: number;
28
-
29
- /**
30
- * If set to `reset`, the billing_cycle_anchor of the subscription is set to the start of the phase when entering the phase. If unset, then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
31
- */
32
- billing_cycle_anchor: 'reset' | null;
33
-
34
- /**
35
- * Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.
36
- */
37
- collection_method: QuotePhase.CollectionMethod | null;
38
-
39
- /**
40
- * The default tax rates to apply to the subscription during this phase of the quote.
41
- */
42
- default_tax_rates?: Array<string | Stripe.TaxRate>;
43
-
44
- /**
45
- * The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
46
- */
47
- discounts: Array<string | Stripe.Discount>;
48
-
49
- /**
50
- * The end of this phase of the quote
51
- */
52
- end_date: number | null;
53
-
54
- /**
55
- * The invoice settings applicable during this phase.
56
- */
57
- invoice_settings: QuotePhase.InvoiceSettings | null;
58
-
59
- /**
60
- * Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`.
61
- */
62
- iterations: number | null;
63
-
64
- /**
65
- * A list of items the customer is being quoted for.
66
- */
67
- line_items?: ApiList<Stripe.LineItem>;
68
-
69
- /**
70
- * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on the subscription schedule's phases when the quote is accepted.
71
- */
72
- metadata: Stripe.Metadata | null;
73
-
74
- /**
75
- * If the quote will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`.
76
- */
77
- proration_behavior: QuotePhase.ProrationBehavior;
78
-
79
- total_details: QuotePhase.TotalDetails;
80
-
81
- /**
82
- * If set to true the entire phase is counted as a trial and the customer will not be charged for any recurring fees.
83
- */
84
- trial: boolean | null;
85
-
86
- /**
87
- * When the trial ends within the phase.
88
- */
89
- trial_end: number | null;
90
- }
91
-
92
- namespace QuotePhase {
93
- type CollectionMethod = 'charge_automatically' | 'send_invoice';
94
-
95
- interface InvoiceSettings {
96
- /**
97
- * Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`.
98
- */
99
- days_until_due: number | null;
100
- }
101
-
102
- type ProrationBehavior = 'always_invoice' | 'create_prorations' | 'none';
103
-
104
- interface TotalDetails {
105
- /**
106
- * This is the sum of all the discounts.
107
- */
108
- amount_discount: number;
109
-
110
- /**
111
- * This is the sum of all the shipping amounts.
112
- */
113
- amount_shipping: number | null;
114
-
115
- /**
116
- * This is the sum of all the tax amounts.
117
- */
118
- amount_tax: number;
119
-
120
- breakdown?: TotalDetails.Breakdown;
121
- }
122
-
123
- namespace TotalDetails {
124
- interface Breakdown {
125
- /**
126
- * The aggregated discounts.
127
- */
128
- discounts: Array<Breakdown.Discount>;
129
-
130
- /**
131
- * The aggregated tax amounts by rate.
132
- */
133
- taxes: Array<Breakdown.Tax>;
134
- }
135
-
136
- namespace Breakdown {
137
- interface Discount {
138
- /**
139
- * The amount discounted.
140
- */
141
- amount: number;
142
-
143
- /**
144
- * A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes).
145
- * It contains information about when the discount began, when it will end, and what it is applied to.
146
- *
147
- * Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts)
148
- */
149
- discount: Stripe.Discount;
150
- }
151
-
152
- interface Tax {
153
- /**
154
- * Amount of tax applied for this rate.
155
- */
156
- amount: number;
157
-
158
- /**
159
- * Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax.
160
- *
161
- * Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates)
162
- */
163
- rate: Stripe.TaxRate;
164
-
165
- /**
166
- * The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
167
- */
168
- taxability_reason: Tax.TaxabilityReason | null;
169
-
170
- /**
171
- * The amount on which tax is calculated, in cents (or local equivalent).
172
- */
173
- taxable_amount: number | null;
174
- }
175
-
176
- namespace Tax {
177
- type TaxabilityReason =
178
- | 'customer_exempt'
179
- | 'not_collecting'
180
- | 'not_subject_to_tax'
181
- | 'not_supported'
182
- | 'portion_product_exempt'
183
- | 'portion_reduced_rated'
184
- | 'portion_standard_rated'
185
- | 'product_exempt'
186
- | 'product_exempt_holiday'
187
- | 'proportionally_rated'
188
- | 'reduced_rated'
189
- | 'reverse_charge'
190
- | 'standard_rated'
191
- | 'taxable_basis_reduced'
192
- | 'zero_rated';
193
- }
194
- }
195
- }
196
- }
197
- }
198
- }
@@ -1,47 +0,0 @@
1
- // File generated from our OpenAPI spec
2
-
3
- declare module 'stripe' {
4
- namespace Stripe {
5
- interface QuotePhaseRetrieveParams {
6
- /**
7
- * Specifies which fields in the response should be expanded.
8
- */
9
- expand?: Array<string>;
10
- }
11
-
12
- interface QuotePhaseListLineItemsParams extends PaginationParams {
13
- /**
14
- * Specifies which fields in the response should be expanded.
15
- */
16
- expand?: Array<string>;
17
- }
18
-
19
- class QuotePhasesResource {
20
- /**
21
- * Retrieves the quote phase with the given ID.
22
- */
23
- retrieve(
24
- id: string,
25
- params?: QuotePhaseRetrieveParams,
26
- options?: RequestOptions
27
- ): Promise<Stripe.Response<Stripe.QuotePhase>>;
28
- retrieve(
29
- id: string,
30
- options?: RequestOptions
31
- ): Promise<Stripe.Response<Stripe.QuotePhase>>;
32
-
33
- /**
34
- * When retrieving a quote phase, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
35
- */
36
- listLineItems(
37
- id: string,
38
- params?: QuotePhaseListLineItemsParams,
39
- options?: RequestOptions
40
- ): ApiListPromise<Stripe.LineItem>;
41
- listLineItems(
42
- id: string,
43
- options?: RequestOptions
44
- ): ApiListPromise<Stripe.LineItem>;
45
- }
46
- }
47
- }