stripe 15.1.0 → 15.2.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 (243) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -6
  3. data/CONTRIBUTING.md +25 -0
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +10 -7
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_version.rb +1 -1
  8. data/lib/stripe/resources/account.rb +47 -20
  9. data/lib/stripe/resources/account_session.rb +111 -7
  10. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  11. data/lib/stripe/resources/balance.rb +42 -0
  12. data/lib/stripe/resources/balance_transaction.rb +2 -0
  13. data/lib/stripe/resources/bank_account.rb +2 -2
  14. data/lib/stripe/resources/billing_portal/session.rb +1 -1
  15. data/lib/stripe/resources/capability.rb +1 -1
  16. data/lib/stripe/resources/charge.rb +13 -5
  17. data/lib/stripe/resources/checkout/session.rb +20 -4
  18. data/lib/stripe/resources/confirmation_token.rb +33 -87
  19. data/lib/stripe/resources/country_spec.rb +1 -1
  20. data/lib/stripe/resources/coupon.rb +1 -2
  21. data/lib/stripe/resources/credit_note.rb +12 -9
  22. data/lib/stripe/resources/customer.rb +2 -4
  23. data/lib/stripe/resources/customer_session.rb +3 -3
  24. data/lib/stripe/resources/dispute.rb +2 -2
  25. data/lib/stripe/resources/event.rb +1 -1
  26. data/lib/stripe/resources/file.rb +1 -1
  27. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  28. data/lib/stripe/resources/identity/verification_session.rb +17 -11
  29. data/lib/stripe/resources/invoice.rb +114 -27
  30. data/lib/stripe/resources/invoice_item.rb +2 -3
  31. data/lib/stripe/resources/invoice_line_item.rb +1 -1
  32. data/lib/stripe/resources/invoice_payment.rb +9 -2
  33. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  34. data/lib/stripe/resources/issuing/card.rb +1 -1
  35. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  36. data/lib/stripe/resources/payment_intent.rb +196 -302
  37. data/lib/stripe/resources/payment_method.rb +46 -103
  38. data/lib/stripe/resources/payment_method_configuration.rb +297 -2
  39. data/lib/stripe/resources/payment_method_domain.rb +2 -2
  40. data/lib/stripe/resources/payout.rb +4 -4
  41. data/lib/stripe/resources/person.rb +2 -2
  42. data/lib/stripe/resources/plan.rb +2 -3
  43. data/lib/stripe/resources/price.rb +1 -1
  44. data/lib/stripe/resources/product.rb +1 -2
  45. data/lib/stripe/resources/radar/value_list.rb +1 -2
  46. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  47. data/lib/stripe/resources/refund.rb +6 -1
  48. data/lib/stripe/resources/reversal.rb +1 -1
  49. data/lib/stripe/resources/review.rb +1 -1
  50. data/lib/stripe/resources/setup_intent.rb +111 -281
  51. data/lib/stripe/resources/source.rb +1 -1
  52. data/lib/stripe/resources/subscription.rb +89 -29
  53. data/lib/stripe/resources/subscription_item.rb +33 -0
  54. data/lib/stripe/resources/subscription_schedule.rb +119 -4
  55. data/lib/stripe/resources/tax/calculation.rb +4 -0
  56. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  57. data/lib/stripe/resources/tax/registration.rb +1 -1
  58. data/lib/stripe/resources/tax_id.rb +1 -2
  59. data/lib/stripe/resources/tax_rate.rb +2 -2
  60. data/lib/stripe/resources/terminal/configuration.rb +1 -2
  61. data/lib/stripe/resources/terminal/location.rb +2 -3
  62. data/lib/stripe/resources/terminal/reader.rb +275 -3
  63. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  64. data/lib/stripe/resources/token.rb +2 -2
  65. data/lib/stripe/resources/transfer.rb +1 -1
  66. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  67. data/lib/stripe/services/account_external_account_service.rb +2 -3
  68. data/lib/stripe/services/account_login_link_service.rb +1 -1
  69. data/lib/stripe/services/account_person_service.rb +1 -2
  70. data/lib/stripe/services/account_service.rb +38 -13
  71. data/lib/stripe/services/account_session_service.rb +75 -7
  72. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  73. data/lib/stripe/services/balance_service.rb +1 -1
  74. data/lib/stripe/services/charge_service.rb +4 -4
  75. data/lib/stripe/services/checkout/session_service.rb +11 -3
  76. data/lib/stripe/services/coupon_service.rb +1 -2
  77. data/lib/stripe/services/credit_note_service.rb +7 -8
  78. data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
  79. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
  80. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  81. data/lib/stripe/services/customer_service.rb +3 -5
  82. data/lib/stripe/services/customer_tax_id_service.rb +1 -2
  83. data/lib/stripe/services/dispute_service.rb +1 -1
  84. data/lib/stripe/services/file_service.rb +1 -1
  85. data/lib/stripe/services/identity/verification_session_service.rb +5 -5
  86. data/lib/stripe/services/invoice_item_service.rb +1 -2
  87. data/lib/stripe/services/invoice_service.rb +92 -23
  88. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  89. data/lib/stripe/services/issuing/card_service.rb +1 -1
  90. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  91. data/lib/stripe/services/payment_intent_service.rb +176 -292
  92. data/lib/stripe/services/payment_method_configuration_service.rb +212 -2
  93. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  94. data/lib/stripe/services/payment_method_service.rb +43 -100
  95. data/lib/stripe/services/payout_service.rb +2 -2
  96. data/lib/stripe/services/plan_service.rb +2 -3
  97. data/lib/stripe/services/price_service.rb +2 -2
  98. data/lib/stripe/services/product_feature_service.rb +1 -2
  99. data/lib/stripe/services/product_service.rb +2 -3
  100. data/lib/stripe/services/promotion_code_service.rb +1 -1
  101. data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
  102. data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
  103. data/lib/stripe/services/radar/value_list_service.rb +1 -2
  104. data/lib/stripe/services/setup_intent_service.rb +110 -280
  105. data/lib/stripe/services/source_service.rb +1 -1
  106. data/lib/stripe/services/subscription_item_service.rb +26 -0
  107. data/lib/stripe/services/subscription_schedule_service.rb +93 -3
  108. data/lib/stripe/services/subscription_service.rb +77 -26
  109. data/lib/stripe/services/tax/calculation_service.rb +4 -0
  110. data/lib/stripe/services/tax/registration_service.rb +1 -1
  111. data/lib/stripe/services/tax_id_service.rb +1 -2
  112. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  113. data/lib/stripe/services/terminal/location_service.rb +2 -3
  114. data/lib/stripe/services/terminal/reader_service.rb +106 -2
  115. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +33 -87
  116. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
  117. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  118. data/lib/stripe/services/token_service.rb +1 -1
  119. data/lib/stripe/services/transfer_service.rb +1 -1
  120. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  121. data/lib/stripe/services/v2/core/event_destination_service.rb +4 -10
  122. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  123. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  124. data/lib/stripe/version.rb +1 -1
  125. data/rbi/stripe/resources/account.rbi +46 -23
  126. data/rbi/stripe/resources/account_session.rbi +131 -12
  127. data/rbi/stripe/resources/apple_pay_domain.rbi +1 -3
  128. data/rbi/stripe/resources/balance.rbi +55 -0
  129. data/rbi/stripe/resources/balance_transaction.rbi +3 -0
  130. data/rbi/stripe/resources/bank_account.rbi +2 -2
  131. data/rbi/stripe/resources/billing/alert.rbi +2 -2
  132. data/rbi/stripe/resources/billing_portal/session.rbi +1 -1
  133. data/rbi/stripe/resources/capability.rbi +1 -1
  134. data/rbi/stripe/resources/charge.rbi +17 -5
  135. data/rbi/stripe/resources/checkout/session.rbi +22 -6
  136. data/rbi/stripe/resources/confirmation_token.rbi +33 -99
  137. data/rbi/stripe/resources/country_spec.rbi +1 -1
  138. data/rbi/stripe/resources/coupon.rbi +1 -3
  139. data/rbi/stripe/resources/credit_note.rbi +14 -9
  140. data/rbi/stripe/resources/customer.rbi +2 -6
  141. data/rbi/stripe/resources/customer_session.rbi +3 -3
  142. data/rbi/stripe/resources/dispute.rbi +2 -2
  143. data/rbi/stripe/resources/event.rbi +1 -1
  144. data/rbi/stripe/resources/file.rbi +1 -1
  145. data/rbi/stripe/resources/identity/verification_report.rbi +9 -0
  146. data/rbi/stripe/resources/identity/verification_session.rbi +20 -11
  147. data/rbi/stripe/resources/invoice.rbi +109 -33
  148. data/rbi/stripe/resources/invoice_item.rbi +2 -4
  149. data/rbi/stripe/resources/invoice_line_item.rbi +1 -1
  150. data/rbi/stripe/resources/invoice_payment.rbi +9 -2
  151. data/rbi/stripe/resources/issuing/authorization.rbi +8 -8
  152. data/rbi/stripe/resources/issuing/card.rbi +1 -1
  153. data/rbi/stripe/resources/issuing/dispute.rbi +3 -3
  154. data/rbi/stripe/resources/payment_intent.rbi +201 -349
  155. data/rbi/stripe/resources/payment_method.rbi +46 -116
  156. data/rbi/stripe/resources/payment_method_configuration.rbi +334 -4
  157. data/rbi/stripe/resources/payment_method_domain.rbi +2 -2
  158. data/rbi/stripe/resources/payout.rbi +4 -4
  159. data/rbi/stripe/resources/person.rbi +2 -2
  160. data/rbi/stripe/resources/plan.rbi +2 -4
  161. data/rbi/stripe/resources/price.rbi +1 -1
  162. data/rbi/stripe/resources/product.rbi +1 -3
  163. data/rbi/stripe/resources/radar/value_list.rbi +1 -3
  164. data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
  165. data/rbi/stripe/resources/refund.rbi +5 -1
  166. data/rbi/stripe/resources/reversal.rbi +1 -1
  167. data/rbi/stripe/resources/review.rbi +1 -1
  168. data/rbi/stripe/resources/setup_intent.rbi +111 -325
  169. data/rbi/stripe/resources/source.rbi +1 -1
  170. data/rbi/stripe/resources/subscription.rbi +99 -36
  171. data/rbi/stripe/resources/subscription_item.rbi +36 -2
  172. data/rbi/stripe/resources/subscription_schedule.rbi +138 -10
  173. data/rbi/stripe/resources/tax/calculation.rbi +5 -1
  174. data/rbi/stripe/resources/tax/calculation_line_item.rbi +3 -0
  175. data/rbi/stripe/resources/tax/registration.rbi +1 -1
  176. data/rbi/stripe/resources/tax_id.rbi +1 -3
  177. data/rbi/stripe/resources/tax_rate.rbi +2 -2
  178. data/rbi/stripe/resources/terminal/configuration.rbi +1 -3
  179. data/rbi/stripe/resources/terminal/location.rbi +2 -4
  180. data/rbi/stripe/resources/terminal/reader.rbi +265 -5
  181. data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
  182. data/rbi/stripe/resources/token.rbi +2 -2
  183. data/rbi/stripe/resources/transfer.rbi +1 -1
  184. data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
  185. data/rbi/stripe/services/account_external_account_service.rbi +2 -4
  186. data/rbi/stripe/services/account_login_link_service.rbi +1 -1
  187. data/rbi/stripe/services/account_person_service.rbi +1 -3
  188. data/rbi/stripe/services/account_service.rbi +40 -16
  189. data/rbi/stripe/services/account_session_service.rbi +86 -12
  190. data/rbi/stripe/services/apple_pay_domain_service.rbi +1 -3
  191. data/rbi/stripe/services/balance_service.rbi +1 -1
  192. data/rbi/stripe/services/billing/alert_service.rbi +2 -2
  193. data/rbi/stripe/services/charge_service.rbi +4 -4
  194. data/rbi/stripe/services/checkout/session_service.rbi +12 -5
  195. data/rbi/stripe/services/coupon_service.rbi +1 -3
  196. data/rbi/stripe/services/credit_note_service.rbi +7 -8
  197. data/rbi/stripe/services/customer_balance_transaction_service.rbi +3 -3
  198. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +2 -2
  199. data/rbi/stripe/services/customer_payment_source_service.rbi +1 -1
  200. data/rbi/stripe/services/customer_service.rbi +3 -7
  201. data/rbi/stripe/services/customer_tax_id_service.rbi +1 -3
  202. data/rbi/stripe/services/dispute_service.rbi +1 -1
  203. data/rbi/stripe/services/file_service.rbi +1 -1
  204. data/rbi/stripe/services/identity/verification_session_service.rbi +5 -5
  205. data/rbi/stripe/services/invoice_item_service.rbi +1 -3
  206. data/rbi/stripe/services/invoice_service.rbi +90 -29
  207. data/rbi/stripe/services/issuing/authorization_service.rbi +4 -4
  208. data/rbi/stripe/services/issuing/card_service.rbi +1 -1
  209. data/rbi/stripe/services/issuing/dispute_service.rbi +2 -2
  210. data/rbi/stripe/services/payment_intent_service.rbi +179 -339
  211. data/rbi/stripe/services/payment_method_configuration_service.rbi +236 -4
  212. data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
  213. data/rbi/stripe/services/payment_method_service.rbi +43 -113
  214. data/rbi/stripe/services/payout_service.rbi +2 -2
  215. data/rbi/stripe/services/plan_service.rbi +2 -4
  216. data/rbi/stripe/services/price_service.rbi +2 -2
  217. data/rbi/stripe/services/product_feature_service.rbi +1 -3
  218. data/rbi/stripe/services/product_service.rbi +2 -4
  219. data/rbi/stripe/services/promotion_code_service.rbi +1 -1
  220. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +1 -1
  221. data/rbi/stripe/services/radar/value_list_item_service.rbi +1 -3
  222. data/rbi/stripe/services/radar/value_list_service.rbi +1 -3
  223. data/rbi/stripe/services/setup_intent_service.rbi +110 -324
  224. data/rbi/stripe/services/source_service.rbi +1 -1
  225. data/rbi/stripe/services/subscription_item_service.rbi +28 -2
  226. data/rbi/stripe/services/subscription_schedule_service.rbi +107 -9
  227. data/rbi/stripe/services/subscription_service.rbi +85 -33
  228. data/rbi/stripe/services/tax/calculation_service.rbi +5 -1
  229. data/rbi/stripe/services/tax/registration_service.rbi +1 -1
  230. data/rbi/stripe/services/tax_id_service.rbi +1 -3
  231. data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
  232. data/rbi/stripe/services/terminal/location_service.rbi +2 -4
  233. data/rbi/stripe/services/terminal/reader_service.rbi +115 -4
  234. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +33 -99
  235. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +31 -0
  236. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +1 -3
  237. data/rbi/stripe/services/token_service.rbi +1 -1
  238. data/rbi/stripe/services/transfer_service.rbi +1 -1
  239. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
  240. data/rbi/stripe/services/v2/core/event_destination_service.rbi +4 -12
  241. data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
  242. data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
  243. metadata +3 -2
