stripe 15.2.1 → 15.3.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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -0
  3. data/CHANGELOG.md +66 -39
  4. data/OPENAPI_VERSION +1 -1
  5. data/README.md +14 -50
  6. data/VERSION +1 -1
  7. data/lib/stripe/api_version.rb +2 -1
  8. data/lib/stripe/events/v2_core_event_destination_ping_event.rb +1 -1
  9. data/lib/stripe/resources/account.rb +89 -5
  10. data/lib/stripe/resources/account_session.rb +79 -79
  11. data/lib/stripe/resources/billing_portal/session.rb +2 -2
  12. data/lib/stripe/resources/charge.rb +28 -15
  13. data/lib/stripe/resources/checkout/session.rb +57 -7
  14. data/lib/stripe/resources/confirmation_token.rb +19 -11
  15. data/lib/stripe/resources/credit_note.rb +9 -9
  16. data/lib/stripe/resources/customer_session.rb +2 -2
  17. data/lib/stripe/resources/event.rb +1 -1
  18. data/lib/stripe/resources/identity/verification_session.rb +34 -0
  19. data/lib/stripe/resources/invoice.rb +29 -4
  20. data/lib/stripe/resources/invoice_item.rb +1 -4
  21. data/lib/stripe/resources/mandate.rb +3 -0
  22. data/lib/stripe/resources/payment_intent.rb +331 -12
  23. data/lib/stripe/resources/payment_method.rb +17 -9
  24. data/lib/stripe/resources/quote.rb +26 -3
  25. data/lib/stripe/resources/setup_attempt.rb +1 -1
  26. data/lib/stripe/resources/setup_intent.rb +285 -3
  27. data/lib/stripe/resources/subscription.rb +68 -6
  28. data/lib/stripe/resources/subscription_schedule.rb +22 -0
  29. data/lib/stripe/resources/tax/registration.rb +20 -0
  30. data/lib/stripe/resources/terminal/configuration.rb +1 -0
  31. data/lib/stripe/resources/terminal/reader.rb +152 -4
  32. data/lib/stripe/resources/token.rb +1 -1
  33. data/lib/stripe/resources/treasury/financial_account.rb +5 -1
  34. data/lib/stripe/services/account_service.rb +83 -5
  35. data/lib/stripe/services/account_session_service.rb +48 -48
  36. data/lib/stripe/services/billing_portal/session_service.rb +1 -1
  37. data/lib/stripe/services/checkout/session_service.rb +57 -7
  38. data/lib/stripe/services/credit_note_preview_lines_service.rb +3 -3
  39. data/lib/stripe/services/credit_note_service.rb +6 -6
  40. data/lib/stripe/services/customer_session_service.rb +1 -1
  41. data/lib/stripe/services/identity/verification_session_service.rb +16 -0
  42. data/lib/stripe/services/invoice_service.rb +29 -4
  43. data/lib/stripe/services/payment_intent_service.rb +315 -9
  44. data/lib/stripe/services/payment_method_service.rb +5 -0
  45. data/lib/stripe/services/quote_service.rb +20 -3
  46. data/lib/stripe/services/setup_intent_service.rb +275 -2
  47. data/lib/stripe/services/subscription_schedule_service.rb +13 -0
  48. data/lib/stripe/services/subscription_service.rb +48 -4
  49. data/lib/stripe/services/tax/registration_service.rb +13 -0
  50. data/lib/stripe/services/terminal/reader_service.rb +90 -0
  51. data/lib/stripe/services/test_helpers/confirmation_token_service.rb +6 -1
  52. data/lib/stripe/services/token_service.rb +1 -1
  53. data/lib/stripe/services/treasury/financial_account_service.rb +5 -1
  54. data/lib/stripe/services/v2/billing_service.rb +2 -2
  55. data/lib/stripe/services/v2/core/event_destination_service.rb +16 -16
  56. data/lib/stripe/version.rb +1 -1
  57. data/rbi/stripe/resources/account.rbi +78 -9
  58. data/rbi/stripe/resources/account_session.rbi +79 -79
  59. data/rbi/stripe/resources/billing_portal/session.rbi +2 -2
  60. data/rbi/stripe/resources/charge.rbi +32 -15
  61. data/rbi/stripe/resources/checkout/session.rbi +65 -9
  62. data/rbi/stripe/resources/confirmation_token.rbi +23 -12
  63. data/rbi/stripe/resources/credit_note.rbi +9 -9
  64. data/rbi/stripe/resources/customer_session.rbi +2 -2
  65. data/rbi/stripe/resources/event.rbi +1 -1
  66. data/rbi/stripe/resources/identity/verification_session.rbi +39 -1
  67. data/rbi/stripe/resources/invoice.rbi +36 -6
  68. data/rbi/stripe/resources/invoice_item.rbi +1 -4
  69. data/rbi/stripe/resources/mandate.rbi +4 -0
  70. data/rbi/stripe/resources/payment_intent.rbi +361 -21
  71. data/rbi/stripe/resources/payment_method.rbi +19 -10
  72. data/rbi/stripe/resources/quote.rbi +22 -3
  73. data/rbi/stripe/resources/setup_attempt.rbi +1 -1
  74. data/rbi/stripe/resources/setup_intent.rbi +332 -9
  75. data/rbi/stripe/resources/subscription.rbi +60 -7
  76. data/rbi/stripe/resources/subscription_schedule.rbi +23 -1
  77. data/rbi/stripe/resources/tax/registration.rbi +20 -1
  78. data/rbi/stripe/resources/terminal/configuration.rbi +1 -0
  79. data/rbi/stripe/resources/terminal/location.rbi +2 -2
  80. data/rbi/stripe/resources/terminal/reader.rbi +151 -4
  81. data/rbi/stripe/resources/token.rbi +1 -1
  82. data/rbi/stripe/resources/treasury/financial_account.rbi +6 -2
  83. data/rbi/stripe/services/account_service.rbi +77 -9
  84. data/rbi/stripe/services/account_session_service.rbi +48 -48
  85. data/rbi/stripe/services/billing_portal/session_service.rbi +1 -1
  86. data/rbi/stripe/services/checkout/session_service.rbi +65 -9
  87. data/rbi/stripe/services/credit_note_preview_lines_service.rbi +3 -3
  88. data/rbi/stripe/services/credit_note_service.rbi +6 -6
  89. data/rbi/stripe/services/customer_session_service.rbi +1 -1
  90. data/rbi/stripe/services/identity/verification_session_service.rbi +17 -1
  91. data/rbi/stripe/services/invoice_service.rbi +36 -6
  92. data/rbi/stripe/services/payment_intent_service.rbi +348 -18
  93. data/rbi/stripe/services/payment_method_service.rbi +6 -1
  94. data/rbi/stripe/services/quote_service.rbi +16 -3
  95. data/rbi/stripe/services/setup_intent_service.rbi +326 -8
  96. data/rbi/stripe/services/subscription_schedule_service.rbi +12 -1
  97. data/rbi/stripe/services/subscription_service.rbi +41 -5
  98. data/rbi/stripe/services/tax/registration_service.rbi +14 -1
  99. data/rbi/stripe/services/terminal/location_service.rbi +2 -2
  100. data/rbi/stripe/services/terminal/reader_service.rbi +85 -0
  101. data/rbi/stripe/services/test_helpers/confirmation_token_service.rbi +9 -2
  102. data/rbi/stripe/services/token_service.rbi +1 -1
  103. data/rbi/stripe/services/treasury/financial_account_service.rbi +6 -2
  104. data/rbi/stripe/services/v2/billing_service.rbi +1 -1
  105. data/rbi/stripe/services/v2/core/event_destination_service.rbi +13 -13
  106. metadata +3 -2
