stripe 15.3.0.pre.beta.2 → 15.4.0.pre.beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +42 -16
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +13 -49
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_requestor.rb +2 -2
  8. data/lib/stripe/api_version.rb +1 -1
  9. data/lib/stripe/errors.rb +3 -3
  10. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
  11. data/lib/stripe/resources/account.rb +89 -5
  12. data/lib/stripe/resources/account_session.rb +93 -93
  13. data/lib/stripe/resources/billing_portal/session.rb +2 -2
  14. data/lib/stripe/resources/charge.rb +28 -15
  15. data/lib/stripe/resources/checkout/session.rb +53 -7
  16. data/lib/stripe/resources/confirmation_token.rb +19 -11
  17. data/lib/stripe/resources/credit_note.rb +9 -9
  18. data/lib/stripe/resources/customer_session.rb +2 -2
  19. data/lib/stripe/resources/dispute.rb +2 -0
  20. data/lib/stripe/resources/event.rb +1 -1
  21. data/lib/stripe/resources/identity/verification_session.rb +34 -0
  22. data/lib/stripe/resources/invoice.rb +21 -3
  23. data/lib/stripe/resources/invoice_item.rb +1 -4
  24. data/lib/stripe/resources/mandate.rb +3 -0
  25. data/lib/stripe/resources/order.rb +154 -2
  26. data/lib/stripe/resources/payment_attempt_record.rb +30 -17
  27. data/lib/stripe/resources/payment_intent.rb +331 -12
  28. data/lib/stripe/resources/payment_method.rb +17 -9
  29. data/lib/stripe/resources/payment_record.rb +30 -17
  30. data/lib/stripe/resources/quote.rb +15 -1
  31. data/lib/stripe/resources/quote_preview_subscription_schedule.rb +8 -1
  32. data/lib/stripe/resources/setup_attempt.rb +1 -1
  33. data/lib/stripe/resources/setup_intent.rb +285 -3
  34. data/lib/stripe/resources/subscription.rb +27 -10
  35. data/lib/stripe/resources/subscription_schedule.rb +17 -1
  36. data/lib/stripe/resources/tax/registration.rb +20 -0
  37. data/lib/stripe/resources/terminal/configuration.rb +1 -0
  38. data/lib/stripe/resources/terminal/reader.rb +10 -10
  39. data/lib/stripe/resources/token.rb +1 -1
  40. data/lib/stripe/resources/treasury/financial_account.rb +5 -1
  41. data/lib/stripe/resources/v2/core/account.rb +9 -0
  42. data/lib/stripe/resources/v2/money_management/financial_account.rb +3 -3
  43. data/lib/stripe/resources/v2/money_management/outbound_payment.rb +1 -1
  44. data/lib/stripe/resources/v2/money_management/outbound_transfer.rb +1 -1
  45. data/lib/stripe/resources/v2/money_management/received_credit.rb +8 -2
  46. data/lib/stripe/services/account_service.rb +83 -5
  47. data/lib/stripe/services/account_session_service.rb +62 -62
  48. data/lib/stripe/services/billing_portal/session_service.rb +1 -1
  49. data/lib/stripe/services/checkout/session_service.rb +53 -7
  50. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  51. data/lib/stripe/services/credit_note_service.rb +6 -6
  52. data/lib/stripe/services/customer_session_service.rb +1 -1
  53. data/lib/stripe/services/identity/verification_session_service.rb +16 -0
  54. data/lib/stripe/services/invoice_service.rb +21 -3
  55. data/lib/stripe/services/order_service.rb +154 -2
  56. data/lib/stripe/services/payment_intent_service.rb +315 -9
  57. data/lib/stripe/services/payment_method_service.rb +5 -0
  58. data/lib/stripe/services/quote_service.rb +9 -0
  59. data/lib/stripe/services/setup_intent_service.rb +275 -2
  60. data/lib/stripe/services/subscription_schedule_service.rb +9 -0
  61. data/lib/stripe/services/subscription_service.rb +21 -4
  62. data/lib/stripe/services/tax/registration_service.rb +13 -0
  63. data/lib/stripe/services/terminal/reader_service.rb +4 -4
  64. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -1
  65. data/lib/stripe/services/token_service.rb +1 -1
  66. data/lib/stripe/services/treasury/financial_account_service.rb +5 -1
  67. data/lib/stripe/services/v2/billing_service.rb +2 -2
  68. data/lib/stripe/services/v2/core/account_service.rb +47 -15
  69. data/lib/stripe/services/v2/core/accounts/person_service.rb +9 -10
  70. data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
  71. data/lib/stripe/services/v2/core/vault/gb_bank_account_service.rb +4 -5
  72. data/lib/stripe/services/v2/core/vault/us_bank_account_service.rb +2 -2
  73. data/lib/stripe/services/v2/core_service.rb +2 -2
  74. data/lib/stripe/services/v2/money_management/financial_address_service.rb +13 -12
  75. data/lib/stripe/services/v2/money_management/inbound_transfer_service.rb +36 -36
  76. data/lib/stripe/services/v2/money_management/outbound_payment_service.rb +44 -45
  77. data/lib/stripe/services/v2/money_management/outbound_setup_intent_service.rb +10 -10
  78. data/lib/stripe/services/v2/money_management/outbound_transfer_service.rb +41 -41
  79. data/lib/stripe/services/v2/money_management/payout_method_service.rb +1 -2
  80. data/lib/stripe/services/v2/money_management_service.rb +4 -4
  81. data/lib/stripe/services/v2/payments/off_session_payment_service.rb +9 -10
  82. data/lib/stripe/services/v2_services.rb +3 -3
  83. data/lib/stripe/version.rb +1 -1
  84. data/lib/stripe/webhook.rb +1 -1
  85. data/rbi/stripe.rbi +14445 -12226
  86. metadata +3 -2
