Class: Stripe::SubscriptionSchedule::Phase
- Inherits:
-
Stripe::StripeObject
- Object
- Stripe::StripeObject
- Stripe::SubscriptionSchedule::Phase
- Defined in:
- lib/stripe/resources/subscription_schedule.rb
Defined Under Namespace
Classes: AddInvoiceItem, AutomaticTax, BillingThresholds, Discount, InvoiceSettings, Item, TransferData
Constant Summary
Constants inherited from Stripe::StripeObject
Stripe::StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#add_invoice_items ⇒ Object
readonly
A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
-
#application_fee_percent ⇒ Object
readonly
A non-negative decimal between 0 and 100, with at most two decimal places.
-
#automatic_tax ⇒ Object
readonly
Attribute for field automatic_tax.
-
#billing_cycle_anchor ⇒ Object
readonly
Possible values are
phase_startorautomatic. -
#billing_thresholds ⇒ Object
readonly
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.
-
#collection_method ⇒ Object
readonly
Either
charge_automatically, orsend_invoice. -
#currency ⇒ Object
readonly
Three-letter ISO currency code, in lowercase.
-
#default_payment_method ⇒ Object
readonly
ID of the default payment method for the subscription schedule.
-
#default_tax_rates ⇒ Object
readonly
The default tax rates to apply to the subscription during this phase of the subscription schedule.
-
#description ⇒ Object
readonly
Subscription description, meant to be displayable to the customer.
-
#discounts ⇒ Object
readonly
The stackable discounts that will be applied to the subscription on this phase.
-
#end_date ⇒ Object
readonly
The end of this phase of the subscription schedule.
-
#invoice_settings ⇒ Object
readonly
The invoice settings applicable during this phase.
-
#items ⇒ Object
readonly
Subscription items to configure the subscription to during this phase of the subscription schedule.
-
#metadata ⇒ Object
readonly
Set of key-value pairs that you can attach to a phase.
-
#on_behalf_of ⇒ Object
readonly
The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription.
-
#proration_behavior ⇒ Object
readonly
When transitioning phases, controls how prorations are handled (if any).
-
#start_date ⇒ Object
readonly
The start of this phase of the subscription schedule.
-
#transfer_data ⇒ Object
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.
-
#trial ⇒ Object
readonly
If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
-
#trial_end ⇒ Object
readonly
When the trial ends within the phase.
Attributes inherited from Stripe::StripeObject
Class Method Summary collapse
Methods inherited from Stripe::StripeObject
#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #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_items ⇒ Object (readonly)
A list of prices and quantities that will generate invoice items appended to the next invoice for this phase.
480 481 482 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 480 def add_invoice_items @add_invoice_items end |
#application_fee_percent ⇒ Object (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.
482 483 484 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 482 def application_fee_percent @application_fee_percent end |
#automatic_tax ⇒ Object (readonly)
Attribute for field automatic_tax
484 485 486 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 484 def automatic_tax @automatic_tax end |
#billing_cycle_anchor ⇒ Object (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.
486 487 488 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 486 def billing_cycle_anchor @billing_cycle_anchor end |
#billing_thresholds ⇒ Object (readonly)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period
488 489 490 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 488 def billing_thresholds @billing_thresholds end |
#collection_method ⇒ Object (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.
490 491 492 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 490 def collection_method @collection_method end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
492 493 494 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 492 def currency @currency end |
#default_payment_method ⇒ Object (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.
494 495 496 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 494 def default_payment_method @default_payment_method end |
#default_tax_rates ⇒ Object (readonly)
The default tax rates to apply to the subscription during this phase of the subscription schedule.
496 497 498 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 496 def default_tax_rates @default_tax_rates end |
#description ⇒ Object (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.
498 499 500 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 498 def description @description end |
#discounts ⇒ Object (readonly)
The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts.
500 501 502 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 500 def discounts @discounts end |
#end_date ⇒ Object (readonly)
The end of this phase of the subscription schedule.
502 503 504 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 502 def end_date @end_date end |
#invoice_settings ⇒ Object (readonly)
The invoice settings applicable during this phase.
504 505 506 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 504 def invoice_settings @invoice_settings end |
#items ⇒ Object (readonly)
Subscription items to configure the subscription to during this phase of the subscription schedule.
506 507 508 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 506 def items @items end |
#metadata ⇒ Object (readonly)
Set of key-value pairs 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.
508 509 510 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 508 def @metadata end |
#on_behalf_of ⇒ Object (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.
510 511 512 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 510 def on_behalf_of @on_behalf_of end |
#proration_behavior ⇒ Object (readonly)
When transitioning phases, controls how prorations are handled (if any). Possible values are create_prorations, none, and always_invoice.
512 513 514 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 512 def proration_behavior @proration_behavior end |
#start_date ⇒ Object (readonly)
The start of this phase of the subscription schedule.
514 515 516 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 514 def start_date @start_date end |
#transfer_data ⇒ Object (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.
516 517 518 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 516 def transfer_data @transfer_data end |
#trial ⇒ Object (readonly)
If set to true the entire phase is counted as a trial and the customer will not be charged for any fees.
518 519 520 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 518 def trial @trial end |
#trial_end ⇒ Object (readonly)
When the trial ends within the phase.
520 521 522 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 520 def trial_end @trial_end end |
Class Method Details
.field_remappings ⇒ Object
534 535 536 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 534 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
522 523 524 525 526 527 528 529 530 531 532 |
# File 'lib/stripe/resources/subscription_schedule.rb', line 522 def self.inner_class_types @inner_class_types = { add_invoice_items: AddInvoiceItem, automatic_tax: AutomaticTax, billing_thresholds: BillingThresholds, discounts: Discount, invoice_settings: InvoiceSettings, items: Item, transfer_data: TransferData, } end |