@@ -69,6 +69,28 @@ module Stripe
69
69
  sig { returns(Features) }
70
70
  attr_reader :features
71
71
  end
72
+ class DisputesList < Stripe::StripeObject
73
+ class Features < Stripe::StripeObject
74
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
75
+ sig { returns(T::Boolean) }
76
+ attr_reader :capture_payments
77
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
78
+ sig { returns(T::Boolean) }
79
+ attr_reader :destination_on_behalf_of_charge_management
80
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
81
+ sig { returns(T::Boolean) }
82
+ attr_reader :dispute_management
83
+ # Whether to allow sending refunds. This is `true` by default.
84
+ sig { returns(T::Boolean) }
85
+ attr_reader :refund_management
86
+ end
87
+ # Whether the embedded component is enabled.
88
+ sig { returns(T::Boolean) }
89
+ attr_reader :enabled
90
+ # Attribute for field features
91
+ sig { returns(Features) }
92
+ attr_reader :features
93
+ end
72
94
  class Documents < Stripe::StripeObject
73
95
  class Features < Stripe::StripeObject; end
74
96
  # Whether the embedded component is enabled.
@@ -198,6 +220,25 @@ module Stripe
198
220
  sig { returns(Features) }
199
221
  attr_reader :features
200
222
  end
223
+ class PaymentDisputes < Stripe::StripeObject
224
+ class Features < Stripe::StripeObject
225
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
226
+ sig { returns(T::Boolean) }
227
+ attr_reader :destination_on_behalf_of_charge_management
228
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
229
+ sig { returns(T::Boolean) }
230
+ attr_reader :dispute_management
231
+ # Whether to allow sending refunds. This is `true` by default.
232
+ sig { returns(T::Boolean) }
233
+ attr_reader :refund_management
234
+ end
235
+ # Whether the embedded component is enabled.
236
+ sig { returns(T::Boolean) }
237
+ attr_reader :enabled
238
+ # Attribute for field features
239
+ sig { returns(Features) }
240
+ attr_reader :features
241
+ end
201
242
  class Payments < Stripe::StripeObject
