Class: Stripe::BillingPortal::ConfigurationUpdateParams::Features::SubscriptionUpdate

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/billing_portal/configuration_update_params.rb

Defined Under Namespace

Classes: Product, ScheduleAtPeriodEnd

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

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

Returns a new instance of SubscriptionUpdate.



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/stripe/params/billing_portal/configuration_update_params.rb', line 146

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

Instance Attribute Details

#billing_cycle_anchorObject

Determines the value to use for the billing cycle anchor on subscription updates. Valid values are now or unchanged, and the default value is unchanged. Setting the value to now resets the subscription’s billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](docs.stripe.com/billing/subscriptions/billing-cycle).



132
133
134
# File 'lib/stripe/params/billing_portal/configuration_update_params.rb', line 132

def billing_cycle_anchor
  @billing_cycle_anchor
end

#default_allowed_updatesObject

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



134
135
136
# File 'lib/stripe/params/billing_portal/configuration_update_params.rb', line 134

def default_allowed_updates
  @default_allowed_updates
end

#enabledObject

Whether the feature is enabled.



136
137
138
# File 'lib/stripe/params/billing_portal/configuration_update_params.rb', line 136

def enabled
  @enabled
end

#productsObject

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



138
139
140
# File 'lib/stripe/params/billing_portal/configuration_update_params.rb', line 138

def products
  @products
end

#proration_behaviorObject

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



140
141
142
# File 'lib/stripe/params/billing_portal/configuration_update_params.rb', line 140

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.



142
143
144
# File 'lib/stripe/params/billing_portal/configuration_update_params.rb', line 142

def schedule_at_period_end
  @schedule_at_period_end
end

#trial_update_behaviorObject

The behavior when updating a subscription that is trialing.



144
145
146
# File 'lib/stripe/params/billing_portal/configuration_update_params.rb', line 144

def trial_update_behavior
  @trial_update_behavior
end