stripe 19.1.0 → 19.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/lib/stripe/api_requestor.rb +3 -0
  3. data/lib/stripe/api_version.rb +1 -1
  4. data/lib/stripe/event_types.rb +16 -0
  5. data/lib/stripe/events/v2_commerce_product_catalog_imports_failed_event.rb +44 -0
  6. data/lib/stripe/events/v2_commerce_product_catalog_imports_processing_event.rb +44 -0
  7. data/lib/stripe/events/v2_commerce_product_catalog_imports_succeeded_event.rb +44 -0
  8. data/lib/stripe/events/v2_commerce_product_catalog_imports_succeeded_with_errors_event.rb +44 -0
  9. data/lib/stripe/object_types.rb +1 -0
  10. data/lib/stripe/params/account_create_params.rb +26 -0
  11. data/lib/stripe/params/account_update_params.rb +26 -0
  12. data/lib/stripe/params/balance_settings_update_params.rb +42 -2
  13. data/lib/stripe/params/charge_create_params.rb +4 -1
  14. data/lib/stripe/params/checkout/session_create_params.rb +28 -15
  15. data/lib/stripe/params/confirmation_token_create_params.rb +11 -1
  16. data/lib/stripe/params/invoice_create_preview_params.rb +60 -0
  17. data/lib/stripe/params/payment_intent_capture_params.rb +2 -2
  18. data/lib/stripe/params/payment_intent_confirm_params.rb +38 -5
  19. data/lib/stripe/params/payment_intent_create_params.rb +65 -6
  20. data/lib/stripe/params/payment_intent_increment_authorization_params.rb +2 -2
  21. data/lib/stripe/params/payment_intent_update_params.rb +58 -5
  22. data/lib/stripe/params/payment_link_create_params.rb +30 -1
  23. data/lib/stripe/params/payment_link_update_params.rb +29 -0
  24. data/lib/stripe/params/payment_method_configuration_create_params.rb +43 -1
  25. data/lib/stripe/params/payment_method_configuration_list_params.rb +4 -0
  26. data/lib/stripe/params/payment_method_configuration_update_params.rb +43 -1
  27. data/lib/stripe/params/payment_method_create_params.rb +11 -1
  28. data/lib/stripe/params/payout_create_params.rb +1 -1
  29. data/lib/stripe/params/setup_intent_confirm_params.rb +18 -2
  30. data/lib/stripe/params/setup_intent_create_params.rb +18 -2
  31. data/lib/stripe/params/setup_intent_update_params.rb +18 -2
  32. data/lib/stripe/params/subscription_create_params.rb +61 -11
  33. data/lib/stripe/params/subscription_item_create_params.rb +1 -7
  34. data/lib/stripe/params/subscription_item_delete_params.rb +1 -7
  35. data/lib/stripe/params/subscription_item_update_params.rb +1 -7
  36. data/lib/stripe/params/subscription_schedule_create_params.rb +4 -0
  37. data/lib/stripe/params/subscription_schedule_update_params.rb +4 -0
  38. data/lib/stripe/params/subscription_update_params.rb +62 -8
  39. data/lib/stripe/params/terminal/configuration_create_params.rb +52 -0
  40. data/lib/stripe/params/terminal/configuration_update_params.rb +52 -0
  41. data/lib/stripe/params/test_helpers/confirmation_token_create_params.rb +11 -1
  42. data/lib/stripe/params/test_helpers/test_clock_create_params.rb +4 -1
  43. data/lib/stripe/params/v2/billing/meter_event_adjustment_create_params.rb +2 -2
  44. data/lib/stripe/params/v2/commerce/product_catalog/import_create_params.rb +25 -0
  45. data/lib/stripe/params/v2/commerce/product_catalog/import_list_params.rb +54 -0
  46. data/lib/stripe/params/v2/commerce/product_catalog/import_retrieve_params.rb +12 -0
  47. data/lib/stripe/params/v2/core/account_create_params.rb +28 -6
  48. data/lib/stripe/params/v2/core/account_token_create_params.rb +27 -5
  49. data/lib/stripe/params/v2/core/account_update_params.rb +29 -7
  50. data/lib/stripe/params/v2/core/event_destination_create_params.rb +23 -0
  51. data/lib/stripe/params.rb +1342 -614
  52. data/lib/stripe/railtie.rb +8 -0
  53. data/lib/stripe/resources/account.rb +4 -0
  54. data/lib/stripe/resources/balance_settings.rb +42 -2
  55. data/lib/stripe/resources/charge.rb +35 -0
  56. data/lib/stripe/resources/checkout/session.rb +23 -7
  57. data/lib/stripe/resources/confirmation_token.rb +26 -0
  58. data/lib/stripe/resources/discount.rb +2 -2
  59. data/lib/stripe/resources/invoice.rb +2 -0
  60. data/lib/stripe/resources/invoice_item.rb +34 -1
  61. data/lib/stripe/resources/issuing/dispute.rb +1 -1
  62. data/lib/stripe/resources/issuing/personalization_design.rb +1 -1
  63. data/lib/stripe/resources/mandate.rb +13 -0
  64. data/lib/stripe/resources/payment_attempt_record.rb +40 -10
  65. data/lib/stripe/resources/payment_intent.rb +71 -5
  66. data/lib/stripe/resources/payment_link.rb +40 -0
  67. data/lib/stripe/resources/payment_method.rb +26 -0
  68. data/lib/stripe/resources/payment_method_configuration.rb +68 -0
  69. data/lib/stripe/resources/payment_record.rb +40 -10
  70. data/lib/stripe/resources/radar/payment_evaluation.rb +1 -1
  71. data/lib/stripe/resources/refund.rb +13 -0
  72. data/lib/stripe/resources/setup_attempt.rb +13 -0
  73. data/lib/stripe/resources/setup_intent.rb +26 -0
  74. data/lib/stripe/resources/subscription.rb +77 -4
  75. data/lib/stripe/resources/subscription_item.rb +2 -0
  76. data/lib/stripe/resources/subscription_schedule.rb +2 -0
  77. data/lib/stripe/resources/terminal/configuration.rb +64 -0
  78. data/lib/stripe/resources/terminal/reader.rb +116 -0
  79. data/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +3 -3
  80. data/lib/stripe/resources/v2/billing/meter_event_session.rb +3 -3
  81. data/lib/stripe/resources/v2/commerce/product_catalog_import.rb +274 -0
  82. data/lib/stripe/resources/v2/core/account.rb +37 -10
  83. data/lib/stripe/resources/v2/core/account_token.rb +1 -1
  84. data/lib/stripe/resources/v2/core/event.rb +1 -0
  85. data/lib/stripe/resources/v2/core/event_destination.rb +24 -0
  86. data/lib/stripe/resources.rb +500 -178
  87. data/lib/stripe/services/payment_intent_service.rb +3 -1
  88. data/lib/stripe/services/subscription_service.rb +2 -2
  89. data/lib/stripe/services/v2/billing/meter_event_session_service.rb +1 -1
  90. data/lib/stripe/services/v2/commerce/product_catalog/import_service.rb +45 -0
  91. data/lib/stripe/services/v2/commerce/product_catalog_service.rb +17 -0
  92. data/lib/stripe/services/v2/commerce_service.rb +15 -0
  93. data/lib/stripe/services/v2/core/account_service.rb +1 -1
  94. data/lib/stripe/services/v2/core/account_token_service.rb +5 -1
  95. data/lib/stripe/services/v2/core/accounts/person_token_service.rb +2 -1
  96. data/lib/stripe/services/v2/core/event_service.rb +2 -1
  97. data/lib/stripe/services/v2_services.rb +2 -1
  98. data/lib/stripe/services.rb +469 -189
  99. data/lib/stripe/version.rb +1 -1
  100. data/lib/stripe.rb +25 -4
  101. data/rbi/stripe.rbi +2785 -253
  102. metadata +14 -2
