stripe 15.3.0 → 15.4.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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/API_VERSION +1 -1
  3. data/CHANGELOG.md +21 -1
  4. data/OPENAPI_VERSION +1 -1
  5. data/VERSION +1 -1
  6. data/lib/stripe/api_version.rb +1 -1
  7. data/lib/stripe/resources/account.rb +5 -5
  8. data/lib/stripe/resources/account_link.rb +3 -1
  9. data/lib/stripe/resources/account_session.rb +51 -0
  10. data/lib/stripe/resources/billing/credit_grant.rb +1 -1
  11. data/lib/stripe/resources/billing_portal/configuration.rb +46 -2
  12. data/lib/stripe/resources/charge.rb +7 -5
  13. data/lib/stripe/resources/checkout/session.rb +32 -4
  14. data/lib/stripe/resources/confirmation_token.rb +3 -3
  15. data/lib/stripe/resources/customer.rb +1 -1
  16. data/lib/stripe/resources/dispute.rb +1 -1
  17. data/lib/stripe/resources/event.rb +14 -26
  18. data/lib/stripe/resources/invoice.rb +24 -8
  19. data/lib/stripe/resources/invoice_item.rb +1 -1
  20. data/lib/stripe/resources/payment_intent.rb +14 -4
  21. data/lib/stripe/resources/payment_link.rb +83 -5
  22. data/lib/stripe/resources/payment_method.rb +4 -4
  23. data/lib/stripe/resources/quote.rb +1 -1
  24. data/lib/stripe/resources/radar/value_list.rb +2 -2
  25. data/lib/stripe/resources/refund.rb +1 -1
  26. data/lib/stripe/resources/review.rb +2 -2
  27. data/lib/stripe/resources/setup_attempt.rb +1 -1
  28. data/lib/stripe/resources/subscription.rb +2 -2
  29. data/lib/stripe/resources/subscription_item.rb +2 -2
  30. data/lib/stripe/resources/subscription_schedule.rb +35 -3
  31. data/lib/stripe/resources/tax/registration.rb +408 -30
  32. data/lib/stripe/resources/terminal/configuration.rb +196 -0
  33. data/lib/stripe/services/account_link_service.rb +3 -1
  34. data/lib/stripe/services/account_service.rb +3 -3
  35. data/lib/stripe/services/account_session_service.rb +34 -0
  36. data/lib/stripe/services/billing/credit_grant_service.rb +1 -1
  37. data/lib/stripe/services/billing_portal/configuration_service.rb +36 -2
  38. data/lib/stripe/services/checkout/session_service.rb +19 -3
  39. data/lib/stripe/services/invoice_item_service.rb +1 -1
  40. data/lib/stripe/services/invoice_service.rb +24 -8
  41. data/lib/stripe/services/payment_intent_service.rb +8 -3
  42. data/lib/stripe/services/payment_link_service.rb +81 -5
  43. data/lib/stripe/services/payment_method_service.rb +1 -1
  44. data/lib/stripe/services/quote_service.rb +1 -1
  45. data/lib/stripe/services/radar/value_list_service.rb +1 -1
  46. data/lib/stripe/services/subscription_item_service.rb +2 -2
  47. data/lib/stripe/services/subscription_schedule_service.rb +35 -3
  48. data/lib/stripe/services/subscription_service.rb +2 -2
  49. data/lib/stripe/services/tax/registration_service.rb +360 -30
  50. data/lib/stripe/services/terminal/configuration_service.rb +152 -0
  51. data/lib/stripe/version.rb +1 -1
  52. data/rbi/stripe/resources/account.rbi +5 -5
  53. data/rbi/stripe/resources/account_link.rbi +3 -1
  54. data/rbi/stripe/resources/account_session.rbi +62 -1
  55. data/rbi/stripe/resources/billing/credit_grant.rbi +1 -1
  56. data/rbi/stripe/resources/billing_portal/configuration.rbi +62 -4
  57. data/rbi/stripe/resources/charge.rbi +8 -5
  58. data/rbi/stripe/resources/checkout/session.rbi +42 -7
  59. data/rbi/stripe/resources/confirmation_token.rbi +3 -3
  60. data/rbi/stripe/resources/customer.rbi +1 -1
  61. data/rbi/stripe/resources/dispute.rbi +1 -1
  62. data/rbi/stripe/resources/event.rbi +14 -26
  63. data/rbi/stripe/resources/invoice.rbi +27 -11
  64. data/rbi/stripe/resources/invoice_item.rbi +1 -1
  65. data/rbi/stripe/resources/payment_intent.rbi +14 -4
  66. data/rbi/stripe/resources/payment_link.rbi +101 -9
  67. data/rbi/stripe/resources/payment_method.rbi +4 -4
  68. data/rbi/stripe/resources/quote.rbi +1 -1
  69. data/rbi/stripe/resources/radar/value_list.rbi +2 -2
  70. data/rbi/stripe/resources/refund.rbi +1 -1
  71. data/rbi/stripe/resources/review.rbi +2 -2
  72. data/rbi/stripe/resources/setup_attempt.rbi +1 -1
  73. data/rbi/stripe/resources/subscription.rbi +6 -6
  74. data/rbi/stripe/resources/subscription_item.rbi +2 -2
  75. data/rbi/stripe/resources/subscription_schedule.rbi +33 -5
  76. data/rbi/stripe/resources/tax/registration.rbi +544 -60
  77. data/rbi/stripe/resources/terminal/configuration.rbi +210 -2
  78. data/rbi/stripe/services/account_link_service.rbi +3 -1
  79. data/rbi/stripe/services/account_service.rbi +3 -3
  80. data/rbi/stripe/services/account_session_service.rbi +40 -1
  81. data/rbi/stripe/services/billing/credit_grant_service.rbi +1 -1
  82. data/rbi/stripe/services/billing_portal/configuration_service.rbi +48 -4
  83. data/rbi/stripe/services/checkout/session_service.rbi +26 -6
  84. data/rbi/stripe/services/invoice_item_service.rbi +1 -1
  85. data/rbi/stripe/services/invoice_service.rbi +27 -11
  86. data/rbi/stripe/services/payment_intent_service.rbi +8 -3
  87. data/rbi/stripe/services/payment_link_service.rbi +98 -9
  88. data/rbi/stripe/services/payment_method_service.rbi +1 -1
  89. data/rbi/stripe/services/quote_service.rbi +1 -1
  90. data/rbi/stripe/services/radar/value_list_service.rbi +1 -1
  91. data/rbi/stripe/services/subscription_item_service.rbi +2 -2
  92. data/rbi/stripe/services/subscription_schedule_service.rbi +37 -5
  93. data/rbi/stripe/services/subscription_service.rbi +6 -6
  94. data/rbi/stripe/services/tax/registration_service.rbi +480 -60
  95. data/rbi/stripe/services/terminal/configuration_service.rbi +170 -2
  96. metadata +2 -2