202
243
  class Features < Stripe::StripeObject
203
244
  # Whether to allow capturing and cancelling payment intents. This is `true` by default.
@@ -281,6 +322,9 @@ module Stripe
281
322
  # Attribute for field balances
282
323
  sig { returns(Balances) }
283
324
  attr_reader :balances
325
+ # Attribute for field disputes_list
326
+ sig { returns(DisputesList) }
327
+ attr_reader :disputes_list
284
328
  # Attribute for field documents
285
329
  sig { returns(Documents) }
286
330
  attr_reader :documents
@@ -302,6 +346,9 @@ module Stripe
302
346
  # Attribute for field payment_details
303
347
  sig { returns(PaymentDetails) }
304
348
  attr_reader :payment_details
349
+ # Attribute for field payment_disputes
350
+ sig { returns(PaymentDisputes) }
351
+ attr_reader :payment_disputes
305
352
  # Attribute for field payments
306
353
  sig { returns(Payments) }
307
354
  attr_reader :payments
@@ -441,14 +488,49 @@ module Stripe
441
488
  }
442
489
  def initialize(enabled: nil, features: nil); end
443
490
  end
444
- class Documents < Stripe::RequestParams
491
+ class DisputesList < Stripe::RequestParams
445
492
  class Features < Stripe::RequestParams
