Class: Stripe::InvoiceCreatePreviewParams::ScheduleDetails

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/invoice_create_preview_params.rb

Defined Under Namespace

Classes: Amendment, BillingMode, BillingSchedule, Phase, Prebilling

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amendments: nil, billing_behavior: nil, billing_mode: nil, billing_schedules: nil, end_behavior: nil, phases: nil, prebilling: nil, proration_behavior: nil) ⇒ ScheduleDetails

Returns a new instance of ScheduleDetails.



1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1901

def initialize(
  amendments: nil,
  billing_behavior: nil,
  billing_mode: nil,
  billing_schedules: nil,
  end_behavior: nil,
  phases: nil,
  prebilling: nil,
  proration_behavior: nil
)
  @amendments = amendments
  @billing_behavior = billing_behavior
  @billing_mode = billing_mode
  @billing_schedules = billing_schedules
  @end_behavior = end_behavior
  @phases = phases
  @prebilling = prebilling
  @proration_behavior = proration_behavior
end

Instance Attribute Details

#amendmentsObject

Changes to apply to the phases of the subscription schedule, in the order provided.



1885
1886
1887
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1885

def amendments
  @amendments
end

#billing_behaviorObject

Configures when the subscription schedule generates prorations for phase transitions. Possible values are ‘prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front.



1887
1888
1889
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1887

def billing_behavior
  @billing_behavior
end

#billing_modeObject

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



1889
1890
1891
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1889

def billing_mode
  @billing_mode
end

#billing_schedulesObject

Sets the billing schedules for the subscription schedule.



1891
1892
1893
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1891

def billing_schedules
  @billing_schedules
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.



1893
1894
1895
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1893

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.



1895
1896
1897
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1895

def phases
  @phases
end

#prebillingObject

Provide any time periods to bill in advance.



1897
1898
1899
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1897

def prebilling
  @prebilling
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.



1899
1900
1901
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1899

def proration_behavior
  @proration_behavior
end