@@ -958,6 +958,7 @@ module Stripe
958
958
  end
959
959
 
960
960
  class Cashapp < Stripe::RequestParams; end
961
+ class Crypto < Stripe::RequestParams; end
961
962
  class CustomerBalance < Stripe::RequestParams; end
962
963
 
963
964
  class Eps < Stripe::RequestParams
@@ -1241,6 +1242,8 @@ module Stripe
1241
1242
  attr_accessor :boleto
1242
1243
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
1243
1244
  attr_accessor :cashapp
1245
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
1246
+ attr_accessor :crypto
1244
1247
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
1245
1248
  attr_accessor :customer_balance
1246
1249
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -1348,6 +1351,7 @@ module Stripe
1348
1351
  blik: nil,
1349
1352
  boleto: nil,
1350
1353
  cashapp: nil,
1354
+ crypto: nil,
1351
1355
  customer_balance: nil,
1352
1356
  eps: nil,
1353
1357
  fpx: nil,
@@ -1409,6 +1413,7 @@ module Stripe
1409
1413
  @blik = blik
1410
1414
  @boleto = boleto
1411
1415
  @cashapp = cashapp
1416
+ @crypto = crypto
1412
1417
  @customer_balance = customer_balance
1413
1418
  @eps = eps
1414
1419
  @fpx = fpx
@@ -1752,7 +1757,7 @@ module Stripe
1752
1757
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
1753
1758
  # One of `month`.
1754
1759
  attr_accessor :interval
1755
- # Type of installment plan, one of `fixed_count`.
1760
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
1756
1761
  attr_accessor :type
1757
1762
 
1758
1763
  def initialize(count: nil, interval: nil, type: nil)
@@ -2084,6 +2089,23 @@ module Stripe
2084
2089
  end
2085
2090
  end
2086
2091
 
2092
+ class Crypto < Stripe::RequestParams
2093
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
2094
+ #
2095
+ # 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.
2096
+ #
2097
+ # 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.
2098
+ #
2099
+ # 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).
2100
+ #
2101
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2102
+ attr_accessor :setup_future_usage
2103
+
2104
+ def initialize(setup_future_usage: nil)
2105
+ @setup_future_usage = setup_future_usage
2106
+ end
2107
+ end
2108
+
2087
2109
  class CustomerBalance < Stripe::RequestParams
2088
2110
  class BankTransfer < Stripe::RequestParams
2089
2111
  class EuBankTransfer < Stripe::RequestParams
@@ -2281,12 +2303,78 @@ module Stripe
2281
2303
  end
2282
2304
 
2283
2305
  class Klarna < Stripe::RequestParams