@@ -43,6 +43,14 @@ module Stripe
43
43
  sig { returns(T.nilable(Integer)) }
44
44
  attr_reader :second
45
45
  end
46
+ class BillingMode < Stripe::StripeObject
47
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
48
+ sig { returns(String) }
49
+ attr_reader :type
50
+ # Details on when the current billing_mode was adopted.
51
+ sig { returns(Integer) }
52
+ attr_reader :updated_at
53
+ end
46
54
  class BillingThresholds < Stripe::StripeObject
47
55
  # Monetary threshold that triggers the subscription to create an invoice
48
56
  sig { returns(T.nilable(Integer)) }
@@ -265,13 +273,16 @@ module Stripe
265
273
  # The fixed values used to calculate the `billing_cycle_anchor`.
266
274
  sig { returns(T.nilable(BillingCycleAnchorConfig)) }
267
275
  attr_reader :billing_cycle_anchor_config
276
+ # The billing mode of the subscription.
277
+ sig { returns(BillingMode) }
278
+ attr_reader :billing_mode
268
279
  # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
269
280
  sig { returns(T.nilable(BillingThresholds)) }
270
281
  attr_reader :billing_thresholds
271
282
  # A date in the future at which the subscription will automatically get canceled
272
283
  sig { returns(T.nilable(Integer)) }
273
284
  attr_reader :cancel_at
274
- # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. This field will be removed in a future API version. Please use `cancel_at` instead.
285
+ # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period.
275
286
  sig { returns(T::Boolean) }
