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
@@ -231,6 +231,7 @@ module Stripe
231
231
  end
232
232
 
233
233
  class Cashapp < Stripe::RequestParams; end
234
+ class Crypto < Stripe::RequestParams; end
234
235
  class CustomerBalance < Stripe::RequestParams; end
235
236
 
236
237
  class Eps < Stripe::RequestParams
@@ -514,6 +515,8 @@ module Stripe
514
515
  attr_accessor :boleto
515
516
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
516
517
  attr_accessor :cashapp
518
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
519
+ attr_accessor :crypto
517
520
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
518
521
  attr_accessor :customer_balance
519
522
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -621,6 +624,7 @@ module Stripe
621
624
  blik: nil,
622
625
  boleto: nil,
623
626
  cashapp: nil,
627
+ crypto: nil,
624
628
  customer_balance: nil,
625
629
  eps: nil,
626
630
  fpx: nil,
@@ -682,6 +686,7 @@ module Stripe
682
686
  @blik = blik
683
687
  @boleto = boleto
684
688
  @cashapp = cashapp
689
+ @crypto = crypto
685
690
  @customer_balance = customer_balance
686
691
  @eps = eps
687
692
  @fpx = fpx
@@ -942,6 +947,88 @@ module Stripe
942
947
 
943
948
  class CardPresent < Stripe::RequestParams; end
944
949
 
950
+ class Klarna < Stripe::RequestParams
951
+ class OnDemand < Stripe::RequestParams
952
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
953
+ attr_accessor :average_amount
954
+ # 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.
955
+ attr_accessor :maximum_amount
956
+ # 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.
957
+ attr_accessor :minimum_amount
958
+ # Interval at which the customer is making purchases
959
+ attr_accessor :purchase_interval
960
+ # The number of `purchase_interval` between charges
961
+ attr_accessor :purchase_interval_count
962
+
963
+ def initialize(
964
+ average_amount: nil,
965
+ maximum_amount: nil,
966
+ minimum_amount: nil,
967
+ purchase_interval: nil,
968
+ purchase_interval_count: nil
969
+ )
970
+ @average_amount = average_amount
971
+ @maximum_amount = maximum_amount
972
+ @minimum_amount = minimum_amount
973
+ @purchase_interval = purchase_interval
974
+ @purchase_interval_count = purchase_interval_count
975
+ end
976
+ end
977
+
978
+ class Subscription < Stripe::RequestParams
979
+ class NextBilling < Stripe::RequestParams
980
+ # The amount of the next charge for the subscription.
981
+ attr_accessor :amount
982
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
983
+ attr_accessor :date
984
+
985
+ def initialize(amount: nil, date: nil)
986
+ @amount = amount
987
+ @date = date
988
+ end
989
+ end
990
+ # Unit of time between subscription charges.
991
+ attr_accessor :interval
992
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
993
+ attr_accessor :interval_count
994
+ # Name for subscription.
995
+ attr_accessor :name
996
+ # Describes the upcoming charge for this subscription.
997
+ attr_accessor :next_billing
998
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
999
+ attr_accessor :reference
1000
+
1001
+ def initialize(
1002
+ interval: nil,
1003
+ interval_count: nil,
1004
+ name: nil,
1005
+ next_billing: nil,
1006
+ reference: nil
1007
+ )
1008
+ @interval = interval
1009
+ @interval_count = interval_count
1010
+ @name = name
1011
+ @next_billing = next_billing
1012
+ @reference = reference
1013
+ end
1014
+ end
1015
+ # The currency of the SetupIntent. Three letter ISO currency code.
1016
+ attr_accessor :currency
1017
+ # On-demand details if setting up a payment method for on-demand payments.
1018
+ attr_accessor :on_demand
1019
+ # Preferred language of the Klarna authorization page that the customer is redirected to
1020
+ attr_accessor :preferred_locale
1021
+ # Subscription details if setting up or charging a subscription
1022
+ attr_accessor :subscriptions
1023
+
1024
+ def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil)
1025
+ @currency = currency
1026
+ @on_demand = on_demand
1027
+ @preferred_locale = preferred_locale
1028
+ @subscriptions = subscriptions
1029
+ end
1030
+ end
1031
+
945
1032
  class Link < Stripe::RequestParams
946
1033
  # [Deprecated] This is a legacy parameter that no longer has any function.
947
1034
  attr_accessor :persistent_token
@@ -1122,6 +1209,8 @@ module Stripe
1122
1209
  attr_accessor :card