2306
+ class OnDemand < Stripe::RequestParams
2307
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
2308
+ attr_accessor :average_amount
2309
+ # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
2310
+ attr_accessor :maximum_amount
2311
+ # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
2312
+ attr_accessor :minimum_amount
2313
+ # Interval at which the customer is making purchases
2314
+ attr_accessor :purchase_interval
2315
+ # The number of `purchase_interval` between charges
2316
+ attr_accessor :purchase_interval_count
2317
+
2318
+ def initialize(
2319
+ average_amount: nil,
2320
+ maximum_amount: nil,
2321
+ minimum_amount: nil,
2322
+ purchase_interval: nil,
2323
+ purchase_interval_count: nil
2324
+ )
2325
+ @average_amount = average_amount
2326
+ @maximum_amount = maximum_amount
2327
+ @minimum_amount = minimum_amount
2328
+ @purchase_interval = purchase_interval
2329
+ @purchase_interval_count = purchase_interval_count
2330
+ end
2331
+ end
2332
+
2333
+ class Subscription < Stripe::RequestParams
2334
+ class NextBilling < Stripe::RequestParams
2335
+ # The amount of the next charge for the subscription.
2336
+ attr_accessor :amount
2337
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
2338
+ attr_accessor :date
2339
+
2340
+ def initialize(amount: nil, date: nil)
2341
+ @amount = amount
2342
+ @date = date
2343
+ end
2344
+ end
2345
+ # Unit of time between subscription charges.
2346
+ attr_accessor :interval
2347
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
2348
+ attr_accessor :interval_count
2349
+ # Name for subscription.
2350
+ attr_accessor :name
2351
+ # Describes the upcoming charge for this subscription.
2352
+ attr_accessor :next_billing
2353
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
2354
+ attr_accessor :reference
2355
+
2356
+ def initialize(
2357
+ interval: nil,
2358
+ interval_count: nil,
2359
+ name: nil,
2360
+ next_billing: nil,
2361
+ reference: nil
2362
+ )
2363
+ @interval = interval
2364
+ @interval_count = interval_count
2365
+ @name = name
2366
+ @next_billing = next_billing
2367
+ @reference = reference
2368
+ end
2369
+ end
2284
2370
  # Controls when the funds are captured from the customer's account.
2285
2371
  #
2286
2372
  # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
2287
2373
  #
2288
2374
  # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
2289
2375
  attr_accessor :capture_method
2376
+ # On-demand details if setting up or charging an on-demand payment.
2377
+ attr_accessor :on_demand
2290
2378
  # Preferred language of the Klarna authorization page that the customer is redirected to
2291
2379
  attr_accessor :preferred_locale
2292
2380
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
@@ -2299,11 +2387,21 @@ module Stripe
2299
2387
  #
2300
2388
  # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
2301
2389
  attr_accessor :setup_future_usage
2390
+ # Subscription details if setting up or charging a subscription.
2391
+ attr_accessor :subscriptions
2302
2392
 
2303
- def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
2393
+ def initialize(
2394
+ capture_method: nil,
2395
+ on_demand: nil,
2396
+ preferred_locale: nil,
2397
+ setup_future_usage: nil,
2398
+ subscriptions: nil
2399
+ )
2304
2400
  @capture_method = capture_method
2401
+ @on_demand = on_demand
2305
2402
  @preferred_locale = preferred_locale
2306
2403
  @setup_future_usage = setup_future_usage
2404
+ @subscriptions = subscriptions
2307
2405
  end
2308
2406
  end
2309
2407
 
@@ -3114,6 +3212,8 @@ module Stripe
3114
3212
  attr_accessor :card_present
3115
3213
  # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
3116
3214
  attr_accessor :cashapp
3215
+ # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options.
3216
+ attr_accessor :crypto
3117
3217
  # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
3118
3218
  attr_accessor :customer_balance
3119
3219
  # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
@@ -3215,6 +3315,7 @@ module Stripe
3215
3315
  card: nil,
3216
3316
  card_present: nil,
3217
3317
  cashapp: nil,
3318
+ crypto: nil,
3218
3319
  customer_balance: nil,
3219
3320
  eps: nil,
3220
3321
  fpx: nil,
@@ -3273,6 +3374,7 @@ module Stripe
3273
3374
  @card = card
3274
3375
  @card_present = card_present
3275
3376
  @cashapp = cashapp
3377
+ @crypto = crypto
3276
3378
  @customer_balance = customer_balance
3277
3379
  @eps = eps
3278
3380
  @fpx = fpx
@@ -3464,7 +3566,7 @@ module Stripe
3464
3566
  attr_accessor :payment_method_data
