stripe 15.0.0 → 15.3.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 (320) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +129 -44
  4. data/CONTRIBUTING.md +25 -0
  5. data/Gemfile +1 -1
  6. data/OPENAPI_VERSION +1 -1
  7. data/README.md +28 -55
  8. data/VERSION +1 -1
  9. data/lib/stripe/api_operations/nested_resource.rb +35 -35
  10. data/lib/stripe/api_requestor.rb +1 -1
  11. data/lib/stripe/api_version.rb +2 -1
  12. data/lib/stripe/connection_manager.rb +1 -3
  13. data/lib/stripe/event_types.rb +1 -0
  14. data/lib/stripe/events/v1_billing_meter_error_report_triggered_event.rb +1 -1
  15. data/lib/stripe/events/v1_billing_meter_no_meter_found_event.rb +1 -1
  16. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +21 -0
  17. data/lib/stripe/oauth.rb +1 -1
  18. data/lib/stripe/resources/account.rb +198 -28
  19. data/lib/stripe/resources/account_session.rb +176 -72
  20. data/lib/stripe/resources/apple_pay_domain.rb +1 -2
  21. data/lib/stripe/resources/balance.rb +42 -0
  22. data/lib/stripe/resources/balance_transaction.rb +2 -0
  23. data/lib/stripe/resources/bank_account.rb +2 -2
  24. data/lib/stripe/resources/billing_portal/session.rb +3 -3
  25. data/lib/stripe/resources/capability.rb +1 -1
  26. data/lib/stripe/resources/charge.rb +43 -20
  27. data/lib/stripe/resources/checkout/session.rb +120 -19
  28. data/lib/stripe/resources/confirmation_token.rb +119 -100
  29. data/lib/stripe/resources/country_spec.rb +1 -1
  30. data/lib/stripe/resources/coupon.rb +2 -3
  31. data/lib/stripe/resources/credit_note.rb +21 -18
  32. data/lib/stripe/resources/customer.rb +4 -6
  33. data/lib/stripe/resources/customer_session.rb +5 -5
  34. data/lib/stripe/resources/dispute.rb +2 -2
  35. data/lib/stripe/resources/event.rb +3 -1
  36. data/lib/stripe/resources/file.rb +1 -1
  37. data/lib/stripe/resources/funding_instructions.rb +1 -1
  38. data/lib/stripe/resources/identity/verification_report.rb +6 -0
  39. data/lib/stripe/resources/identity/verification_session.rb +51 -11
  40. data/lib/stripe/resources/invoice.rb +146 -32
  41. data/lib/stripe/resources/invoice_item.rb +3 -7
  42. data/lib/stripe/resources/invoice_line_item.rb +1 -1
  43. data/lib/stripe/resources/invoice_payment.rb +9 -2
  44. data/lib/stripe/resources/issuing/authorization.rb +8 -8
  45. data/lib/stripe/resources/issuing/card.rb +1 -1
  46. data/lib/stripe/resources/issuing/dispute.rb +3 -3
  47. data/lib/stripe/resources/login_link.rb +2 -1
  48. data/lib/stripe/resources/mandate.rb +3 -0
  49. data/lib/stripe/resources/payment_intent.rb +602 -325
  50. data/lib/stripe/resources/payment_method.rb +76 -117
  51. data/lib/stripe/resources/payment_method_configuration.rb +356 -2
  52. data/lib/stripe/resources/payment_method_domain.rb +15 -2
  53. data/lib/stripe/resources/payout.rb +4 -4
  54. data/lib/stripe/resources/person.rb +27 -3
  55. data/lib/stripe/resources/plan.rb +2 -3
  56. data/lib/stripe/resources/price.rb +1 -1
  57. data/lib/stripe/resources/product.rb +1 -2
  58. data/lib/stripe/resources/quote.rb +28 -3
  59. data/lib/stripe/resources/radar/value_list.rb +1 -2
  60. data/lib/stripe/resources/radar/value_list_item.rb +1 -2
  61. data/lib/stripe/resources/refund.rb +8 -1
  62. data/lib/stripe/resources/reversal.rb +1 -1
  63. data/lib/stripe/resources/review.rb +1 -1
  64. data/lib/stripe/resources/setup_attempt.rb +1 -1
  65. data/lib/stripe/resources/setup_intent.rb +414 -293
  66. data/lib/stripe/resources/source.rb +1 -1
  67. data/lib/stripe/resources/subscription.rb +149 -27
  68. data/lib/stripe/resources/subscription_item.rb +33 -0
  69. data/lib/stripe/resources/subscription_schedule.rb +141 -4
  70. data/lib/stripe/resources/tax/calculation.rb +6 -2
  71. data/lib/stripe/resources/tax/calculation_line_item.rb +2 -0
  72. data/lib/stripe/resources/tax/registration.rb +261 -1
  73. data/lib/stripe/resources/tax/transaction.rb +1 -1
  74. data/lib/stripe/resources/tax_id.rb +3 -4
  75. data/lib/stripe/resources/tax_rate.rb +2 -2
  76. data/lib/stripe/resources/terminal/configuration.rb +2 -2
  77. data/lib/stripe/resources/terminal/location.rb +2 -3
  78. data/lib/stripe/resources/terminal/reader.rb +426 -6
  79. data/lib/stripe/resources/test_helpers/test_clock.rb +1 -2
  80. data/lib/stripe/resources/token.rb +63 -2
  81. data/lib/stripe/resources/transfer.rb +1 -1
  82. data/lib/stripe/resources/treasury/financial_account.rb +5 -1
  83. data/lib/stripe/resources/v2/billing/meter_event.rb +2 -2
  84. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +2 -2
  85. data/lib/stripe/resources/v2/billing/meter_event_session.rb +2 -2
  86. data/lib/stripe/resources/v2/event.rb +2 -2
  87. data/lib/stripe/resources/v2/event_destination.rb +2 -2
  88. data/lib/stripe/resources/webhook_endpoint.rb +1 -2
  89. data/lib/stripe/resources.rb +1 -0
  90. data/lib/stripe/services/account_external_account_service.rb +3 -4
  91. data/lib/stripe/services/account_login_link_service.rb +1 -1
  92. data/lib/stripe/services/account_person_service.rb +85 -2
  93. data/lib/stripe/services/account_service.rb +169 -20
  94. data/lib/stripe/services/account_session_service.rb +115 -47
  95. data/lib/stripe/services/apple_pay_domain_service.rb +1 -2
  96. data/lib/stripe/services/application_fee_service.rb +1 -1
  97. data/lib/stripe/services/apps_service.rb +1 -1
  98. data/lib/stripe/services/balance_service.rb +1 -1
  99. data/lib/stripe/services/billing/meter_service.rb +1 -1
  100. data/lib/stripe/services/billing_portal/session_service.rb +1 -1
  101. data/lib/stripe/services/billing_portal_service.rb +1 -1
  102. data/lib/stripe/services/billing_service.rb +1 -1
  103. data/lib/stripe/services/charge_service.rb +4 -4
  104. data/lib/stripe/services/checkout/session_service.rb +94 -15
  105. data/lib/stripe/services/checkout_service.rb +1 -1
  106. data/lib/stripe/services/climate_service.rb +1 -1
  107. data/lib/stripe/services/coupon_service.rb +1 -2
  108. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  109. data/lib/stripe/services/credit_note_service.rb +14 -15
  110. data/lib/stripe/services/customer_balance_transaction_service.rb +3 -3
  111. data/lib/stripe/services/customer_cash_balance_transaction_service.rb +2 -2
  112. data/lib/stripe/services/customer_payment_method_service.rb +1 -1
  113. data/lib/stripe/services/customer_payment_source_service.rb +1 -1
  114. data/lib/stripe/services/customer_service.rb +5 -7
  115. data/lib/stripe/services/customer_session_service.rb +1 -1
  116. data/lib/stripe/services/customer_tax_id_service.rb +2 -3
  117. data/lib/stripe/services/dispute_service.rb +1 -1
  118. data/lib/stripe/services/entitlements_service.rb +1 -1
  119. data/lib/stripe/services/file_service.rb +1 -1
  120. data/lib/stripe/services/financial_connections/account_service.rb +1 -1
  121. data/lib/stripe/services/financial_connections_service.rb +1 -1
  122. data/lib/stripe/services/forwarding_service.rb +1 -1
  123. data/lib/stripe/services/identity/verification_session_service.rb +21 -5
  124. data/lib/stripe/services/identity_service.rb +1 -1
  125. data/lib/stripe/services/invoice_item_service.rb +1 -2
  126. data/lib/stripe/services/invoice_service.rb +122 -28
  127. data/lib/stripe/services/issuing/authorization_service.rb +4 -4
  128. data/lib/stripe/services/issuing/card_service.rb +1 -1
  129. data/lib/stripe/services/issuing/dispute_service.rb +2 -2
  130. data/lib/stripe/services/issuing_service.rb +1 -1
  131. data/lib/stripe/services/payment_intent_service.rb +563 -313
  132. data/lib/stripe/services/payment_link_service.rb +1 -1
  133. data/lib/stripe/services/payment_method_configuration_service.rb +254 -2
  134. data/lib/stripe/services/payment_method_domain_service.rb +1 -1
  135. data/lib/stripe/services/payment_method_service.rb +59 -105
  136. data/lib/stripe/services/payout_service.rb +2 -2
  137. data/lib/stripe/services/plan_service.rb +2 -3
  138. data/lib/stripe/services/price_service.rb +2 -2
  139. data/lib/stripe/services/product_feature_service.rb +1 -2
  140. data/lib/stripe/services/product_service.rb +3 -4
  141. data/lib/stripe/services/promotion_code_service.rb +1 -1
  142. data/lib/stripe/services/quote_service.rb +21 -4
  143. data/lib/stripe/services/radar/early_fraud_warning_service.rb +1 -1
  144. data/lib/stripe/services/radar/value_list_item_service.rb +1 -2
  145. data/lib/stripe/services/radar/value_list_service.rb +1 -2
  146. data/lib/stripe/services/radar_service.rb +1 -1
  147. data/lib/stripe/services/reporting_service.rb +1 -1
  148. data/lib/stripe/services/setup_intent_service.rb +403 -291
  149. data/lib/stripe/services/sigma_service.rb +1 -1
  150. data/lib/stripe/services/source_service.rb +2 -2
  151. data/lib/stripe/services/subscription_item_service.rb +26 -0
  152. data/lib/stripe/services/subscription_schedule_service.rb +106 -3
  153. data/lib/stripe/services/subscription_service.rb +121 -26
  154. data/lib/stripe/services/tax/calculation_service.rb +6 -2
  155. data/lib/stripe/services/tax/registration_service.rb +170 -1
  156. data/lib/stripe/services/tax/transaction_service.rb +1 -1
  157. data/lib/stripe/services/tax_id_service.rb +2 -3
  158. data/lib/stripe/services/tax_service.rb +1 -1
  159. data/lib/stripe/services/terminal/configuration_service.rb +1 -2
  160. data/lib/stripe/services/terminal/location_service.rb +2 -3
  161. data/lib/stripe/services/terminal/reader_service.rb +196 -2
  162. data/lib/stripe/services/terminal_service.rb +1 -1
  163. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +90 -91
  164. data/lib/stripe/services/test_helpers/issuing_service.rb +1 -1
  165. data/lib/stripe/services/test_helpers/terminal/reader_service.rb +43 -0
  166. data/lib/stripe/services/test_helpers/terminal_service.rb +1 -1
  167. data/lib/stripe/services/test_helpers/test_clock_service.rb +1 -2
  168. data/lib/stripe/services/test_helpers/treasury_service.rb +1 -1
  169. data/lib/stripe/services/test_helpers_service.rb +1 -1
  170. data/lib/stripe/services/token_service.rb +62 -1
  171. data/lib/stripe/services/transfer_service.rb +2 -2
  172. data/lib/stripe/services/treasury/financial_account_service.rb +6 -2
  173. data/lib/stripe/services/treasury_service.rb +1 -1
  174. data/lib/stripe/services/v1_services.rb +1 -1
  175. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -2
  176. data/lib/stripe/services/v2/billing_service.rb +3 -3
  177. data/lib/stripe/services/v2/core/event_destination_service.rb +17 -23
  178. data/lib/stripe/services/v2/core/event_service.rb +1 -2
  179. data/lib/stripe/services/v2/core_service.rb +1 -1
  180. data/lib/stripe/services/v2_services.rb +1 -1
  181. data/lib/stripe/services/webhook_endpoint_service.rb +1 -2
  182. data/lib/stripe/version.rb +1 -1
  183. data/lib/stripe/webhook.rb +1 -1
  184. data/rbi/stripe/resources/account.rbi +190 -35
  185. data/rbi/stripe/resources/account_session.rbi +196 -77
  186. data/rbi/stripe/resources/apple_pay_domain.rbi +1 -3
  187. data/rbi/stripe/resources/balance.rbi +55 -0
  188. data/rbi/stripe/resources/balance_transaction.rbi +3 -0
  189. data/rbi/stripe/resources/bank_account.rbi +2 -2
  190. data/rbi/stripe/resources/billing/alert.rbi +2 -2
  191. data/rbi/stripe/resources/billing_portal/session.rbi +3 -3
  192. data/rbi/stripe/resources/capability.rbi +1 -1
  193. data/rbi/stripe/resources/charge.rbi +52 -20
  194. data/rbi/stripe/resources/checkout/session.rbi +133 -24
  195. data/rbi/stripe/resources/confirmation_token.rbi +140 -115
  196. data/rbi/stripe/resources/country_spec.rbi +1 -1
  197. data/rbi/stripe/resources/coupon.rbi +2 -4
  198. data/rbi/stripe/resources/credit_note.rbi +23 -18
  199. data/rbi/stripe/resources/customer.rbi +4 -8
  200. data/rbi/stripe/resources/customer_session.rbi +5 -5
  201. data/rbi/stripe/resources/dispute.rbi +2 -2
  202. data/rbi/stripe/resources/event.rbi +4 -1
  203. data/rbi/stripe/resources/file.rbi +1 -1
  204. data/rbi/stripe/resources/identity/verification_report.rbi +9 -0
  205. data/rbi/stripe/resources/identity/verification_session.rbi +59 -12
  206. data/rbi/stripe/resources/invoice.rbi +149 -40
  207. data/rbi/stripe/resources/invoice_item.rbi +3 -8
  208. data/rbi/stripe/resources/invoice_line_item.rbi +2 -2
  209. data/rbi/stripe/resources/invoice_payment.rbi +9 -2
  210. data/rbi/stripe/resources/issuing/authorization.rbi +8 -8
  211. data/rbi/stripe/resources/issuing/card.rbi +1 -1
  212. data/rbi/stripe/resources/issuing/dispute.rbi +3 -3
  213. data/rbi/stripe/resources/login_link.rbi +2 -1
  214. data/rbi/stripe/resources/mandate.rbi +4 -0
  215. data/rbi/stripe/resources/payment_intent.rbi +637 -381
  216. data/rbi/stripe/resources/payment_method.rbi +81 -133
  217. data/rbi/stripe/resources/payment_method_configuration.rbi +400 -4
  218. data/rbi/stripe/resources/payment_method_domain.rbi +18 -2
  219. data/rbi/stripe/resources/payout.rbi +4 -4
  220. data/rbi/stripe/resources/person.rbi +33 -3
  221. data/rbi/stripe/resources/plan.rbi +2 -4
  222. data/rbi/stripe/resources/price.rbi +1 -1
  223. data/rbi/stripe/resources/product.rbi +1 -3
  224. data/rbi/stripe/resources/quote.rbi +25 -3
  225. data/rbi/stripe/resources/radar/value_list.rbi +1 -3
  226. data/rbi/stripe/resources/radar/value_list_item.rbi +1 -3
  227. data/rbi/stripe/resources/refund.rbi +8 -1
  228. data/rbi/stripe/resources/reversal.rbi +1 -1
  229. data/rbi/stripe/resources/review.rbi +1 -1
  230. data/rbi/stripe/resources/setup_attempt.rbi +1 -1
  231. data/rbi/stripe/resources/setup_intent.rbi +464 -346
  232. data/rbi/stripe/resources/source.rbi +1 -1
  233. data/rbi/stripe/resources/subscription.rbi +150 -34
  234. data/rbi/stripe/resources/subscription_item.rbi +36 -2
  235. data/rbi/stripe/resources/subscription_schedule.rbi +161 -11
  236. data/rbi/stripe/resources/tax/calculation.rbi +7 -3
  237. data/rbi/stripe/resources/tax/calculation_line_item.rbi +4 -1
  238. data/rbi/stripe/resources/tax/registration.rbi +249 -2
  239. data/rbi/stripe/resources/tax/transaction.rbi +1 -1
  240. data/rbi/stripe/resources/tax_id.rbi +3 -5
  241. data/rbi/stripe/resources/tax_rate.rbi +2 -2
  242. data/rbi/stripe/resources/terminal/configuration.rbi +2 -3
  243. data/rbi/stripe/resources/terminal/location.rbi +4 -6
  244. data/rbi/stripe/resources/terminal/reader.rbi +415 -8
  245. data/rbi/stripe/resources/test_helpers/test_clock.rbi +1 -3
  246. data/rbi/stripe/resources/token.rbi +70 -4
  247. data/rbi/stripe/resources/transfer.rbi +1 -1
  248. data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
  249. data/rbi/stripe/resources/v2/billing/meter_event.rbi +3 -3
  250. data/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +3 -3
  251. data/rbi/stripe/resources/v2/billing/meter_event_session.rbi +3 -3
  252. data/rbi/stripe/resources/v2/event.rbi +3 -3
  253. data/rbi/stripe/resources/v2/event_destination.rbi +3 -3
  254. data/rbi/stripe/resources/webhook_endpoint.rbi +1 -3
  255. data/rbi/stripe/services/account_external_account_service.rbi +3 -5
  256. data/rbi/stripe/services/account_login_link_service.rbi +1 -1
  257. data/rbi/stripe/services/account_person_service.rbi +93 -5
  258. data/rbi/stripe/services/account_service.rbi +166 -28
  259. data/rbi/stripe/services/account_session_service.rbi +126 -52
  260. data/rbi/stripe/services/apple_pay_domain_service.rbi +1 -3
  261. data/rbi/stripe/services/balance_service.rbi +1 -1
  262. data/rbi/stripe/services/billing/alert_service.rbi +2 -2
  263. data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
  264. data/rbi/stripe/services/charge_service.rbi +4 -4
  265. data/rbi/stripe/services/checkout/session_service.rbi +104 -19
  266. data/rbi/stripe/services/coupon_service.rbi +1 -3
  267. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
  268. data/rbi/stripe/services/credit_note_service.rbi +13 -14
  269. data/rbi/stripe/services/customer_balance_transaction_service.rbi +3 -3
  270. data/rbi/stripe/services/customer_cash_balance_transaction_service.rbi +2 -2
  271. data/rbi/stripe/services/customer_payment_method_service.rbi +1 -1
  272. data/rbi/stripe/services/customer_payment_source_service.rbi +1 -1
  273. data/rbi/stripe/services/customer_service.rbi +4 -8
  274. data/rbi/stripe/services/customer_session_service.rbi +1 -1
  275. data/rbi/stripe/services/customer_tax_id_service.rbi +2 -4
  276. data/rbi/stripe/services/dispute_service.rbi +1 -1
  277. data/rbi/stripe/services/file_service.rbi +1 -1
  278. data/rbi/stripe/services/identity/verification_session_service.rbi +22 -6
  279. data/rbi/stripe/services/invoice_item_service.rbi +1 -3
  280. data/rbi/stripe/services/invoice_service.rbi +126 -35
  281. data/rbi/stripe/services/issuing/authorization_service.rbi +4 -4
  282. data/rbi/stripe/services/issuing/card_service.rbi +1 -1
  283. data/rbi/stripe/services/issuing/dispute_service.rbi +2 -2
  284. data/rbi/stripe/services/payment_intent_service.rbi +599 -369
  285. data/rbi/stripe/services/payment_method_configuration_service.rbi +280 -4
  286. data/rbi/stripe/services/payment_method_domain_service.rbi +1 -1
  287. data/rbi/stripe/services/payment_method_service.rbi +62 -121
  288. data/rbi/stripe/services/payout_service.rbi +2 -2
  289. data/rbi/stripe/services/plan_service.rbi +2 -4
  290. data/rbi/stripe/services/price_service.rbi +2 -2
  291. data/rbi/stripe/services/product_feature_service.rbi +1 -3
  292. data/rbi/stripe/services/product_service.rbi +2 -4
  293. data/rbi/stripe/services/promotion_code_service.rbi +1 -1
  294. data/rbi/stripe/services/quote_service.rbi +16 -3
  295. data/rbi/stripe/services/radar/early_fraud_warning_service.rbi +1 -1
  296. data/rbi/stripe/services/radar/value_list_item_service.rbi +1 -3
  297. data/rbi/stripe/services/radar/value_list_service.rbi +1 -3
  298. data/rbi/stripe/services/setup_intent_service.rbi +457 -344
  299. data/rbi/stripe/services/source_service.rbi +1 -1
  300. data/rbi/stripe/services/subscription_item_service.rbi +28 -2
  301. data/rbi/stripe/services/subscription_schedule_service.rbi +119 -10
  302. data/rbi/stripe/services/subscription_service.rbi +121 -33
  303. data/rbi/stripe/services/tax/calculation_service.rbi +6 -2
  304. data/rbi/stripe/services/tax/registration_service.rbi +171 -2
  305. data/rbi/stripe/services/tax_id_service.rbi +2 -4
  306. data/rbi/stripe/services/terminal/configuration_service.rbi +1 -3
  307. data/rbi/stripe/services/terminal/location_service.rbi +4 -6
  308. data/rbi/stripe/services/terminal/reader_service.rbi +200 -4
  309. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +106 -106
  310. data/rbi/stripe/services/test_helpers/terminal/reader_service.rbi +31 -0
  311. data/rbi/stripe/services/test_helpers/test_clock_service.rbi +1 -3
  312. data/rbi/stripe/services/token_service.rbi +71 -3
  313. data/rbi/stripe/services/transfer_service.rbi +1 -1
  314. data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
  315. data/rbi/stripe/services/v2/billing/meter_event_session_service.rbi +1 -3
  316. data/rbi/stripe/services/v2/billing_service.rbi +1 -1
  317. data/rbi/stripe/services/v2/core/event_destination_service.rbi +14 -22
  318. data/rbi/stripe/services/v2/core/event_service.rbi +1 -3
  319. data/rbi/stripe/services/webhook_endpoint_service.rbi +1 -3
  320. metadata +5 -2
