Class: Stripe::QuoteCreateParams::SubscriptionData
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::QuoteCreateParams::SubscriptionData
- Defined in:
- lib/stripe/params/quote_create_params.rb
Defined Under Namespace
Classes: BillOnAcceptance, BillingMode, BillingSchedule, Prebilling
Instance Attribute Summary collapse
-
#bill_on_acceptance ⇒ Object
Describes the period to bill for upon accepting the quote.
-
#billing_behavior ⇒ Object
Configures when the subscription schedule generates prorations for phase transitions.
-
#billing_cycle_anchor ⇒ Object
When specified as
reset, the subscription will always start a new billing period when the quote is accepted. -
#billing_mode ⇒ Object
Controls how prorations and invoices for subscriptions are calculated and orchestrated.
-
#billing_schedules ⇒ Object
Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
-
#description ⇒ Object
The subscription's description, meant to be displayable to the customer.
-
#effective_date ⇒ Object
When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted.
-
#end_behavior ⇒ Object
Behavior of the subscription schedule and underlying subscription when it ends.
-
#from_subscription ⇒ Object
The id of a subscription that the quote will update.
-
#metadata ⇒ Object
Set of key-value pairs that will set metadata on the subscription or subscription schedule when the quote is accepted.
-
#phase_effective_at ⇒ Object
Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
-
#prebilling ⇒ Object
If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted.
-
#proration_behavior ⇒ Object
Determines how to handle prorations.
-
#trial_period_days ⇒ Object
Integer representing the number of trial period days before the customer is charged for the first time.
Instance Method Summary collapse
-
#initialize(bill_on_acceptance: nil, billing_behavior: nil, billing_cycle_anchor: nil, billing_mode: nil, billing_schedules: nil, description: nil, effective_date: nil, end_behavior: nil, from_subscription: nil, metadata: nil, phase_effective_at: nil, prebilling: nil, proration_behavior: nil, trial_period_days: nil) ⇒ SubscriptionData
constructor
A new instance of SubscriptionData.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h
Constructor Details
#initialize(bill_on_acceptance: nil, billing_behavior: nil, billing_cycle_anchor: nil, billing_mode: nil, billing_schedules: nil, description: nil, effective_date: nil, end_behavior: nil, from_subscription: nil, metadata: nil, phase_effective_at: nil, prebilling: nil, proration_behavior: nil, trial_period_days: nil) ⇒ SubscriptionData
Returns a new instance of SubscriptionData.
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 |
# File 'lib/stripe/params/quote_create_params.rb', line 1171 def initialize( bill_on_acceptance: nil, billing_behavior: nil, billing_cycle_anchor: nil, billing_mode: nil, billing_schedules: nil, description: nil, effective_date: nil, end_behavior: nil, from_subscription: nil, metadata: nil, phase_effective_at: nil, prebilling: nil, proration_behavior: nil, trial_period_days: nil ) @bill_on_acceptance = bill_on_acceptance @billing_behavior = billing_behavior @billing_cycle_anchor = billing_cycle_anchor @billing_mode = billing_mode @billing_schedules = billing_schedules @description = description @effective_date = effective_date @end_behavior = end_behavior @from_subscription = from_subscription @metadata = @phase_effective_at = phase_effective_at @prebilling = prebilling @proration_behavior = proration_behavior @trial_period_days = trial_period_days end |
Instance Attribute Details
#bill_on_acceptance ⇒ Object
Describes the period to bill for upon accepting the quote.
1137 1138 1139 |
# File 'lib/stripe/params/quote_create_params.rb', line 1137 def bill_on_acceptance @bill_on_acceptance end |
#billing_behavior ⇒ Object
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.
1139 1140 1141 |
# File 'lib/stripe/params/quote_create_params.rb', line 1139 def billing_behavior @billing_behavior end |
#billing_cycle_anchor ⇒ Object
When specified as reset, the subscription will always start a new billing period when the quote is accepted.
1141 1142 1143 |
# File 'lib/stripe/params/quote_create_params.rb', line 1141 def billing_cycle_anchor @billing_cycle_anchor end |
#billing_mode ⇒ Object
Controls how prorations and invoices for subscriptions are calculated and orchestrated.
1143 1144 1145 |
# File 'lib/stripe/params/quote_create_params.rb', line 1143 def billing_mode @billing_mode end |
#billing_schedules ⇒ Object
Billing schedules that will be applied to the subscription or subscription schedule created when the quote is accepted.
1145 1146 1147 |
# File 'lib/stripe/params/quote_create_params.rb', line 1145 def billing_schedules @billing_schedules end |
#description ⇒ Object
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.
1147 1148 1149 |
# File 'lib/stripe/params/quote_create_params.rb', line 1147 def description @description end |
#effective_date ⇒ Object
When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value current_period_end can be provided to update a subscription at the end of its current period. The effective_date is ignored if it is in the past when the quote is accepted.
1149 1150 1151 |
# File 'lib/stripe/params/quote_create_params.rb', line 1149 def effective_date @effective_date end |
#end_behavior ⇒ Object
Behavior of the subscription schedule and underlying subscription when it ends.
1151 1152 1153 |
# File 'lib/stripe/params/quote_create_params.rb', line 1151 def end_behavior @end_behavior end |
#from_subscription ⇒ Object
The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden.
1153 1154 1155 |
# File 'lib/stripe/params/quote_create_params.rb', line 1153 def from_subscription @from_subscription end |
#metadata ⇒ Object
Set of key-value pairs that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in line_items, this field will be passed to the resulting subscription's metadata field. If subscription_data.effective_date is used, this field will be passed to the resulting subscription schedule's phases.metadata field. Unlike object-level metadata, this field is declarative. Updates will clear prior values.
1155 1156 1157 |
# File 'lib/stripe/params/quote_create_params.rb', line 1155 def @metadata end |
#phase_effective_at ⇒ Object
Configures how the subscription schedule handles billing for phase transitions when the quote is accepted.
1157 1158 1159 |
# File 'lib/stripe/params/quote_create_params.rb', line 1157 def phase_effective_at @phase_effective_at end |
#prebilling ⇒ Object
If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with effective_date.
1159 1160 1161 |
# File 'lib/stripe/params/quote_create_params.rb', line 1159 def prebilling @prebilling end |
#proration_behavior ⇒ Object
Determines how to handle 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. In order to always invoice immediately for prorations, pass always_invoice.
Prorations can be disabled by passing none.
1167 1168 1169 |
# File 'lib/stripe/params/quote_create_params.rb', line 1167 def proration_behavior @proration_behavior end |
#trial_period_days ⇒ Object
Integer representing the number of trial period days before the customer is charged for the first time.
1169 1170 1171 |
# File 'lib/stripe/params/quote_create_params.rb', line 1169 def trial_period_days @trial_period_days end |