Class: Stripe::InvoiceCreatePreviewParams::ScheduleDetails
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::InvoiceCreatePreviewParams::ScheduleDetails
- Defined in:
- lib/stripe/params/invoice_create_preview_params.rb
Defined Under Namespace
Classes: BillingMode, Phase
Instance Attribute Summary collapse
-
#billing_mode ⇒ Object
Controls how prorations and invoices for subscriptions are calculated and orchestrated.
-
#end_behavior ⇒ Object
Behavior of the subscription schedule and underlying subscription when it ends.
-
#phases ⇒ Object
List representing phases of the subscription schedule.
-
#proration_behavior ⇒ Object
In cases where the ‘schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil) ⇒ ScheduleDetails
constructor
A new instance of ScheduleDetails.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(billing_mode: nil, end_behavior: nil, phases: nil, proration_behavior: nil) ⇒ ScheduleDetails
Returns a new instance of ScheduleDetails.
798 799 800 801 802 803 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 798 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_mode ⇒ Object
Controls how prorations and invoices for subscriptions are calculated and orchestrated.
790 791 792 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 790 def billing_mode @billing_mode end |
#end_behavior ⇒ Object
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.
792 793 794 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 792 def end_behavior @end_behavior end |
#phases ⇒ Object
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.
794 795 796 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 794 def phases @phases end |
#proration_behavior ⇒ Object
In cases where the ‘schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request.
796 797 798 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 796 def proration_behavior @proration_behavior end |
Class Method Details
.field_encodings ⇒ Object
805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 |
# File 'lib/stripe/params/invoice_create_preview_params.rb', line 805 def self.field_encodings @field_encodings = { phases: { kind: :array, element: { kind: :object, fields: { add_invoice_items: { kind: :array, element: { kind: :object, fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, }, }, }, items: { kind: :array, element: { kind: :object, fields: { price_data: { kind: :object, fields: { unit_amount_decimal: :decimal_string } }, }, }, }, }, }, }, } end |