@@ -138,7 +138,7 @@ module Stripe
138
138
  attr_accessor :payment_method_reuse_agreement
139
139
  # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout
140
140
  # Session will determine whether to display an option to opt into promotional communication
141
- # from the merchant depending on the customer's locale. Only available to US merchants.
141
+ # from the merchant depending on the customer's locale. Only available to US merchants and US customers.
142
142
  attr_accessor :promotions
143
143
  # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay.
144
144
  # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public).
@@ -1021,7 +1021,7 @@ module Stripe
1021
1021
  end
1022
1022
 
1023
1023
  class Restrictions < ::Stripe::RequestParams
1024
- # Specify the card brands to block in the Checkout Session. If a customer enters or selects a card belonging to a blocked brand, they can't complete the Session.
1024
+ # The card brands to block. If a customer enters or selects a card belonging to a blocked brand, they can't complete the payment.
1025
1025
  attr_accessor :brands_blocked
1026
1026
 
1027
1027
  def initialize(brands_blocked: nil)
@@ -1685,6 +1685,15 @@ module Stripe
1685
1685
  end
1686
1686
  end
1687
1687
 
1688
+ class Scalapay < ::Stripe::RequestParams
1689
+ # Controls when the funds will be captured from the customer's account.
1690
+ attr_accessor :capture_method
1691
+
1692
+ def initialize(capture_method: nil)
1693
+ @capture_method = capture_method
1694
+ end
1695
+ end
1696
+
1688
1697
  class SepaDebit < ::Stripe::RequestParams
