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, end_behavior: nil, phases: nil, prebilling: nil, proration_behavior: nil, billing_schedules: nil) ⇒ ScheduleDetails

Returns a new instance of ScheduleDetails.



1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1537

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

Instance Attribute Details

#amendmentsObject

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



1521
1522
1523
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1521

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.



1523
1524
1525
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1523

def billing_behavior
  @billing_behavior
end

#billing_modeObject

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



1525
1526
1527
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1525

def billing_mode
  @billing_mode
end

#billing_schedulesObject

Sets the billing schedules for the subscription schedule.



1535
1536
1537
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1535

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.



1527
1528
1529
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1527

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.



1529
1530
1531
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1529

def phases
  @phases
end

#prebillingObject

Provide any time periods to bill in advance.



1531
1532
1533
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1531

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.



1533
1534
1535
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 1533

def proration_behavior
  @proration_behavior
end