Class: Stripe::QuoteService::UpdateParams::SubscriptionData
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::QuoteService::UpdateParams::SubscriptionData
- Defined in:
- lib/stripe/services/quote_service.rb
Defined Under Namespace
Classes: BillOnAcceptance, 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.
-
#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.
-
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule 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](stripe.com/docs/subscriptions/billing-cycle#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, description: nil, effective_date: nil, end_behavior: nil, metadata: nil, prebilling: nil, proration_behavior: nil, trial_period_days: nil) ⇒ SubscriptionData
constructor
A new instance of SubscriptionData.
Methods inherited from RequestParams
Constructor Details
#initialize(bill_on_acceptance: nil, billing_behavior: nil, billing_cycle_anchor: nil, description: nil, effective_date: nil, end_behavior: nil, metadata: nil, prebilling: nil, proration_behavior: nil, trial_period_days: nil) ⇒ SubscriptionData
Returns a new instance of SubscriptionData.
1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 |
# File 'lib/stripe/services/quote_service.rb', line 1960 def initialize( bill_on_acceptance: nil, billing_behavior: nil, billing_cycle_anchor: nil, description: nil, effective_date: nil, end_behavior: nil, metadata: 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 @description = description @effective_date = effective_date @end_behavior = end_behavior @metadata = @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.
1934 1935 1936 |
# File 'lib/stripe/services/quote_service.rb', line 1934 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.
1936 1937 1938 |
# File 'lib/stripe/services/quote_service.rb', line 1936 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.
1938 1939 1940 |
# File 'lib/stripe/services/quote_service.rb', line 1938 def billing_cycle_anchor @billing_cycle_anchor 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.
1940 1941 1942 |
# File 'lib/stripe/services/quote_service.rb', line 1940 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.
1942 1943 1944 |
# File 'lib/stripe/services/quote_service.rb', line 1942 def effective_date @effective_date end |
#end_behavior ⇒ Object
Behavior of the subscription schedule and underlying subscription when it ends.
1944 1945 1946 |
# File 'lib/stripe/services/quote_service.rb', line 1944 def end_behavior @end_behavior end |
#metadata ⇒ Object
Set of [key-value pairs](stripe.com/docs/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.
1946 1947 1948 |
# File 'lib/stripe/services/quote_service.rb', line 1946 def @metadata 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`.
1948 1949 1950 |
# File 'lib/stripe/services/quote_service.rb', line 1948 def prebilling @prebilling end |
#proration_behavior ⇒ Object
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`.
1956 1957 1958 |
# File 'lib/stripe/services/quote_service.rb', line 1956 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.
1958 1959 1960 |
# File 'lib/stripe/services/quote_service.rb', line 1958 def trial_period_days @trial_period_days end |