Class: Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel
- Defined in:
- lib/stripe/services/billing_portal/configuration_service.rb
Defined Under Namespace
Classes: CancellationReason
Instance Attribute Summary collapse
-
#cancellation_reason ⇒ Object
Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer.
-
#enabled ⇒ Object
Whether the feature is enabled.
-
#mode ⇒ Object
Whether to cancel subscriptions immediately or at the end of the billing period.
-
#proration_behavior ⇒ Object
Whether to create prorations when canceling subscriptions.
Instance Method Summary collapse
-
#initialize(cancellation_reason: nil, enabled: nil, mode: nil, proration_behavior: nil) ⇒ SubscriptionCancel
constructor
A new instance of SubscriptionCancel.
Methods inherited from RequestParams
Constructor Details
#initialize(cancellation_reason: nil, enabled: nil, mode: nil, proration_behavior: nil) ⇒ SubscriptionCancel
Returns a new instance of SubscriptionCancel.
314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 314 def initialize( cancellation_reason: nil, enabled: nil, mode: nil, proration_behavior: nil ) @cancellation_reason = cancellation_reason @enabled = enabled @mode = mode @proration_behavior = proration_behavior end |
Instance Attribute Details
#cancellation_reason ⇒ Object
Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer
306 307 308 |
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 306 def cancellation_reason @cancellation_reason end |
#enabled ⇒ Object
Whether the feature is enabled.
308 309 310 |
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 308 def enabled @enabled end |
#mode ⇒ Object
Whether to cancel subscriptions immediately or at the end of the billing period.
310 311 312 |
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 310 def mode @mode end |
#proration_behavior ⇒ Object
Whether to create prorations when canceling subscriptions. Possible values are ‘none` and `create_prorations`, which is only compatible with `mode=immediately`. Passing `always_invoice` will result in an error. No prorations are generated when canceling a subscription at the end of its natural billing period.
312 313 314 |
# File 'lib/stripe/services/billing_portal/configuration_service.rb', line 312 def proration_behavior @proration_behavior end |