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.



2909
2910
2911
2912
2913
# File 'lib/stripe/resources/invoice.rb', line 2909

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.



2903
2904
2905
# File 'lib/stripe/resources/invoice.rb', line 2903

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.



2905
2906
2907
# File 'lib/stripe/resources/invoice.rb', line 2905

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.



2907
2908
2909
# File 'lib/stripe/resources/invoice.rb', line 2907

def proration_behavior
  @proration_behavior
end