1689
1698
  class MandateOptions < ::Stripe::RequestParams
1690
1699
  # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
@@ -1842,7 +1851,7 @@ module Stripe
1842
1851
  @setup_future_usage = setup_future_usage
1843
1852
  end
1844
1853
  end
1845
- # contains details about the ACSS Debit payment method options. You can't set this parameter if `ui_mode` is `custom`.
1854
+ # contains details about the ACSS Debit payment method options. You can't set this parameter if `ui_mode` is `elements`.
1846
1855
  attr_accessor :acss_debit
1847
1856
  # contains details about the Affirm payment method options.
1848
1857
  attr_accessor :affirm
@@ -1892,7 +1901,7 @@ module Stripe
1892
1901
  attr_accessor :konbini
1893
1902
  # contains details about the Korean card payment method options.
1894
1903
  attr_accessor :kr_card
1895
- # contains details about the Link payment method options.
1904
+ # contains details about the Link payment method options (Link is also known as Onelink in the UK).
1896
1905
  attr_accessor :link
1897
1906
  # contains details about the Mobilepay payment method options.
1898
1907
  attr_accessor :mobilepay
@@ -1922,6 +1931,8 @@ module Stripe
1922
1931
  attr_accessor :samsung_pay
1923
1932
  # contains details about the Satispay payment method options.
1924
1933
  attr_accessor :satispay
1934
+ # contains details about the Scalapay payment method options.
1935
+ attr_accessor :scalapay
1925
1936
  # contains details about the Sepa Debit payment method options.
1926
1937
  attr_accessor :sepa_debit
1927
1938
  # contains details about the Sofort payment method options.
@@ -1978,6 +1989,7 @@ module Stripe
1978
1989
  revolut_pay: nil,
1979
1990
  samsung_pay: nil,
1980
1991
  satispay: nil,
1992
+ scalapay: nil,
1981
1993
  sepa_debit: nil,
1982
1994
  sofort: nil,
1983
1995
  swish: nil,
@@ -2026,6 +2038,7 @@ module Stripe
2026
2038
  @revolut_pay = revolut_pay
2027
2039
  @samsung_pay = samsung_pay
2028
2040
  @satispay = satispay
2041
+ @scalapay = scalapay
2029
2042
  @sepa_debit = sepa_debit
2030
2043
  @sofort = sofort
2031
2044
  @swish = swish
@@ -2293,7 +2306,7 @@ module Stripe
2293
2306
  end
2294
2307
  # 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. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
2295
2308
  attr_accessor :application_fee_percent
2296
- # A future timestamp to anchor the subscription's billing cycle for new subscriptions. You can't set this parameter if `ui_mode` is `custom`.
2309
+ # A future timestamp to anchor the subscription's billing cycle for new subscriptions. You can't set this parameter if `ui_mode` is `elements`.
2297
2310
  attr_accessor :billing_cycle_anchor
2298
2311
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
2299
2312
  attr_accessor :billing_mode
