Class: Stripe::Invoice::CreatePreviewParams::ScheduleDetails

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/invoice.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.



2875
2876
2877
2878
2879
# File 'lib/stripe/resources/invoice.rb', line 2875

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.



2869
2870
2871
# File 'lib/stripe/resources/invoice.rb', line 2869

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.



2871
2872
2873
# File 'lib/stripe/resources/invoice.rb', line 2871

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.



2873
2874
2875
# File 'lib/stripe/resources/invoice.rb', line 2873

def proration_behavior
  @proration_behavior
end