446
-
493
+ # Whether to allow capturing and cancelling payment intents. This is `true` by default.
494
+ sig { returns(T.nilable(T::Boolean)) }
495
+ attr_accessor :capture_payments
496
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
497
+ sig { returns(T.nilable(T::Boolean)) }
498
+ attr_accessor :destination_on_behalf_of_charge_management
499
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
500
+ sig { returns(T.nilable(T::Boolean)) }
501
+ attr_accessor :dispute_management
502
+ # Whether to allow sending refunds. This is `true` by default.
503
+ sig { returns(T.nilable(T::Boolean)) }
504
+ attr_accessor :refund_management
505
+ sig {
506
+ params(capture_payments: T.nilable(T::Boolean), destination_on_behalf_of_charge_management: T.nilable(T::Boolean), dispute_management: T.nilable(T::Boolean), refund_management: T.nilable(T::Boolean)).void
507
+ }
508
+ def initialize(
509
+ capture_payments: nil,
510
+ destination_on_behalf_of_charge_management: nil,
511
+ dispute_management: nil,
512
+ refund_management: nil
513
+ ); end
447
514
  end
448
515
  # Whether the embedded component is enabled.
449
516
  sig { returns(T::Boolean) }
450
517
  attr_accessor :enabled
451
518
  # The list of features enabled in the embedded component.
