Class: Stripe::QuoteUpdateParams::SubscriptionDataOverride

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

Defined Under Namespace

Classes: AppliesTo, BillOnAcceptance, BillingSchedule

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, billing_schedules: nil, customer: nil, description: nil, end_behavior: nil, phase_effective_at: nil, proration_behavior: nil) ⇒ SubscriptionDataOverride

Returns a new instance of SubscriptionDataOverride.



1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
# File 'lib/stripe/params/quote_update_params.rb', line 1150

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

Instance Attribute Details

#applies_toObject

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



1126
1127
1128
# File 'lib/stripe/params/quote_update_params.rb', line 1126

def applies_to
  @applies_to
end

#bill_on_acceptanceObject

Describes the period to bill for upon accepting the quote.



1128
1129
1130
# File 'lib/stripe/params/quote_update_params.rb', line 1128

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.



1130
1131
1132
# File 'lib/stripe/params/quote_update_params.rb', line 1130

def billing_behavior
  @billing_behavior
end

#billing_schedulesObject

Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.



1132
1133
1134
# File 'lib/stripe/params/quote_update_params.rb', line 1132

def billing_schedules
  @billing_schedules
end

#customerObject

The customer the Subscription Data override applies to.



1134
1135
1136
# File 'lib/stripe/params/quote_update_params.rb', line 1134

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.



1136
1137
1138
# File 'lib/stripe/params/quote_update_params.rb', line 1136

def description
  @description
end

#end_behaviorObject

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



1138
1139
1140
# File 'lib/stripe/params/quote_update_params.rb', line 1138

def end_behavior
  @end_behavior
end

#phase_effective_atObject

Configures how the subscription schedule handles billing for phase transitions when the quote is accepted. Possible values are ‘phase_start` (default) or `billing_period_start`. `phase_start` bills based on the current state of the subscription, ignoring changes scheduled in future phases. `billing_period_start` bills predictively for upcoming phase transitions within the current billing cycle, including pricing changes and service period adjustments that will occur before the next invoice.



1140
1141
1142
# File 'lib/stripe/params/quote_update_params.rb', line 1140

def phase_effective_at
  @phase_effective_at
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`.



1148
1149
1150
# File 'lib/stripe/params/quote_update_params.rb', line 1148

def proration_behavior
  @proration_behavior
end