Class: Stripe::QuotePreviewSubscriptionSchedule::Phase

Inherits:
StripeObject
  • Object
show all
Defined in:
lib/stripe/resources/quote_preview_subscription_schedule.rb

Defined Under Namespace

Classes: AddInvoiceItem, AutomaticTax, BillingThresholds, Discount, InvoiceSettings, Item, PauseCollection, TransferData, TrialSettings

Constant Summary

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from StripeObject

#last_response

Method Summary

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#add_invoice_itemsObject (readonly)

A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.



258
259
260
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 258

def add_invoice_items
  @add_invoice_items
end

#application_fee_percentObject (readonly)

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner’s Stripe account during this phase of the schedule.



260
261
262
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 260

def application_fee_percent
  @application_fee_percent
end

#automatic_taxObject (readonly)

Attribute for field automatic_tax



262
263
264
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 262

def automatic_tax
  @automatic_tax
end

#billing_cycle_anchorObject (readonly)

Possible values are ‘phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](stripe.com/docs/billing/subscriptions/billing-cycle).



264
265
266
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 264

def billing_cycle_anchor
  @billing_cycle_anchor
end

#billing_thresholdsObject (readonly)

Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period



266
267
268
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 266

def billing_thresholds
  @billing_thresholds
end

#collection_methodObject (readonly)

Either ‘charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`.



268
269
270
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 268

def collection_method
  @collection_method
end

#couponObject (readonly)

ID of the coupon to use during this phase of the subscription schedule.



270
271
272
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 270

def coupon
  @coupon
end

#currencyObject (readonly)

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



272
273
274
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 272

def currency
  @currency
end

#default_payment_methodObject (readonly)

ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer’s invoice settings.



274
275
276
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 274

def default_payment_method
  @default_payment_method
end

#default_tax_ratesObject (readonly)

The default tax rates to apply to the subscription during this phase of the subscription schedule.



276
277
278
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 276

def default_tax_rates
  @default_tax_rates
end

#descriptionObject (readonly)

Subscription 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.



278
279
280
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 278

def description
  @description
end

#discountsObject (readonly)

The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.



280
281
282
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 280

def discounts
  @discounts
end

#end_dateObject (readonly)

The end of this phase of the subscription schedule.



282
283
284
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 282

def end_date
  @end_date
end

#invoice_settingsObject (readonly)

The invoice settings applicable during this phase.



284
285
286
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 284

def invoice_settings
  @invoice_settings
end

#itemsObject (readonly)

Subscription items to configure the subscription to during this phase of the subscription schedule.



286
287
288
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 286

def items
  @items
end

#metadataObject (readonly)

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule’s phase will update the underlying subscription’s ‘metadata` when the phase is entered. Updating the underlying subscription’s ‘metadata` directly will not affect the current phase’s ‘metadata`.



288
289
290
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 288

def 
  @metadata
end

#on_behalf_ofObject (readonly)

The account (if any) the charge was made on behalf of for charges associated with the schedule’s subscription. See the Connect documentation for details.



290
291
292
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 290

def on_behalf_of
  @on_behalf_of
end

#pause_collectionObject (readonly)

If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to ‘paused`. Learn more about [pausing collection](stripe.com/docs/billing/subscriptions/pause-payment).



292
293
294
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 292

def pause_collection
  @pause_collection
end

#proration_behaviorObject (readonly)

If the subscription schedule will prorate when transitioning to this phase. Possible values are ‘create_prorations` and `none`.



294
295
296
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 294

def proration_behavior
  @proration_behavior
end

#start_dateObject (readonly)

The start of this phase of the subscription schedule.



296
297
298
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 296

def start_date
  @start_date
end

#transfer_dataObject (readonly)

The account (if any) the associated subscription’s payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription’s invoices.



298
299
300
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 298

def transfer_data
  @transfer_data
end

#trial_continuationObject (readonly)

Specify behavior of the trial when crossing schedule phase boundaries



300
301
302
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 300

def trial_continuation
  @trial_continuation
end

#trial_endObject (readonly)

When the trial ends within the phase.



302
303
304
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 302

def trial_end
  @trial_end
end

#trial_settingsObject (readonly)

Settings related to any trials on the subscription during this phase.



304
305
306
# File 'lib/stripe/resources/quote_preview_subscription_schedule.rb', line 304

def trial_settings
  @trial_settings
end