519
+ sig {
520
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::DisputesList::Features))
521
+ }
522
+ attr_accessor :features
523
+ sig {
524
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::DisputesList::Features)).void
525
+ }
526
+ def initialize(enabled: nil, features: nil); end
527
+ end
528
+ class Documents < Stripe::RequestParams
529
+ class Features < Stripe::RequestParams; end
530
+ # Whether the embedded component is enabled.
531
+ sig { returns(T::Boolean) }
532
+ attr_accessor :enabled
533
+ # The list of features enabled in the embedded component.
452
534
  sig {
453
535
  returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents::Features))
454
536
  }
@@ -660,6 +742,39 @@ module Stripe
660
742
  }
661
743
  def initialize(enabled: nil, features: nil); end
662
744
  end
745
+ class PaymentDisputes < Stripe::RequestParams
746
+ class Features < Stripe::RequestParams
747
+ # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default.
748
+ sig { returns(T.nilable(T::Boolean)) }
749
+ attr_accessor :destination_on_behalf_of_charge_management
750
+ # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default.
751
+ sig { returns(T.nilable(T::Boolean)) }
752
+ attr_accessor :dispute_management
753
+ # Whether to allow sending refunds. This is `true` by default.
754
+ sig { returns(T.nilable(T::Boolean)) }
755
+ attr_accessor :refund_management
756
+ sig {
757
+ params(destination_on_behalf_of_charge_management: T.nilable(T::Boolean), dispute_management: T.nilable(T::Boolean), refund_management: T.nilable(T::Boolean)).void
758
+ }
759
+ def initialize(
760
+ destination_on_behalf_of_charge_management: nil,
761
+ dispute_management: nil,
762
+ refund_management: nil
763
+ ); end
764
+ end
765
+ # Whether the embedded component is enabled.
766
+ sig { returns(T::Boolean) }
767
+ attr_accessor :enabled
768
+ # The list of features enabled in the embedded component.
769
+ sig {
770
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDisputes::Features))
771
+ }
772
+ attr_accessor :features
773
+ sig {
774
+ params(enabled: T::Boolean, features: T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDisputes::Features)).void
775
+ }
776
+ def initialize(enabled: nil, features: nil); end
777
+ end
663
778
  class Payments < Stripe::RequestParams
664
779
  class Features < Stripe::RequestParams
665
780
  # Whether to allow capturing and cancelling payment intents. This is `true` by default.
@@ -739,9 +854,7 @@ module Stripe
739
854
  def initialize(enabled: nil, features: nil); end
740
855
  end
741
856
  class PayoutsList < Stripe::RequestParams
742
- class Features < Stripe::RequestParams
743
-
744
- end
857
+ class Features < Stripe::RequestParams; end
745
858
  # Whether the embedded component is enabled.
746
859
  sig { returns(T::Boolean) }
747
860
  attr_accessor :enabled
@@ -756,9 +869,7 @@ module Stripe
756
869
  def initialize(enabled: nil, features: nil); end
757
870
  end
758
871
  class TaxRegistrations < Stripe::RequestParams
759
- class Features < Stripe::RequestParams
760
-
761
- end
872
+ class Features < Stripe::RequestParams; end
762
873
  # Whether the embedded component is enabled.
763
874
  sig { returns(T::Boolean) }
764
875
  attr_accessor :enabled
@@ -773,9 +884,7 @@ module Stripe
773
884
  def initialize(enabled: nil, features: nil); end
774
885
  end
775
886
  class TaxSettings < Stripe::RequestParams
776
- class Features < Stripe::RequestParams
777
-
778
- end
887
+ class Features < Stripe::RequestParams; end
779
888
  # Whether the embedded component is enabled.
780
889
  sig { returns(T::Boolean) }
781
890
  attr_accessor :enabled
@@ -802,6 +911,9 @@ module Stripe
802
911
  # Configuration for the balances embedded component.
803
912
  sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Balances)) }
804
913
  attr_accessor :balances
914
+ # Configuration for the disputes list embedded component.
915
+ sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::DisputesList)) }
916
+ attr_accessor :disputes_list
805
917
  # Configuration for the documents embedded component.
806
918
  sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents)) }
807
919
  attr_accessor :documents
@@ -833,6 +945,11 @@ module Stripe
833
945
  returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDetails))
834
946
  }
835
947
  attr_accessor :payment_details
948
+ # Configuration for the payment disputes embedded component.
949
+ sig {
950
+ returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDisputes))
951
+ }
952
+ attr_accessor :payment_disputes
836
953
  # Configuration for the payments embedded component.
