Class: Stripe::Quote::SubscriptionData

Inherits:
StripeObject show all
Defined in:
lib/stripe/resources/quote.rb

Defined Under Namespace

Classes: BillOnAcceptance, BillingMode, Prebilling

Constant Summary

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from 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

#bill_on_acceptanceObject (readonly)

Describes the period to bill for upon accepting the quote.



604
605
606
# File 'lib/stripe/resources/quote.rb', line 604

def bill_on_acceptance
  @bill_on_acceptance
end

#billing_behaviorObject (readonly)

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.



606
607
608
# File 'lib/stripe/resources/quote.rb', line 606

def billing_behavior
  @billing_behavior
end

#billing_cycle_anchorObject (readonly)

Whether the subscription will always start a new billing period when the quote is accepted.



608
609
610
# File 'lib/stripe/resources/quote.rb', line 608

def billing_cycle_anchor
  @billing_cycle_anchor
end

#billing_modeObject (readonly)

The billing mode of the quote.



610
611
612
# File 'lib/stripe/resources/quote.rb', line 610

def billing_mode
  @billing_mode
end

#descriptionObject (readonly)

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.



612
613
614
# File 'lib/stripe/resources/quote.rb', line 612

def description
  @description
end

#effective_dateObject (readonly)

When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.



614
615
616
# File 'lib/stripe/resources/quote.rb', line 614

def effective_date
  @effective_date
end

#end_behaviorObject (readonly)

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



616
617
618
# File 'lib/stripe/resources/quote.rb', line 616

def end_behavior
  @end_behavior
end

#from_subscriptionObject (readonly)

The id of the subscription that will be updated when the quote is accepted.



618
619
620
# File 'lib/stripe/resources/quote.rb', line 618

def from_subscription
  @from_subscription
end

#metadataObject (readonly)

Set of [key-value pairs](docs.stripe.com/api/metadata) 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.



620
621
622
# File 'lib/stripe/resources/quote.rb', line 620

def 
  @metadata
end

#prebillingObject (readonly)

If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with ‘effective_date`.



622
623
624
# File 'lib/stripe/resources/quote.rb', line 622

def prebilling
  @prebilling
end

#proration_behaviorObject (readonly)

Determines how to handle [prorations](docs.stripe.com/subscriptions/billing-cycle#prorations) when the quote is accepted.



624
625
626
# File 'lib/stripe/resources/quote.rb', line 624

def proration_behavior
  @proration_behavior
end

#trial_period_daysObject (readonly)

Integer representing the number of trial period days before the customer is charged for the first time.



626
627
628
# File 'lib/stripe/resources/quote.rb', line 626

def trial_period_days
  @trial_period_days
end

Class Method Details

.field_remappingsObject



636
637
638
# File 'lib/stripe/resources/quote.rb', line 636

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



628
629
630
631
632
633
634
# File 'lib/stripe/resources/quote.rb', line 628

def self.inner_class_types
  @inner_class_types = {
    bill_on_acceptance: BillOnAcceptance,
    billing_mode: BillingMode,
    prebilling: Prebilling,
  }
end