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
@@ -1094,7 +1094,7 @@ module Stripe
1094
1094
  # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
1095
1095
  # One of `month`.
1096
1096
  attr_reader :interval
1097
- # Type of installment plan, one of `fixed_count`.
1097
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
1098
1098
  attr_reader :type
1099
1099
  end
1100
1100
 
@@ -1104,7 +1104,7 @@ module Stripe
1104
1104
  # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card.
1105
1105
  # One of `month`.
1106
1106
  attr_reader :interval
1107
- # Type of installment plan, one of `fixed_count`.
1107
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
1108
1108
  attr_reader :type
1109
1109
  end
1110
1110
  # Installment plans that may be selected for this PaymentIntent.
@@ -1158,7 +1158,7 @@ module Stripe
1158
1158
  end
1159
1159
  # Controls when the funds will be captured from the customer's account.
1160
1160
  attr_reader :capture_method
1161
- # Installment details for this payment (Mexico only).
1161
+ # Installment details for this payment.
1162
1162
  #
1163
1163
  # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments).
1164
1164
  attr_reader :installments
@@ -1224,6 +1224,17 @@ module Stripe
1224
1224
  attr_reader :setup_future_usage
1225
1225
  end
1226
1226
 
1227
+ class Crypto < Stripe::StripeObject
1228
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
1229
+ #
1230
+ # 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.
1231
+ #
1232
+ # 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.
1233
+ #
1234
+ # 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).
1235
+ attr_reader :setup_future_usage
1236
+ end
1237
+
1227
1238
  class CustomerBalance < Stripe::StripeObject
1228
1239
  class BankTransfer < Stripe::StripeObject
1229
1240
  class EuBankTransfer < Stripe::StripeObject
@@ -1832,6 +1843,8 @@ module Stripe
1832
1843
  attr_reader :card_present
1833
1844
  # Attribute for field cashapp
1834
1845
  attr_reader :cashapp
1846
+ # Attribute for field crypto
1847
+ attr_reader :crypto
1835
1848
  # Attribute for field customer_balance
1836
1849
  attr_reader :customer_balance
1837
1850
  # Attribute for field eps
@@ -2926,6 +2939,7 @@ module Stripe
2926
2939
  end
2927
2940
 
2928
2941
  class Cashapp < Stripe::RequestParams; end
2942
+ class Crypto < Stripe::RequestParams; end
2929
2943
  class CustomerBalance < Stripe::RequestParams; end
2930
2944
 
2931
2945
  class Eps < Stripe::RequestParams
@@ -3209,6 +3223,8 @@ module Stripe
3209
3223
  attr_accessor :boleto
3210
3224
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
3211
3225
  attr_accessor :cashapp
3226
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
3227
+ attr_accessor :crypto
3212
3228
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
3213
3229
  attr_accessor :customer_balance
3214
3230
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -3316,6 +3332,7 @@ module Stripe
3316
3332
  blik: nil,
3317
3333
  boleto: nil,
3318
3334
  cashapp: nil,
3335
+ crypto: nil,
3319
3336
  customer_balance: nil,
3320
3337
  eps: nil,
3321
3338
  fpx: nil,
@@ -3377,6 +3394,7 @@ module Stripe
3377
3394
  @blik = blik
3378
3395
  @boleto = boleto
3379
3396
  @cashapp = cashapp
3397
+ @crypto = crypto
3380
3398
  @customer_balance = customer_balance
3381
3399
  @eps = eps
3382
3400
  @fpx = fpx
@@ -3720,7 +3738,7 @@ module Stripe
3720
3738
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
3721
3739
  # One of `month`.
3722
3740
  attr_accessor :interval
3723
- # Type of installment plan, one of `fixed_count`.
3741
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
3724
3742
  attr_accessor :type
3725
3743
 
3726
3744
  def initialize(count: nil, interval: nil, type: nil)
@@ -4052,6 +4070,23 @@ module Stripe
4052
4070
  end
4053
4071
  end
4054
4072
 