276
287
  attr_reader :cancel_at_period_end
277
288
  # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state.
@@ -388,7 +399,7 @@ module Stripe
388
399
  # Settings related to subscription trials.
389
400
  sig { returns(T.nilable(TrialSettings)) }
390
401
  attr_reader :trial_settings
391
- # If the subscription has a trial, the beginning of that trial. For subsequent trials, this date remains as the start of the first ever trial on the subscription.
402
+ # If the subscription has a trial, the beginning of that trial.
392
403
  sig { returns(T.nilable(Integer)) }
393
404
  attr_reader :trial_start
394
405
  class CancelParams < Stripe::RequestParams
@@ -965,7 +976,7 @@ module Stripe
965
976
  # 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.
966
977
  sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
967
978
  attr_accessor :cancel_at
968
- # 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.
979
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
969
980
  sig { returns(T.nilable(T::Boolean)) }
970
981
  attr_accessor :cancel_at_period_end
971
982
  # Details about why this subscription was cancelled
@@ -1335,6 +1346,13 @@ module Stripe
1335
1346
  }
1336
1347
  def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
1337
1348
  end
1349
+ class BillingMode < Stripe::RequestParams
1350
+ # Attribute for param field type
1351
+ sig { returns(String) }
1352
+ attr_accessor :type
1353
+ sig { params(type: String).void }
1354
+ def initialize(type: nil); end
1355
+ end
1338
1356
  class BillingThresholds < Stripe::RequestParams
1339
1357
  # Monetary threshold that triggers the subscription to advance to a new billing period
1340
1358
  sig { returns(T.nilable(Integer)) }
@@ -1737,10 +1755,10 @@ module Stripe
1737
1755
  # 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).
1738
1756
  sig { returns(T.nilable(T.nilable(T.any(String, Float)))) }
1739
1757
  attr_accessor :application_fee_percent
1740
- # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed.
1758
+ # Automatic tax settings for this subscription.
1741
1759
  sig { returns(T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax)) }
1742
1760
  attr_accessor :automatic_tax
1743
- # 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.
1761
+ # 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.
1744
1762
  sig { returns(T.nilable(Integer)) }
1745
1763
  attr_accessor :backdate_start_date
1746
1764
  # 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.
@@ -1749,6 +1767,9 @@ module Stripe
1749
1767
  # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC.
1750
1768
  sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig)) }
1751
1769
  attr_accessor :billing_cycle_anchor_config
1770
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1771
+ sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingMode)) }
1772
+ attr_accessor :billing_mode
1752
1773
  # 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.
1753
1774
  sig {
1754
1775
  returns(T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::BillingThresholds))))
@@ -1757,7 +1778,7 @@ module Stripe
1757
1778
  # 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.
1758
1779
  sig { returns(T.nilable(Integer)) }
1759
1780
  attr_accessor :cancel_at
1760
- # 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.
1781
+ # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1761
1782
  sig { returns(T.nilable(T::Boolean)) }
1762
1783
  attr_accessor :cancel_at_period_end
1763
1784
  # 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`.
@@ -1847,7 +1868,7 @@ module Stripe
1847
1868
  sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)) }
1848
1869
  attr_accessor :trial_settings
1849
1870
  sig {
1850
- params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::BillingThresholds))), cancel_at: T.nilable(Integer), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Subscription::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)).void
1871
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::Subscription::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig), billing_mode: T.nilable(::Stripe::Subscription::CreateParams::BillingMode), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::BillingThresholds))), cancel_at: T.nilable(Integer), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: String, days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(String), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Subscription::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::Subscription::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), off_session: T.nilable(T::Boolean), on_behalf_of: T.nilable(T.nilable(String)), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Subscription::CreateParams::TransferData), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)).void
1851
1872
  }
1852
1873
  def initialize(
1853
1874
  add_invoice_items: nil,
@@ -1856,6 +1877,7 @@ module Stripe
1856
1877
  backdate_start_date: nil,
1857
1878
  billing_cycle_anchor: nil,
1858
1879
  billing_cycle_anchor_config: nil,
1880
+ billing_mode: nil,
1859
1881
  billing_thresholds: nil,
1860
1882
  cancel_at: nil,
1861
1883
  cancel_at_period_end: nil,
@@ -1903,6 +1925,25 @@ module Stripe
1903
1925
  }
1904
1926
  def initialize(expand: nil, limit: nil, page: nil, query: nil); end
1905
1927
  end
