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, DefaultSettings, Phase, Prebilling

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, new, #to_h

Constructor Details

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

Returns a new instance of ScheduleDetails.



1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1912

def initialize(
  amendments: nil,
  billing_behavior: nil,
  billing_mode: nil,
  billing_schedules: nil,
  default_settings: 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
  @default_settings = default_settings
  @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.



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

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.



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

def billing_behavior
  @billing_behavior
end

#billing_modeObject

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



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

def billing_mode
  @billing_mode
end

#billing_schedulesObject

Sets the billing schedules for the subscription schedule.



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

def billing_schedules
  @billing_schedules
end

#default_settingsObject

Object representing the subscription schedule’s default settings.



1902
1903
1904
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1902

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



1904
1905
1906
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1904

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.



1906
1907
1908
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1906

def phases
  @phases
end

#prebillingObject

Provide any time periods to bill in advance.



1908
1909
1910
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1908

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.



1910
1911
1912
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1910

def proration_behavior
  @proration_behavior
end