1123
1210
  # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
1124
1211
  attr_accessor :card_present
1212
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
1213
+ attr_accessor :klarna
1125
1214
  # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
1126
1215
  attr_accessor :link
1127
1216
  # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
@@ -1139,6 +1228,7 @@ module Stripe
1139
1228
  bacs_debit: nil,
1140
1229
  card: nil,
1141
1230
  card_present: nil,
1231
+ klarna: nil,
1142
1232
  link: nil,
1143
1233
  paypal: nil,
1144
1234
  payto: nil,
@@ -1150,6 +1240,7 @@ module Stripe
1150
1240
  @bacs_debit = bacs_debit
1151
1241
  @card = card
1152
1242
  @card_present = card_present
1243
+ @klarna = klarna
1153
1244
  @link = link
1154
1245
  @paypal = paypal
1155
1246
  @payto = payto
@@ -1212,7 +1303,7 @@ module Stripe
1212
1303
  attr_accessor :payment_method_data
1213
1304
  # Payment method-specific configuration for this SetupIntent.
1214
1305
  attr_accessor :payment_method_options
1215
- # The list of payment method types (for example, card) that this SetupIntent 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).
1306
+ # The list of payment method types (for example, card) that this SetupIntent 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).
1216
1307
  attr_accessor :payment_method_types
1217
1308
  # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
1218
1309
  attr_accessor :return_url
@@ -1397,6 +1488,7 @@ module Stripe
1397
1488
  end
1398
1489
 
1399
1490
  class Cashapp < Stripe::RequestParams; end
1491
+ class Crypto < Stripe::RequestParams; end
1400
1492
  class CustomerBalance < Stripe::RequestParams; end
1401
1493
 
1402
1494
  class Eps < Stripe::RequestParams
@@ -1680,6 +1772,8 @@ module Stripe
1680
1772
  attr_accessor :boleto
1681
1773
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
1682
1774
  attr_accessor :cashapp
1775
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
1776
+ attr_accessor :crypto
1683
1777
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
1684
1778
  attr_accessor :customer_balance
1685
1779
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -1787,6 +1881,7 @@ module Stripe
1787
1881
  blik: nil,
1788
1882
  boleto: nil,
1789
1883
  cashapp: nil,
1884
+ crypto: nil,
1790
1885
  customer_balance: nil,
1791
1886
  eps: nil,
1792
1887
  fpx: nil,
@@ -1848,6 +1943,7 @@ module Stripe
1848
1943
  @blik = blik
1849
1944
  @boleto = boleto
1850
1945
  @cashapp = cashapp
1946
+ @crypto = crypto
1851
1947
  @customer_balance = customer_balance
1852
1948
  @eps = eps
1853
1949
  @fpx = fpx
@@ -2108,6 +2204,88 @@ module Stripe
2108
2204
 
2109
2205
  class CardPresent < Stripe::RequestParams; end
2110
2206
 
2207
+ class Klarna < Stripe::RequestParams
2208
+ class OnDemand < Stripe::RequestParams
2209
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
2210
+ attr_accessor :average_amount
2211
+ # 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.
2212
+ attr_accessor :maximum_amount
2213
+ # 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.
2214
+ attr_accessor :minimum_amount
2215
+ # Interval at which the customer is making purchases
2216
+ attr_accessor :purchase_interval
2217
+ # The number of `purchase_interval` between charges
2218
+ attr_accessor :purchase_interval_count
2219
+
2220
+ def initialize(
2221
+ average_amount: nil,
2222
+ maximum_amount: nil,
2223
+ minimum_amount: nil,
2224
+ purchase_interval: nil,
2225
+ purchase_interval_count: nil
2226
+ )
2227
+ @average_amount = average_amount
2228
+ @maximum_amount = maximum_amount
2229
+ @minimum_amount = minimum_amount
2230
+ @purchase_interval = purchase_interval
2231
+ @purchase_interval_count = purchase_interval_count
2232
+ end
2233
+ end
2234
+
2235
+ class Subscription < Stripe::RequestParams
2236
+ class NextBilling < Stripe::RequestParams
2237
+ # The amount of the next charge for the subscription.
2238
+ attr_accessor :amount
2239
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
2240
+ attr_accessor :date
2241
+
2242
+ def initialize(amount: nil, date: nil)
2243
+ @amount = amount
2244
+ @date = date
2245
+ end
2246
+ end
2247
+ # Unit of time between subscription charges.
2248
+ attr_accessor :interval
2249
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
2250
+ attr_accessor :interval_count
2251
+ # Name for subscription.
2252
+ attr_accessor :name
2253
+ # Describes the upcoming charge for this subscription.
2254
+ attr_accessor :next_billing
2255
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
2256
+ attr_accessor :reference
2257
+
2258
+ def initialize(
2259
+ interval: nil,
2260
+ interval_count: nil,
2261
+ name: nil,
2262
+ next_billing: nil,
2263
+ reference: nil
2264
+ )
2265
+ @interval = interval
2266
+ @interval_count = interval_count
2267
+ @name = name
2268
+ @next_billing = next_billing
2269
+ @reference = reference
2270
+ end
2271
+ end
2272
+ # The currency of the SetupIntent. Three letter ISO currency code.
2273
+ attr_accessor :currency
2274
+ # On-demand details if setting up a payment method for on-demand payments.
2275
+ attr_accessor :on_demand
2276
+ # Preferred language of the Klarna authorization page that the customer is redirected to
2277
+ attr_accessor :preferred_locale
2278
+ # Subscription details if setting up or charging a subscription
2279
+ attr_accessor :subscriptions
2280
+
2281
+ def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil)
2282
+ @currency = currency
2283
+ @on_demand = on_demand
2284
+ @preferred_locale = preferred_locale
2285
+ @subscriptions = subscriptions
2286
+ end
2287
+ end
2288
+
2111
2289
  class Link < Stripe::RequestParams