1928
+ class MigrateParams < Stripe::RequestParams
1929
+ class BillingMode < Stripe::RequestParams
1930
+ # Attribute for param field type
1931
+ sig { returns(String) }
1932
+ attr_accessor :type
1933
+ sig { params(type: String).void }
1934
+ def initialize(type: nil); end
1935
+ end
1936
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1937
+ sig { returns(::Stripe::Subscription::MigrateParams::BillingMode) }
1938
+ attr_accessor :billing_mode
1939
+ # Specifies which fields in the response should be expanded.
1940
+ sig { returns(T.nilable(T::Array[String])) }
1941
+ attr_accessor :expand
1942
+ sig {
1943
+ params(billing_mode: ::Stripe::Subscription::MigrateParams::BillingMode, expand: T.nilable(T::Array[String])).void
1944
+ }
1945
+ def initialize(billing_mode: nil, expand: nil); end
1946
+ end
1906
1947
  class ResumeParams < Stripe::RequestParams
1907
1948
  # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle).
1908
1949
  sig { returns(T.nilable(String)) }
@@ -1976,6 +2017,18 @@ module Stripe
1976
2017
  }
1977
2018
  def self.list(params = {}, opts = {}); end
1978
2019
 
2020
+ # Upgrade the billing_mode of an existing subscription.
2021
+ sig {
2022
+ params(params: T.any(::Stripe::Subscription::MigrateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2023
+ }
2024
+ def migrate(params = {}, opts = {}); end
2025
+
2026
+ # Upgrade the billing_mode of an existing subscription.
2027
+ sig {
2028
+ params(subscription: String, params: T.any(::Stripe::Subscription::MigrateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
2029
+ }
2030
+ def self.migrate(subscription, params = {}, opts = {}); end
2031
+
1979
2032
  # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date.
1980
2033
  sig {
1981
2034
  params(params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription)
@@ -7,6 +7,14 @@ module Stripe
7
7
  #
8
8
  # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules)
9
9
  class SubscriptionSchedule < APIResource
10
+ class BillingMode < Stripe::StripeObject
11
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
12
+ sig { returns(String) }
13
+ attr_reader :type
14
+ # Details on when the current billing_mode was adopted.
15
+ sig { returns(Integer) }
16
+ attr_reader :updated_at
17
+ end
10
18
  class CurrentPhase < Stripe::StripeObject
11
19
  # The end of this phase of the subscription schedule.
12
20
  sig { returns(Integer) }
@@ -295,6 +303,9 @@ module Stripe
295
303
  # ID of the Connect Application that created the schedule.
296
304
  sig { returns(T.nilable(T.any(String, Stripe::Application))) }
297
305
  attr_reader :application
306
+ # The billing mode of the subscription.
307
+ sig { returns(BillingMode) }
308
+ attr_reader :billing_mode
298
309
  # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch.
299
310
  sig { returns(T.nilable(Integer)) }
300
311
  attr_reader :canceled_at
@@ -474,6 +485,13 @@ module Stripe
474
485
  ); end
475
486
  end
476
487
  class CreateParams < Stripe::RequestParams
488
+ class BillingMode < Stripe::RequestParams
489
+ # Attribute for param field type
490
+ sig { returns(String) }
491
+ attr_accessor :type
492
+ sig { params(type: String).void }
493
+ def initialize(type: nil); end
494
+ end
477
495
  class DefaultSettings < Stripe::RequestParams
478
496
  class AutomaticTax < Stripe::RequestParams
479
497
  class Liability < Stripe::RequestParams
@@ -976,6 +994,9 @@ module Stripe
976
994
  trial_end: nil
977
995
  ); end
978
996
  end
997
+ # Controls how prorations and invoices for subscriptions are calculated and orchestrated.
998
+ sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode)) }
999
+ attr_accessor :billing_mode
979
1000
  # The identifier of the customer to create the subscription schedule for.
980
1001
  sig { returns(T.nilable(String)) }
981
1002
  attr_accessor :customer
@@ -1001,9 +1022,10 @@ module Stripe
1001
1022
  sig { returns(T.nilable(T.any(Integer, String))) }
1002
1023
  attr_accessor :start_date
1003
1024
  sig {
1004
- params(customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
1025
+ params(billing_mode: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode), customer: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings), end_behavior: T.nilable(String), expand: T.nilable(T::Array[String]), from_subscription: T.nilable(String), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String]))), phases: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]), start_date: T.nilable(T.any(Integer, String))).void
1005
1026
  }