3465
3567
  # Payment method-specific configuration for this PaymentIntent.
3466
3568
  attr_accessor :payment_method_options
3467
- # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
3569
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
3468
3570
  attr_accessor :payment_method_types
3469
3571
  # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
3470
3572
  attr_accessor :radar_options
@@ -4463,6 +4565,7 @@ module Stripe
4463
4565
  end
4464
4566
 
4465
4567
  class Cashapp < Stripe::RequestParams; end
4568
+ class Crypto < Stripe::RequestParams; end
4466
4569
  class CustomerBalance < Stripe::RequestParams; end
4467
4570
 
4468
4571
  class Eps < Stripe::RequestParams
@@ -4746,6 +4849,8 @@ module Stripe
4746
4849
  attr_accessor :boleto
4747
4850
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
4748
4851
  attr_accessor :cashapp
4852
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
4853
+ attr_accessor :crypto
4749
4854
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
4750
4855
  attr_accessor :customer_balance
4751
4856
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -4853,6 +4958,7 @@ module Stripe
4853
4958
  blik: nil,
4854
4959
  boleto: nil,
4855
4960
  cashapp: nil,
4961
+ crypto: nil,
4856
4962
  customer_balance: nil,
4857
4963
  eps: nil,
4858
4964
  fpx: nil,
@@ -4914,6 +5020,7 @@ module Stripe
4914
5020
  @blik = blik
4915
5021
  @boleto = boleto
4916
5022
  @cashapp = cashapp
5023
+ @crypto = crypto
4917
5024
  @customer_balance = customer_balance
4918
5025
  @eps = eps
4919
5026
  @fpx = fpx
@@ -5257,7 +5364,7 @@ module Stripe
5257
5364
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
5258
5365
  # One of `month`.
5259
5366
  attr_accessor :interval
5260
- # Type of installment plan, one of `fixed_count`.
5367
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
5261
5368
  attr_accessor :type
5262
5369
 
5263
5370
  def initialize(count: nil, interval: nil, type: nil)
@@ -5589,6 +5696,23 @@ module Stripe
5589
5696
  end
5590
5697
  end
5591
5698
 
5699
+ class Crypto < Stripe::RequestParams
5700
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
5701
+ #
5702
+ # 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.
5703
+ #
5704
+ # 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.
5705
+ #
5706
+ # 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).
5707
+ #
5708
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
5709
+ attr_accessor :setup_future_usage
5710
+
5711
+ def initialize(setup_future_usage: nil)
5712
+ @setup_future_usage = setup_future_usage
5713
+ end
5714
+ end
5715
+
5592
5716
  class CustomerBalance < Stripe::RequestParams
5593
5717
  class BankTransfer < Stripe::RequestParams
5594
5718
  class EuBankTransfer < Stripe::RequestParams
@@ -5786,12 +5910,78 @@ module Stripe
5786
5910
  end
5787
5911
 
5788
5912
  class Klarna < Stripe::RequestParams
5913
+ class OnDemand < Stripe::RequestParams
5914
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
5915
+ attr_accessor :average_amount
5916
+ # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
5917
+ attr_accessor :maximum_amount
5918
+ # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
5919
+ attr_accessor :minimum_amount
5920
+ # Interval at which the customer is making purchases
5921
+ attr_accessor :purchase_interval
5922
+ # The number of `purchase_interval` between charges
5923
+ attr_accessor :purchase_interval_count
5924
+
5925
+ def initialize(
5926
+ average_amount: nil,
5927
+ maximum_amount: nil,
5928
+ minimum_amount: nil,
5929
+ purchase_interval: nil,
5930
+ purchase_interval_count: nil
5931
+ )
5932
+ @average_amount = average_amount
5933
+ @maximum_amount = maximum_amount
5934
+ @minimum_amount = minimum_amount
5935
+ @purchase_interval = purchase_interval
5936
+ @purchase_interval_count = purchase_interval_count
5937
+ end
5938
+ end
5939
+
5940
+ class Subscription < Stripe::RequestParams
5941
+ class NextBilling < Stripe::RequestParams
5942
+ # The amount of the next charge for the subscription.
5943
+ attr_accessor :amount
5944
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
5945
+ attr_accessor :date
5946
+
5947
+ def initialize(amount: nil, date: nil)
5948
+ @amount = amount
5949
+ @date = date
5950
+ end
5951
+ end
5952
+ # Unit of time between subscription charges.
5953
+ attr_accessor :interval
5954
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
5955
+ attr_accessor :interval_count
5956
+ # Name for subscription.
5957
+ attr_accessor :name
5958
+ # Describes the upcoming charge for this subscription.
5959
+ attr_accessor :next_billing
5960
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
5961
+ attr_accessor :reference
5962
+
5963
+ def initialize(
5964
+ interval: nil,
5965
+ interval_count: nil,
5966
+ name: nil,
5967
+ next_billing: nil,
5968
+ reference: nil
5969
+ )
5970
+ @interval = interval
5971
+ @interval_count = interval_count
5972
+ @name = name
5973
+ @next_billing = next_billing
5974
+ @reference = reference
5975
+ end
5976
+ end
5789
5977
  # Controls when the funds are captured from the customer's account.