@@ -16,7 +16,7 @@ module Stripe
16
16
  # Create sessions on-demand when customers intend to manage their subscriptions
17
17
  # and billing details.
18
18
  #
19
- # Related guide: [Customer management](https://stripe.com/customer-management)
19
+ # Related guide: [Customer management](https://docs.stripe.com/customer-management)
20
20
  class Session < APIResource
21
21
  extend Stripe::APIOperations::Create
22
22
 
@@ -82,7 +82,7 @@ module Stripe
82
82
  # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow.
83
83
  attr_reader :quantity
84
84
  end
85
- # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
85
+ # The coupon or promotion code to apply to this subscription update.
86
86
  attr_reader :discounts
87
87
  # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
88
88
  attr_reader :items
@@ -202,7 +202,7 @@ module Stripe
202
202
  @quantity = quantity
203
203
  end
204
204
  end
205
- # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified.
205
+ # The coupon or promotion code to apply to this subscription update.
206
206
  attr_accessor :discounts
207
207
  # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable.
208
208
  attr_accessor :items
@@ -65,7 +65,7 @@ module Stripe
65
65
  end
66
66
  # Fields that are due and can be satisfied by providing the corresponding alternative fields instead.
67
67
  attr_reader :alternatives
68
- # 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.
68
+ # 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.
69
69
  attr_reader :current_deadline
