Class: Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails

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

Defined Under Namespace

Classes: Phase

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(end_behavior: nil, phases: nil, proration_behavior: nil) ⇒ ScheduleDetails

Returns a new instance of ScheduleDetails.



2439
2440
2441
2442
2443
# File 'lib/stripe/services/invoice_service.rb', line 2439

def initialize(end_behavior: nil, phases: nil, proration_behavior: nil)
  @end_behavior = end_behavior
  @phases = phases
  @proration_behavior = proration_behavior
end

Instance Attribute Details

#end_behaviorObject

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.



2433
2434
2435
# File 'lib/stripe/services/invoice_service.rb', line 2433

def end_behavior
  @end_behavior
end

#phasesObject

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.



2435
2436
2437
# File 'lib/stripe/services/invoice_service.rb', line 2435

def phases
  @phases
end

#proration_behaviorObject

In cases where the ‘schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.



2437
2438
2439
# File 'lib/stripe/services/invoice_service.rb', line 2437

def proration_behavior
  @proration_behavior
end