5790
5978
  #
5791
5979
  # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
5792
5980
  #
5793
5981
  # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
5794
5982
  attr_accessor :capture_method
5983
+ # On-demand details if setting up or charging an on-demand payment.
5984
+ attr_accessor :on_demand
5795
5985
  # Preferred language of the Klarna authorization page that the customer is redirected to
5796
5986
  attr_accessor :preferred_locale
5797
5987
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
@@ -5804,11 +5994,21 @@ module Stripe
5804
5994
  #
5805
5995
  # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
5806
5996
  attr_accessor :setup_future_usage
5997
+ # Subscription details if setting up or charging a subscription.
5998
+ attr_accessor :subscriptions
5807
5999
 
5808
- def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
6000
+ def initialize(
6001
+ capture_method: nil,
6002
+ on_demand: nil,
6003
+ preferred_locale: nil,
6004
+ setup_future_usage: nil,
6005
+ subscriptions: nil
6006
+ )
5809
6007
  @capture_method = capture_method
6008
+ @on_demand = on_demand
5810
6009
  @preferred_locale = preferred_locale
5811
6010
  @setup_future_usage = setup_future_usage
6011
+ @subscriptions = subscriptions
5812
6012
  end
5813
6013
  end
5814
6014
 
@@ -6619,6 +6819,8 @@ module Stripe
6619
6819
  attr_accessor :card_present
6620
6820
  # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
6621
6821
  attr_accessor :cashapp
6822
+ # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options.
6823
+ attr_accessor :crypto
6622
6824
  # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
6623
6825
  attr_accessor :customer_balance
6624
6826
  # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
@@ -6720,6 +6922,7 @@ module Stripe
6720
6922
  card: nil,
6721
6923
  card_present: nil,
6722
6924
  cashapp: nil,
6925
+ crypto: nil,
6723
6926
  customer_balance: nil,
6724
6927
  eps: nil,
6725
6928
  fpx: nil,
@@ -6778,6 +6981,7 @@ module Stripe
6778
6981
  @card = card
6779
6982
  @card_present = card_present
6780
6983
  @cashapp = cashapp
6984
+ @crypto = crypto
6781
6985
  @customer_balance = customer_balance
6782
6986
  @eps = eps
6783
6987
  @fpx = fpx
@@ -6926,7 +7130,7 @@ module Stripe
6926
7130
  attr_accessor :payment_method_data
6927
7131
  # Payment-method-specific configuration for this PaymentIntent.
6928
7132
  attr_accessor :payment_method_options
6929
- # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
7133
+ # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
6930
7134
  attr_accessor :payment_method_types
6931
7135
  # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails).
6932
7136
  attr_accessor :receipt_email
@@ -8727,6 +8931,7 @@ module Stripe
8727
8931
  end
8728
8932
 
8729
8933
  class Cashapp < Stripe::RequestParams; end
8934
+ class Crypto < Stripe::RequestParams; end
8730
8935
  class CustomerBalance < Stripe::RequestParams; end
8731
8936
 
8732
8937
  class Eps < Stripe::RequestParams
@@ -9010,6 +9215,8 @@ module Stripe
9010
9215
  attr_accessor :boleto
9011
9216
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
9012
9217
  attr_accessor :cashapp
9218
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
9219
+ attr_accessor :crypto
9013
9220
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
9014
9221
  attr_accessor :customer_balance
9015
9222
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -9117,6 +9324,7 @@ module Stripe
9117
9324
  blik: nil,
9118
9325
  boleto: nil,
9119
9326
  cashapp: nil,