@@ -2378,7 +2391,7 @@ module Stripe
2378
2391
  @display = display
2379
2392
  end
2380
2393
  end
2381
- # contains details about the Link wallet options.
2394
+ # contains details about the Link wallet options (Link is also known as Onelink in the UK).
2382
2395
  attr_accessor :link
2383
2396
 
2384
2397
  def initialize(link: nil)
@@ -2387,7 +2400,7 @@ module Stripe
2387
2400
  end
2388
2401
  # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing).
2389
2402
  attr_accessor :adaptive_pricing
2390
- # Configure actions after a Checkout Session has expired. You can't set this parameter if `ui_mode` is `custom`.
2403
+ # Configure actions after a Checkout Session has expired. You can't set this parameter if `ui_mode` is `elements`.
2391
2404
  attr_accessor :after_expiration
2392
2405
  # Enables user redeemable promotion codes.
2393
2406
  attr_accessor :allow_promotion_codes
@@ -2395,9 +2408,9 @@ module Stripe
2395
2408
  attr_accessor :automatic_tax
2396
2409
  # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`.
2397
2410
  attr_accessor :billing_address_collection
2398
- # The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is `custom`.
2411
+ # The branding settings for the Checkout Session. This parameter is not allowed if ui_mode is `elements`.
2399
2412
  attr_accessor :branding_settings
2400
- # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`.
2413
+ # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded_page` or `elements`.
2401
2414
  attr_accessor :cancel_url
2402
2415
  # A unique string to reference the Checkout Session. This can be a
2403
2416
  # customer ID, a cart ID, or similar, and can be used to reconcile the
@@ -2487,7 +2500,7 @@ module Stripe
2487
2500
  #
2488
2501
  # You can't set this parameter if `ui_mode` is `custom`.
2489
2502
  attr_accessor :optional_items
2490
- # Where the user is coming from. This informs the optimizations that are applied to the session. You can't set this parameter if `ui_mode` is `custom`.
2503
+ # Where the user is coming from. This informs the optimizations that are applied to the session. You can't set this parameter if `ui_mode` is `elements`.
2491
2504
  attr_accessor :origin_context
2492
2505
  # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode.
2493
2506
  attr_accessor :payment_intent_data
@@ -2525,10 +2538,10 @@ module Stripe
2525
2538
  # We recommend that you review your privacy policy and check with your legal contacts
2526
2539
  # before using this feature. Learn more about [collecting phone numbers with Checkout](https://docs.stripe.com/payments/checkout/phone-numbers).
2527
2540
  attr_accessor :phone_number_collection
2528
- # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
2541
+ # This parameter applies to `ui_mode: embedded_page`. Learn more about the [redirect behavior](https://docs.stripe.com/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`.
2529
2542
  attr_accessor :redirect_on_completion
2530
2543
  # The URL to redirect your customer back to after they authenticate or cancel their payment on the
2531
- # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom`
2544
+ # payment method's app or site. This parameter is required if `ui_mode` is `embedded_page` or `elements`
2532
2545
  # and redirect-based payment methods are enabled on the session.
2533
2546
  attr_accessor :return_url
2534
2547
  # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode.
@@ -2543,19 +2556,19 @@ module Stripe
2543
2556
  # to customize relevant text on the page, such as the submit button.
2544
2557
  # `submit_type` can only be specified on Checkout Sessions in
2545
2558
  # `payment` or `subscription` mode. If blank or `auto`, `pay` is used.
2546
- # You can't set this parameter if `ui_mode` is `custom`.
2559
+ # You can't set this parameter if `ui_mode` is `elements`.
2547
2560
  attr_accessor :submit_type
2548
2561
  # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
2549
2562
  attr_accessor :subscription_data
2550
2563
  # The URL to which Stripe should send customers when payment or setup
2551
2564
  # is complete.
2552
- # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use
2565
+ # This parameter is not allowed if ui_mode is `embedded_page` or `elements`. If you'd like to use
2553
2566
  # information from the successful Checkout Session on your page, read the
2554
2567
  # guide on [customizing your success page](https://docs.stripe.com/payments/checkout/custom-success-page).
2555
2568
  attr_accessor :success_url