70
70
  # 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.
71
71
  attr_reader :currently_due
@@ -43,6 +43,8 @@ module Stripe
43
43
  attr_reader :name
44
44
  # Billing phone number (including extension).
45
45
  attr_reader :phone
46
+ # Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
47
+ attr_reader :tax_id
46
48
  end
47
49
 
48
50
  class FraudDetails < Stripe::StripeObject
@@ -155,6 +157,10 @@ module Stripe
155
157
  end
156
158
 
157
159
  class Affirm < Stripe::StripeObject
160
+ # ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
161
+ attr_reader :location
162
+ # ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
163
+ attr_reader :reader
158
164
  # The Affirm transaction ID associated with this payment.
159
165
  attr_reader :transaction_id
160
166
  end
@@ -284,7 +290,7 @@ module Stripe
284
290
  # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
285
291
  # One of `month`.
286
292
  attr_reader :interval
287
- # Type of installment plan, one of `fixed_count`.
293
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
288
294
  attr_reader :type
289
295
  end
290
296
  # Installment plan selected for the payment.
@@ -468,7 +474,7 @@ module Stripe
468
474
  attr_reader :iin
469
475
  # Attribute for field incremental_authorization
470
476
  attr_reader :incremental_authorization
471
- # Installment details for this payment (Mexico only).
477
+ # Installment details for this payment.
472
478
  #
