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

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

Defined Under Namespace

Classes: BillingMode, Phase

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

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

Returns a new instance of ScheduleDetails.



2979
2980
2981
2982
2983
2984
# File 'lib/stripe/resources/invoice.rb', line 2979

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

Instance Attribute Details

#billing_modeObject

Controls how prorations and invoices for subscriptions are calculated and orchestrated.



2971
2972
2973
# File 'lib/stripe/resources/invoice.rb', line 2971

def billing_mode
  @billing_mode
end

#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.



2973
2974
2975
# File 'lib/stripe/resources/invoice.rb', line 2973

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.



2975
2976
2977
# File 'lib/stripe/resources/invoice.rb', line 2975

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.



2977
2978
2979
# File 'lib/stripe/resources/invoice.rb', line 2977

def proration_behavior
  @proration_behavior
end