From bffc4512a79352ff63c2c9b670083423332180b2 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 15:38:43 +0000 Subject: [PATCH] Update generated code for v1800 and 2025-05-28.preview --- OPENAPI_VERSION | 2 +- lib/stripe/api_version.rb | 4 +- lib/stripe/resources/checkout/session.rb | 9 + lib/stripe/resources/invoice.rb | 18 ++ lib/stripe/resources/quote.rb | 9 + lib/stripe/resources/subscription.rb | 17 ++ lib/stripe/resources/subscription_schedule.rb | 9 + .../services/checkout/session_service.rb | 9 + lib/stripe/services/invoice_service.rb | 18 ++ lib/stripe/services/quote_service.rb | 9 + .../services/subscription_schedule_service.rb | 9 + lib/stripe/services/subscription_service.rb | 17 ++ rbi/stripe.rbi | 172 +++++++++++++++--- rbi/stripe/resources/checkout/session.rbi | 13 +- rbi/stripe/resources/invoice.rbi | 26 ++- rbi/stripe/resources/quote.rbi | 11 +- rbi/stripe/resources/subscription.rbi | 24 ++- .../resources/subscription_schedule.rbi | 11 +- .../services/checkout/session_service.rbi | 13 +- rbi/stripe/services/invoice_service.rbi | 26 ++- rbi/stripe/services/quote_service.rbi | 13 +- .../subscription_schedule_service.rbi | 11 +- rbi/stripe/services/subscription_service.rbi | 24 ++- 23 files changed, 415 insertions(+), 59 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3cac03d7..ad4294e1 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1799 \ No newline at end of file +v1800 \ No newline at end of file diff --git a/lib/stripe/api_version.rb b/lib/stripe/api_version.rb index 16de02c5..1abca094 100644 --- a/lib/stripe/api_version.rb +++ b/lib/stripe/api_version.rb @@ -3,8 +3,8 @@ module Stripe module ApiVersion - CURRENT = "2025-05-28.preview" + CURRENT = "2025-06-30.preview" CURRENT_MAJOR = "preview" - CURRENT_MONTHLY = "2025-05-28" + CURRENT_MONTHLY = "2025-06-30" end end diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index a316e6ab..4a587cf5 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -3058,6 +3058,15 @@ module Stripe end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 22ed0206..2b5f12f4 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -3336,6 +3336,15 @@ module Stripe end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -3911,6 +3920,15 @@ module Stripe end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index b37cf1f9..925ad0cd 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -1265,6 +1265,15 @@ module Stripe end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Prebilling < Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. attr_accessor :iterations diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index 43d78bc4..9fbe531f 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -1283,6 +1283,15 @@ module Stripe end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period attr_accessor :amount_gte @@ -1926,6 +1935,14 @@ module Stripe end class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end # Controls how prorations and invoices for subscriptions are calculated and orchestrated. attr_accessor :billing_mode # Specifies which fields in the response should be expanded. diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index db9ad675..194cf22c 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -434,6 +434,15 @@ module Stripe end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams diff --git a/lib/stripe/services/checkout/session_service.rb b/lib/stripe/services/checkout/session_service.rb index f9efad5e..c34712b0 100644 --- a/lib/stripe/services/checkout/session_service.rb +++ b/lib/stripe/services/checkout/session_service.rb @@ -1959,6 +1959,15 @@ module Stripe end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. diff --git a/lib/stripe/services/invoice_service.rb b/lib/stripe/services/invoice_service.rb index 8e67fc95..d2a2c962 100644 --- a/lib/stripe/services/invoice_service.rb +++ b/lib/stripe/services/invoice_service.rb @@ -2859,6 +2859,15 @@ module Stripe end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -3434,6 +3443,15 @@ module Stripe end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) diff --git a/lib/stripe/services/quote_service.rb b/lib/stripe/services/quote_service.rb index 9ab2947e..589168e4 100644 --- a/lib/stripe/services/quote_service.rb +++ b/lib/stripe/services/quote_service.rb @@ -820,6 +820,15 @@ module Stripe end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class Prebilling < Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. attr_accessor :iterations diff --git a/lib/stripe/services/subscription_schedule_service.rb b/lib/stripe/services/subscription_schedule_service.rb index 06ae6d82..b25445a2 100644 --- a/lib/stripe/services/subscription_schedule_service.rb +++ b/lib/stripe/services/subscription_schedule_service.rb @@ -126,6 +126,15 @@ module Stripe end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams diff --git a/lib/stripe/services/subscription_service.rb b/lib/stripe/services/subscription_service.rb index cc65ae96..202b2213 100644 --- a/lib/stripe/services/subscription_service.rb +++ b/lib/stripe/services/subscription_service.rb @@ -1045,6 +1045,15 @@ module Stripe end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end + class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period attr_accessor :amount_gte @@ -1688,6 +1697,14 @@ module Stripe end class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + attr_accessor :type + + def initialize(type: nil) + @type = type + end + end # Controls how prorations and invoices for subscriptions are calculated and orchestrated. attr_accessor :billing_mode # Specifies which fields in the response should be expanded. diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index 2a71654a..78ebe8bd 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -18117,6 +18117,13 @@ module Stripe def initialize(shipping_rate: nil, shipping_rate_data: nil); end end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -18173,7 +18180,9 @@ module Stripe sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::BillingMode)) + } attr_accessor :billing_mode # The tax rates that will apply to any subscription item that does not have # `tax_rates` set. Invoices created will have their `default_tax_rates` populated @@ -18216,7 +18225,7 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings)).void + params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::BillingMode), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings)).void } def initialize( application_fee_percent: nil, @@ -32076,6 +32085,13 @@ module Stripe trial_settings: nil ); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -32681,7 +32697,9 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :billing_behavior # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::BillingMode)) + } attr_accessor :billing_mode # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. sig { returns(T.nilable(String)) } @@ -32700,7 +32718,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :proration_behavior sig { - params(amendments: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment]), billing_behavior: T.nilable(String), billing_mode: T.nilable(String), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), prebilling: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling]))), proration_behavior: T.nilable(String)).void + params(amendments: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment]), billing_behavior: T.nilable(String), billing_mode: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), prebilling: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling]))), proration_behavior: T.nilable(String)).void } def initialize( amendments: nil, @@ -32713,6 +32731,13 @@ module Stripe ); end end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) @@ -32878,7 +32903,9 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::BillingMode)) + } attr_accessor :billing_mode # 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. sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) } @@ -32918,7 +32945,7 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :trial_end sig { - params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(String), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]), prebilling: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Prebilling), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void + params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]), prebilling: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Prebilling), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void } def initialize( billing_cycle_anchor: nil, @@ -74780,6 +74807,13 @@ module Stripe } def initialize(bill_from: nil, bill_until: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Prebilling < Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. sig { returns(Integer) } @@ -74799,7 +74833,7 @@ module Stripe sig { returns(T.nilable(T.nilable(String))) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillingMode)) } attr_accessor :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } @@ -74834,7 +74868,7 @@ module Stripe sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :trial_period_days sig { - params(bill_on_acceptance: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance), billing_behavior: T.nilable(String), billing_cycle_anchor: T.nilable(T.nilable(String)), billing_mode: T.nilable(String), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), end_behavior: T.nilable(String), from_subscription: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), prebilling: T.nilable(T.nilable(T.any(String, ::Stripe::Quote::CreateParams::SubscriptionData::Prebilling))), proration_behavior: T.nilable(String), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void + params(bill_on_acceptance: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance), billing_behavior: T.nilable(String), billing_cycle_anchor: T.nilable(T.nilable(String)), billing_mode: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillingMode), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), end_behavior: T.nilable(String), from_subscription: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), prebilling: T.nilable(T.nilable(T.any(String, ::Stripe::Quote::CreateParams::SubscriptionData::Prebilling))), proration_behavior: T.nilable(String), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void } def initialize( bill_on_acceptance: nil, @@ -87934,6 +87968,13 @@ module Stripe } def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period sig { returns(T.nilable(Integer)) } @@ -88447,7 +88488,7 @@ module Stripe sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig)) } attr_accessor :billing_cycle_anchor_config # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingMode)) } attr_accessor :billing_mode # 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. sig { @@ -88553,7 +88594,7 @@ module Stripe sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)) } attr_accessor :trial_settings sig { - 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(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::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: T.nilable(String), customer_account: T.nilable(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))), prebilling: T.nilable(::Stripe::Subscription::CreateParams::Prebilling), 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 + 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(T.any(Integer, String)), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: T.nilable(String), customer_account: T.nilable(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))), prebilling: T.nilable(::Stripe::Subscription::CreateParams::Prebilling), 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 } def initialize( add_invoice_items: nil, @@ -88613,13 +88654,22 @@ module Stripe def initialize(expand: nil, limit: nil, page: nil, query: nil); end end class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(String) } + sig { returns(::Stripe::Subscription::MigrateParams::BillingMode) } attr_accessor :billing_mode # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } attr_accessor :expand - sig { params(billing_mode: String, expand: T.nilable(T::Array[String])).void } + sig { + params(billing_mode: ::Stripe::Subscription::MigrateParams::BillingMode, expand: T.nilable(T::Array[String])).void + } def initialize(billing_mode: nil, expand: nil); end end class ResumeParams < Stripe::RequestParams @@ -89835,6 +89885,13 @@ module Stripe ); end end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams @@ -90504,7 +90561,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :billing_behavior # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode)) } attr_accessor :billing_mode # The identifier of the customer to create the subscription schedule for. sig { returns(T.nilable(String)) } @@ -90537,7 +90594,7 @@ module Stripe sig { returns(T.nilable(T.any(Integer, String))) } attr_accessor :start_date sig { - params(billing_behavior: T.nilable(String), billing_mode: T.nilable(String), customer: T.nilable(String), customer_account: 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]), prebilling: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Prebilling), start_date: T.nilable(T.any(Integer, String))).void + params(billing_behavior: T.nilable(String), billing_mode: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode), customer: T.nilable(String), customer_account: 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]), prebilling: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Prebilling), start_date: T.nilable(T.any(Integer, String))).void } def initialize( billing_behavior: nil, @@ -123093,6 +123150,13 @@ module Stripe def initialize(shipping_rate: nil, shipping_rate_data: nil); end end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -123149,7 +123213,9 @@ module Stripe sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::BillingMode)) + } attr_accessor :billing_mode # The tax rates that will apply to any subscription item that does not have # `tax_rates` set. Invoices created will have their `default_tax_rates` populated @@ -123192,7 +123258,7 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void + params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::BillingMode), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void } def initialize( application_fee_percent: nil, @@ -134919,6 +134985,13 @@ module Stripe trial_settings: nil ); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -135524,7 +135597,9 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :billing_behavior # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode)) + } attr_accessor :billing_mode # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. sig { returns(T.nilable(String)) } @@ -135543,7 +135618,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :proration_behavior sig { - params(amendments: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment]), billing_behavior: T.nilable(String), billing_mode: T.nilable(String), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), prebilling: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling]))), proration_behavior: T.nilable(String)).void + params(amendments: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment]), billing_behavior: T.nilable(String), billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), prebilling: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling]))), proration_behavior: T.nilable(String)).void } def initialize( amendments: nil, @@ -135556,6 +135631,13 @@ module Stripe ); end end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) @@ -135721,7 +135803,9 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode)) + } attr_accessor :billing_mode # 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. sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) } @@ -135761,7 +135845,7 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :trial_end sig { - params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(String), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), prebilling: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Prebilling), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void + params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), prebilling: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Prebilling), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void } def initialize( billing_cycle_anchor: nil, @@ -163375,6 +163459,13 @@ module Stripe } def initialize(bill_from: nil, bill_until: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Prebilling < Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. sig { returns(Integer) } @@ -163394,7 +163485,9 @@ module Stripe sig { returns(T.nilable(T.nilable(String))) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillingMode)) + } attr_accessor :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } @@ -163429,7 +163522,7 @@ module Stripe sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :trial_period_days sig { - params(bill_on_acceptance: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance), billing_behavior: T.nilable(String), billing_cycle_anchor: T.nilable(T.nilable(String)), billing_mode: T.nilable(String), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), end_behavior: T.nilable(String), from_subscription: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), prebilling: T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::CreateParams::SubscriptionData::Prebilling))), proration_behavior: T.nilable(String), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void + params(bill_on_acceptance: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance), billing_behavior: T.nilable(String), billing_cycle_anchor: T.nilable(T.nilable(String)), billing_mode: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillingMode), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), end_behavior: T.nilable(String), from_subscription: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), prebilling: T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::CreateParams::SubscriptionData::Prebilling))), proration_behavior: T.nilable(String), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void } def initialize( bill_on_acceptance: nil, @@ -172051,6 +172144,13 @@ module Stripe } def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period sig { returns(T.nilable(Integer)) } @@ -172572,7 +172672,7 @@ module Stripe } attr_accessor :billing_cycle_anchor_config # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingMode)) } attr_accessor :billing_mode # 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. sig { @@ -172678,7 +172778,7 @@ module Stripe sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)) } attr_accessor :trial_settings sig { - 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(String), 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: T.nilable(String), customer_account: T.nilable(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))), prebilling: T.nilable(::Stripe::SubscriptionService::CreateParams::Prebilling), 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 + 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: T.nilable(String), customer_account: T.nilable(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))), prebilling: T.nilable(::Stripe::SubscriptionService::CreateParams::Prebilling), 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 } def initialize( add_invoice_items: nil, @@ -172738,13 +172838,22 @@ module Stripe def initialize(expand: nil, limit: nil, page: nil, query: nil); end end class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(String) } + sig { returns(::Stripe::SubscriptionService::MigrateParams::BillingMode) } attr_accessor :billing_mode # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } attr_accessor :expand - sig { params(billing_mode: String, expand: T.nilable(T::Array[String])).void } + sig { + params(billing_mode: ::Stripe::SubscriptionService::MigrateParams::BillingMode, expand: T.nilable(T::Array[String])).void + } def initialize(billing_mode: nil, expand: nil); end end class ResumeParams < Stripe::RequestParams @@ -173418,6 +173527,13 @@ module Stripe ); end end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams @@ -174087,7 +174203,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :billing_behavior # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::BillingMode)) } attr_accessor :billing_mode # The identifier of the customer to create the subscription schedule for. sig { returns(T.nilable(String)) } @@ -174124,7 +174240,7 @@ module Stripe sig { returns(T.nilable(T.any(Integer, String))) } attr_accessor :start_date sig { - params(billing_behavior: T.nilable(String), billing_mode: T.nilable(String), customer: T.nilable(String), customer_account: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionScheduleService::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::SubscriptionScheduleService::CreateParams::Phase]), prebilling: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Prebilling), start_date: T.nilable(T.any(Integer, String))).void + params(billing_behavior: T.nilable(String), billing_mode: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::BillingMode), customer: T.nilable(String), customer_account: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionScheduleService::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::SubscriptionScheduleService::CreateParams::Phase]), prebilling: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Prebilling), start_date: T.nilable(T.any(Integer, String))).void } def initialize( billing_behavior: nil, diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index 424a616a..c38d1aab 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -3552,6 +3552,13 @@ module Stripe def initialize(shipping_rate: nil, shipping_rate_data: nil); end end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -3608,7 +3615,9 @@ module Stripe sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::BillingMode)) + } attr_accessor :billing_mode # The tax rates that will apply to any subscription item that does not have # `tax_rates` set. Invoices created will have their `default_tax_rates` populated @@ -3651,7 +3660,7 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings)).void + params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::BillingMode), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings)).void } def initialize( application_fee_percent: nil, diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index 2a7ab4f7..7df753b5 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -3884,6 +3884,13 @@ module Stripe trial_settings: nil ); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -4489,7 +4496,9 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :billing_behavior # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::BillingMode)) + } attr_accessor :billing_mode # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. sig { returns(T.nilable(String)) } @@ -4508,7 +4517,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :proration_behavior sig { - params(amendments: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment]), billing_behavior: T.nilable(String), billing_mode: T.nilable(String), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), prebilling: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling]))), proration_behavior: T.nilable(String)).void + params(amendments: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment]), billing_behavior: T.nilable(String), billing_mode: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]), prebilling: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling]))), proration_behavior: T.nilable(String)).void } def initialize( amendments: nil, @@ -4521,6 +4530,13 @@ module Stripe ); end end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) @@ -4686,7 +4702,9 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::BillingMode)) + } attr_accessor :billing_mode # 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. sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) } @@ -4726,7 +4744,7 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :trial_end sig { - params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(String), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]), prebilling: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Prebilling), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void + params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]), prebilling: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Prebilling), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void } def initialize( billing_cycle_anchor: nil, diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi index 94a34132..c1a9ee1d 100644 --- a/rbi/stripe/resources/quote.rbi +++ b/rbi/stripe/resources/quote.rbi @@ -1533,6 +1533,13 @@ module Stripe } def initialize(bill_from: nil, bill_until: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Prebilling < Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. sig { returns(Integer) } @@ -1552,7 +1559,7 @@ module Stripe sig { returns(T.nilable(T.nilable(String))) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillingMode)) } attr_accessor :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } @@ -1587,7 +1594,7 @@ module Stripe sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :trial_period_days sig { - params(bill_on_acceptance: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance), billing_behavior: T.nilable(String), billing_cycle_anchor: T.nilable(T.nilable(String)), billing_mode: T.nilable(String), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), end_behavior: T.nilable(String), from_subscription: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), prebilling: T.nilable(T.nilable(T.any(String, ::Stripe::Quote::CreateParams::SubscriptionData::Prebilling))), proration_behavior: T.nilable(String), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void + params(bill_on_acceptance: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance), billing_behavior: T.nilable(String), billing_cycle_anchor: T.nilable(T.nilable(String)), billing_mode: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::BillingMode), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), end_behavior: T.nilable(String), from_subscription: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), prebilling: T.nilable(T.nilable(T.any(String, ::Stripe::Quote::CreateParams::SubscriptionData::Prebilling))), proration_behavior: T.nilable(String), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void } def initialize( bill_on_acceptance: nil, diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi index 03faeb16..536b89c7 100644 --- a/rbi/stripe/resources/subscription.rbi +++ b/rbi/stripe/resources/subscription.rbi @@ -1554,6 +1554,13 @@ module Stripe } def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period sig { returns(T.nilable(Integer)) } @@ -2067,7 +2074,7 @@ module Stripe sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig)) } attr_accessor :billing_cycle_anchor_config # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingMode)) } attr_accessor :billing_mode # 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. sig { @@ -2173,7 +2180,7 @@ module Stripe sig { returns(T.nilable(::Stripe::Subscription::CreateParams::TrialSettings)) } attr_accessor :trial_settings sig { - 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(String), billing_thresholds: T.nilable(T.nilable(T.any(String, ::Stripe::Subscription::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: T.nilable(String), customer_account: T.nilable(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))), prebilling: T.nilable(::Stripe::Subscription::CreateParams::Prebilling), 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 + 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(T.any(Integer, String)), cancel_at_period_end: T.nilable(T::Boolean), collection_method: T.nilable(String), currency: T.nilable(String), customer: T.nilable(String), customer_account: T.nilable(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))), prebilling: T.nilable(::Stripe::Subscription::CreateParams::Prebilling), 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 } def initialize( add_invoice_items: nil, @@ -2233,13 +2240,22 @@ module Stripe def initialize(expand: nil, limit: nil, page: nil, query: nil); end end class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(String) } + sig { returns(::Stripe::Subscription::MigrateParams::BillingMode) } attr_accessor :billing_mode # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } attr_accessor :expand - sig { params(billing_mode: String, expand: T.nilable(T::Array[String])).void } + sig { + params(billing_mode: ::Stripe::Subscription::MigrateParams::BillingMode, expand: T.nilable(T::Array[String])).void + } def initialize(billing_mode: nil, expand: nil); end end class ResumeParams < Stripe::RequestParams diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi index 345f8d68..9ac17317 100644 --- a/rbi/stripe/resources/subscription_schedule.rbi +++ b/rbi/stripe/resources/subscription_schedule.rbi @@ -594,6 +594,13 @@ module Stripe ); end end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams @@ -1263,7 +1270,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :billing_behavior # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode)) } attr_accessor :billing_mode # The identifier of the customer to create the subscription schedule for. sig { returns(T.nilable(String)) } @@ -1296,7 +1303,7 @@ module Stripe sig { returns(T.nilable(T.any(Integer, String))) } attr_accessor :start_date sig { - params(billing_behavior: T.nilable(String), billing_mode: T.nilable(String), customer: T.nilable(String), customer_account: 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]), prebilling: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Prebilling), start_date: T.nilable(T.any(Integer, String))).void + params(billing_behavior: T.nilable(String), billing_mode: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::BillingMode), customer: T.nilable(String), customer_account: 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]), prebilling: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Prebilling), start_date: T.nilable(T.any(Integer, String))).void } def initialize( billing_behavior: nil, diff --git a/rbi/stripe/services/checkout/session_service.rbi b/rbi/stripe/services/checkout/session_service.rbi index e898c853..db0fd28a 100644 --- a/rbi/stripe/services/checkout/session_service.rbi +++ b/rbi/stripe/services/checkout/session_service.rbi @@ -2051,6 +2051,13 @@ module Stripe def initialize(shipping_rate: nil, shipping_rate_data: nil); end end class SubscriptionData < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class InvoiceSettings < Stripe::RequestParams class Issuer < Stripe::RequestParams # The connected account being referenced when `type` is `account`. @@ -2107,7 +2114,9 @@ module Stripe sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::BillingMode)) + } attr_accessor :billing_mode # The tax rates that will apply to any subscription item that does not have # `tax_rates` set. Invoices created will have their `default_tax_rates` populated @@ -2150,7 +2159,7 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void + params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), billing_mode: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::BillingMode), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), invoice_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings), metadata: T.nilable(T::Hash[String, String]), on_behalf_of: T.nilable(String), proration_behavior: T.nilable(String), transfer_data: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData), trial_end: T.nilable(Integer), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings)).void } def initialize( application_fee_percent: nil, diff --git a/rbi/stripe/services/invoice_service.rbi b/rbi/stripe/services/invoice_service.rbi index b76e79b2..e6ea9ba4 100644 --- a/rbi/stripe/services/invoice_service.rbi +++ b/rbi/stripe/services/invoice_service.rbi @@ -3056,6 +3056,13 @@ module Stripe trial_settings: nil ); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Phase < Stripe::RequestParams class AddInvoiceItem < Stripe::RequestParams class Discount < Stripe::RequestParams @@ -3661,7 +3668,9 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :billing_behavior # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode)) + } attr_accessor :billing_mode # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. sig { returns(T.nilable(String)) } @@ -3680,7 +3689,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :proration_behavior sig { - params(amendments: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment]), billing_behavior: T.nilable(String), billing_mode: T.nilable(String), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), prebilling: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling]))), proration_behavior: T.nilable(String)).void + params(amendments: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment]), billing_behavior: T.nilable(String), billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::BillingMode), end_behavior: T.nilable(String), phases: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]), prebilling: T.nilable(T.nilable(T.any(String, T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling]))), proration_behavior: T.nilable(String)).void } def initialize( amendments: nil, @@ -3693,6 +3702,13 @@ module Stripe ); end end class SubscriptionDetails < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Item < Stripe::RequestParams class BillingThresholds < Stripe::RequestParams # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) @@ -3858,7 +3874,9 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode)) + } attr_accessor :billing_mode # 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. sig { returns(T.nilable(T.nilable(T.any(String, T.any(Integer, String))))) } @@ -3898,7 +3916,7 @@ module Stripe sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :trial_end sig { - params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(String), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), prebilling: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Prebilling), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void + params(billing_cycle_anchor: T.nilable(T.any(String, Integer)), billing_mode: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::BillingMode), cancel_at: T.nilable(T.nilable(T.any(String, T.any(Integer, String)))), cancel_at_period_end: T.nilable(T::Boolean), cancel_now: T.nilable(T::Boolean), default_tax_rates: T.nilable(T.nilable(T.any(String, T::Array[String]))), items: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]), prebilling: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Prebilling), proration_behavior: T.nilable(String), proration_date: T.nilable(Integer), resume_at: T.nilable(String), start_date: T.nilable(Integer), trial_end: T.nilable(T.any(String, Integer))).void } def initialize( billing_cycle_anchor: nil, diff --git a/rbi/stripe/services/quote_service.rbi b/rbi/stripe/services/quote_service.rbi index 9147a979..9465e89d 100644 --- a/rbi/stripe/services/quote_service.rbi +++ b/rbi/stripe/services/quote_service.rbi @@ -870,6 +870,13 @@ module Stripe } def initialize(bill_from: nil, bill_until: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class Prebilling < Stripe::RequestParams # This is used to determine the number of billing cycles to prebill. sig { returns(Integer) } @@ -889,7 +896,9 @@ module Stripe sig { returns(T.nilable(T.nilable(String))) } attr_accessor :billing_cycle_anchor # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { + returns(T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillingMode)) + } attr_accessor :billing_mode # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } @@ -924,7 +933,7 @@ module Stripe sig { returns(T.nilable(T.nilable(T.any(String, Integer)))) } attr_accessor :trial_period_days sig { - params(bill_on_acceptance: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance), billing_behavior: T.nilable(String), billing_cycle_anchor: T.nilable(T.nilable(String)), billing_mode: T.nilable(String), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), end_behavior: T.nilable(String), from_subscription: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), prebilling: T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::CreateParams::SubscriptionData::Prebilling))), proration_behavior: T.nilable(String), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void + params(bill_on_acceptance: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance), billing_behavior: T.nilable(String), billing_cycle_anchor: T.nilable(T.nilable(String)), billing_mode: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::BillingMode), description: T.nilable(String), effective_date: T.nilable(T.nilable(T.any(String, T.any(String, Integer)))), end_behavior: T.nilable(String), from_subscription: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), prebilling: T.nilable(T.nilable(T.any(String, ::Stripe::QuoteService::CreateParams::SubscriptionData::Prebilling))), proration_behavior: T.nilable(String), trial_period_days: T.nilable(T.nilable(T.any(String, Integer)))).void } def initialize( bill_on_acceptance: nil, diff --git a/rbi/stripe/services/subscription_schedule_service.rbi b/rbi/stripe/services/subscription_schedule_service.rbi index 915a4c49..316a0cbf 100644 --- a/rbi/stripe/services/subscription_schedule_service.rbi +++ b/rbi/stripe/services/subscription_schedule_service.rbi @@ -136,6 +136,13 @@ module Stripe ); end end class CreateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class DefaultSettings < Stripe::RequestParams class AutomaticTax < Stripe::RequestParams class Liability < Stripe::RequestParams @@ -805,7 +812,7 @@ module Stripe sig { returns(T.nilable(String)) } attr_accessor :billing_behavior # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::BillingMode)) } attr_accessor :billing_mode # The identifier of the customer to create the subscription schedule for. sig { returns(T.nilable(String)) } @@ -842,7 +849,7 @@ module Stripe sig { returns(T.nilable(T.any(Integer, String))) } attr_accessor :start_date sig { - params(billing_behavior: T.nilable(String), billing_mode: T.nilable(String), customer: T.nilable(String), customer_account: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionScheduleService::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::SubscriptionScheduleService::CreateParams::Phase]), prebilling: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Prebilling), start_date: T.nilable(T.any(Integer, String))).void + params(billing_behavior: T.nilable(String), billing_mode: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::BillingMode), customer: T.nilable(String), customer_account: T.nilable(String), default_settings: T.nilable(::Stripe::SubscriptionScheduleService::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::SubscriptionScheduleService::CreateParams::Phase]), prebilling: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Prebilling), start_date: T.nilable(T.any(Integer, String))).void } def initialize( billing_behavior: nil, diff --git a/rbi/stripe/services/subscription_service.rbi b/rbi/stripe/services/subscription_service.rbi index c1aa1317..072d328a 100644 --- a/rbi/stripe/services/subscription_service.rbi +++ b/rbi/stripe/services/subscription_service.rbi @@ -1125,6 +1125,13 @@ module Stripe } def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end end + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end class BillingThresholds < Stripe::RequestParams # Monetary threshold that triggers the subscription to advance to a new billing period sig { returns(T.nilable(Integer)) } @@ -1646,7 +1653,7 @@ module Stripe } attr_accessor :billing_cycle_anchor_config # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingMode)) } attr_accessor :billing_mode # 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. sig { @@ -1752,7 +1759,7 @@ module Stripe sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::TrialSettings)) } attr_accessor :trial_settings sig { - 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(String), 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: T.nilable(String), customer_account: T.nilable(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))), prebilling: T.nilable(::Stripe::SubscriptionService::CreateParams::Prebilling), 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 + 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: T.nilable(String), customer_account: T.nilable(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))), prebilling: T.nilable(::Stripe::SubscriptionService::CreateParams::Prebilling), 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 } def initialize( add_invoice_items: nil, @@ -1812,13 +1819,22 @@ module Stripe def initialize(expand: nil, limit: nil, page: nil, query: nil); end end class MigrateParams < Stripe::RequestParams + class BillingMode < Stripe::RequestParams + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end # Controls how prorations and invoices for subscriptions are calculated and orchestrated. - sig { returns(String) } + sig { returns(::Stripe::SubscriptionService::MigrateParams::BillingMode) } attr_accessor :billing_mode # Specifies which fields in the response should be expanded. sig { returns(T.nilable(T::Array[String])) } attr_accessor :expand - sig { params(billing_mode: String, expand: T.nilable(T::Array[String])).void } + sig { + params(billing_mode: ::Stripe::SubscriptionService::MigrateParams::BillingMode, expand: T.nilable(T::Array[String])).void + } def initialize(billing_mode: nil, expand: nil); end end class ResumeParams < Stripe::RequestParams