1006
1027
  def initialize(
1028
+ billing_mode: nil,
1007
1029
  customer: nil,
1008
1030
  default_settings: nil,
1009
1031
  end_behavior: nil,
@@ -685,6 +685,11 @@ module Stripe
685
685
  sig { returns(String) }
686
686
  attr_reader :type
687
687
  end
688
+ class Ua < Stripe::StripeObject
689
+ # Type of registration in `country`.
690
+ sig { returns(String) }
691
+ attr_reader :type
692
+ end
688
693
  class Ug < Stripe::StripeObject
689
694
  # Type of registration in `country`.
690
695
  sig { returns(String) }
@@ -1030,6 +1035,9 @@ module Stripe
1030
1035
  # Attribute for field tz
1031
1036
  sig { returns(Tz) }
1032
1037
  attr_reader :tz
1038
+ # Attribute for field ua
1039
+ sig { returns(Ua) }
1040
+ attr_reader :ua
1033
1041
  # Attribute for field ug
1034
1042
  sig { returns(Ug) }
1035
1043
  attr_reader :ug
@@ -2133,6 +2141,13 @@ module Stripe
2133
2141
  sig { params(type: String).void }
2134
2142
  def initialize(type: nil); end
2135
2143
  end
2144
+ class Ua < Stripe::RequestParams
2145
+ # Type of registration to be created in `country`.
2146
+ sig { returns(String) }
2147
+ attr_accessor :type
2148
+ sig { params(type: String).void }
2149
+ def initialize(type: nil); end
2150
+ end
2136
2151
  class Ug < Stripe::RequestParams
2137
2152
  # Type of registration to be created in `country`.
2138
2153
  sig { returns(String) }
@@ -2520,6 +2535,9 @@ module Stripe
2520
2535
  # Options for the registration in TZ.
2521
2536
  sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz)) }
2522
2537
  attr_accessor :tz
2538
+ # Options for the registration in UA.
2539
+ sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ua)) }
2540
+ attr_accessor :ua
2523
2541
  # Options for the registration in UG.
2524
2542
  sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ug)) }
2525
2543
  attr_accessor :ug
@@ -2545,7 +2563,7 @@ module Stripe
2545
2563
  sig { returns(T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zw)) }
2546
2564
  attr_accessor :zw
2547
2565
  sig {
2548
- params(ae: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ae), al: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Al), am: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Am), ao: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ao), at: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::At), au: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Au), aw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Aw), az: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Az), ba: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ba), bb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bb), bd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bd), be: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be), bf: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bf), bg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg), bh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bh), bj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bj), bs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bs), by: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::By), ca: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca), cd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cd), ch: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ch), cl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cl), cm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cm), co: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Co), cr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cr), cv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cv), cy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy), cz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz), de: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::De), dk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk), ec: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ec), ee: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee), eg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Eg), es: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es), et: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Et), fi: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi), fr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr), gb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gb), ge: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ge), gn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gn), gr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr), hr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr), hu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu), id: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Id), ie: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie), in_: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::In), is: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Is), it: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::It), jp: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Jp), ke: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ke), kg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kg), kh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kh), kr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kr), kz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kz), la: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::La), lt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt), lu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu), lv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv), ma: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ma), md: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Md), me: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Me), mk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mk), mr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mr), mt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt), mx: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mx), my: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::My), ng: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ng), nl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl), no: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::No), np: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Np), nz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nz), om: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Om), pe: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pe), ph: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ph), pl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl), pt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt), ro: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro), rs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Rs), ru: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ru), sa: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sa), se: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se), sg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sg), si: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si), sk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk), sn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sn), sr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sr), th: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Th), tj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tj), tr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tr), tz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz), ug: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ug), us: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us), uy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uy), uz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uz), vn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Vn), za: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Za), zm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zm), zw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zw)).void
2566
+ params(ae: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ae), al: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Al), am: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Am), ao: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ao), at: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::At), au: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Au), aw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Aw), az: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Az), ba: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ba), bb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bb), bd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bd), be: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be), bf: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bf), bg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg), bh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bh), bj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bj), bs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bs), by: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::By), ca: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca), cd: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cd), ch: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ch), cl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cl), cm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cm), co: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Co), cr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cr), cv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cv), cy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy), cz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz), de: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::De), dk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk), ec: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ec), ee: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee), eg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Eg), es: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es), et: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Et), fi: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi), fr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr), gb: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gb), ge: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ge), gn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gn), gr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr), hr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr), hu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu), id: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Id), ie: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie), in_: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::In), is: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Is), it: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::It), jp: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Jp), ke: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ke), kg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kg), kh: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kh), kr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kr), kz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kz), la: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::La), lt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt), lu: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu), lv: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv), ma: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ma), md: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Md), me: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Me), mk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mk), mr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mr), mt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt), mx: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mx), my: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::My), ng: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ng), nl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl), no: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::No), np: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Np), nz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nz), om: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Om), pe: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pe), ph: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ph), pl: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl), pt: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt), ro: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro), rs: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Rs), ru: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ru), sa: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sa), se: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se), sg: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sg), si: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si), sk: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk), sn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sn), sr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sr), th: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Th), tj: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tj), tr: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tr), tz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz), ua: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ua), ug: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ug), us: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us), uy: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uy), uz: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uz), vn: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Vn), za: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Za), zm: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zm), zw: T.nilable(::Stripe::Tax::Registration::CreateParams::CountryOptions::Zw)).void
2549
2567
  }