@@ -133,7 +133,7 @@ module Stripe
133
133
  end
134
134
  class CreateParams < Stripe::RequestParams
135
135
  class BillingMode < Stripe::RequestParams
136
- # Attribute for param field type
136
+ # Controls the calculation and orchestration of prorations and invoices for subscriptions.
137
137
  sig { returns(String) }
138
138
  attr_accessor :type
139
139
  sig { params(type: String).void }
@@ -392,6 +392,16 @@ module Stripe
392
392
  }
393
393
  def initialize(coupon: nil, discount: nil, promotion_code: nil); end
394
394
  end
395
+ class Duration < Stripe::RequestParams
396
+ # Specifies phase duration. Either `day`, `week`, `month` or `year`.
397
+ sig { returns(String) }
398
+ attr_accessor :interval
399
+ # The multiplier applied to the interval.
400
+ sig { returns(T.nilable(Integer)) }
401
+ attr_accessor :interval_count
402
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
403
+ def initialize(interval: nil, interval_count: nil); end
404
+ end
395
405
  class InvoiceSettings < Stripe::RequestParams
396
406
  class Issuer < Stripe::RequestParams
397
407
  # The connected account being referenced when `type` is `account`.
@@ -580,6 +590,11 @@ module Stripe
580
590
  returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))))
581
591
  }
582
592
  attr_accessor :discounts