2556
2569
  # Controls tax ID collection during checkout.
2557
2570
  attr_accessor :tax_id_collection
2558
- # The UI mode of the Session. Defaults to `hosted`.
2571
+ # The UI mode of the Session. Defaults to `hosted_page`.
2559
2572
  attr_accessor :ui_mode
2560
2573
  # Wallet-specific configuration.
2561
2574
  attr_accessor :wallet_options
@@ -103,6 +103,7 @@ module Stripe
103
103
  end
104
104
  end
105
105
 
106
+ class Bizum < ::Stripe::RequestParams; end
106
107
  class Blik < ::Stripe::RequestParams; end
107
108
 
108
109
  class Boleto < ::Stripe::RequestParams
@@ -270,6 +271,7 @@ module Stripe
270
271
  class RevolutPay < ::Stripe::RequestParams; end
271
272
  class SamsungPay < ::Stripe::RequestParams; end
272
273
  class Satispay < ::Stripe::RequestParams; end
274
+ class Scalapay < ::Stripe::RequestParams; end
273
275
 
274
276
  class SepaDebit < ::Stripe::RequestParams
275
277
  # IBAN of the bank account.
@@ -372,6 +374,8 @@ module Stripe
372
374
  attr_accessor :billie
373
375
  # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
374
376
  attr_accessor :billing_details
377
+ # If this is a `bizum` PaymentMethod, this hash contains details about the Bizum payment method.
378
+ attr_accessor :bizum
375
379
  # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
376
380
  attr_accessor :blik
377
381
  # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
@@ -402,7 +406,7 @@ module Stripe
402
406
  attr_accessor :konbini
403
407
  # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
404
408
  attr_accessor :kr_card
405
- # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
409
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method (Link is also known as Onelink in the UK).
406
410
  attr_accessor :link
407
411
  # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
408
412
  attr_accessor :mb_way
@@ -442,6 +446,8 @@ module Stripe
442
446
  attr_accessor :samsung_pay
443
447
  # If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
444
448
  attr_accessor :satispay
449
+ # If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay payment method.
450
+ attr_accessor :scalapay
445
451
  # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
446
452
  attr_accessor :sepa_debit
447
453
  # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
@@ -476,6 +482,7 @@ module Stripe
476
482
  bancontact: nil,
477
483
  billie: nil,
478
484
  billing_details: nil,
485
+ bizum: nil,
479
486
  blik: nil,
480
487
  boleto: nil,
481
488
  cashapp: nil,
@@ -511,6 +518,7 @@ module Stripe
511
518
  revolut_pay: nil,
512
519
  samsung_pay: nil,
513
520
  satispay: nil,
521
+ scalapay: nil,
514
522
  sepa_debit: nil,
515
523
  sofort: nil,
516
524
  sunbit: nil,
@@ -534,6 +542,7 @@ module Stripe
534
542
  @bancontact = bancontact
535
543
  @billie = billie
536
544
  @billing_details = billing_details
545
+ @bizum = bizum
537
546
  @blik = blik
538
547
  @boleto = boleto
539
548
  @cashapp = cashapp
@@ -569,6 +578,7 @@ module Stripe
569
578
  @revolut_pay = revolut_pay
570
579
  @samsung_pay = samsung_pay
571
580
  @satispay = satispay
581
+ @scalapay = scalapay
572
582
  @sepa_debit = sepa_debit
573
583
  @sofort = sofort
574
584
  @sunbit = sunbit
@@ -413,6 +413,8 @@ module Stripe
413
413
  @field_encodings = { unit_amount_decimal: :decimal_string }
414
414
  end
415
415
  end
416
+ # Controls whether discounts apply to this invoice item. Defaults to true if no value is provided.
417
+ attr_accessor :discountable
416
418
  # The coupons to redeem into discounts for the item.
417
419
  attr_accessor :discounts
418
420
  # Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
@@ -429,6 +431,7 @@ module Stripe
429
431
  attr_accessor :tax_rates
430
432
 
431
433
  def initialize(
434
+ discountable: nil,
432
435
  discounts: nil,
433
436
  metadata: nil,
434
437
  period: nil,
@@ -437,6 +440,7 @@ module Stripe
437
440
  quantity: nil,
438
441
  tax_rates: nil
439
442
  )