2550
2568
  def initialize(
2551
2569
  ae: nil,
@@ -2638,6 +2656,7 @@ module Stripe
2638
2656
  tj: nil,
2639
2657
  tr: nil,
2640
2658
  tz: nil,
2659
+ ua: nil,
2641
2660
  ug: nil,
2642
2661
  us: nil,
2643
2662
  uy: nil,
@@ -5,6 +5,7 @@
5
5
  module Stripe
6
6
  module Terminal
7
7
  # A Configurations object represents how features should be configured for terminal readers.
8
+ # For information about how to use it, see the [Terminal configurations documentation](https://docs.stripe.com/terminal/fleet/configurations-overview).
8
9
  class Configuration < APIResource
9
10
  class BbposWiseposE < Stripe::StripeObject
10
11
  # A File ID representing an image to display on the reader
@@ -92,7 +92,7 @@ module Stripe
92
92
  sig { returns(T.nilable(T.nilable(String))) }
93
93
  attr_accessor :configuration_overrides
94
94
  # A name for the location.
95
- sig { returns(T.nilable(String)) }
95
+ sig { returns(T.nilable(T.nilable(String))) }
96
96
  attr_accessor :display_name
97
97
  # Specifies which fields in the response should be expanded.
98
98
  sig { returns(T.nilable(T::Array[String])) }
@@ -101,7 +101,7 @@ module Stripe
101
101
  sig { returns(T.nilable(T.nilable(T.any(String, T::Hash[String, String])))) }
102
102
  attr_accessor :metadata
103
103
  sig {
104
- params(address: T.nilable(::Stripe::Terminal::Location::UpdateParams::Address), configuration_overrides: T.nilable(T.nilable(String)), display_name: T.nilable(String), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
104
+ params(address: T.nilable(::Stripe::Terminal::Location::UpdateParams::Address), configuration_overrides: T.nilable(T.nilable(String)), display_name: T.nilable(T.nilable(String)), expand: T.nilable(T::Array[String]), metadata: T.nilable(T.nilable(T.any(String, T::Hash[String, String])))).void
105
105
  }
106
106
  def initialize(
107
107
  address: nil,
@@ -127,6 +127,50 @@ module Stripe
127
127
  sig { returns(T.nilable(T::Hash[String, String])) }
128
128
  attr_reader :metadata
129
129
  end
130
+ class CollectPaymentMethod < Stripe::StripeObject
131
+ class CollectConfig < Stripe::StripeObject
132
+ class Tipping < Stripe::StripeObject
133
+ # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).
134
+ sig { returns(Integer) }
135
+ attr_reader :amount_eligible
136
+ end
137
+ # Enable customer-initiated cancellation when processing this payment.
138
+ sig { returns(T::Boolean) }
139
+ attr_reader :enable_customer_cancellation
140
+ # Override showing a tipping selection screen on this transaction.
141
+ sig { returns(T::Boolean) }
142
+ attr_reader :skip_tipping
143
+ # Represents a per-transaction tipping configuration
144
+ sig { returns(Tipping) }
145
+ attr_reader :tipping
146
+ end
147
+ # Represents a per-transaction override of a reader configuration
148
+ sig { returns(CollectConfig) }
149
+ attr_reader :collect_config
150
+ # Most recent PaymentIntent processed by the reader.
151
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
152
+ attr_reader :payment_intent
153
+ # PaymentMethod objects represent your customer's payment instruments.
154
+ # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to
155
+ # Customer objects to store instrument details for future payments.
156
+ #
157
+ # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios).
158
+ sig { returns(Stripe::PaymentMethod) }
159
+ attr_reader :payment_method
160
+ end
161
+ class ConfirmPaymentIntent < Stripe::StripeObject
162
+ class ConfirmConfig < Stripe::StripeObject
163
+ # If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion.
164
+ sig { returns(String) }
165
+ attr_reader :return_url
166
+ end
167
+ # Represents a per-transaction override of a reader configuration
168
+ sig { returns(ConfirmConfig) }
169
+ attr_reader :confirm_config
170
+ # Most recent PaymentIntent processed by the reader.
171
+ sig { returns(T.any(String, Stripe::PaymentIntent)) }
172
+ attr_reader :payment_intent
173
+ end
130
174
  class ProcessPaymentIntent < Stripe::StripeObject
131
175
  class ProcessConfig < Stripe::StripeObject
132
176
  class Tipping < Stripe::StripeObject
@@ -134,10 +178,10 @@ module Stripe
134
178
  sig { returns(Integer) }
135
179
  attr_reader :amount_eligible
136
180
  end
137
- # Enable customer initiated cancellation when processing this payment.
181
+ # Enable customer-initiated cancellation when processing this payment.
138
182
  sig { returns(T::Boolean) }
139
183
  attr_reader :enable_customer_cancellation
140
- # If the customer does not abandon authenticating the payment, they will be redirected to this specified URL after completion.
184
+ # If the customer doesn't abandon authenticating the payment, they're redirected to this URL after completion.
141
185
  sig { returns(String) }
142
186
  attr_reader :return_url
143
187
  # Override showing a tipping selection screen on this transaction.
@@ -156,7 +200,7 @@ module Stripe
156
200
  end
157
201
  class ProcessSetupIntent < Stripe::StripeObject
158
202
  class ProcessConfig < Stripe::StripeObject
159
- # Enable customer initiated cancellation when processing this SetupIntent.
203
+ # Enable customer-initiated cancellation when processing this SetupIntent.
160
204
  sig { returns(T::Boolean) }
161
205
  attr_reader :enable_customer_cancellation
162
206
  end
@@ -172,7 +216,7 @@ module Stripe
172
216
  end
173
217
  class RefundPayment < Stripe::StripeObject
174
218
  class RefundPaymentConfig < Stripe::StripeObject
175
- # Enable customer initiated cancellation when refunding this payment.
219
+ # Enable customer-initiated cancellation when refunding this payment.
176
220
  sig { returns(T::Boolean) }
177
221
  attr_reader :enable_customer_cancellation
178
222
  end
@@ -240,6 +284,12 @@ module Stripe
240
284
  # Represents a reader action to collect customer inputs
241
285
  sig { returns(CollectInputs) }
242
286
  attr_reader :collect_inputs
287
+ # Represents a reader action to collect a payment method
288
+ sig { returns(CollectPaymentMethod) }
289
+ attr_reader :collect_payment_method
290
+ # Represents a reader action to confirm a payment
291
+ sig { returns(ConfirmPaymentIntent) }
292
+ attr_reader :confirm_payment_intent
243
293
  # Failure code, only set if status is `failed`.
244
294
  sig { returns(T.nilable(String)) }
245
295
  attr_reader :failure_code
@@ -496,6 +546,79 @@ module Stripe
496
546
  }
497
547
  def initialize(expand: nil, inputs: nil, metadata: nil); end
498
548
  end
549
+ class CollectPaymentMethodParams < Stripe::RequestParams
550
+ class CollectConfig < Stripe::RequestParams
551
+ class Tipping < Stripe::RequestParams
552
+ # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency).
553
+ sig { returns(T.nilable(Integer)) }
554
+ attr_accessor :amount_eligible
555
+ sig { params(amount_eligible: T.nilable(Integer)).void }
556
+ def initialize(amount_eligible: nil); end
557
+ end
558
+ # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow.
559
+ sig { returns(T.nilable(String)) }
560
+ attr_accessor :allow_redisplay
561
+ # Enables cancel button on transaction screens.
562
+ sig { returns(T.nilable(T::Boolean)) }
563
+ attr_accessor :enable_customer_cancellation
564
+ # Override showing a tipping selection screen on this transaction.
565
+ sig { returns(T.nilable(T::Boolean)) }
566
+ attr_accessor :skip_tipping
567
+ # Tipping configuration for this transaction.
568
+ sig {
569
+ returns(T.nilable(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig::Tipping))
570
+ }
571
+ attr_accessor :tipping
572
+ sig {
573
+ params(allow_redisplay: T.nilable(String), enable_customer_cancellation: T.nilable(T::Boolean), skip_tipping: T.nilable(T::Boolean), tipping: T.nilable(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig::Tipping)).void
574
+ }
575
+ def initialize(
576
+ allow_redisplay: nil,
577
+ enable_customer_cancellation: nil,
578
+ skip_tipping: nil,
579
+ tipping: nil
580
+ ); end
581
+ end
582
+ # Configuration overrides.
583
+ sig {
584
+ returns(T.nilable(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig))
585
+ }
586
+ attr_accessor :collect_config
587
+ # Specifies which fields in the response should be expanded.
588
+ sig { returns(T.nilable(T::Array[String])) }
589
+ attr_accessor :expand
590
+ # PaymentIntent ID.
591
+ sig { returns(String) }
592
+ attr_accessor :payment_intent
593
+ sig {
594
+ params(collect_config: T.nilable(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig), expand: T.nilable(T::Array[String]), payment_intent: String).void
595
+ }
596
+ def initialize(collect_config: nil, expand: nil, payment_intent: nil); end
597
+ end
598
+ class ConfirmPaymentIntentParams < Stripe::RequestParams
599
+ class ConfirmConfig < Stripe::RequestParams
600
+ # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme.
601
+ sig { returns(T.nilable(String)) }
602
+ attr_accessor :return_url
603
+ sig { params(return_url: T.nilable(String)).void }
604
+ def initialize(return_url: nil); end
605
+ end
606
+ # Configuration overrides.
607
+ sig {
608
+ returns(T.nilable(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams::ConfirmConfig))
609
+ }
610
+ attr_accessor :confirm_config
611
+ # Specifies which fields in the response should be expanded.
612
+ sig { returns(T.nilable(T::Array[String])) }
613
+ attr_accessor :expand
614
+ # PaymentIntent ID.
615
+ sig { returns(String) }
616
+ attr_accessor :payment_intent
617
+ sig {
618
+ params(confirm_config: T.nilable(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams::ConfirmConfig), expand: T.nilable(T::Array[String]), payment_intent: String).void
619
+ }
620
+ def initialize(confirm_config: nil, expand: nil, payment_intent: nil); end
621
+ end
499
622
  class ProcessPaymentIntentParams < Stripe::RequestParams
500
623
  class ProcessConfig < Stripe::RequestParams
501
624
  class Tipping < Stripe::RequestParams
@@ -765,6 +888,30 @@ module Stripe
765
888
  }
766
889
  def self.collect_inputs(reader, params = {}, opts = {}); end
767
890
 
891
+ # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
892
+ sig {
893
+ params(params: T.any(::Stripe::Terminal::Reader::CollectPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
894
+ }
895
+ def collect_payment_method(params = {}, opts = {}); end
896
+
897
+ # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation.
898
+ sig {
899
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::CollectPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
900
+ }
901
+ def self.collect_payment_method(reader, params = {}, opts = {}); end
902
+
903
+ # Finalizes a payment on a Reader.
904
+ sig {
905
+ params(params: T.any(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
906
+ }
907
+ def confirm_payment_intent(params = {}, opts = {}); end
908
+
909
+ # Finalizes a payment on a Reader.
910
+ sig {
911
+ params(reader: String, params: T.any(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
912
+ }
913
+ def self.confirm_payment_intent(reader, params = {}, opts = {}); end
914
+
768
915
  # Creates a new Reader object.
769
916
  sig {
770
917
  params(params: T.any(::Stripe::Terminal::Reader::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader)
@@ -281,7 +281,7 @@ module Stripe
281
281
  # The company's phone number (used for verification).
282
282
  sig { returns(T.nilable(String)) }
283
283
  attr_accessor :phone
284
- # Attribute for param field registration_date
284
+ # When the business was incorporated or registered.
285
285
  sig {
286
286
  returns(T.nilable(T.nilable(T.any(String, ::Stripe::Token::CreateParams::Account::Company::RegistrationDate))))
287
287
  }
@@ -155,15 +155,19 @@ module Stripe
155
155
  # An object ID cursor for use in pagination.
156
156
  sig { returns(T.nilable(String)) }
157
157
  attr_accessor :starting_after
158
+ # Only return FinancialAccounts that have the given status: `open` or `closed`
159
+ sig { returns(T.nilable(String)) }
160
+ attr_accessor :status
158
161
  sig {
159
- params(created: T.nilable(T.any(::Stripe::Treasury::FinancialAccount::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String)).void
162
+ params(created: T.nilable(T.any(::Stripe::Treasury::FinancialAccount::ListParams::Created, Integer)), ending_before: T.nilable(String), expand: T.nilable(T::Array[String]), limit: T.nilable(Integer), starting_after: T.nilable(String), status: T.nilable(String)).void
160
163
  }
161
164
  def initialize(
162
165
  created: nil,
163
166
  ending_before: nil,
164
167
  expand: nil,
165
168
  limit: nil,
166
- starting_after: nil
169
+ starting_after: nil,
170
+ status: nil
167
171
  ); end
168
172
  end
169
173
  class CreateParams < Stripe::RequestParams