Class: Stripe::SubscriptionScheduleUpdateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::SubscriptionScheduleUpdateParams
- Defined in:
- lib/stripe/params/subscription_schedule_update_params.rb
Defined Under Namespace
Classes: DefaultSettings, PauseSchedule, Phase
Instance Attribute Summary collapse
-
#default_settings ⇒ Object
Object representing the subscription schedule's default settings.
-
#end_behavior ⇒ Object
Behavior of the subscription schedule and underlying subscription when it ends.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object.
-
#pause_schedules ⇒ Object
Configures the subscription's pause behavior and, optionally, its resume behavior.
-
#phases ⇒ Object
List representing phases of the subscription schedule.
-
#proration_behavior ⇒ Object
If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(default_settings: nil, end_behavior: nil, expand: nil, metadata: nil, pause_schedules: nil, phases: nil, proration_behavior: nil) ⇒ SubscriptionScheduleUpdateParams
constructor
A new instance of SubscriptionScheduleUpdateParams.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, discriminator, discriminator_fields, new, #to_h
Constructor Details
#initialize(default_settings: nil, end_behavior: nil, expand: nil, metadata: nil, pause_schedules: nil, phases: nil, proration_behavior: nil) ⇒ SubscriptionScheduleUpdateParams
Returns a new instance of SubscriptionScheduleUpdateParams.
779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 779 def initialize( default_settings: nil, end_behavior: nil, expand: nil, metadata: nil, pause_schedules: nil, phases: nil, proration_behavior: nil ) @default_settings = default_settings @end_behavior = end_behavior @expand = @metadata = @pause_schedules = pause_schedules @phases = phases @proration_behavior = proration_behavior end |
Instance Attribute Details
#default_settings ⇒ Object
Object representing the subscription schedule's default settings.
765 766 767 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 765 def default_settings @default_settings 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.
767 768 769 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 767 def end_behavior @end_behavior end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
769 770 771 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 769 def @expand end |
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
771 772 773 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 771 def @metadata end |
#pause_schedules ⇒ Object
Configures the subscription's pause behavior and, optionally, its resume behavior. Only one entry is supported. Include a key to update an existing entry. Omit to leave an existing pause schedule unchanged, or pass "" to clear it.
773 774 775 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 773 def pause_schedules @pause_schedules 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. Note that past phases can be omitted.
775 776 777 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 775 def phases @phases end |
#proration_behavior ⇒ Object
If the update changes the billing configuration (item price, quantity, etc.) of the current phase, indicates how prorations from this change should be handled. The default value is create_prorations.
777 778 779 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 777 def proration_behavior @proration_behavior end |
Class Method Details
.field_encodings ⇒ Object
797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 |
# File 'lib/stripe/params/subscription_schedule_update_params.rb', line 797 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 |