4073
+ class Crypto < Stripe::RequestParams
4074
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
4075
+ #
4076
+ # 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.
4077
+ #
4078
+ # 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.
4079
+ #
4080
+ # 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).
4081
+ #
4082
+ # 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`.
4083
+ attr_accessor :setup_future_usage
4084
+
4085
+ def initialize(setup_future_usage: nil)
4086
+ @setup_future_usage = setup_future_usage
4087
+ end
4088
+ end
4089
+
4055
4090
  class CustomerBalance < Stripe::RequestParams
4056
4091
  class BankTransfer < Stripe::RequestParams
4057
4092
  class EuBankTransfer < Stripe::RequestParams
@@ -4249,12 +4284,78 @@ module Stripe
4249
4284
  end
4250
4285
 
4251
4286
  class Klarna < Stripe::RequestParams
4287
+ class OnDemand < Stripe::RequestParams
4288
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
4289
+ attr_accessor :average_amount
4290
+ # 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.
4291
+ attr_accessor :maximum_amount
4292
+ # 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.
4293
+ attr_accessor :minimum_amount
4294
+ # Interval at which the customer is making purchases
4295
+ attr_accessor :purchase_interval
4296
+ # The number of `purchase_interval` between charges
4297
+ attr_accessor :purchase_interval_count
4298
+
4299
+ def initialize(
4300
+ average_amount: nil,
4301
+ maximum_amount: nil,
4302
+ minimum_amount: nil,
4303
+ purchase_interval: nil,
4304
+ purchase_interval_count: nil
4305
+ )
4306
+ @average_amount = average_amount
4307
+ @maximum_amount = maximum_amount
4308
+ @minimum_amount = minimum_amount
4309
+ @purchase_interval = purchase_interval
4310
+ @purchase_interval_count = purchase_interval_count
4311
+ end
4312
+ end
4313
+
4314
+ class Subscription < Stripe::RequestParams
4315
+ class NextBilling < Stripe::RequestParams
4316
+ # The amount of the next charge for the subscription.
4317
+ attr_accessor :amount
4318
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
4319
+ attr_accessor :date
4320
+
4321
+ def initialize(amount: nil, date: nil)
4322
+ @amount = amount
4323
+ @date = date
4324
+ end
4325
+ end
4326
+ # Unit of time between subscription charges.
4327
+ attr_accessor :interval
4328
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
4329
+ attr_accessor :interval_count
4330
+ # Name for subscription.
4331
+ attr_accessor :name
4332
+ # Describes the upcoming charge for this subscription.
4333
+ attr_accessor :next_billing
4334
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
4335
+ attr_accessor :reference
4336
+
4337
+ def initialize(
4338
+ interval: nil,
4339
+ interval_count: nil,
4340
+ name: nil,
4341
+ next_billing: nil,
4342
+ reference: nil
4343
+ )
4344
+ @interval = interval
4345
+ @interval_count = interval_count
4346
+ @name = name
4347
+ @next_billing = next_billing
4348
+ @reference = reference
4349
+ end
4350
+ end
4252
4351
  # Controls when the funds are captured from the customer's account.
4253
4352
  #
4254
4353
  # 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.
4255
4354
  #
4256
4355
  # 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.
4257
4356
  attr_accessor :capture_method
4357
+ # On-demand details if setting up or charging an on-demand payment.
4358
+ attr_accessor :on_demand
4258
4359
  # Preferred language of the Klarna authorization page that the customer is redirected to
4259
4360
  attr_accessor :preferred_locale
4260
4361
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
@@ -4267,11 +4368,21 @@ module Stripe
4267
4368
  #
4268
4369
  # 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`.
4269
4370
  attr_accessor :setup_future_usage
4371
+ # Subscription details if setting up or charging a subscription.
4372
+ attr_accessor :subscriptions
4270
4373
 
4271
- def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
4374
+ def initialize(
4375
+ capture_method: nil,
4376
+ on_demand: nil,
4377
+ preferred_locale: nil,
4378
+ setup_future_usage: nil,
4379
+ subscriptions: nil
4380
+ )
4272
4381
  @capture_method = capture_method
4382
+ @on_demand = on_demand
4273
4383
  @preferred_locale = preferred_locale
4274
4384
  @setup_future_usage = setup_future_usage
4385
+ @subscriptions = subscriptions
4275
4386
  end
4276
4387
  end
4277
4388
 
@@ -5082,6 +5193,8 @@ module Stripe
5082
5193
  attr_accessor :card_present