593
+ # The number of intervals the phase should last. If set, `end_date` must not be set.
594
+ sig {
595
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Duration))
596
+ }
597
+ attr_accessor :duration
583
598
  # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
584
599
  sig { returns(T.nilable(Integer)) }
585
600
  attr_accessor :end_date
@@ -591,7 +606,7 @@ module Stripe
591
606
  # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
592
607
  sig { returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item]) }
593
608
  attr_accessor :items
594
- # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
609
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
595
610
  sig { returns(T.nilable(Integer)) }
596
611
  attr_accessor :iterations
597
612
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
@@ -615,7 +630,7 @@ module Stripe
615
630
  sig { returns(T.nilable(Integer)) }
616
631
  attr_accessor :trial_end
617
632
  sig {
618
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::CreateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
633
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::CreateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]))), duration: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Duration), end_date: T.nilable(Integer), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(Integer)).void
619
634
  }
620
635
  def initialize(
621
636
  add_invoice_items: nil,
@@ -629,6 +644,7 @@ module Stripe
629
644
  default_tax_rates: nil,
630
645
  description: nil,
631
646
  discounts: nil,
647
+ duration: nil,
632
648
  end_date: nil,
633
649
  invoice_settings: nil,
634
650
  items: nil,
@@ -948,6 +964,16 @@ module Stripe
948
964
  }
949
965
  def initialize(coupon: nil, discount: nil, promotion_code: nil); end
950
966
  end
967
+ class Duration < Stripe::RequestParams
968
+ # Specifies phase duration. Either `day`, `week`, `month` or `year`.
969
+ sig { returns(String) }
970
+ attr_accessor :interval
971
+ # The multiplier applied to the interval.
972
+ sig { returns(T.nilable(Integer)) }
973
+ attr_accessor :interval_count
974
+ sig { params(interval: String, interval_count: T.nilable(Integer)).void }
975
+ def initialize(interval: nil, interval_count: nil); end
976
+ end
951
977
  class InvoiceSettings < Stripe::RequestParams
952
978
  class Issuer < Stripe::RequestParams
953
979
  # The connected account being referenced when `type` is `account`.
@@ -1136,6 +1162,11 @@ module Stripe
1136
1162
  returns(T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))))
1137
1163
  }
1138
1164
  attr_accessor :discounts
1165
+ # The number of intervals the phase should last. If set, `end_date` must not be set.
1166
+ sig {
1167
+ returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Duration))
1168
+ }
1169
+ attr_accessor :duration
1139
1170
  # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
1140
1171
  sig { returns(T.nilable(T.any(Integer, String))) }
1141
1172
  attr_accessor :end_date
@@ -1147,7 +1178,7 @@ module Stripe
1147
1178
  # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule.
1148
1179
  sig { returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item]) }
1149
1180
  attr_accessor :items
1150
- # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set.
1181
+ # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. This parameter is deprecated and will be removed in a future version. Use `duration` instead.
1151
1182
  sig { returns(T.nilable(Integer)) }
1152
1183
  attr_accessor :iterations
1153
1184
  # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`.
@@ -1174,7 +1205,7 @@ module Stripe
1174
1205
  sig { returns(T.nilable(T.any(Integer, String))) }
1175
1206
  attr_accessor :trial_end
1176
1207
  sig {
1177
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
1208
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem]), application_fee_percent: T.nilable(Float), automatic_tax: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::BillingThresholds))), collection_method: T.nilable(String), currency: T.nilable(String), default_payment_method: T.nilable(String), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]))), duration: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Duration), end_date: T.nilable(T.any(Integer, String)), invoice_settings: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings), items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item], iterations: T.nilable(Integer), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), start_date: T.nilable(T.any(Integer, String)), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData), trial: T.nilable(T::Boolean), trial_end: T.nilable(T.any(Integer, String))).void
1178
1209
  }
1179
1210
  def initialize(
1180
1211
  add_invoice_items: nil,
@@ -1188,6 +1219,7 @@ module Stripe
1188
1219
  default_tax_rates: nil,
1189
1220
  description: nil,
1190
1221
  discounts: nil,
1222
+ duration: nil,
1191
1223
  end_date: nil,
1192
1224
  invoice_settings: nil,
1193
1225
  items: nil,
@@ -591,7 +591,7 @@ module Stripe
591
591
  }