443
+ @discountable = discountable
440
444
  @discounts = discounts
441
445
  @metadata = metadata
442
446
  @period = period
@@ -851,6 +855,58 @@ module Stripe
851
855
  end
852
856
  end
853
857
 
858
+ class BillingSchedule < ::Stripe::RequestParams
859
+ class AppliesTo < ::Stripe::RequestParams
860
+ # The ID of the price object.
861
+ attr_accessor :price
862
+ # Controls which subscription items the billing schedule applies to.
863
+ attr_accessor :type
864
+
865
+ def initialize(price: nil, type: nil)
866
+ @price = price
867
+ @type = type
868
+ end
869
+ end
870
+
871
+ class BillUntil < ::Stripe::RequestParams
872
+ class Duration < ::Stripe::RequestParams
873
+ # Specifies billing duration. Either `day`, `week`, `month` or `year`.
874
+ attr_accessor :interval
875
+ # The multiplier applied to the interval.
876
+ attr_accessor :interval_count
877
+
878
+ def initialize(interval: nil, interval_count: nil)
879
+ @interval = interval
880
+ @interval_count = interval_count
881
+ end
882
+ end
883
+ # Specifies the billing period.
884
+ attr_accessor :duration
885
+ # The end date of the billing schedule.
886
+ attr_accessor :timestamp
887
+ # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
888
+ attr_accessor :type
889
+
890
+ def initialize(duration: nil, timestamp: nil, type: nil)
891
+ @duration = duration
892
+ @timestamp = timestamp
893
+ @type = type
894
+ end
895
+ end
896
+ # Configure billing schedule differently for individual subscription items.
897
+ attr_accessor :applies_to
898
+ # The end date for the billing schedule.
899
+ attr_accessor :bill_until
900
+ # Specify a key for the billing schedule. Must be unique to this field, alphanumeric, and up to 200 characters. If not provided, a unique key will be generated.
901
+ attr_accessor :key
902
+
903
+ def initialize(applies_to: nil, bill_until: nil, key: nil)
904
+ @applies_to = applies_to
905
+ @bill_until = bill_until
906
+ @key = key
907
+ end
908
+ end
909
+
854
910
  class Item < ::Stripe::RequestParams
855
911
  class BillingThresholds < ::Stripe::RequestParams
856
912
  # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte))
@@ -980,6 +1036,8 @@ module Stripe
980
1036
  attr_accessor :billing_cycle_anchor
981
1037
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
982
1038
  attr_accessor :billing_mode
1039
+ # Sets the billing schedules for the subscription.
1040
+ attr_accessor :billing_schedules
983
1041
  # 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.
984
1042
  attr_accessor :cancel_at
985
1043
  # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
@@ -1004,6 +1062,7 @@ module Stripe
1004
1062
  def initialize(
1005
1063
  billing_cycle_anchor: nil,
1006
1064
  billing_mode: nil,
1065
+ billing_schedules: nil,
1007
1066
  cancel_at: nil,
1008
1067
  cancel_at_period_end: nil,
1009
1068
  cancel_now: nil,
@@ -1017,6 +1076,7 @@ module Stripe
1017
1076
  )
1018
1077
  @billing_cycle_anchor = billing_cycle_anchor
1019
1078
  @billing_mode = billing_mode
1079
+ @billing_schedules = billing_schedules
1020
1080
  @cancel_at = cancel_at
1021
1081
  @cancel_at_period_end = cancel_at_period_end
1022
1082
  @cancel_now = cancel_now
@@ -133,9 +133,9 @@ module Stripe
133
133
  class Shipping < ::Stripe::RequestParams
134
134
  # If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than or equal to 0.
135
135
  attr_accessor :amount
136
- # If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed.
136
+ # If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens and spaces are allowed.
137
137
  attr_accessor :from_postal_code
138
- # If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed.
138
+ # If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens and spaces are allowed.
139
139
  attr_accessor :to_postal_code
140
140
 
141
141
  def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil)