473
479
  # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
474
480
  attr_reader :installments
@@ -509,9 +515,9 @@ module Stripe
509
515
  class Receipt < Stripe::StripeObject
510
516
  # The type of account being debited or credited
511
517
  attr_reader :account_type
512
- # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
518
+ # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.
513
519
  attr_reader :application_cryptogram
514
- # Mnenomic of the Application Identifier.
520
+ # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip.
515
521
  attr_reader :application_preferred_name
516
522
  # Identifier for this transaction.
517
523
  attr_reader :authorization_code
@@ -519,11 +525,11 @@ module Stripe
519
525
  attr_reader :authorization_response_code
520
526
  # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
521
527
  attr_reader :cardholder_verification_method
522
- # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
528
+ # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.
523
529
  attr_reader :dedicated_file_name
524
- # The outcome of a series of EMV functions performed by the card reader.
530
+ # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95.
525
531
  attr_reader :terminal_verification_results
526
- # An indication of various EMV functions performed during the transaction.
532
+ # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.
527
533
  attr_reader :transaction_status_information
528
534
  end
529
535
 
@@ -575,7 +581,7 @@ module Stripe
575
581
  attr_reader :offline
576
582
  # Defines whether the authorized amount can be over-captured or not
577
583
  attr_reader :overcapture_supported