592
592
  attr_accessor :billing_thresholds
593
593
  # 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.
594
- sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) }
594
+ sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) }
595
595
  attr_accessor :cancel_at
596
596
  # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
597
597
  sig { returns(T.nilable(T::Boolean)) }
@@ -651,7 +651,7 @@ module Stripe
651
651
  #
652
652
  # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes).
653
653
  #
654
- # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more.
654
+ # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the 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/changelog/2019-03-14) to learn more.
655
655
  sig { returns(T.nilable(String)) }
656
656
  attr_accessor :payment_behavior
657
657
  # Payment settings to pass to invoices created by the subscription.
@@ -683,7 +683,7 @@ module Stripe
683
683
  sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)) }
684
684
  attr_accessor :trial_settings
685
685
  sig {
686
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::BillingThresholds))), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), cancel_at_period_end: T.nilable(T::Boolean), cancellation_details: T.nilable(::Stripe::SubscriptionService::UpdateParams::CancellationDetails), collection_method: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::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)), pause_collection: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PauseCollection))), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::TransferData))), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)).void
686
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::UpdateParams::AutomaticTax), billing_cycle_anchor: T.nilable(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::BillingThresholds))), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancellation_details: T.nilable(::Stripe::SubscriptionService::UpdateParams::CancellationDetails), collection_method: T.nilable(String), days_until_due: T.nilable(Integer), default_payment_method: T.nilable(String), default_source: T.nilable(T.nilable(String)), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), description: T.nilable(T.nilable(String)), discounts: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::SubscriptionService::UpdateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::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)), pause_collection: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PauseCollection))), payment_behavior: T.nilable(String), payment_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), transfer_data: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::UpdateParams::TransferData))), trial_end: T.nilable(T.any(String, Integer)), trial_from_plan: T.nilable(T::Boolean), trial_settings: T.nilable(::Stripe::SubscriptionService::UpdateParams::TrialSettings)).void
687
687
  }
688
688
  def initialize(
689
689
  add_invoice_items: nil,
@@ -968,7 +968,7 @@ module Stripe
968
968
  def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end
969
969
  end
970
970
  class BillingMode < Stripe::RequestParams
971
- # Attribute for param field type
971
+ # Controls the calculation and orchestration of prorations and invoices for subscriptions.
972
972
  sig { returns(String) }
973
973
  attr_accessor :type
974
974
  sig { params(type: String).void }
@@ -1403,7 +1403,7 @@ module Stripe
1403
1403
  }
1404
1404
  attr_accessor :billing_thresholds
1405
1405
  # 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.
1406
- sig { returns(T.nilable(Integer)) }
1406
+ sig { returns(T.nilable(T.any(Integer, String))) }
1407
1407
  attr_accessor :cancel_at
1408
1408
  # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`.
1409
1409
  sig { returns(T.nilable(T::Boolean)) }
@@ -1495,7 +1495,7 @@ module Stripe
1495
1495
  sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)) }
1496
1496
  attr_accessor :trial_settings
1497
1497
  sig {
1498
- params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig), billing_mode: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingMode), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::TrialSettings)).void
1498
+ params(add_invoice_items: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]), application_fee_percent: T.nilable(T.nilable(T.any(String, Float))), automatic_tax: T.nilable(::Stripe::SubscriptionService::CreateParams::AutomaticTax), backdate_start_date: T.nilable(Integer), billing_cycle_anchor: T.nilable(Integer), billing_cycle_anchor_config: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig), billing_mode: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingMode), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::BillingThresholds))), cancel_at: T.nilable(T.any(Integer, String)), 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::SubscriptionService::CreateParams::Discount]))), expand: T.nilable(T::Array[String]), invoice_settings: T.nilable(::Stripe::SubscriptionService::CreateParams::InvoiceSettings), items: T.nilable(T::Array[::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::PaymentSettings), pending_invoice_item_interval: T.nilable(T.nilable(T.any(String, ::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval))), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionService::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::SubscriptionService::CreateParams::TrialSettings)).void
1499
1499
  }
1500
1500
  def initialize(
1501
1501
  add_invoice_items: nil,