2112
2290
  # [Deprecated] This is a legacy parameter that no longer has any function.
2113
2291
  attr_accessor :persistent_token
@@ -2288,6 +2466,8 @@ module Stripe
2288
2466
  attr_accessor :card
2289
2467
  # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
2290
2468
  attr_accessor :card_present
2469
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
2470
+ attr_accessor :klarna
2291
2471
  # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
2292
2472
  attr_accessor :link
2293
2473
  # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
@@ -2305,6 +2485,7 @@ module Stripe
2305
2485
  bacs_debit: nil,
2306
2486
  card: nil,
2307
2487
  card_present: nil,
2488
+ klarna: nil,
2308
2489
  link: nil,
2309
2490
  paypal: nil,
2310
2491
  payto: nil,
@@ -2316,6 +2497,7 @@ module Stripe
2316
2497
  @bacs_debit = bacs_debit
2317
2498
  @card = card
2318
2499
  @card_present = card_present
2500
+ @klarna = klarna
2319
2501
  @link = link
2320
2502
  @paypal = paypal
2321
2503
  @payto = payto
@@ -2354,7 +2536,7 @@ module Stripe
2354
2536
  attr_accessor :payment_method_data
2355
2537
  # Payment method-specific configuration for this SetupIntent.
2356
2538
  attr_accessor :payment_method_options
2357
- # The list of payment method types (for example, card) that this SetupIntent can set up. 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).
2539
+ # The list of payment method types (for example, card) that this SetupIntent can set up. 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).
2358
2540
  attr_accessor :payment_method_types
2359
2541
 