578
- # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
584
+ # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.
579
585
  attr_reader :preferred_locales
580
586
  # How card details were read in this transaction.
581
587
  attr_reader :read_method
@@ -592,6 +598,17 @@ module Stripe
592
598
  attr_reader :cashtag
593
599
  end
594
600
 
601
+ class Crypto < Stripe::StripeObject
602
+ # The wallet address of the customer.
603
+ attr_reader :buyer_address
604
+ # The blockchain network that the transaction was sent on.
605
+ attr_reader :network
606
+ # The token currency that the transaction was sent with.
607
+ attr_reader :token_currency
608
+ # The blockchain transaction hash of the crypto payment.
609
+ attr_reader :transaction_hash
610
+ end
611
+
595
612
  class CustomerBalance < Stripe::StripeObject; end
596
613
 
597
614
  class Eps < Stripe::StripeObject
@@ -631,7 +648,7 @@ module Stripe
631
648
  end
632
649
 
633
650
  class Ideal < Stripe::StripeObject
634
- # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
651
+ # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `buut`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`.
635
652
  attr_reader :bank
636
653
  # The Bank Identifier Code of the customer's bank.
637
654
  attr_reader :bic
@@ -650,9 +667,9 @@ module Stripe
650
667
  class Receipt < Stripe::StripeObject
651
668
  # The type of account being debited or credited
652
669
  attr_reader :account_type
653
- # EMV tag 9F26, cryptogram generated by the integrated circuit chip.
670
+ # The Application Cryptogram, a unique value generated by the card to authenticate the transaction with issuers.
654
671
  attr_reader :application_cryptogram
655
- # Mnenomic of the Application Identifier.
672
+ # The Application Identifier (AID) on the card used to determine which networks are eligible to process the transaction. Referenced from EMV tag 9F12, data encoded on the card's chip.
656
673
  attr_reader :application_preferred_name
657
674
  # Identifier for this transaction.
658
675
  attr_reader :authorization_code
@@ -660,11 +677,11 @@ module Stripe
660
677
  attr_reader :authorization_response_code
661
678
  # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`.
662
679
  attr_reader :cardholder_verification_method
663
- # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip.
680
+ # Similar to the application_preferred_name, identifying the applications (AIDs) available on the card. Referenced from EMV tag 84.
664
681
  attr_reader :dedicated_file_name
665
- # The outcome of a series of EMV functions performed by the card reader.
682
+ # A 5-byte string that records the checks and validations that occur between the card and the terminal. These checks determine how the terminal processes the transaction and what risk tolerance is acceptable. Referenced from EMV Tag 95.
666
683
  attr_reader :terminal_verification_results