837
954
  sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::Payments)) }
838
955
  attr_accessor :payments
@@ -851,12 +968,13 @@ module Stripe
851
968
  sig { returns(T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxSettings)) }
852
969
  attr_accessor :tax_settings
853
970
  sig {
854
- params(account_management: T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountManagement), account_onboarding: T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding), balances: T.nilable(::Stripe::AccountSession::CreateParams::Components::Balances), documents: T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents), financial_account: T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccount), financial_account_transactions: T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions), issuing_card: T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCard), issuing_cards_list: T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList), notification_banner: T.nilable(::Stripe::AccountSession::CreateParams::Components::NotificationBanner), payment_details: T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDetails), payments: T.nilable(::Stripe::AccountSession::CreateParams::Components::Payments), payouts: T.nilable(::Stripe::AccountSession::CreateParams::Components::Payouts), payouts_list: T.nilable(::Stripe::AccountSession::CreateParams::Components::PayoutsList), tax_registrations: T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations), tax_settings: T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxSettings)).void
971
+ params(account_management: T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountManagement), account_onboarding: T.nilable(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding), balances: T.nilable(::Stripe::AccountSession::CreateParams::Components::Balances), disputes_list: T.nilable(::Stripe::AccountSession::CreateParams::Components::DisputesList), documents: T.nilable(::Stripe::AccountSession::CreateParams::Components::Documents), financial_account: T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccount), financial_account_transactions: T.nilable(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions), issuing_card: T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCard), issuing_cards_list: T.nilable(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList), notification_banner: T.nilable(::Stripe::AccountSession::CreateParams::Components::NotificationBanner), payment_details: T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDetails), payment_disputes: T.nilable(::Stripe::AccountSession::CreateParams::Components::PaymentDisputes), payments: T.nilable(::Stripe::AccountSession::CreateParams::Components::Payments), payouts: T.nilable(::Stripe::AccountSession::CreateParams::Components::Payouts), payouts_list: T.nilable(::Stripe::AccountSession::CreateParams::Components::PayoutsList), tax_registrations: T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations), tax_settings: T.nilable(::Stripe::AccountSession::CreateParams::Components::TaxSettings)).void
855
972
  }