@@ -133,9 +133,9 @@ module Stripe
133
133
  class Shipping < ::Stripe::RequestParams
134
134
  # If a physical good is being shipped, the cost of shipping represented in the [smallest currency unit](https://docs.stripe.com/currencies#zero-decimal). An integer greater than or equal to 0.
135
135
  attr_accessor :amount
136
- # If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens are allowed.
136
+ # If a physical good is being shipped, the postal code of where it is being shipped from. At most 10 alphanumeric characters long, hyphens and spaces are allowed.
137
137
  attr_accessor :from_postal_code
138
- # If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens are allowed.
138
+ # If a physical good is being shipped, the postal code of where it is being shipped to. At most 10 alphanumeric characters long, hyphens and spaces are allowed.
139
139
  attr_accessor :to_postal_code
140
140
 
141
141
  def initialize(amount: nil, from_postal_code: nil, to_postal_code: nil)
@@ -367,6 +367,7 @@ module Stripe
367
367
  end
368
368
  end
369
369
 
370
+ class Bizum < ::Stripe::RequestParams; end
370
371
  class Blik < ::Stripe::RequestParams; end
371
372
 
372
373
  class Boleto < ::Stripe::RequestParams
@@ -534,6 +535,7 @@ module Stripe
534
535
  class RevolutPay < ::Stripe::RequestParams; end
535
536
  class SamsungPay < ::Stripe::RequestParams; end
536
537
  class Satispay < ::Stripe::RequestParams; end
538
+ class Scalapay < ::Stripe::RequestParams; end
537
539
 
538
540
  class SepaDebit < ::Stripe::RequestParams
539
541
  # IBAN of the bank account.
@@ -636,6 +638,8 @@ module Stripe
636
638
  attr_accessor :billie
637
639
  # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
638
640
  attr_accessor :billing_details
641
+ # If this is a `bizum` PaymentMethod, this hash contains details about the Bizum payment method.
642
+ attr_accessor :bizum
639
643
  # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
640
644
  attr_accessor :blik
641
645
  # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
@@ -666,7 +670,7 @@ module Stripe
666
670
  attr_accessor :konbini
667
671
  # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
668
672
  attr_accessor :kr_card
669
- # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
673
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method (Link is also known as Onelink in the UK).
670
674
  attr_accessor :link
671
675
  # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
672
676
  attr_accessor :mb_way
@@ -706,6 +710,8 @@ module Stripe
706
710
  attr_accessor :samsung_pay
707
711
  # If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
708
712
  attr_accessor :satispay
713
+ # If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay payment method.
714
+ attr_accessor :scalapay
709
715
  # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
710
716
  attr_accessor :sepa_debit
711
717
  # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
@@ -740,6 +746,7 @@ module Stripe
740
746
  bancontact: nil,
741
747
  billie: nil,
742
748
  billing_details: nil,
749
+ bizum: nil,
743
750
  blik: nil,
744
751
  boleto: nil,
745
752
  cashapp: nil,
@@ -775,6 +782,7 @@ module Stripe
775
782
  revolut_pay: nil,
776
783
  samsung_pay: nil,
777
784
  satispay: nil,
785
+ scalapay: nil,
778
786
  sepa_debit: nil,
779
787
  sofort: nil,
780
788
  sunbit: nil,
@@ -798,6 +806,7 @@ module Stripe
798
806
  @bancontact = bancontact
799
807
  @billie = billie
800
808
  @billing_details = billing_details
809
+ @bizum = bizum
801
810
  @blik = blik
802
811
  @boleto = boleto
803
812
  @cashapp = cashapp
@@ -833,6 +842,7 @@ module Stripe
833
842
  @revolut_pay = revolut_pay
834
843
  @samsung_pay = samsung_pay
835
844
  @satispay = satispay
845
+ @scalapay = scalapay
836
846
  @sepa_debit = sepa_debit
837
847
  @sofort = sofort
838
848
  @sunbit = sunbit
@@ -1093,6 +1103,8 @@ module Stripe
1093
1103
  end
1094
1104
  end
1095
1105
 
1106
+ class Bizum < ::Stripe::RequestParams; end
1107
+
1096
1108
  class Blik < ::Stripe::RequestParams
