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
@@ -3,6 +3,8 @@
3
3
 
4
4
  module Stripe
5
5
  class PaymentMethodConfigurationListParams < ::Stripe::RequestParams
6
+ # Whether the configuration is active.
7
+ attr_accessor :active
6
8
  # The Connect application to filter by.
7
9
  attr_accessor :application
8
10
  # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
@@ -15,12 +17,14 @@ module Stripe
15
17
  attr_accessor :starting_after
16
18
 
17
19
  def initialize(
20
+ active: nil,
18
21
  application: nil,
19
22
  ending_before: nil,
20
23
  expand: nil,
21
24
  limit: nil,
22
25
  starting_after: nil
23
26
  )
27
+ @active = active
24
28
  @application = application
25
29
  @ending_before = ending_before
26
30
  @expand = expand
@@ -207,6 +207,23 @@ module Stripe
207
207
  end
208
208
  end
209
209
 
210
+ class Bizum < ::Stripe::RequestParams
211
+ class DisplayPreference < ::Stripe::RequestParams
212
+ # The account's preference for whether or not to display this payment method.
213
+ attr_accessor :preference
214
+
215
+ def initialize(preference: nil)
216
+ @preference = preference
217
+ end
218
+ end
219
+ # Whether or not the payment method should be displayed.
220
+ attr_accessor :display_preference
221
+
222
+ def initialize(display_preference: nil)
223
+ @display_preference = display_preference
224
+ end
225
+ end
226
+
210
227
  class Blik < ::Stripe::RequestParams
211
228
  class DisplayPreference < ::Stripe::RequestParams
212
229
  # The account's preference for whether or not to display this payment method.
@@ -836,6 +853,23 @@ module Stripe
836
853
  end
837
854
  end
838
855
 
856
+ class Scalapay < ::Stripe::RequestParams
857
+ class DisplayPreference < ::Stripe::RequestParams
858
+ # The account's preference for whether or not to display this payment method.
859
+ attr_accessor :preference
860
+
861
+ def initialize(preference: nil)
862
+ @preference = preference
863
+ end
864
+ end
865
+ # Whether or not the payment method should be displayed.
866
+ attr_accessor :display_preference
867
+
868
+ def initialize(display_preference: nil)
869
+ @display_preference = display_preference
870
+ end
871
+ end
872
+
839
873
  class SepaDebit < ::Stripe::RequestParams
840
874
  class DisplayPreference < ::Stripe::RequestParams
841
875
  # The account's preference for whether or not to display this payment method.
@@ -1014,6 +1048,8 @@ module Stripe
1014
1048
  attr_accessor :bancontact
1015
1049
  # Billie is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method that offers businesses Pay by Invoice where they offer payment terms ranging from 7-120 days. Customers are redirected from your website or app, authorize the payment with Billie, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
1016
1050
  attr_accessor :billie
1051
+ # To enable Bizum, buyers need a Spanish IBAN from a bank connected to Bizum. Within their banking app, they can enable Bizum and link their mobile number to their IBAN.
1052
+ attr_accessor :bizum
1017
1053
  # BLIK is a [single use](https://docs.stripe.com/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://docs.stripe.com/payments/blik) for more details.
1018
1054
  attr_accessor :blik
1019
1055
  # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://docs.stripe.com/payments/boleto) for more details.
@@ -1090,8 +1126,10 @@ module Stripe
1090
1126
  attr_accessor :revolut_pay
1091
1127
  # Samsung Pay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage local wallet available in South Korea.
1092
1128
  attr_accessor :samsung_pay
1093
- # Satispay is a [single-use](https://docs.stripe.com/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
1129
+ # Satispay is a [single-use](/payments/payment-methods#usage) payment method where customers are required to [authenticate](/payments/payment-methods#customer-actions) their payment. Customers pay by being redirected from your website or app, authorizing the payment with Satispay, then returning to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
1094
1130
  attr_accessor :satispay
1131
+ # Scalapay is a [single-use](/payments/payment-methods#usage) payment method that lets customers pay in 3 or 4 installments. Customers are redirected from your website or app, authorize the payment with Scalapay, then return to your website or app. You get [immediate notification](/payments/payment-methods#payment-notification) of whether the payment succeeded or failed.
1132
+ attr_accessor :scalapay
1095
1133
  # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://docs.stripe.com/payments/sepa-debit) for more details.