856
973
  def initialize(
857
974
  account_management: nil,
858
975
  account_onboarding: nil,
859
976
  balances: nil,
977
+ disputes_list: nil,
860
978
  documents: nil,
861
979
  financial_account: nil,
862
980
  financial_account_transactions: nil,
@@ -864,6 +982,7 @@ module Stripe
864
982
  issuing_cards_list: nil,
865
983
  notification_banner: nil,
866
984
  payment_details: nil,
985
+ payment_disputes: nil,
867
986
  payments: nil,
868
987
  payouts: nil,
869
988
  payouts_list: nil,
@@ -23,9 +23,7 @@ module Stripe
23
23
  # Always true for a deleted object
24
24
  sig { returns(T::Boolean) }
25
25
  attr_reader :deleted
26
- class DeleteParams < Stripe::RequestParams
27
-
28
- end
26
+ class DeleteParams < Stripe::RequestParams; end
29
27
  class ListParams < Stripe::RequestParams
30
28
  # Attribute for param field domain_name
31
29
  sig { returns(T.nilable(String)) }
@@ -155,6 +155,58 @@ module Stripe
155
155
  sig { returns(SourceTypes) }
156
156
  attr_reader :source_types
157
157
  end
158
+ class RefundAndDisputePrefunding < Stripe::StripeObject
159
+ class Available < Stripe::StripeObject
160
+ class SourceTypes < Stripe::StripeObject
161
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
162
+ sig { returns(Integer) }
163
+ attr_reader :bank_account
164
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
165
+ sig { returns(Integer) }
166
+ attr_reader :card
167
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
168
+ sig { returns(Integer) }
169
+ attr_reader :fpx
170
+ end
171
+ # Balance amount.
172
+ sig { returns(Integer) }
173
+ attr_reader :amount
174
+ # 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).
175
+ sig { returns(String) }
176
+ attr_reader :currency
177
+ # Attribute for field source_types
178
+ sig { returns(SourceTypes) }
179
+ attr_reader :source_types
180
+ end
181
+ class Pending < Stripe::StripeObject
182
+ class SourceTypes < Stripe::StripeObject
183
+ # Amount coming from [legacy US ACH payments](https://docs.stripe.com/ach-deprecated).
184
+ sig { returns(Integer) }
185
+ attr_reader :bank_account
186
+ # Amount coming from most payment methods, including cards as well as [non-legacy bank debits](https://docs.stripe.com/payments/bank-debits).
187
+ sig { returns(Integer) }
188
+ attr_reader :card
189
+ # Amount coming from [FPX](https://docs.stripe.com/payments/fpx), a Malaysian payment method.
190
+ sig { returns(Integer) }
191
+ attr_reader :fpx
192
+ end
193
+ # Balance amount.
194
+ sig { returns(Integer) }
195
+ attr_reader :amount
196
+ # 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).
197
+ sig { returns(String) }
198
+ attr_reader :currency
199
+ # Attribute for field source_types
200
+ sig { returns(SourceTypes) }
201
+ attr_reader :source_types
202
+ end
203
+ # Funds that are available for use.
204
+ sig { returns(T::Array[Available]) }
205
+ attr_reader :available
206
+ # Funds that are pending
207
+ sig { returns(T::Array[Pending]) }
208
+ attr_reader :pending
209
+ end
158
210
  # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
159
211
  sig { returns(T::Array[Available]) }
160
212
  attr_reader :available
@@ -176,5 +228,8 @@ module Stripe
176
228
  # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property.
177
229
  sig { returns(T::Array[Pending]) }
178
230
  attr_reader :pending
231
+ # Attribute for field refund_and_dispute_prefunding
232
+ sig { returns(RefundAndDisputePrefunding) }
233
+ attr_reader :refund_and_dispute_prefunding
179
234
  end
180
235
  end
@@ -31,6 +31,9 @@ module Stripe
31
31
  # The date that the transaction's net funds become available in the Stripe balance.
32
32
  sig { returns(Integer) }
33
33
  attr_reader :available_on
34
+ # The balance that this transaction impacts.
35
+ sig { returns(String) }
36
+ attr_reader :balance_type
34
37
  # Time at which the object was created. Measured in seconds since the Unix epoch.
35
38
  sig { returns(Integer) }
36
39
  attr_reader :created
@@ -5,11 +5,11 @@
5
5
  module Stripe
6
6
  # These bank accounts are payment methods on `Customer` objects.
7
7
  #
8
- # On the other hand [External Accounts](https://stripe.com/api#external_accounts) are transfer
8
+ # On the other hand [External Accounts](https://docs.stripe.com/api#external_accounts) are transfer
9
9
  # destinations on `Account` objects for connected accounts.
10
10
  # They can be bank accounts or debit cards as well, and are documented in the links above.
11
11
  #
12
- # Related guide: [Bank debits and transfers](https://stripe.com/payments/bank-debits-transfers)
12
+ # Related guide: [Bank debits and transfers](https://docs.stripe.com/payments/bank-debits-transfers)
13
13
  class BankAccount < APIResource
14
14
  class FutureRequirements < Stripe::StripeObject
15
15
  class Error < Stripe::StripeObject
@@ -101,13 +101,13 @@ module Stripe
101
101
  sig { returns(Integer) }
102
102
  attr_accessor :gte
103
103
  # The [Billing Meter](/api/billing/meter) ID whose usage is monitored.
104
- sig { returns(T.nilable(String)) }
104
+ sig { returns(String) }
105
105
  attr_accessor :meter
106
106
  # Whether the alert should only fire only once, or once per billing cycle.
107
107
  sig { returns(String) }
108
108
  attr_accessor :recurrence
109
109
  sig {
110
- params(filters: T.nilable(T::Array[::Stripe::Billing::Alert::CreateParams::UsageThreshold::Filter]), gte: Integer, meter: T.nilable(String), recurrence: String).void
110
+ params(filters: T.nilable(T::Array[::Stripe::Billing::Alert::CreateParams::UsageThreshold::Filter]), gte: Integer, meter: String, recurrence: String).void
111
111
  }
112
112
  def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil); end
113
113
  end
@@ -17,7 +17,7 @@ module Stripe
17
17
  # Create sessions on-demand when customers intend to manage their subscriptions
18
18
  # and billing details.
19
19
  #
20
- # Related guide: [Customer management](https://stripe.com/customer-management)
20
+ # Related guide: [Customer management](https://docs.stripe.com/customer-management)
21
21
  class Session < APIResource
22
22
  class Flow < Stripe::StripeObject
23
23
  class AfterCompletion < Stripe::StripeObject
@@ -75,7 +75,7 @@ module Stripe
75
75
  # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
76
76
  sig { returns(T.nilable(T::Array[Alternative])) }
77
77
  attr_reader :alternatives
78
- # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected.
78
+ # The date by which all required account information must be both submitted and verified. This includes fields listed in `currently_due` as well as those in `pending_verification`. If any required information is missing or unverified by this date, the account may be disabled. Note that `current_deadline` may change if additional `currently_due` requirements are requested.
79
79
  sig { returns(T.nilable(Integer)) }
80
80
  attr_reader :current_deadline
81
81
  # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled.
@@ -192,6 +192,12 @@ module Stripe
192
192
  attr_reader :transit_number
193
193
  end
194
194
  class Affirm < Stripe::StripeObject
195
+ # ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
196
+ sig { returns(String) }
197
+ attr_reader :location
198
+ # ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
199
+ sig { returns(String) }
200
+ attr_reader :reader
195
201
  # The Affirm transaction ID associated with this payment.
196
202
  sig { returns(T.nilable(String)) }
197
203
  attr_reader :transaction_id