2360
2542
  def initialize(
@@ -2550,6 +2732,7 @@ module Stripe
2550
2732
  end
2551
2733
 
2552
2734
  class Cashapp < Stripe::RequestParams; end
2735
+ class Crypto < Stripe::RequestParams; end
2553
2736
  class CustomerBalance < Stripe::RequestParams; end
2554
2737
 
2555
2738
  class Eps < Stripe::RequestParams
@@ -2833,6 +3016,8 @@ module Stripe
2833
3016
  attr_accessor :boleto
2834
3017
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
2835
3018
  attr_accessor :cashapp
3019
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
3020
+ attr_accessor :crypto
2836
3021
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
2837
3022
  attr_accessor :customer_balance
2838
3023
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -2940,6 +3125,7 @@ module Stripe
2940
3125
  blik: nil,
2941
3126
  boleto: nil,
2942
3127
  cashapp: nil,
3128
+ crypto: nil,
2943
3129
  customer_balance: nil,
2944
3130
  eps: nil,
2945
3131
  fpx: nil,
@@ -3001,6 +3187,7 @@ module Stripe
3001
3187
  @blik = blik
3002
3188
  @boleto = boleto
3003
3189
  @cashapp = cashapp
3190
+ @crypto = crypto
3004
3191
  @customer_balance = customer_balance
3005
3192
  @eps = eps
3006
3193
  @fpx = fpx
@@ -3261,6 +3448,88 @@ module Stripe
3261
3448
 
3262
3449
  class CardPresent < Stripe::RequestParams; end
3263
3450
 
3451
+ class Klarna < Stripe::RequestParams
3452
+ class OnDemand < Stripe::RequestParams
3453
+ # Your average amount value. You can use a value across your customer base, or segment based on customer type, country, etc.
3454
+ attr_accessor :average_amount
3455
+ # 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.
3456
+ attr_accessor :maximum_amount
3457
+ # 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.
3458
+ attr_accessor :minimum_amount
3459
+ # Interval at which the customer is making purchases
3460
+ attr_accessor :purchase_interval
3461
+ # The number of `purchase_interval` between charges
3462
+ attr_accessor :purchase_interval_count
3463
+
3464
+ def initialize(
3465
+ average_amount: nil,
3466
+ maximum_amount: nil,
3467
+ minimum_amount: nil,
3468
+ purchase_interval: nil,
3469
+ purchase_interval_count: nil
3470
+ )
3471
+ @average_amount = average_amount
3472
+ @maximum_amount = maximum_amount
3473
+ @minimum_amount = minimum_amount
3474
+ @purchase_interval = purchase_interval
3475
+ @purchase_interval_count = purchase_interval_count
3476
+ end
3477
+ end
3478
+
3479
+ class Subscription < Stripe::RequestParams
3480
+ class NextBilling < Stripe::RequestParams
3481
+ # The amount of the next charge for the subscription.
3482
+ attr_accessor :amount
3483
+ # The date of the next charge for the subscription in YYYY-MM-DD format.
3484
+ attr_accessor :date
3485
+
3486
+ def initialize(amount: nil, date: nil)
3487
+ @amount = amount
3488
+ @date = date
3489
+ end
3490
+ end
3491
+ # Unit of time between subscription charges.
3492
+ attr_accessor :interval
3493
+ # The number of intervals (specified in the `interval` attribute) between subscription charges. For example, `interval=month` and `interval_count=3` charges every 3 months.
3494
+ attr_accessor :interval_count
3495
+ # Name for subscription.
3496
+ attr_accessor :name
3497
+ # Describes the upcoming charge for this subscription.
3498
+ attr_accessor :next_billing
3499
+ # A non-customer-facing reference to correlate subscription charges in the Klarna app. Use a value that persists across subscription charges.
3500
+ attr_accessor :reference
3501
+
3502
+ def initialize(
3503
+ interval: nil,
3504
+ interval_count: nil,
3505
+ name: nil,
3506
+ next_billing: nil,
3507
+ reference: nil
3508
+ )
3509
+ @interval = interval
3510
+ @interval_count = interval_count
3511
+ @name = name
3512
+ @next_billing = next_billing
3513
+ @reference = reference
3514
+ end
3515
+ end
3516
+ # The currency of the SetupIntent. Three letter ISO currency code.
3517
+ attr_accessor :currency
3518
+ # On-demand details if setting up a payment method for on-demand payments.
3519
+ attr_accessor :on_demand
3520
+ # Preferred language of the Klarna authorization page that the customer is redirected to
3521
+ attr_accessor :preferred_locale
3522
+ # Subscription details if setting up or charging a subscription
3523
+ attr_accessor :subscriptions
3524
+
3525
+ def initialize(currency: nil, on_demand: nil, preferred_locale: nil, subscriptions: nil)
3526
+ @currency = currency
3527
+ @on_demand = on_demand
3528
+ @preferred_locale = preferred_locale
3529
+ @subscriptions = subscriptions
3530
+ end
3531
+ end
3532
+
3264
3533
  class Link < Stripe::RequestParams
3265
3534
  # [Deprecated] This is a legacy parameter that no longer has any function.
3266
3535
  attr_accessor :persistent_token
@@ -3441,6 +3710,8 @@ module Stripe
3441
3710
  attr_accessor :card
3442
3711
  # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
3443
3712
  attr_accessor :card_present
3713
+ # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
3714
+ attr_accessor :klarna
3444
3715
  # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
3445
3716
  attr_accessor :link
3446
3717
  # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
@@ -3458,6 +3729,7 @@ module Stripe
3458
3729
  bacs_debit: nil,
3459
3730
  card: nil,
3460
3731
  card_present: nil,
3732
+ klarna: nil,
3461
3733
  link: nil,
3462
3734
  paypal: nil,
3463
3735
  payto: nil,
@@ -3469,6 +3741,7 @@ module Stripe
3469
3741
  @bacs_debit = bacs_debit
3470
3742
  @card = card
3471
3743
  @card_present = card_present
3744
+ @klarna = klarna
3472
3745
  @link = link
3473
3746
  @paypal = paypal
3474
3747
  @payto = payto
@@ -126,6 +126,15 @@ module Stripe
126
126
  end
127
127
 
128
128
  class CreateParams < Stripe::RequestParams
129
+ class BillingMode < Stripe::RequestParams
130
+ # Attribute for param field type
131
+ attr_accessor :type
132
+
133
+ def initialize(type: nil)
134
+ @type = type
135
+ end
136
+ end
137
+
129
138
  class DefaultSettings < Stripe::RequestParams
130
139
  class AutomaticTax < Stripe::RequestParams
131
140
  class Liability < Stripe::RequestParams
@@ -651,7 +651,7 @@ module Stripe
651
651
  attr_accessor :billing_thresholds
652
652
  # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
653
653
  attr_accessor :cancel_at
654
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
654
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
655
655
  attr_accessor :cancel_at_period_end
656
656
  # Details about why this subscription was cancelled
657
657
  attr_accessor :cancellation_details
@@ -1045,6 +1045,15 @@ module Stripe
1045
1045
  end
1046
1046
  end
1047
1047
 
1048
+ class BillingMode < Stripe::RequestParams
1049
+ # Attribute for param field type
1050
+ attr_accessor :type
1051
+
1052
+ def initialize(type: nil)
1053
+ @type = type
1054
+ end
1055
+ end
1056
+
1048
1057
  class BillingThresholds < Stripe::RequestParams
1049
1058
  # Monetary threshold that triggers the subscription to advance to a new billing period
1050
1059
  attr_accessor :amount_gte
@@ -1513,9 +1522,9 @@ module Stripe
1513
1522
  attr_accessor :add_invoice_items
1514
1523
  # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
1515
1524
  attr_accessor :application_fee_percent
1516
- # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
1525
+ # Automatic tax settings for this subscription.
1517
1526
  attr_accessor :automatic_tax
1518
- # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
1527
+ # A past timestamp to backdate the subscription's start date to. If set, the first invoice will contain line items for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor.
1519
1528
  attr_accessor :backdate_start_date
1520
1529
  # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals.
1521
1530
  attr_accessor :billing_cycle_anchor
@@ -1527,7 +1536,7 @@ module Stripe
1527
1536
  attr_accessor :billing_thresholds
1528
1537
  # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period.
1529
1538
  attr_accessor :cancel_at
1530
- # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This param will be removed in a future API version. Please use `cancel_at` instead.
1539
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1531
1540
  attr_accessor :cancel_at_period_end
1532
1541
  # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`.
1533
1542
  attr_accessor :collection_method
@@ -1688,6 +1697,14 @@ module Stripe
1688
1697
  end
1689
1698
 
1690
1699
  class MigrateParams < Stripe::RequestParams
1700
+ class BillingMode < Stripe::RequestParams
1701
+ # Attribute for param field type
1702
+ attr_accessor :type
1703
+
1704
+ def initialize(type: nil)
1705
+ @type = type
1706
+ end
1707
+ end
1691
1708
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1692
1709
  attr_accessor :billing_mode
1693
1710
  # Specifies which fields in the response should be expanded.
@@ -1151,6 +1151,15 @@ module Stripe
1151
1151
  end
1152
1152
  end
1153
1153
 
1154
+ class Ua < Stripe::RequestParams
1155
+ # Type of registration to be created in `country`.
1156
+ attr_accessor :type
1157
+
1158
+ def initialize(type: nil)
1159
+ @type = type
1160
+ end
1161
+ end
1162
+
1154
1163
  class Ug < Stripe::RequestParams
1155
1164
  # Type of registration to be created in `country`.
1156
1165
  attr_accessor :type
@@ -1457,6 +1466,8 @@ module Stripe
1457
1466
  attr_accessor :tr
1458
1467
  # Options for the registration in TZ.
1459
1468
  attr_accessor :tz
1469
+ # Options for the registration in UA.
1470
+ attr_accessor :ua
1460
1471
  # Options for the registration in UG.
1461
1472
  attr_accessor :ug
1462
1473
  # Options for the registration in US.
@@ -1565,6 +1576,7 @@ module Stripe
1565
1576
  tj: nil,
1566
1577
  tr: nil,
1567
1578
  tz: nil,
1579
+ ua: nil,
1568
1580
  ug: nil,
1569
1581
  us: nil,
1570
1582
  uy: nil,
@@ -1664,6 +1676,7 @@ module Stripe
1664
1676
  @tj = tj
1665
1677
  @tr = tr
1666
1678
  @tz = tz
1679
+ @ua = ua
1667
1680
  @ug = ug
1668
1681
  @us = us
1669
1682
  @uy = uy
@@ -226,11 +226,11 @@ module Stripe
226
226
  @tipping = tipping
227
227
  end
228
228
  end
229
- # Configuration overrides
229
+ # Configuration overrides.
230
230
  attr_accessor :collect_config
231
231
  # Specifies which fields in the response should be expanded.
232
232
  attr_accessor :expand
233
- # PaymentIntent ID
233
+ # PaymentIntent ID.
234
234
  attr_accessor :payment_intent
235
235
 
236
236
  def initialize(collect_config: nil, expand: nil, payment_intent: nil)
@@ -249,11 +249,11 @@ module Stripe
249
249
  @return_url = return_url
250
250
  end
251
251
  end
252
- # Configuration overrides
252
+ # Configuration overrides.
253
253
  attr_accessor :confirm_config
254
254
  # Specifies which fields in the response should be expanded.
255
255
  attr_accessor :expand
256
- # PaymentIntent ID
256
+ # PaymentIntent ID.
257
257
  attr_accessor :payment_intent
258
258
 
259
259
  def initialize(confirm_config: nil, expand: nil, payment_intent: nil)
@@ -117,6 +117,7 @@ module Stripe
117
117
  end
118
118
 
119
119
  class Cashapp < Stripe::RequestParams; end
120
+ class Crypto < Stripe::RequestParams; end
120
121
  class CustomerBalance < Stripe::RequestParams; end
121
122
 
122
123
  class Eps < Stripe::RequestParams
@@ -400,6 +401,8 @@ module Stripe
400
401
  attr_accessor :boleto
401
402
  # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
402
403
  attr_accessor :cashapp
404
+ # If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
405
+ attr_accessor :crypto
403
406
  # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
404
407
  attr_accessor :customer_balance
405
408
  # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
@@ -507,6 +510,7 @@ module Stripe
507
510
  blik: nil,
508
511
  boleto: nil,
509
512
  cashapp: nil,
513
+ crypto: nil,
510
514
  customer_balance: nil,
511
515
  eps: nil,
512
516
  fpx: nil,
@@ -568,6 +572,7 @@ module Stripe
568
572
  @blik = blik
569
573
  @boleto = boleto
570
574
  @cashapp = cashapp
575
+ @crypto = crypto
571
576
  @customer_balance = customer_balance
572
577
  @eps = eps
573
578
  @fpx = fpx
@@ -625,7 +630,7 @@ module Stripe
625
630
  # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card.
626
631
  # One of `month`.
627
632
  attr_accessor :interval
628
- # Type of installment plan, one of `fixed_count`.
633
+ # Type of installment plan, one of `fixed_count`, `bonus`, or `revolving`.
629
634
  attr_accessor :type
630
635
 
631
636
  def initialize(count: nil, interval: nil, type: nil)
@@ -212,7 +212,7 @@ module Stripe
212
212
  attr_accessor :ownership_exemption_reason
213
213
  # The company's phone number (used for verification).
214
214
  attr_accessor :phone
215
- # Attribute for param field registration_date
215
+ # When the business was incorporated or registered.
216
216
  attr_accessor :registration_date
217
217
  # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong).
218
218
  attr_accessor :registration_number
@@ -39,19 +39,23 @@ module Stripe
39
39
  attr_accessor :limit
40
40
  # An object ID cursor for use in pagination.
41
41
  attr_accessor :starting_after
42
+ # Only return FinancialAccounts that have the given status: `open` or `closed`
43
+ attr_accessor :status
42
44
 
43
45
  def initialize(
44
46
  created: nil,
45
47
  ending_before: nil,
46
48
  expand: nil,
47
49
  limit: nil,
48
- starting_after: nil
50
+ starting_after: nil,
51
+ status: nil
49
52
  )
50
53
  @created = created
51
54
  @ending_before = ending_before
52
55
  @expand = expand
53
56
  @limit = limit
54
57
  @starting_after = starting_after
58
+ @status = status
55
59
  end
56
60
  end
57
61