Class: Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/billing_portal/configuration_service.rb

Defined Under Namespace

Classes: Product, ScheduleAtPeriodEnd

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(default_allowed_updates: nil, enabled: nil, products: nil, proration_behavior: nil, schedule_at_period_end: nil) ⇒ SubscriptionUpdate

Returns a new instance of SubscriptionUpdate.



176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 176

def initialize(
  default_allowed_updates: nil,
  enabled: nil,
  products: nil,
  proration_behavior: nil,
  schedule_at_period_end: nil
)
  @default_allowed_updates = default_allowed_updates
  @enabled = enabled
  @products = products
  @proration_behavior = proration_behavior
  @schedule_at_period_end = schedule_at_period_end
end

Instance Attribute Details

#default_allowed_updatesObject

The types of subscription updates that are supported. When empty, subscriptions are not updateable.



162
163
164
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 162

def default_allowed_updates
  @default_allowed_updates
end

#enabledObject

Whether the feature is enabled.



165
166
167
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 165

def enabled
  @enabled
end

#productsObject

The list of up to 10 products that support subscription updates.



168
169
170
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 168

def products
  @products
end

#proration_behaviorObject

Determines how to handle prorations resulting from subscription updates. Valid values are ‘none`, `create_prorations`, and `always_invoice`.



171
172
173
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 171

def proration_behavior
  @proration_behavior
end

#schedule_at_period_endObject

Setting to control when an update should be scheduled at the end of the period instead of applying immediately.



174
175
176
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 174

def schedule_at_period_end
  @schedule_at_period_end
end