@@ -1236,6 +1242,12 @@ module Stripe
1236
1242
  # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
1237
1243
  sig { returns(T.nilable(String)) }
1238
1244
  attr_reader :fingerprint
1245
+ # ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
1246
+ sig { returns(String) }
1247
+ attr_reader :location
1248
+ # ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
1249
+ sig { returns(String) }
1250
+ attr_reader :reader
1239
1251
  # Transaction ID of this particular WeChat Pay transaction.
1240
1252
  sig { returns(T.nilable(String)) }
1241
1253
  attr_reader :transaction_id
@@ -2006,9 +2018,9 @@ module Stripe
2006
2018
  end
2007
2019
  # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
2008
2020
  #
2009
- # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
2021
+ # Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
2010
2022
  #
2011
- # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
2023
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
2012
2024
  sig {
2013
2025
  params(params: T.any(::Stripe::Charge::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
2014
2026
  }
@@ -2016,15 +2028,15 @@ module Stripe
2016
2028
 
2017
2029
  # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
2018
2030
  #
2019
- # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
2031
+ # Uncaptured payments expire a set number of days after they are created ([7 by default](https://docs.stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail.
2020
2032
  #
2021
- # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
2033
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
2022
2034
  sig {
2023
2035
  params(charge: String, params: T.any(::Stripe::Charge::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge)
2024
2036
  }
2025
2037
  def self.capture(charge, params = {}, opts = {}); end
2026
2038
 
2027
- # This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
2039
+ # This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents)
2028
2040
  # to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
2029
2041
  # object used to request payment.
2030
2042
  sig {
@@ -779,6 +779,15 @@ module Stripe
779
779
  # Controls when the funds will be captured from the customer's account.
780
780
  sig { returns(String) }
781
781
  attr_reader :capture_method
782
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
783
+ #
784
+ # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes.
785
+ #
786
+ # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead.
787
+ #
788
+ # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication).
789
+ sig { returns(String) }
790
+ attr_reader :setup_future_usage
782
791
  end
783
792
  class Oxxo < Stripe::StripeObject
784
793
  # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time.
@@ -1377,7 +1386,7 @@ module Stripe
1377
1386
  # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
1378
1387
  sig { returns(T.nilable(String)) }
1379
1388
  attr_reader :submit_type
1380
- # The ID of the subscription for Checkout Sessions in `subscription` mode.
1389
+ # The ID of the [Subscription](https://stripe.com/docs/api/subscriptions) for Checkout Sessions in `subscription` mode.
1381
1390
  sig { returns(T.nilable(T.any(String, Stripe::Subscription))) }
1382
1391
  attr_reader :subscription
1383
1392
  # The URL the customer will be directed to after the payment or
@@ -2710,9 +2719,7 @@ module Stripe
2710
2719
  }
2711
2720
  def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end
2712
2721
  end
2713
- class PayByBank < Stripe::RequestParams
2714
-
2715
- end
2722
+ class PayByBank < Stripe::RequestParams; end
2716
2723
  class Payco < Stripe::RequestParams
2717
2724
  # Controls when the funds will be captured from the customer's account.
2718
2725
  sig { returns(T.nilable(String)) }
@@ -3173,13 +3180,20 @@ module Stripe
3173
3180
  # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout.
3174
3181
  sig { returns(T.nilable(T::Array[String])) }
3175
3182
  attr_accessor :allow_redisplay_filters
3183
+ # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
3184
+ sig { returns(T.nilable(String)) }
3185
+ attr_accessor :payment_method_remove
3176
3186
  # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
3177
3187
  sig { returns(T.nilable(String)) }
3178
3188
  attr_accessor :payment_method_save
3179
3189
  sig {
3180
- params(allow_redisplay_filters: T.nilable(T::Array[String]), payment_method_save: T.nilable(String)).void
3190
+ params(allow_redisplay_filters: T.nilable(T::Array[String]), payment_method_remove: T.nilable(String), payment_method_save: T.nilable(String)).void
3181
3191
  }
3182
- def initialize(allow_redisplay_filters: nil, payment_method_save: nil); end
3192
+ def initialize(
3193
+ allow_redisplay_filters: nil,
3194
+ payment_method_remove: nil,
3195
+ payment_method_save: nil
3196
+ ); end
3183
3197
  end
3184
3198
  class SetupIntentData < Stripe::RequestParams
3185
3199
  # An arbitrary string attached to the object. Often useful for displaying to users.
@@ -3979,6 +3993,8 @@ module Stripe
3979
3993
  def self.list_line_items(session, params = {}, opts = {}); end
3980
3994
 
3981
3995
  # Updates a Checkout Session object.
3996
+ #
3997
+ # Related guide: [Dynamically update Checkout](https://docs.stripe.com/payments/checkout/dynamic-updates)
3982
3998
  sig {
3983
3999
  params(session: String, params: T.any(::Stripe::Checkout::Session::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session)
3984
4000
  }