Class: Stripe::QuoteUpdateParams::SubscriptionDataOverride

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

Defined Under Namespace

Classes: AppliesTo, BillOnAcceptance

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(applies_to: nil, bill_on_acceptance: nil, billing_behavior: nil, customer: nil, description: nil, end_behavior: nil, proration_behavior: nil) ⇒ SubscriptionDataOverride

Returns a new instance of SubscriptionDataOverride.



946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
# File 'lib/stripe/params/quote_update_params.rb', line 946

def initialize(
  applies_to: nil,
  bill_on_acceptance: nil,
  billing_behavior: nil,
  customer: nil,
  description: nil,
  end_behavior: nil,
  proration_behavior: nil
)
  @applies_to = applies_to
  @bill_on_acceptance = bill_on_acceptance
  @billing_behavior = billing_behavior
  @customer = customer
  @description = description
  @end_behavior = end_behavior
  @proration_behavior = proration_behavior
end

Instance Attribute Details

#applies_toObject

Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule.



926
927
928
# File 'lib/stripe/params/quote_update_params.rb', line 926

def applies_to
  @applies_to
end

#bill_on_acceptanceObject

Describes the period to bill for upon accepting the quote.



928
929
930
# File 'lib/stripe/params/quote_update_params.rb', line 928

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



930
931
932
# File 'lib/stripe/params/quote_update_params.rb', line 930

def billing_behavior
  @billing_behavior
end

#customerObject

The customer the Subscription Data override applies to.



932
933
934
# File 'lib/stripe/params/quote_update_params.rb', line 932

def customer
  @customer
end

#descriptionObject

The subscription’s description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs.



934
935
936
# File 'lib/stripe/params/quote_update_params.rb', line 934

def description
  @description
end

#end_behaviorObject

Behavior of the subscription schedule and underlying subscription when it ends.



936
937
938
# File 'lib/stripe/params/quote_update_params.rb', line 936

def end_behavior
  @end_behavior
end

#proration_behaviorObject

Determines how to handle [prorations](stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are ‘create_prorations` or `none`.

When updating a subscription, valid values are ‘create_prorations`, `none`, or `always_invoice`.

Passing ‘create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`.

Prorations can be disabled by passing ‘none`.



944
945
946
# File 'lib/stripe/params/quote_update_params.rb', line 944

def proration_behavior
  @proration_behavior
end