1096
1134
  attr_accessor :sepa_debit
1097
1135
  # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://docs.stripe.com/payments/sofort) for more details.
@@ -1125,6 +1163,7 @@ module Stripe
1125
1163
  bacs_debit: nil,
1126
1164
  bancontact: nil,
1127
1165
  billie: nil,
1166
+ bizum: nil,
1128
1167
  blik: nil,
1129
1168
  boleto: nil,
1130
1169
  card: nil,
@@ -1164,6 +1203,7 @@ module Stripe
1164
1203
  revolut_pay: nil,
1165
1204
  samsung_pay: nil,
1166
1205
  satispay: nil,
1206
+ scalapay: nil,
1167
1207
  sepa_debit: nil,
1168
1208
  sofort: nil,
1169
1209
  sunbit: nil,
@@ -1187,6 +1227,7 @@ module Stripe
1187
1227
  @bacs_debit = bacs_debit
1188
1228
  @bancontact = bancontact
1189
1229
  @billie = billie
1230
+ @bizum = bizum
1190
1231
  @blik = blik
1191
1232
  @boleto = boleto
1192
1233
  @card = card
@@ -1226,6 +1267,7 @@ module Stripe
1226
1267
  @revolut_pay = revolut_pay
1227
1268
  @samsung_pay = samsung_pay
1228
1269
  @satispay = satispay
1270
+ @scalapay = scalapay
1229
1271
  @sepa_debit = sepa_debit
1230
1272
  @sofort = sofort
1231
1273
  @sunbit = sunbit
@@ -102,6 +102,7 @@ module Stripe
102
102
  end
103
103
  end
104
104
 
105
+ class Bizum < ::Stripe::RequestParams; end
105
106
  class Blik < ::Stripe::RequestParams; end
106
107
 
107
108
  class Boleto < ::Stripe::RequestParams
@@ -318,6 +319,7 @@ module Stripe
318
319
  class RevolutPay < ::Stripe::RequestParams; end
319
320
  class SamsungPay < ::Stripe::RequestParams; end
320
321
  class Satispay < ::Stripe::RequestParams; end
322
+ class Scalapay < ::Stripe::RequestParams; end
321
323
 
322
324
  class SepaDebit < ::Stripe::RequestParams
323
325
  # IBAN of the bank account.
@@ -420,6 +422,8 @@ module Stripe
420
422
  attr_accessor :billie
421
423
  # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
422
424
  attr_accessor :billing_details
425
+ # If this is a `bizum` PaymentMethod, this hash contains details about the Bizum payment method.
426
+ attr_accessor :bizum
423
427
  # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
424
428
  attr_accessor :blik
425
429
  # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
@@ -458,7 +462,7 @@ module Stripe
458
462
  attr_accessor :konbini
459
463
  # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
460
464
  attr_accessor :kr_card
461
- # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
465
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method (Link is also known as Onelink in the UK).
462
466
  attr_accessor :link
463
467
  # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
464
468
  attr_accessor :mb_way
@@ -500,6 +504,8 @@ module Stripe
500
504
  attr_accessor :samsung_pay
501
505
  # If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
502
506
  attr_accessor :satispay
507
+ # If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay payment method.
508
+ attr_accessor :scalapay
503
509
  # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
504
510
  attr_accessor :sepa_debit
505
511
  # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
@@ -534,6 +540,7 @@ module Stripe
534
540
  bancontact: nil,
535
541
  billie: nil,
536
542
  billing_details: nil,
543
+ bizum: nil,
537
544
  blik: nil,
538
545
  boleto: nil,
539
546
  card: nil,
@@ -574,6 +581,7 @@ module Stripe
574
581
  revolut_pay: nil,
575
582
  samsung_pay: nil,
576
583
  satispay: nil,
584
+ scalapay: nil,
577
585
  sepa_debit: nil,
578
586
  sofort: nil,
579
587
  sunbit: nil,
@@ -597,6 +605,7 @@ module Stripe
597
605
  @bancontact = bancontact
598
606
  @billie = billie
599
607
  @billing_details = billing_details
608
+ @bizum = bizum
600
609
  @blik = blik
601
610
  @boleto = boleto
602
611
  @card = card
@@ -637,6 +646,7 @@ module Stripe
637
646
  @revolut_pay = revolut_pay
638
647
  @samsung_pay = samsung_pay
639
648
  @satispay = satispay
