Class: Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/billing_portal/configuration.rb

Defined Under Namespace

Classes: CancellationReason

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(cancellation_reason: nil, enabled: nil, mode: nil, proration_behavior: nil) ⇒ SubscriptionCancel

Returns a new instance of SubscriptionCancel.



434
435
436
437
438
439
440
441
442
443
444
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 434

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_reasonObject

Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer



426
427
428
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 426

def cancellation_reason
  @cancellation_reason
end

#enabledObject

Whether the feature is enabled.



428
429
430
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 428

def enabled
  @enabled
end

#modeObject

Whether to cancel subscriptions immediately or at the end of the billing period.



430
431
432
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 430

def mode
  @mode
end

#proration_behaviorObject

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.



432
433
434
# File 'lib/stripe/resources/billing_portal/configuration.rb', line 432

def proration_behavior
  @proration_behavior
end