5083
5194
  # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
5084
5195
  attr_accessor :cashapp
5196
+ # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options.
5197
+ attr_accessor :crypto
5085
5198
  # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
5086
5199
  attr_accessor :customer_balance
5087
5200
  # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
@@ -5183,6 +5296,7 @@ module Stripe
5183
5296
  card: nil,
5184
5297
  card_present: nil,
5185
5298
  cashapp: nil,
5299
+ crypto: nil,
5186
5300
  customer_balance: nil,
5187
5301
  eps: nil,
5188
5302
  fpx: nil,
@@ -5241,6 +5355,7 @@ module Stripe
5241
5355
  @card = card
5242
5356
  @card_present = card_present
5243
5357
  @cashapp = cashapp
5358
+ @crypto = crypto
5244
5359
  @customer_balance = customer_balance
5245
5360
  @eps = eps
5246
5361
  @fpx = fpx
@@ -5432,7 +5547,7 @@ module Stripe
5432
5547
  attr_accessor :payment_method_data
5433
5548
  # Payment method-specific configuration for this PaymentIntent.
5434
5549
  attr_accessor :payment_method_options
5435
- # 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).
5550
+ # 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).
5436
5551
  attr_accessor :payment_method_types
5437
5552
  # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
5438
5553
  attr_accessor :radar_options
@@ -6419,6 +6534,7 @@ module Stripe
6419
6534
  end
6420
6535
 
6421
6536
  class Cashapp < Stripe::RequestParams; end
6537
+ class Crypto < Stripe::RequestParams; end
6422
6538
  class CustomerBalance < Stripe::RequestParams; end
6423
6539
 
6424
6540
  class Eps < Stripe::RequestParams
@@ -6702,6 +6818,8 @@ module Stripe
6702
6818
  attr_accessor :boleto
6703
6819
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
6704
6820
  attr_accessor :cashapp
6821
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
6822
+ attr_accessor :crypto
6705
6823
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
6706
6824
  attr_accessor :customer_balance
6707
6825
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -6809,6 +6927,7 @@ module Stripe
6809
6927
  blik: nil,
6810
6928
  boleto: nil,
6811
6929
  cashapp: nil,
6930
+ crypto: nil,
6812
6931
  customer_balance: nil,
6813
6932
  eps: nil,
6814
6933
  fpx: nil,
@@ -6870,6 +6989,7 @@ module Stripe
6870
6989
  @blik = blik
6871
6990
  @boleto = boleto
6872
6991
  @cashapp = cashapp
6992
+ @crypto = crypto
6873
6993
  @customer_balance = customer_balance
6874
6994
  @eps = eps
6875
6995
  @fpx = fpx
@@ -7213,7 +7333,7 @@ module Stripe
7213
7333
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
7214
7334
  # One of `month`.
7215
7335
  attr_accessor :interval
7216
- # Type of installment plan, one of `fixed_count`.
7336
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
7217
7337
  attr_accessor :type
7218
7338
 
7219
7339
  def initialize(count: nil, interval: nil, type: nil)
@@ -7545,6 +7665,23 @@ module Stripe
7545
7665
  end
7546
7666
  end
7547
7667
 
7668
+ class Crypto < Stripe::RequestParams
7669
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
7670
+ #
7671
+ # 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.
7672
+ #
7673
+ # 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.
7674
+ #
7675
+ # 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).
7676
+ #
7677
+ # 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`.
7678
+ attr_accessor :setup_future_usage
7679
+
7680
+ def initialize(setup_future_usage: nil)
7681
+ @setup_future_usage = setup_future_usage
7682
+ end
7683
+ end
7684
+
7548
7685
  class CustomerBalance < Stripe::RequestParams
7549
7686
  class BankTransfer < Stripe::RequestParams
7550
7687
  class EuBankTransfer < Stripe::RequestParams
@@ -7742,12 +7879,78 @@ module Stripe
7742
7879
  end
7743
7880
 
7744
7881
  class Klarna < Stripe::RequestParams