667
- # An indication of various EMV functions performed during the transaction.
684
+ # An indication of which steps were completed during the card read process. Referenced from EMV Tag 9B.
668
685
  attr_reader :transaction_status_information
669
686
  end
670
687
  # Card brand. Can be `interac`, `mastercard` or `visa`.
@@ -699,7 +716,7 @@ module Stripe
699
716
  attr_reader :network
700
717
  # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. This value will be present if it is returned by the financial network in the authorization response, and null otherwise.
701
718
  attr_reader :network_transaction_id
702
- # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip.
719
+ # The languages that the issuing bank recommends using for localizing any customer-facing text, as read from the card. Referenced from EMV tag 5F2D, data encoded on the card's chip.
703
720
  attr_reader :preferred_locales
704
721
  # How card details were read in this transaction.
705
722
  attr_reader :read_method
@@ -976,6 +993,10 @@ module Stripe
976
993
  class WechatPay < Stripe::StripeObject
977
994
  # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same.
978
995
  attr_reader :fingerprint
996
+ # ID of the [location](https://stripe.com/docs/api/terminal/locations) that this transaction's reader is assigned to.
997
+ attr_reader :location
998
+ # ID of the [reader](https://stripe.com/docs/api/terminal/readers) this transaction was made on.
999
+ attr_reader :reader
979
1000
  # Transaction ID of this particular WeChat Pay transaction.
980
1001
  attr_reader :transaction_id
981
1002
  end
@@ -1015,6 +1036,8 @@ module Stripe
1015
1036
  attr_reader :card_present
1016
1037
  # Attribute for field cashapp
1017
1038
  attr_reader :cashapp
1039
+ # Attribute for field crypto
1040
+ attr_reader :crypto
1018
1041
  # Attribute for field customer_balance
1019
1042
  attr_reader :customer_balance
1020
1043
  # Attribute for field eps
@@ -1634,9 +1657,9 @@ module Stripe
1634
1657
 
1635
1658
  # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
1636
1659
  #
1637
- # 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.
1660
+ # 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.
1638
1661
  #
1639
- # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
1662
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
1640
1663
  def capture(params = {}, opts = {})
