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.



2473
2474
2475
2476
2477
# File 'lib/stripe/services/invoice_service.rb', line 2473

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.



2467
2468
2469
# File 'lib/stripe/services/invoice_service.rb', line 2467

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.



2469
2470
2471
# File 'lib/stripe/services/invoice_service.rb', line 2469

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.



2471
2472
2473
# File 'lib/stripe/services/invoice_service.rb', line 2471

def proration_behavior
  @proration_behavior
end