diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c9b5edcc..14e93a9c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1712 \ No newline at end of file +v1714 \ No newline at end of file diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index 6ff18c21..9b6a52cf 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -3096,6 +3096,8 @@ module Stripe attr_accessor :application_fee_percent # A future timestamp to anchor the subscription's billing cycle for new subscriptions. attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + 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 # from the subscription. @@ -3127,6 +3129,7 @@ module Stripe def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, @@ -3140,6 +3143,7 @@ module Stripe ) @application_fee_percent = application_fee_percent @billing_cycle_anchor = billing_cycle_anchor + @billing_mode = billing_mode @default_tax_rates = default_tax_rates @description = description @invoice_settings = invoice_settings diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index da70055f..010a5bef 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -3862,6 +3862,8 @@ module Stripe attr_accessor :amendments # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_accessor :billing_behavior + # The billing mode that will be used to create the subscription schedule. When the schedule creates a subscription, the subscription's `billing_mode` will be set to the same value as the schedule's `billing_mode`. + 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. attr_accessor :end_behavior # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. @@ -3874,6 +3876,7 @@ module Stripe def initialize( amendments: nil, billing_behavior: nil, + billing_mode: nil, end_behavior: nil, phases: nil, prebilling: nil, @@ -3881,6 +3884,7 @@ module Stripe ) @amendments = amendments @billing_behavior = billing_behavior + @billing_mode = billing_mode @end_behavior = end_behavior @phases = phases @prebilling = prebilling @@ -4030,6 +4034,8 @@ module Stripe end # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + 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. attr_accessor :cancel_at # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. @@ -4055,6 +4061,7 @@ module Stripe def initialize( billing_cycle_anchor: nil, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, @@ -4068,6 +4075,7 @@ module Stripe trial_end: nil ) @billing_cycle_anchor = billing_cycle_anchor + @billing_mode = billing_mode @cancel_at = cancel_at @cancel_at_period_end = cancel_at_period_end @cancel_now = cancel_now diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index 56b2edc3..48c14e6a 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -307,6 +307,8 @@ module Stripe attr_reader :billing_behavior # Whether the subscription will always start a new billing period when the quote is accepted. attr_reader :billing_cycle_anchor + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted. + attr_reader :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. attr_reader :description # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. diff --git a/lib/stripe/resources/quote_preview_subscription_schedule.rb b/lib/stripe/resources/quote_preview_subscription_schedule.rb index 78955a29..f0d88a6e 100644 --- a/lib/stripe/resources/quote_preview_subscription_schedule.rb +++ b/lib/stripe/resources/quote_preview_subscription_schedule.rb @@ -293,6 +293,8 @@ module Stripe attr_reader :applies_to # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_reader :billing_behavior + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule. + attr_reader :billing_mode # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index 422e58ea..f52edebb 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -1898,6 +1898,8 @@ module Stripe attr_reader :billing_cycle_anchor # The fixed values used to calculate the `billing_cycle_anchor`. attr_reader :billing_cycle_anchor_config + # Configure billing_mode in each subscription to opt in improved credit proration behavior. + attr_reader :billing_mode # A date in the future at which the subscription will automatically get canceled attr_reader :cancel_at # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index 76b741e6..1457f208 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -2236,6 +2236,8 @@ module Stripe attr_reader :application # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_reader :billing_behavior + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule. + attr_reader :billing_mode # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. attr_reader :canceled_at # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. diff --git a/lib/stripe/services/checkout/session_service.rb b/lib/stripe/services/checkout/session_service.rb index a00bd7fa..9fbd8158 100644 --- a/lib/stripe/services/checkout/session_service.rb +++ b/lib/stripe/services/checkout/session_service.rb @@ -2005,6 +2005,8 @@ module Stripe attr_accessor :application_fee_percent # A future timestamp to anchor the subscription's billing cycle for new subscriptions. attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + 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 # from the subscription. @@ -2036,6 +2038,7 @@ module Stripe def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, @@ -2049,6 +2052,7 @@ module Stripe ) @application_fee_percent = application_fee_percent @billing_cycle_anchor = billing_cycle_anchor + @billing_mode = billing_mode @default_tax_rates = default_tax_rates @description = description @invoice_settings = invoice_settings diff --git a/lib/stripe/services/invoice_service.rb b/lib/stripe/services/invoice_service.rb index 96673fa8..69c826c7 100644 --- a/lib/stripe/services/invoice_service.rb +++ b/lib/stripe/services/invoice_service.rb @@ -3385,6 +3385,8 @@ module Stripe attr_accessor :amendments # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. attr_accessor :billing_behavior + # The billing mode that will be used to create the subscription schedule. When the schedule creates a subscription, the subscription's `billing_mode` will be set to the same value as the schedule's `billing_mode`. + 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. attr_accessor :end_behavior # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. @@ -3397,6 +3399,7 @@ module Stripe def initialize( amendments: nil, billing_behavior: nil, + billing_mode: nil, end_behavior: nil, phases: nil, prebilling: nil, @@ -3404,6 +3407,7 @@ module Stripe ) @amendments = amendments @billing_behavior = billing_behavior + @billing_mode = billing_mode @end_behavior = end_behavior @phases = phases @prebilling = prebilling @@ -3553,6 +3557,8 @@ module Stripe end # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + 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. attr_accessor :cancel_at # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. @@ -3578,6 +3584,7 @@ module Stripe def initialize( billing_cycle_anchor: nil, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, @@ -3591,6 +3598,7 @@ module Stripe trial_end: nil ) @billing_cycle_anchor = billing_cycle_anchor + @billing_mode = billing_mode @cancel_at = cancel_at @cancel_at_period_end = cancel_at_period_end @cancel_now = cancel_now diff --git a/rbi/stripe.rbi b/rbi/stripe.rbi index 06334cab..e5cdc15d 100644 --- a/rbi/stripe.rbi +++ b/rbi/stripe.rbi @@ -22287,6 +22287,9 @@ module Stripe # A future timestamp to anchor the subscription's billing cycle for new subscriptions. sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + sig { returns(T.nilable(String)) } + 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 # from the subscription. @@ -22331,11 +22334,12 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), 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(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 } def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, @@ -37236,6 +37240,9 @@ module Stripe # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(T.nilable(String)) } attr_accessor :billing_behavior + # The billing mode that will be used to create the subscription schedule. When the schedule creates a subscription, the subscription's `billing_mode` will be set to the same value as the schedule's `billing_mode`. + sig { returns(T.nilable(String)) } + 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)) } attr_accessor :end_behavior @@ -37253,11 +37260,12 @@ 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), 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(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 } def initialize( amendments: nil, billing_behavior: nil, + billing_mode: nil, end_behavior: nil, phases: nil, prebilling: nil, @@ -37416,6 +37424,9 @@ module Stripe # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + sig { returns(T.nilable(String)) } + 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, Integer)))) } attr_accessor :cancel_at @@ -37454,10 +37465,11 @@ 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)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), 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(String), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), 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, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, @@ -77988,6 +78000,9 @@ module Stripe # Whether the subscription will always start a new billing period when the quote is accepted. sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted. + sig { returns(String) } + attr_reader :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)) } attr_reader :description @@ -82453,6 +82468,9 @@ module Stripe # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule. + sig { returns(String) } + attr_reader :billing_mode # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at @@ -91246,6 +91264,9 @@ module Stripe # The fixed values used to calculate the `billing_cycle_anchor`. sig { returns(T.nilable(BillingCycleAnchorConfig)) } attr_reader :billing_cycle_anchor_config + # Configure billing_mode in each subscription to opt in improved credit proration behavior. + sig { returns(String) } + attr_reader :billing_mode # A date in the future at which the subscription will automatically get canceled sig { returns(T.nilable(Integer)) } attr_reader :cancel_at @@ -94050,6 +94071,9 @@ module Stripe # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule. + sig { returns(String) } + attr_reader :billing_mode # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at @@ -122847,6 +122871,9 @@ module Stripe # A future timestamp to anchor the subscription's billing cycle for new subscriptions. sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + sig { returns(T.nilable(String)) } + 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 # from the subscription. @@ -122891,11 +122918,12 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), 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(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 } def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, @@ -135590,6 +135618,9 @@ module Stripe # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(T.nilable(String)) } attr_accessor :billing_behavior + # The billing mode that will be used to create the subscription schedule. When the schedule creates a subscription, the subscription's `billing_mode` will be set to the same value as the schedule's `billing_mode`. + sig { returns(T.nilable(String)) } + 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)) } attr_accessor :end_behavior @@ -135607,11 +135638,12 @@ 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), 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(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 } def initialize( amendments: nil, billing_behavior: nil, + billing_mode: nil, end_behavior: nil, phases: nil, prebilling: nil, @@ -135770,6 +135802,9 @@ module Stripe # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + sig { returns(T.nilable(String)) } + 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, Integer)))) } attr_accessor :cancel_at @@ -135808,10 +135843,11 @@ 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)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), 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(String), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), 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, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index 06f0b699..3fc82705 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -3593,6 +3593,9 @@ module Stripe # A future timestamp to anchor the subscription's billing cycle for new subscriptions. sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + sig { returns(T.nilable(String)) } + 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 # from the subscription. @@ -3637,11 +3640,12 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), 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(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 } def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index 42cc5203..e83b1893 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -4471,6 +4471,9 @@ module Stripe # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(T.nilable(String)) } attr_accessor :billing_behavior + # The billing mode that will be used to create the subscription schedule. When the schedule creates a subscription, the subscription's `billing_mode` will be set to the same value as the schedule's `billing_mode`. + sig { returns(T.nilable(String)) } + 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)) } attr_accessor :end_behavior @@ -4488,11 +4491,12 @@ 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), 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(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 } def initialize( amendments: nil, billing_behavior: nil, + billing_mode: nil, end_behavior: nil, phases: nil, prebilling: nil, @@ -4651,6 +4655,9 @@ module Stripe # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + sig { returns(T.nilable(String)) } + 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, Integer)))) } attr_accessor :cancel_at @@ -4689,10 +4696,11 @@ 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)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), 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(String), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), 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, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil, diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi index d3c5f8f5..ce1244ea 100644 --- a/rbi/stripe/resources/quote.rbi +++ b/rbi/stripe/resources/quote.rbi @@ -377,6 +377,9 @@ module Stripe # Whether the subscription will always start a new billing period when the quote is accepted. sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be set on the subscription once the quote is accepted. + sig { returns(String) } + attr_reader :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)) } attr_reader :description diff --git a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi index 7c2f0082..378d4b0d 100644 --- a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +++ b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi @@ -380,6 +380,9 @@ module Stripe # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule. + sig { returns(String) } + attr_reader :billing_mode # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi index eab4516a..f61afcc8 100644 --- a/rbi/stripe/resources/subscription.rbi +++ b/rbi/stripe/resources/subscription.rbi @@ -300,6 +300,9 @@ module Stripe # The fixed values used to calculate the `billing_cycle_anchor`. sig { returns(T.nilable(BillingCycleAnchorConfig)) } attr_reader :billing_cycle_anchor_config + # Configure billing_mode in each subscription to opt in improved credit proration behavior. + sig { returns(String) } + attr_reader :billing_mode # A date in the future at which the subscription will automatically get canceled sig { returns(T.nilable(Integer)) } attr_reader :cancel_at diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi index ef619cf3..9b77f9bd 100644 --- a/rbi/stripe/resources/subscription_schedule.rbi +++ b/rbi/stripe/resources/subscription_schedule.rbi @@ -369,6 +369,9 @@ module Stripe # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior + # The [billing mode](/api/subscriptions/create#create_subscription-billing_mode) that will be used to process all future operations for the subscription schedule. + sig { returns(String) } + attr_reader :billing_mode # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at diff --git a/rbi/stripe/services/checkout/session_service.rbi b/rbi/stripe/services/checkout/session_service.rbi index 60854f34..62eec175 100644 --- a/rbi/stripe/services/checkout/session_service.rbi +++ b/rbi/stripe/services/checkout/session_service.rbi @@ -2101,6 +2101,9 @@ module Stripe # A future timestamp to anchor the subscription's billing cycle for new subscriptions. sig { returns(T.nilable(Integer)) } attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + sig { returns(T.nilable(String)) } + 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 # from the subscription. @@ -2145,11 +2148,12 @@ module Stripe } attr_accessor :trial_settings sig { - params(application_fee_percent: T.nilable(Float), billing_cycle_anchor: T.nilable(Integer), 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(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 } def initialize( application_fee_percent: nil, billing_cycle_anchor: nil, + billing_mode: nil, default_tax_rates: nil, description: nil, invoice_settings: nil, diff --git a/rbi/stripe/services/invoice_service.rbi b/rbi/stripe/services/invoice_service.rbi index c84a30ef..339291da 100644 --- a/rbi/stripe/services/invoice_service.rbi +++ b/rbi/stripe/services/invoice_service.rbi @@ -3643,6 +3643,9 @@ module Stripe # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(T.nilable(String)) } attr_accessor :billing_behavior + # The billing mode that will be used to create the subscription schedule. When the schedule creates a subscription, the subscription's `billing_mode` will be set to the same value as the schedule's `billing_mode`. + sig { returns(T.nilable(String)) } + 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)) } attr_accessor :end_behavior @@ -3660,11 +3663,12 @@ 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), 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(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 } def initialize( amendments: nil, billing_behavior: nil, + billing_mode: nil, end_behavior: nil, phases: nil, prebilling: nil, @@ -3823,6 +3827,9 @@ module Stripe # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. sig { returns(T.nilable(T.any(String, Integer))) } attr_accessor :billing_cycle_anchor + # The billing mode to create the subscription with. Once a subscription has been created with a billing_mode, all future operations on the subscription will be processed based on the billing_mode. + sig { returns(T.nilable(String)) } + 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, Integer)))) } attr_accessor :cancel_at @@ -3861,10 +3868,11 @@ 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)), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), 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(String), cancel_at: T.nilable(T.nilable(T.any(String, Integer))), 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, + billing_mode: nil, cancel_at: nil, cancel_at_period_end: nil, cancel_now: nil,