9327
+ crypto: nil,
9120
9328
  customer_balance: nil,
9121
9329
  eps: nil,
9122
9330
  fpx: nil,
@@ -9178,6 +9386,7 @@ module Stripe
9178
9386
  @blik = blik
9179
9387
  @boleto = boleto
9180
9388
  @cashapp = cashapp
9389
+ @crypto = crypto
9181
9390
  @customer_balance = customer_balance
9182
9391
  @eps = eps
9183
9392
  @fpx = fpx
@@ -9521,7 +9730,7 @@ module Stripe
9521
9730
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
9522
9731
  # One of `month`.
9523
9732
  attr_accessor :interval
9524
- # Type of installment plan, one of `fixed_count`.
9733
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
9525
9734
  attr_accessor :type
9526
9735
 
9527
9736
  def initialize(count: nil, interval: nil, type: nil)
@@ -9853,6 +10062,23 @@ module Stripe
9853
10062
  end
9854
10063
  end
9855
10064
 
10065
+ class Crypto < Stripe::RequestParams
10066
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
10067
+ #
10068
+ # 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.
10069
+ #
10070
+ # 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.
10071
+ #
10072
+ # 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).
10073
+ #
10074
+ # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
10075
+ attr_accessor :setup_future_usage
10076
+
10077
+ def initialize(setup_future_usage: nil)
10078
+ @setup_future_usage = setup_future_usage
10079
+ end
10080
+ end
10081
+
9856
10082
  class CustomerBalance < Stripe::RequestParams
9857
10083
  class BankTransfer < Stripe::RequestParams
9858
10084
  class EuBankTransfer < Stripe::RequestParams
@@ -10050,12 +10276,78 @@ module Stripe
10050
10276
  end
10051
10277
 
10052
10278
  class Klarna < Stripe::RequestParams
10279
+ class OnDemand < Stripe::RequestParams
10280
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
10281
+ attr_accessor :average_amount
10282
+ # The maximum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
10283
+ attr_accessor :maximum_amount
10284
+ # The lowest or minimum value you may charge a customer per purchase. You can use a value across your customer base, or segment based on customer type, country, etc.
10285
+ attr_accessor :minimum_amount
10286
+ # Interval at which the customer is making purchases
10287
+ attr_accessor :purchase_interval
10288
+ # The number of `purchase_interval` between charges
10289
+ attr_accessor :purchase_interval_count
10290
+
10291
+ def initialize(
10292
+ average_amount: nil,
10293
+ maximum_amount: nil,
10294
+ minimum_amount: nil,
10295
+ purchase_interval: nil,
10296
+ purchase_interval_count: nil
10297
+ )
10298
+ @average_amount = average_amount
10299
+ @maximum_amount = maximum_amount
10300
+ @minimum_amount = minimum_amount
10301
+ @purchase_interval = purchase_interval
10302
+ @purchase_interval_count = purchase_interval_count
10303
+ end
10304
+ end
10305
+
10306
+ class Subscription < Stripe::RequestParams
10307
+ class NextBilling < Stripe::RequestParams
10308
+ # The amount of the next charge for the subscription.
10309
+ attr_accessor :amount
10310
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
10311
+ attr_accessor :date
10312
+
10313
+ def initialize(amount: nil, date: nil)
10314
+ @amount = amount
10315
+ @date = date
10316
+ end
10317
+ end
10318
+ # Unit of time between subscription charges.
10319
+ attr_accessor :interval
10320
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
10321
+ attr_accessor :interval_count
10322
+ # Name for subscription.
10323
+ attr_accessor :name
10324
+ # Describes the upcoming charge for this subscription.
10325
+ attr_accessor :next_billing
10326
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
10327
+ attr_accessor :reference
10328
+
10329
+ def initialize(
10330
+ interval: nil,
10331
+ interval_count: nil,
10332
+ name: nil,
10333
+ next_billing: nil,
10334
+ reference: nil
10335
+ )
10336
+ @interval = interval
10337
+ @interval_count = interval_count
10338
+ @name = name
10339
+ @next_billing = next_billing
10340
+ @reference = reference
10341
+ end
10342
+ end
10053
10343
  # Controls when the funds are captured from the customer's account.
10054
10344
  #
10055
10345
  # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type.
10056
10346
  #
10057
10347
  # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type.
10058
10348
  attr_accessor :capture_method