1097
1109
  # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation.
1098
1110
  attr_accessor :code
@@ -2180,6 +2192,19 @@ module Stripe
2180
2192
  end
2181
2193
  end
2182
2194
 
2195
+ class Scalapay < ::Stripe::RequestParams
2196
+ # Controls when the funds are captured from the customer's account.
2197
+ #
2198
+ # 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.
2199
+ #
2200
+ # 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.
2201
+ attr_accessor :capture_method
2202
+
2203
+ def initialize(capture_method: nil)
2204
+ @capture_method = capture_method
2205
+ end
2206
+ end
2207
+
2183
2208
  class SepaDebit < ::Stripe::RequestParams
2184
2209
  class MandateOptions < ::Stripe::RequestParams
2185
2210
  # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'.
@@ -2442,6 +2467,8 @@ module Stripe
2442
2467
  attr_accessor :bancontact
2443
2468
  # If this is a `billie` PaymentMethod, this sub-hash contains details about the Billie payment method options.
2444
2469
  attr_accessor :billie
2470
+ # If this is a `bizum` PaymentMethod, this sub-hash contains details about the Bizum payment method options.
2471
+ attr_accessor :bizum
2445
2472
  # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options.
2446
2473
  attr_accessor :blik
2447
2474
  # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options.
@@ -2476,7 +2503,7 @@ module Stripe
2476
2503
  attr_accessor :konbini
2477
2504
  # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options.
2478
2505
  attr_accessor :kr_card
2479
- # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
2506
+ # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options (Link is also known as Onelink in the UK).
2480
2507
  attr_accessor :link
2481
2508
  # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options.
2482
2509
  attr_accessor :mb_way
@@ -2512,6 +2539,8 @@ module Stripe
2512
2539
  attr_accessor :samsung_pay
2513
2540
  # If this is a `satispay` PaymentMethod, this sub-hash contains details about the Satispay payment method options.
2514
2541
  attr_accessor :satispay
2542
+ # If this is a `scalapay` PaymentMethod, this sub-hash contains details about the ScalaPay payment method options.
2543
+ attr_accessor :scalapay
2515
2544
  # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options.
2516
2545
  attr_accessor :sepa_debit
2517
2546
  # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options.
@@ -2540,6 +2569,7 @@ module Stripe
2540
2569
  bacs_debit: nil,
2541
2570
  bancontact: nil,
2542
2571
  billie: nil,
2572
+ bizum: nil,
2543
2573
  blik: nil,
2544
2574
  boleto: nil,
2545
2575
  card: nil,
@@ -2575,6 +2605,7 @@ module Stripe
2575
2605
  revolut_pay: nil,
2576
2606
  samsung_pay: nil,
2577
2607
  satispay: nil,
2608
+ scalapay: nil,
2578
2609
  sepa_debit: nil,
2579
2610
  sofort: nil,
2580
2611
  swish: nil,
@@ -2594,6 +2625,7 @@ module Stripe
2594
2625
  @bacs_debit = bacs_debit
2595
2626
  @bancontact = bancontact
2596
2627
  @billie = billie
2628
+ @bizum = bizum
2597
2629
  @blik = blik
2598
2630
  @boleto = boleto
2599
2631
  @card = card
@@ -2629,6 +2661,7 @@ module Stripe
2629
2661
  @revolut_pay = revolut_pay
2630
2662
  @samsung_pay = samsung_pay
2631
2663
  @satispay = satispay
2664
+ @scalapay = scalapay
2632
2665
  @sepa_debit = sepa_debit
2633
2666
  @sofort = sofort
2634
2667
  @swish = swish
@@ -2721,7 +2754,7 @@ module Stripe
2721
2754
  attr_accessor :mandate
2722
2755
  # Attribute for param field mandate_data
2723
2756
  attr_accessor :mandate_data
2724
- # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://docs.stripe.com/payments/cards/charging-saved-cards).
2757
+ # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect payment method details and [charge them later](https://docs.stripe.com/payments/save-during-payment).
2725
2758
  attr_accessor :off_session
2726
2759
  # Provides industry-specific information about the charge.
2727
2760
  attr_accessor :payment_details