7882
+ class OnDemand < Stripe::RequestParams
7883
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
7884
+ attr_accessor :average_amount
7885
+ # 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.
7886
+ attr_accessor :maximum_amount
7887
+ # 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.
7888
+ attr_accessor :minimum_amount
7889
+ # Interval at which the customer is making purchases
7890
+ attr_accessor :purchase_interval
7891
+ # The number of `purchase_interval` between charges
7892
+ attr_accessor :purchase_interval_count
7893
+
7894
+ def initialize(
7895
+ average_amount: nil,
7896
+ maximum_amount: nil,
7897
+ minimum_amount: nil,
7898
+ purchase_interval: nil,
7899
+ purchase_interval_count: nil
7900
+ )
7901
+ @average_amount = average_amount
7902
+ @maximum_amount = maximum_amount
7903
+ @minimum_amount = minimum_amount
7904
+ @purchase_interval = purchase_interval
7905
+ @purchase_interval_count = purchase_interval_count
7906
+ end
7907
+ end
7908
+
7909
+ class Subscription < Stripe::RequestParams
7910
+ class NextBilling < Stripe::RequestParams
7911
+ # The amount of the next charge for the subscription.
7912
+ attr_accessor :amount
7913
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
7914
+ attr_accessor :date
7915
+
7916
+ def initialize(amount: nil, date: nil)
7917
+ @amount = amount
7918
+ @date = date
7919
+ end
7920
+ end
7921
+ # Unit of time between subscription charges.
7922
+ attr_accessor :interval
7923
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
7924
+ attr_accessor :interval_count
7925
+ # Name for subscription.
7926
+ attr_accessor :name
7927
+ # Describes the upcoming charge for this subscription.
7928
+ attr_accessor :next_billing
7929
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
7930
+ attr_accessor :reference
7931
+
7932
+ def initialize(
7933
+ interval: nil,
7934
+ interval_count: nil,
7935
+ name: nil,
7936
+ next_billing: nil,
7937
+ reference: nil
7938
+ )
7939
+ @interval = interval
7940
+ @interval_count = interval_count
7941
+ @name = name
7942
+ @next_billing = next_billing
7943
+ @reference = reference
7944
+ end
7945
+ end
7745
7946
  # Controls when the funds are captured from the customer's account.
7746
7947
  #
7747
7948
  # 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.
7748
7949
  #
7749
7950
  # 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.
7750
7951
  attr_accessor :capture_method
7952
+ # On-demand details if setting up or charging an on-demand payment.
7953
+ attr_accessor :on_demand
7751
7954
  # Preferred language of the Klarna authorization page that the customer is redirected to
7752
7955
  attr_accessor :preferred_locale
7753
7956
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
@@ -7760,11 +7963,21 @@ module Stripe
7760
7963
  #
7761
7964
  # 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`.
7762
7965
  attr_accessor :setup_future_usage
7966
+ # Subscription details if setting up or charging a subscription.
7967
+ attr_accessor :subscriptions
7763
7968
 
7764
- def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
7969
+ def initialize(
7970
+ capture_method: nil,
7971
+ on_demand: nil,
7972
+ preferred_locale: nil,
7973
+ setup_future_usage: nil,
7974
+ subscriptions: nil
7975
+ )
7765
7976
  @capture_method = capture_method
7977
+ @on_demand = on_demand
7766
7978
  @preferred_locale = preferred_locale
7767
7979
  @setup_future_usage = setup_future_usage
7980
+ @subscriptions = subscriptions
7768
7981
  end
7769
7982
  end
7770
7983
 
@@ -8575,6 +8788,8 @@ module Stripe
8575
8788
  attr_accessor :card_present
8576
8789
  # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
8577
8790
  attr_accessor :cashapp
8791
+ # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options.
8792
+ attr_accessor :crypto
8578
8793
  # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
8579
8794
  attr_accessor :customer_balance
8580
8795
  # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
@@ -8676,6 +8891,7 @@ module Stripe
8676
8891
  card: nil,
8677
8892
  card_present: nil,
8678
8893
  cashapp: nil,
8894
+ crypto: nil,
8679
8895
  customer_balance: nil,
8680
8896
  eps: nil,
8681
8897
  fpx: nil,
@@ -8734,6 +8950,7 @@ module Stripe
8734
8950
  @card = card
8735
8951
  @card_present = card_present
8736
8952
  @cashapp = cashapp