1641
1664
  request_stripe_object(
1642
1665
  method: :post,
@@ -1648,9 +1671,9 @@ module Stripe
1648
1671
 
1649
1672
  # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false.
1650
1673
  #
1651
- # 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.
1674
+ # 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.
1652
1675
  #
1653
- # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture).
1676
+ # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://docs.stripe.com/docs/api/payment_intents/capture).
1654
1677
  def self.capture(charge, params = {}, opts = {})
1655
1678
  request_stripe_object(
1656
1679
  method: :post,
@@ -1660,7 +1683,7 @@ module Stripe
1660
1683
  )
1661
1684
  end
1662
1685
 
1663
- # This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents)
1686
+ # This method is no longer recommended—use the [Payment Intents API](https://docs.stripe.com/docs/api/payment_intents)
1664
1687
  # to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge
1665
1688
  # object used to request payment.
1666
1689
  def self.create(params = {}, opts = {})
@@ -60,6 +60,8 @@ module Stripe
60
60
  attr_reader :enabled
61
61
  # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account.
62
62
  attr_reader :liability
63
+ # The tax provider powering automatic tax.
64
+ attr_reader :provider
63
65
  # The status of the most recent automated tax calculation for this session.
64
66
  attr_reader :status
65
67
  end
@@ -232,7 +234,7 @@ module Stripe
232
234
  end
233
235
 
234
236
  class TaxId < Stripe::StripeObject
235
- # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown`
237
+ # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `al_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, `aw_tin`, `az_tin`, `bd_bin`, `bj_ifu`, `et_tin`, `kg_tin`, `la_tin`, `cm_niu`, `cv_nif`, `bf_ifu`, or `unknown`
236
238
  attr_reader :type
237
239
  # The value of the tax ID.
238
240
  attr_reader :value
@@ -675,6 +677,14 @@ module Stripe
675
677
  class NaverPay < Stripe::StripeObject
676
678
  # Controls when the funds will be captured from the customer's account.
677
679
  attr_reader :capture_method
680
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
681
+ #
682
+ # 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.
683
+ #
684
+ # 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.
685
+ #
686
+ # 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).
687
+ attr_reader :setup_future_usage
678
688
  end
679
689
 
680
690
  class Oxxo < Stripe::StripeObject
@@ -1010,6 +1020,15 @@ module Stripe
1010
1020
  attr_reader :breakdown
1011
1021
  end
1012
1022
 
1023
+ class WalletOptions < Stripe::StripeObject
1024
+ class Link < Stripe::StripeObject
1025
+ # Describes whether Checkout should display Link. Defaults to `auto`.
1026
+ attr_reader :display
1027
+ end
1028
+ # Attribute for field link
1029
+ attr_reader :link
1030
+ end
1031
+
1013
1032
  class ListParams < Stripe::RequestParams
1014
1033
  class Created < Stripe::RequestParams
1015
1034
  # Minimum value to filter by (exclusive)
@@ -2160,6 +2179,43 @@ module Stripe
2160
2179
  end
2161
2180
 
2162
2181
  class Klarna < Stripe::RequestParams
2182
+ class Subscription < Stripe::RequestParams
2183
+ class NextBilling < Stripe::RequestParams
2184
+ # The amount of the next charge for the subscription.
2185
+ attr_accessor :amount
2186
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
2187
+ attr_accessor :date
2188
+
2189
+ def initialize(amount: nil, date: nil)
2190
+ @amount = amount
2191
+ @date = date
2192
+ end
2193
+ end
2194
+ # Unit of time between subscription charges.
2195
+ attr_accessor :interval
2196
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
2197
+ attr_accessor :interval_count
2198
+ # Name for subscription.
2199
+ attr_accessor :name
2200
+ # Describes the upcoming charge for this subscription.
2201
+ attr_accessor :next_billing
2202
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
2203
+ attr_accessor :reference
2204
+
2205
+ def initialize(
2206
+ interval: nil,
2207
+ interval_count: nil,
2208
+ name: nil,
2209
+ next_billing: nil,
2210
+ reference: nil
2211
+ )
2212
+ @interval = interval
2213
+ @interval_count = interval_count
2214
+ @name = name
2215
+ @next_billing = next_billing
2216
+ @reference = reference
2217
+ end
2218
+ end
2163
2219
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2164
2220
  #
2165
2221
  # 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.
@@ -2168,9 +2224,12 @@ module Stripe
2168
2224
  #
2169
2225
  # 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).
2170
2226
  attr_accessor :setup_future_usage
2227
+ # Subscription details if the Checkout Session sets up a future subscription.
2228
+ attr_accessor :subscriptions
2171
2229
 
2172
- def initialize(setup_future_usage: nil)
2230
+ def initialize(setup_future_usage: nil, subscriptions: nil)
2173
2231
  @setup_future_usage = setup_future_usage
2232
+ @subscriptions = subscriptions
2174
2233
  end
2175
2234
  end
2176
2235
 
@@ -2309,8 +2368,7 @@ module Stripe
2309
2368
  end
2310
2369
  end
2311
2370
 
2312
- class PayByBank < Stripe::RequestParams
2313
- end
2371
+ class PayByBank < Stripe::RequestParams; end
2314
2372
 
2315
2373
  class Payco < Stripe::RequestParams
2316
2374
  # Controls when the funds will be captured from the customer's account.
@@ -2706,11 +2764,18 @@ module Stripe
2706
2764
  class SavedPaymentMethodOptions < Stripe::RequestParams
2707
2765
  # 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.
2708
2766
  attr_accessor :allow_redisplay_filters
2767
+ # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default.
2768
+ attr_accessor :payment_method_remove
2709
2769
  # Enable customers to choose if they wish to save their payment method for future use. Disabled by default.
2710
2770
  attr_accessor :payment_method_save
2711
2771
 
2712
- def initialize(allow_redisplay_filters: nil, payment_method_save: nil)
2772
+ def initialize(
2773
+ allow_redisplay_filters: nil,
2774
+ payment_method_remove: nil,
2775
+ payment_method_save: nil
2776
+ )
2713
2777
  @allow_redisplay_filters = allow_redisplay_filters
2778
+ @payment_method_remove = payment_method_remove
2714
2779
  @payment_method_save = payment_method_save
2715
2780
  end
2716
2781
  end
@@ -2847,6 +2912,15 @@ module Stripe
2847
2912
  end
2848
2913
 
2849
2914
  class SubscriptionData < Stripe::RequestParams
2915
+ class BillingMode < Stripe::RequestParams
2916
+ # Attribute for param field type
2917
+ attr_accessor :type
2918
+
2919
+ def initialize(type: nil)
2920
+ @type = type
2921
+ end
2922
+ end
2923
+
2850
2924
  class InvoiceSettings < Stripe::RequestParams
2851
2925
  class Issuer < Stripe::RequestParams
2852
2926
  # The connected account being referenced when `type` is `account`.
@@ -2899,6 +2973,8 @@ module Stripe
2899
2973
  attr_accessor :application_fee_percent
2900
2974
  # A future timestamp to anchor the subscription's billing cycle for new subscriptions.
2901
2975
  attr_accessor :billing_cycle_anchor
2976
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2977
+ attr_accessor :billing_mode
2902
2978
  # The tax rates that will apply to any subscription item that does not have
2903
2979
  # `tax_rates` set. Invoices created will have their `default_tax_rates` populated
2904
2980
  # from the subscription.
@@ -2917,12 +2993,9 @@ module Stripe
2917
2993
  attr_accessor :proration_behavior
2918
2994
  # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
2919
2995
  attr_accessor :transfer_data
2920
- # Unix timestamp representing the end of the trial period the customer
2921
- # will get before being charged for the first time. Has to be at least
2922
- # 48 hours in the future.
2996
+ # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. Has to be at least 48 hours in the future.
2923
2997
  attr_accessor :trial_end
2924
- # Integer representing the number of trial period days before the
2925
- # customer is charged for the first time. Has to be at least 1.
2998
+ # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1.
2926
2999
  attr_accessor :trial_period_days
2927
3000
  # Settings related to subscription trials.
2928
3001
  attr_accessor :trial_settings
@@ -2930,6 +3003,7 @@ module Stripe
2930
3003
  def initialize(
2931
3004
  application_fee_percent: nil,
2932
3005
  billing_cycle_anchor: nil,
3006
+ billing_mode: nil,
2933
3007
  default_tax_rates: nil,
2934
3008
  description: nil,
2935
3009
  invoice_settings: nil,
@@ -2943,6 +3017,7 @@ module Stripe
2943
3017
  )
2944
3018
  @application_fee_percent = application_fee_percent
2945
3019
  @billing_cycle_anchor = billing_cycle_anchor
3020
+ @billing_mode = billing_mode
2946
3021
  @default_tax_rates = default_tax_rates
2947
3022
  @description = description
2948
3023
  @invoice_settings = invoice_settings
@@ -2967,6 +3042,23 @@ module Stripe
2967
3042
  @required = required
2968
3043
  end
2969
3044
  end
3045
+
3046
+ class WalletOptions < Stripe::RequestParams
3047
+ class Link < Stripe::RequestParams
3048
+ # Specifies whether Checkout should display Link as a payment option. By default, Checkout will display all the supported wallets that the Checkout Session was created with. This is the `auto` behavior, and it is the default choice.
3049
+ attr_accessor :display
3050
+
3051
+ def initialize(display: nil)
3052
+ @display = display
3053
+ end
3054
+ end
3055
+ # contains details about the Link wallet options.
3056
+ attr_accessor :link
3057
+
3058
+ def initialize(link: nil)
3059
+ @link = link
3060
+ end
3061
+ end
2970
3062
  # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
2971
3063
  attr_accessor :adaptive_pricing
2972
3064
  # Configure actions after a Checkout Session has expired.
@@ -3029,7 +3121,7 @@ module Stripe
3029
3121
  attr_accessor :expires_at
3030
3122
  # Generate a post-purchase Invoice for one-time payments.
3031
3123
  attr_accessor :invoice_creation
3032
- # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
3124
+ # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). The parameter is required for `payment` and `subscription` mode.
3033
3125
  #
3034
3126
  # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
3035
3127
  #
@@ -3076,9 +3168,9 @@ module Stripe
3076
3168
  # prioritize the most relevant payment methods based on the customer's location and
3077
3169
  # other characteristics.
3078
3170
  attr_accessor :payment_method_types
3079
- # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
3171
+ # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. Can only be set when creating `embedded` or `custom` sessions.
3080
3172
  #
3081
- # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
3173
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
3082
3174
  attr_accessor :permissions
3083
3175
  # Controls phone number collection settings for the session.
3084
3176
  #
@@ -3116,6 +3208,8 @@ module Stripe
3116
3208
  attr_accessor :tax_id_collection
3117
3209
  # The UI mode of the Session. Defaults to `hosted`.
3118
3210
  attr_accessor :ui_mode
3211
+ # Wallet-specific configuration.
3212
+ attr_accessor :wallet_options
3119
3213
 
3120
3214
  def initialize(
3121
3215
  adaptive_pricing: nil,
@@ -3160,7 +3254,8 @@ module Stripe
3160
3254
  subscription_data: nil,
3161
3255
  success_url: nil,
3162
3256
  tax_id_collection: nil,
3163
- ui_mode: nil
3257
+ ui_mode: nil,
3258
+ wallet_options: nil
3164
3259
  )
3165
3260
  @adaptive_pricing = adaptive_pricing
3166
3261
  @after_expiration = after_expiration
@@ -3205,6 +3300,7 @@ module Stripe
3205
3300
  @success_url = success_url
3206
3301
  @tax_id_collection = tax_id_collection
3207
3302
  @ui_mode = ui_mode
3303
+ @wallet_options = wallet_options
3208
3304
  end
3209
3305
  end
3210
3306
 
@@ -3364,7 +3460,7 @@ module Stripe
3364
3460
  @shipping_rate_data = shipping_rate_data
3365
3461
  end
3366
3462
  end
3367
- # Information about the customer collected within the Checkout Session.
3463
+ # Information about the customer collected within the Checkout Session. Can only be set when updating `embedded` or `custom` sessions.
3368
3464
  attr_accessor :collected_information
3369
3465
  # Specifies which fields in the response should be expanded.
3370
3466
  attr_accessor :expand
@@ -3432,7 +3528,8 @@ module Stripe
3432
3528
  # customer ID, a cart ID, or similar, and can be used to reconcile the
3433
3529
  # Session with your internal systems.
3434
3530
  attr_reader :client_reference_id
3435
- # The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded`. Client secret to be used when initializing Stripe.js embedded checkout.
3531
+ # The client secret of your Checkout Session. Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. For `ui_mode: embedded`, the client secret is to be used when initializing Stripe.js embedded checkout.
3532
+ # For `ui_mode: custom`, use the client secret with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end.
3436
3533
  attr_reader :client_secret
3437
3534
  # Information about the customer collected within the Checkout Session.
3438
3535
  attr_reader :collected_information
@@ -3508,7 +3605,7 @@ module Stripe
3508
3605
  attr_reader :payment_status
3509
3606
  # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object.
3510
3607
  #
3511
- # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`.
3608
+ # For specific permissions, please refer to their dedicated subsections, such as `permissions.update_shipping_details`.
3512
3609
  attr_reader :permissions
3513
3610
  # Attribute for field phone_number_collection
3514
3611
  attr_reader :phone_number_collection
@@ -3518,7 +3615,7 @@ module Stripe
3518
3615
  attr_reader :recovered_from
3519
3616
  # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
3520
3617
  attr_reader :redirect_on_completion
3521
- # Applies to Checkout Sessions with `ui_mode: embedded`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
3618
+ # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site.
3522
3619
  attr_reader :return_url
3523
3620
  # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
3524
3621
  attr_reader :saved_payment_method_options
@@ -3536,7 +3633,7 @@ module Stripe
3536
3633
  # relevant text on the page, such as the submit button. `submit_type` can only be
3537
3634
  # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used.
3538
3635
  attr_reader :submit_type
3539
- # The ID of the subscription for Checkout Sessions in `subscription` mode.
3636
+ # The ID of the [Subscription](https://stripe.com/docs/api/subscriptions) for Checkout Sessions in `subscription` mode.
3540
3637
  attr_reader :subscription
3541
3638
  # The URL the customer will be directed to after the payment or
3542
3639
  # subscription creation is successful.
@@ -3550,6 +3647,8 @@ module Stripe
3550
3647
  # The URL to the Checkout Session. Applies to Checkout Sessions with `ui_mode: hosted`. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.`
3551
3648
  # This value is only present when the session is active.
3552
3649
  attr_reader :url
3650
+ # Wallet-specific configuration for this Checkout Session.
3651
+ attr_reader :wallet_options
3553
3652
 
3554
3653
  # Creates a Checkout Session object.
3555
3654
  def self.create(params = {}, opts = {})
@@ -3616,6 +3715,8 @@ module Stripe
3616
3715
  end
3617
3716
 
3618
3717
  # Updates a Checkout Session object.
3718
+ #
3719
+ # Related guide: [Dynamically update Checkout](https://docs.stripe.com/payments/checkout/dynamic-updates)
3619
3720
  def self.update(session, params = {}, opts = {})
3620
3721
  request_stripe_object(
3621
3722
  method: :post,