649
+ @scalapay = scalapay
640
650
  @sepa_debit = sepa_debit
641
651
  @sofort = sofort
642
652
  @sunbit = sunbit
@@ -21,7 +21,7 @@ module Stripe
21
21
  attr_accessor :payout_method
22
22
  # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`.
23
23
  attr_accessor :source_type
24
- # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all.
24
+ # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. For US ACH payouts, this maps to the ACH Company Entry Description field, which the NACHA standard limits to 10 characters. Stripe truncates descriptors longer than 10 characters for US ACH payouts.
25
25
  attr_accessor :statement_descriptor
26
26
 
27
27
  def initialize(
@@ -142,6 +142,7 @@ module Stripe
142
142
  end
143
143
  end
144
144
 
145
+ class Bizum < ::Stripe::RequestParams; end
145
146
  class Blik < ::Stripe::RequestParams; end
146
147
 
147
148
  class Boleto < ::Stripe::RequestParams
@@ -309,6 +310,7 @@ module Stripe
309
310
  class RevolutPay < ::Stripe::RequestParams; end
310
311
  class SamsungPay < ::Stripe::RequestParams; end
311
312
  class Satispay < ::Stripe::RequestParams; end
313
+ class Scalapay < ::Stripe::RequestParams; end
312
314
 
313
315
  class SepaDebit < ::Stripe::RequestParams
314
316
  # IBAN of the bank account.
@@ -411,6 +413,8 @@ module Stripe
411
413
  attr_accessor :billie
412
414
  # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
413
415
  attr_accessor :billing_details
416
+ # If this is a `bizum` PaymentMethod, this hash contains details about the Bizum payment method.
417
+ attr_accessor :bizum
414
418
  # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
415
419
  attr_accessor :blik
416
420
  # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
@@ -441,7 +445,7 @@ module Stripe
441
445
  attr_accessor :konbini
442
446
  # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
443
447
  attr_accessor :kr_card
444
- # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
448
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method (Link is also known as Onelink in the UK).
445
449
  attr_accessor :link
446
450
  # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
447
451
  attr_accessor :mb_way
@@ -481,6 +485,8 @@ module Stripe
481
485
  attr_accessor :samsung_pay
482
486
  # If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
483
487
  attr_accessor :satispay
488
+ # If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay payment method.
489
+ attr_accessor :scalapay
484
490
  # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
485
491
  attr_accessor :sepa_debit
486
492
  # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
@@ -515,6 +521,7 @@ module Stripe
515
521
  bancontact: nil,
516
522
  billie: nil,
517
523
  billing_details: nil,
524
+ bizum: nil,
518
525
  blik: nil,
519
526
  boleto: nil,
520
527
  cashapp: nil,
@@ -550,6 +557,7 @@ module Stripe
550
557
  revolut_pay: nil,
551
558
  samsung_pay: nil,
552
559
  satispay: nil,
560
+ scalapay: nil,
553
561
  sepa_debit: nil,
554
562
  sofort: nil,
555
563
  sunbit: nil,
@@ -573,6 +581,7 @@ module Stripe
573
581
  @bancontact = bancontact
574
582
  @billie = billie
575
583
  @billing_details = billing_details
584
+ @bizum = bizum
576
585
  @blik = blik
577
586
  @boleto = boleto
578
587
  @cashapp = cashapp
@@ -608,6 +617,7 @@ module Stripe
608
617
  @revolut_pay = revolut_pay
609
618
  @samsung_pay = samsung_pay
610
619
  @satispay = satispay
620
+ @scalapay = scalapay
611
621
  @sepa_debit = sepa_debit
612
622
  @sofort = sofort
613
623
  @sunbit = sunbit
@@ -684,6 +694,8 @@ module Stripe
684
694
  end
685
695
  end
686
696
 
697
+ class Bizum < ::Stripe::RequestParams; end
698
+
687
699
  class Card < ::Stripe::RequestParams
688
700
  class MandateOptions < ::Stripe::RequestParams
689
701
  # Amount to be charged for future payments, specified in the presentment currency.
@@ -1140,13 +1152,15 @@ module Stripe
1140
1152
  attr_accessor :amazon_pay
1141
1153
  # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
1142
1154
  attr_accessor :bacs_debit
1155
+ # If this is a `bizum` SetupIntent, this sub-hash contains details about the Bizum payment method options.
1156
+ attr_accessor :bizum
1143
1157
  # Configuration for any card setup attempted on this SetupIntent.
1144
1158
  attr_accessor :card
1145
1159
  # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
1146
1160
  attr_accessor :card_present
1147
1161
  # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
1148
1162
  attr_accessor :klarna
1149
- # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
1163
+ # 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).
1150
1164
  attr_accessor :link
1151
1165
  # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
1152
1166
  attr_accessor :paypal
@@ -1165,6 +1179,7 @@ module Stripe
1165
1179
  acss_debit: nil,
1166
1180
  amazon_pay: nil,
1167
1181
  bacs_debit: nil,
1182
+ bizum: nil,
1168
1183
  card: nil,
1169
1184
  card_present: nil,
1170
1185
  klarna: nil,
@@ -1179,6 +1194,7 @@ module Stripe
1179
1194
  @acss_debit = acss_debit
1180
1195
  @amazon_pay = amazon_pay
1181
1196
  @bacs_debit = bacs_debit
1197
+ @bizum = bizum
1182
1198
  @card = card
1183
1199
  @card_present = card_present
1184
1200
  @klarna = klarna
@@ -156,6 +156,7 @@ module Stripe
156
156
  end
157
157
  end
158
158
 
159
+ class Bizum < ::Stripe::RequestParams; end
159
160
  class Blik < ::Stripe::RequestParams; end
160
161
 
161
162
  class Boleto < ::Stripe::RequestParams
@@ -323,6 +324,7 @@ module Stripe
323
324
  class RevolutPay < ::Stripe::RequestParams; end
324
325
  class SamsungPay < ::Stripe::RequestParams; end
325
326
  class Satispay < ::Stripe::RequestParams; end
327
+ class Scalapay < ::Stripe::RequestParams; end
326
328
 
327
329
  class SepaDebit < ::Stripe::RequestParams
328
330
  # IBAN of the bank account.
@@ -425,6 +427,8 @@ module Stripe
425
427
  attr_accessor :billie
426
428
  # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
427
429
  attr_accessor :billing_details
430
+ # If this is a `bizum` PaymentMethod, this hash contains details about the Bizum payment method.
431
+ attr_accessor :bizum
428
432
  # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
429
433
  attr_accessor :blik
430
434
  # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
@@ -455,7 +459,7 @@ module Stripe
455
459
  attr_accessor :konbini
456
460
  # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
457
461
  attr_accessor :kr_card
458
- # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method.
462
+ # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method (Link is also known as Onelink in the UK).
459
463
  attr_accessor :link
460
464
  # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
461
465
  attr_accessor :mb_way
@@ -495,6 +499,8 @@ module Stripe
495
499
  attr_accessor :samsung_pay
496
500
  # If this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
497
501
  attr_accessor :satispay
502
+ # If this is a Scalapay PaymentMethod, this hash contains details about the Scalapay payment method.
503
+ attr_accessor :scalapay
498
504
  # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
499
505
  attr_accessor :sepa_debit
500
506
  # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
@@ -529,6 +535,7 @@ module Stripe
529
535
  bancontact: nil,
530
536
  billie: nil,
531
537
  billing_details: nil,
538
+ bizum: nil,
532
539
  blik: nil,
533
540
  boleto: nil,
534
541
  cashapp: nil,
@@ -564,6 +571,7 @@ module Stripe
564
571
  revolut_pay: nil,
565
572
  samsung_pay: nil,
566
573
  satispay: nil,
574
+ scalapay: nil,
567
575
  sepa_debit: nil,
568
576
  sofort: nil,
569
577
  sunbit: nil,
@@ -587,6 +595,7 @@ module Stripe
587
595
  @bancontact = bancontact
588
596
  @billie = billie
589
597
  @billing_details = billing_details
598
+ @bizum = bizum
590
599
  @blik = blik
591
600
  @boleto = boleto
592
601
  @cashapp = cashapp
@@ -622,6 +631,7 @@ module Stripe
622
631
  @revolut_pay = revolut_pay
623
632
  @samsung_pay = samsung_pay
624
633
  @satispay = satispay
634
+ @scalapay = scalapay
625
635
  @sepa_debit = sepa_debit
626
636
  @sofort = sofort
627
637
  @sunbit = sunbit
@@ -698,6 +708,8 @@ module Stripe
698
708
  end
699
709
  end
700
710
 
711
+ class Bizum < ::Stripe::RequestParams; end
712
+
701
713
  class Card < ::Stripe::RequestParams
702
714
  class MandateOptions < ::Stripe::RequestParams
703
715
  # Amount to be charged for future payments, specified in the presentment currency.
@@ -1154,13 +1166,15 @@ module Stripe
1154
1166
  attr_accessor :amazon_pay
1155
1167
  # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
1156
1168
  attr_accessor :bacs_debit
1169
+ # If this is a `bizum` SetupIntent, this sub-hash contains details about the Bizum payment method options.
1170
+ attr_accessor :bizum
1157
1171
  # Configuration for any card setup attempted on this SetupIntent.
1158
1172
  attr_accessor :card
1159
1173
  # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
1160
1174
  attr_accessor :card_present
1161
1175
  # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
1162
1176
  attr_accessor :klarna
1163
- # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
1177
+ # 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).
1164
1178
  attr_accessor :link
1165
1179
  # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
1166
1180
  attr_accessor :paypal
@@ -1179,6 +1193,7 @@ module Stripe
1179
1193
  acss_debit: nil,
1180
1194
  amazon_pay: nil,
1181
1195
  bacs_debit: nil,
1196
+ bizum: nil,
1182
1197
  card: nil,
1183
1198
  card_present: nil,
1184
1199
  klarna: nil,
@@ -1193,6 +1208,7 @@ module Stripe
1193
1208
  @acss_debit = acss_debit
1194
1209
  @amazon_pay = amazon_pay
1195
1210
  @bacs_debit = bacs_debit
1211
+ @bizum = bizum
1196
1212
  @card = card
1197
1213
  @card_present = card_present
1198
1214
  @klarna = klarna
@@ -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
@@ -645,6 +655,8 @@ module Stripe
645
655
  end
646
656
  end
647
657
 
658
+ class Bizum < ::Stripe::RequestParams; end
659
+
648
660
  class Card < ::Stripe::RequestParams
649
661
  class MandateOptions < ::Stripe::RequestParams
650
662
  # Amount to be charged for future payments, specified in the presentment currency.
@@ -1101,13 +1113,15 @@ module Stripe
1101
1113
  attr_accessor :amazon_pay
1102
1114
  # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options.
1103
1115
  attr_accessor :bacs_debit
1116
+ # If this is a `bizum` SetupIntent, this sub-hash contains details about the Bizum payment method options.
1117
+ attr_accessor :bizum
1104
1118
  # Configuration for any card setup attempted on this SetupIntent.
1105
1119
  attr_accessor :card
1106
1120
  # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options.
1107
1121
  attr_accessor :card_present
1108
1122
  # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method options.
1109
1123
  attr_accessor :klarna
1110
- # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options.
1124
+ # 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).
1111
1125
  attr_accessor :link
1112
1126
  # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options.
1113
1127
  attr_accessor :paypal
@@ -1126,6 +1140,7 @@ module Stripe
1126
1140
  acss_debit: nil,
1127
1141
  amazon_pay: nil,
1128
1142
  bacs_debit: nil,
1143
+ bizum: nil,
1129
1144
  card: nil,
1130
1145
  card_present: nil,
1131
1146
  klarna: nil,
@@ -1140,6 +1155,7 @@ module Stripe
1140
1155
  @acss_debit = acss_debit
1141
1156
  @amazon_pay = amazon_pay
1142
1157
  @bacs_debit = bacs_debit
1158
+ @bizum = bizum
1143
1159
  @card = card
1144
1160
  @card_present = card_present
1145
1161
  @klarna = klarna
@@ -84,6 +84,8 @@ module Stripe
84
84
  @field_encodings = { unit_amount_decimal: :decimal_string }
85
85
  end
86
86
  end
87
+ # Controls whether discounts apply to this invoice item. Defaults to true if no value is provided.
88
+ attr_accessor :discountable
87
89
  # The coupons to redeem into discounts for the item.
88
90
  attr_accessor :discounts
89
91
  # 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`.
@@ -100,6 +102,7 @@ module Stripe
100
102
  attr_accessor :tax_rates
101
103
 
102
104
  def initialize(
105
+ discountable: nil,
103
106
  discounts: nil,
104
107
  metadata: nil,
105
108
  period: nil,
@@ -108,6 +111,7 @@ module Stripe
108
111
  quantity: nil,
109
112
  tax_rates: nil
110
113
  )
114
+ @discountable = discountable
111
115
  @discounts = discounts
112
116
  @metadata = metadata
113
117
  @period = period
@@ -188,6 +192,58 @@ module Stripe
188
192
  end
189
193
  end
190
194
 
195
+ class BillingSchedule < ::Stripe::RequestParams
196
+ class AppliesTo < ::Stripe::RequestParams
197
+ # The ID of the price object.
198
+ attr_accessor :price
199
+ # Controls which subscription items the billing schedule applies to.
200
+ attr_accessor :type
201
+
202
+ def initialize(price: nil, type: nil)
203
+ @price = price
204
+ @type = type
205
+ end
206
+ end
207
+
208
+ class BillUntil < ::Stripe::RequestParams
209
+ class Duration < ::Stripe::RequestParams
210
+ # Specifies billing duration. Either `day`, `week`, `month` or `year`.
211
+ attr_accessor :interval
212
+ # The multiplier applied to the interval.
213
+ attr_accessor :interval_count
214
+
215
+ def initialize(interval: nil, interval_count: nil)
216
+ @interval = interval
217
+ @interval_count = interval_count
218
+ end
219
+ end
220
+ # Specifies the billing period.
221
+ attr_accessor :duration
222
+ # The end date of the billing schedule.
223
+ attr_accessor :timestamp
224
+ # Describes how the billing schedule will determine the end date. Either `duration` or `timestamp`.
225
+ attr_accessor :type
226
+
227
+ def initialize(duration: nil, timestamp: nil, type: nil)
228
+ @duration = duration
229
+ @timestamp = timestamp
230
+ @type = type
231
+ end
232
+ end
233
+ # Configure billing schedule differently for individual subscription items.
234
+ attr_accessor :applies_to
235
+ # The end date for the billing schedule.
236
+ attr_accessor :bill_until
237
+ # 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.
238
+ attr_accessor :key
239
+
240
+ def initialize(applies_to: nil, bill_until: nil, key: nil)
241
+ @applies_to = applies_to
242
+ @bill_until = bill_until
243
+ @key = key
244
+ end
245
+ end
246
+
191
247
  class BillingThresholds < ::Stripe::RequestParams
192
248
  # Monetary threshold that triggers the subscription to advance to a new billing period
193
249
  attr_accessor :amount_gte
@@ -677,6 +733,8 @@ module Stripe
677
733
  attr_accessor :billing_cycle_anchor_config
678
734
  # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
679
735
  attr_accessor :billing_mode
736
+ # Sets the billing schedules for the subscription.
737
+ attr_accessor :billing_schedules
680
738
  # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
681
739
  attr_accessor :billing_thresholds
682
740
  # 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.
@@ -715,17 +773,7 @@ module Stripe
715
773
  attr_accessor :off_session
716
774
  # The account on behalf of which to charge, for each of the subscription's invoices.
717
775
  attr_accessor :on_behalf_of
718
- # Only applies to subscriptions with `collection_method=charge_automatically`.
719
- #
720
- # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://docs.stripe.com/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior.
721
- #
722
- # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://docs.stripe.com/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state.
723
- #
724
- # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://docs.stripe.com/upgrades#2019-03-14) to learn more.
725
- #
726
- # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription.
727
- #
728
- # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
776
+ # Controls how Stripe handles the first invoice when payment is required and `collection_method=charge_automatically`. Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status.
729
777
  attr_accessor :payment_behavior
730
778
  # Payment settings to pass to invoices created by the subscription.
731
779
  attr_accessor :payment_settings
@@ -752,6 +800,7 @@ module Stripe
752
800
  billing_cycle_anchor: nil,
753
801
  billing_cycle_anchor_config: nil,
754
802
  billing_mode: nil,
803
+ billing_schedules: nil,
755
804
  billing_thresholds: nil,
756
805
  cancel_at: nil,
757
806
  cancel_at_period_end: nil,
@@ -788,6 +837,7 @@ module Stripe
788
837
  @billing_cycle_anchor = billing_cycle_anchor
789
838
  @billing_cycle_anchor_config = billing_cycle_anchor_config
790
839
  @billing_mode = billing_mode
840
+ @billing_schedules = billing_schedules
791
841
  @billing_thresholds = billing_thresholds
792
842
  @cancel_at = cancel_at
793
843
  @cancel_at_period_end = cancel_at_period_end