8953
+ @crypto = crypto
8737
8954
  @customer_balance = customer_balance
8738
8955
  @eps = eps
8739
8956
  @fpx = fpx
@@ -8882,7 +9099,7 @@ module Stripe
8882
9099
  attr_accessor :payment_method_data
8883
9100
  # Payment-method-specific configuration for this PaymentIntent.
8884
9101
  attr_accessor :payment_method_options
8885
- # 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).
9102
+ # 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).
8886
9103
  attr_accessor :payment_method_types
8887
9104
  # 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).
8888
9105
  attr_accessor :receipt_email
@@ -10683,6 +10900,7 @@ module Stripe
10683
10900
  end
10684
10901
 
10685
10902
  class Cashapp < Stripe::RequestParams; end
10903
+ class Crypto < Stripe::RequestParams; end
10686
10904
  class CustomerBalance < Stripe::RequestParams; end
10687
10905
 
10688
10906
  class Eps < Stripe::RequestParams
@@ -10966,6 +11184,8 @@ module Stripe
10966
11184
  attr_accessor :boleto
10967
11185
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
10968
11186
  attr_accessor :cashapp
11187
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
11188
+ attr_accessor :crypto
10969
11189
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
10970
11190
  attr_accessor :customer_balance
10971
11191
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -11073,6 +11293,7 @@ module Stripe
11073
11293
  blik: nil,
11074
11294
  boleto: nil,
11075
11295
  cashapp: nil,
11296
+ crypto: nil,
11076
11297
  customer_balance: nil,
11077
11298
  eps: nil,
11078
11299
  fpx: nil,
@@ -11134,6 +11355,7 @@ module Stripe
11134
11355
  @blik = blik
11135
11356
  @boleto = boleto
11136
11357
  @cashapp = cashapp
11358
+ @crypto = crypto
11137
11359
  @customer_balance = customer_balance
11138
11360
  @eps = eps
11139
11361
  @fpx = fpx
@@ -11477,7 +11699,7 @@ module Stripe
11477
11699
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
11478
11700
  # One of `month`.
11479
11701
  attr_accessor :interval
11480
- # Type of installment plan, one of `fixed_count`.
11702
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
11481
11703
  attr_accessor :type
11482
11704
 
11483
11705
  def initialize(count: nil, interval: nil, type: nil)
@@ -11809,6 +12031,23 @@ module Stripe
11809
12031
  end
11810
12032
  end
11811
12033
 
12034
+ class Crypto < Stripe::RequestParams
12035
+ # Indicates that you intend to make future payments with this PaymentIntent's payment method.
12036
+ #
12037
+ # 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.
12038
+ #
12039
+ # 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.
12040
+ #
12041
+ # 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).
12042
+ #
12043
+ # 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`.
12044
+ attr_accessor :setup_future_usage
12045
+
12046
+ def initialize(setup_future_usage: nil)
12047
+ @setup_future_usage = setup_future_usage
12048
+ end
12049
+ end
12050
+
11812
12051
  class CustomerBalance < Stripe::RequestParams
11813
12052
  class BankTransfer < Stripe::RequestParams
11814
12053
  class EuBankTransfer < Stripe::RequestParams
@@ -12006,12 +12245,78 @@ module Stripe
12006
12245
  end
12007
12246
 
12008
12247
  class Klarna < Stripe::RequestParams