10349
+ # On-demand details if setting up or charging an on-demand payment.
10350
+ attr_accessor :on_demand
10059
10351
  # Preferred language of the Klarna authorization page that the customer is redirected to
10060
10352
  attr_accessor :preferred_locale
10061
10353
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
@@ -10068,11 +10360,21 @@ module Stripe
10068
10360
  #
10069
10361
  # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`.
10070
10362
  attr_accessor :setup_future_usage
10363
+ # Subscription details if setting up or charging a subscription.
10364
+ attr_accessor :subscriptions
10071
10365
 
10072
- def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
10366
+ def initialize(
10367
+ capture_method: nil,
10368
+ on_demand: nil,
10369
+ preferred_locale: nil,
10370
+ setup_future_usage: nil,
10371
+ subscriptions: nil
10372
+ )
10073
10373
  @capture_method = capture_method
10374
+ @on_demand = on_demand
10074
10375
  @preferred_locale = preferred_locale
10075
10376
  @setup_future_usage = setup_future_usage
10377
+ @subscriptions = subscriptions
10076
10378
  end
10077
10379
  end
10078
10380
 
@@ -10883,6 +11185,8 @@ module Stripe
10883
11185
  attr_accessor :card_present
10884
11186
  # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
10885
11187
  attr_accessor :cashapp
11188
+ # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options.
11189
+ attr_accessor :crypto
10886
11190
  # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
10887
11191
  attr_accessor :customer_balance
10888
11192
  # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
@@ -10984,6 +11288,7 @@ module Stripe
10984
11288
  card: nil,
10985
11289
  card_present: nil,
10986
11290
  cashapp: nil,
11291
+ crypto: nil,
10987
11292
  customer_balance: nil,
10988
11293
  eps: nil,
10989
11294
  fpx: nil,
@@ -11042,6 +11347,7 @@ module Stripe
11042
11347
  @card = card
11043
11348
  @card_present = card_present
11044
11349
  @cashapp = cashapp
11350
+ @crypto = crypto
11045
11351
  @customer_balance = customer_balance
11046
11352
  @eps = eps
11047
11353
  @fpx = fpx
@@ -11179,7 +11485,7 @@ module Stripe
11179
11485
  attr_accessor :payment_method_data
11180
11486
  # Payment method-specific configuration for this PaymentIntent.
11181
11487
  attr_accessor :payment_method_options
11182
- # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
11488
+ # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). A list of valid payment method types can be found [here](https://docs.stripe.com/api/payment_methods/object#payment_method_object-type).
11183
11489
  attr_accessor :payment_method_types
11184
11490
  # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
11185
11491
  attr_accessor :radar_options
@@ -185,6 +185,7 @@ module Stripe
185
185
  end
186
186
 
187
187
  class Cashapp < Stripe::RequestParams; end
188
+ class Crypto < Stripe::RequestParams; end
188
189
  class CustomerBalance < Stripe::RequestParams; end
189
190
 
190
191
  class Eps < Stripe::RequestParams
@@ -470,6 +471,8 @@ module Stripe
470
471
  attr_accessor :card
471
472
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
472
473
  attr_accessor :cashapp
474
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
475
+ attr_accessor :crypto
473
476
  # The `Customer` to whom the original PaymentMethod is attached.
474
477
  attr_accessor :customer
475
478
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
@@ -584,6 +587,7 @@ module Stripe
584
587
  boleto: nil,
585
588
  card: nil,
586
589
  cashapp: nil,
590
+ crypto: nil,
587
591
  customer: nil,
588
592
  customer_balance: nil,
589
593
  eps: nil,
@@ -649,6 +653,7 @@ module Stripe
649
653
  @boleto = boleto
650
654
  @card = card
651
655
  @cashapp = cashapp
656
+ @crypto = crypto
652
657
  @customer = customer
653
658
  @customer_balance = customer_balance
654
659
  @eps = eps
@@ -820,6 +820,15 @@ module Stripe
820
820
  end
821
821
  end
822
822
 
823
+ class BillingMode < Stripe::RequestParams
824
+ # Attribute for param field type
825
+ attr_accessor :type
826
+
827
+ def initialize(type: nil)
828
+ @type = type
829
+ end
830
+ end
831
+
823
832
  class Prebilling < Stripe::RequestParams
824
833
  # This is used to determine the number of billing cycles to prebill.
825
834
  attr_accessor :iterations