12248
+ class OnDemand < Stripe::RequestParams
12249
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
12250
+ attr_accessor :average_amount
12251
+ # 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.
12252
+ attr_accessor :maximum_amount
12253
+ # 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.
12254
+ attr_accessor :minimum_amount
12255
+ # Interval at which the customer is making purchases
12256
+ attr_accessor :purchase_interval
12257
+ # The number of `purchase_interval` between charges
12258
+ attr_accessor :purchase_interval_count
12259
+
12260
+ def initialize(
12261
+ average_amount: nil,
12262
+ maximum_amount: nil,
12263
+ minimum_amount: nil,
12264
+ purchase_interval: nil,
12265
+ purchase_interval_count: nil
12266
+ )
12267
+ @average_amount = average_amount
12268
+ @maximum_amount = maximum_amount
12269
+ @minimum_amount = minimum_amount
12270
+ @purchase_interval = purchase_interval
12271
+ @purchase_interval_count = purchase_interval_count
12272
+ end
12273
+ end
12274
+
12275
+ class Subscription < Stripe::RequestParams
12276
+ class NextBilling < Stripe::RequestParams
12277
+ # The amount of the next charge for the subscription.
12278
+ attr_accessor :amount
12279
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
12280
+ attr_accessor :date
12281
+
12282
+ def initialize(amount: nil, date: nil)
12283
+ @amount = amount
12284
+ @date = date
12285
+ end
12286
+ end
12287
+ # Unit of time between subscription charges.
12288
+ attr_accessor :interval
12289
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
12290
+ attr_accessor :interval_count
12291
+ # Name for subscription.
12292
+ attr_accessor :name
12293
+ # Describes the upcoming charge for this subscription.
12294
+ attr_accessor :next_billing
12295
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
12296
+ attr_accessor :reference
12297
+
12298
+ def initialize(
12299
+ interval: nil,
12300
+ interval_count: nil,
12301
+ name: nil,
12302
+ next_billing: nil,
12303
+ reference: nil
12304
+ )
12305
+ @interval = interval
12306
+ @interval_count = interval_count
12307
+ @name = name
12308
+ @next_billing = next_billing
12309
+ @reference = reference
12310
+ end
12311
+ end
12009
12312
  # Controls when the funds are captured from the customer's account.
12010
12313
  #
12011
12314
  # 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.
12012
12315
  #
12013
12316
  # 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.
12014
12317
  attr_accessor :capture_method
12318
+ # On-demand details if setting up or charging an on-demand payment.
12319
+ attr_accessor :on_demand
12015
12320
  # Preferred language of the Klarna authorization page that the customer is redirected to
12016
12321
  attr_accessor :preferred_locale
12017
12322
  # Indicates that you intend to make future payments with this PaymentIntent's payment method.
@@ -12024,11 +12329,21 @@ module Stripe
12024
12329
  #
12025
12330
  # 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`.
12026
12331
  attr_accessor :setup_future_usage
12332
+ # Subscription details if setting up or charging a subscription.
12333
+ attr_accessor :subscriptions
12027
12334
 
12028
- def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil)
12335
+ def initialize(
12336
+ capture_method: nil,
12337
+ on_demand: nil,
12338
+ preferred_locale: nil,
12339
+ setup_future_usage: nil,
12340
+ subscriptions: nil
12341
+ )
12029
12342
  @capture_method = capture_method
12343
+ @on_demand = on_demand
12030
12344
  @preferred_locale = preferred_locale
12031
12345
  @setup_future_usage = setup_future_usage
12346
+ @subscriptions = subscriptions
12032
12347
  end
12033
12348
  end
12034
12349
 
@@ -12839,6 +13154,8 @@ module Stripe
12839
13154
  attr_accessor :card_present
12840
13155
  # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options.
12841
13156
  attr_accessor :cashapp
13157
+ # If this is a `crypto` PaymentMethod, this sub-hash contains details about the Crypto payment method options.
13158
+ attr_accessor :crypto
12842
13159
  # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options.
12843
13160
  attr_accessor :customer_balance
12844
13161
  # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options.
@@ -12940,6 +13257,7 @@ module Stripe
12940
13257
  card: nil,
12941
13258
  card_present: nil,
12942
13259
  cashapp: nil,
13260
+ crypto: nil,
12943
13261
  customer_balance: nil,
12944
13262
  eps: nil,
12945
13263
  fpx: nil,
@@ -12998,6 +13316,7 @@ module Stripe
12998
13316
  @card = card
12999
13317
  @card_present = card_present
13000
13318
  @cashapp = cashapp
13319
+ @crypto = crypto
13001
13320
  @customer_balance = customer_balance
13002
13321
  @eps = eps
13003
13322
  @fpx = fpx
@@ -13135,7 +13454,7 @@ module Stripe
13135
13454
  attr_accessor :payment_method_data
13136
13455
  # Payment method-specific configuration for this PaymentIntent.
13137
13456
  attr_accessor :payment_method_options
13138
- # 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).
13457
+ # 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).
13139
13458
  attr_accessor :payment_method_types
13140
13459
  # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
13141
13460
  attr_accessor :radar_options