Class: Stripe::Price::CreateParams::Recurring
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Price::CreateParams::Recurring
- Defined in:
- lib/stripe/resources/price.rb
Instance Attribute Summary collapse
-
#aggregate_usage ⇒ Object
Specifies a usage aggregation strategy for prices of ‘usage_type=metered`.
-
#interval ⇒ Object
Specifies billing frequency.
-
#interval_count ⇒ Object
The number of intervals between subscription billings.
-
#meter ⇒ Object
The meter tracking the usage of a metered price.
-
#trial_period_days ⇒ Object
Default number of trial days when subscribing a customer to this price using [‘trial_from_plan=true`](stripe.com/docs/api#create_subscription-trial_from_plan).
-
#usage_type ⇒ Object
Configures how the quantity per period should be determined.
Instance Method Summary collapse
-
#initialize(aggregate_usage: nil, interval: nil, interval_count: nil, meter: nil, trial_period_days: nil, usage_type: nil) ⇒ Recurring
constructor
A new instance of Recurring.
Methods inherited from RequestParams
Constructor Details
#initialize(aggregate_usage: nil, interval: nil, interval_count: nil, meter: nil, trial_period_days: nil, usage_type: nil) ⇒ Recurring
Returns a new instance of Recurring.
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 |
# File 'lib/stripe/resources/price.rb', line 333 def initialize( aggregate_usage: nil, interval: nil, interval_count: nil, meter: nil, trial_period_days: nil, usage_type: nil ) @aggregate_usage = aggregate_usage @interval = interval @interval_count = interval_count @meter = meter @trial_period_days = trial_period_days @usage_type = usage_type end |
Instance Attribute Details
#aggregate_usage ⇒ Object
Specifies a usage aggregation strategy for prices of ‘usage_type=metered`. Defaults to `sum`.
321 322 323 |
# File 'lib/stripe/resources/price.rb', line 321 def aggregate_usage @aggregate_usage end |
#interval ⇒ Object
Specifies billing frequency. Either ‘day`, `week`, `month` or `year`.
323 324 325 |
# File 'lib/stripe/resources/price.rb', line 323 def interval @interval end |
#interval_count ⇒ Object
The number of intervals between subscription billings. For example, ‘interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks).
325 326 327 |
# File 'lib/stripe/resources/price.rb', line 325 def interval_count @interval_count end |
#meter ⇒ Object
The meter tracking the usage of a metered price
327 328 329 |
# File 'lib/stripe/resources/price.rb', line 327 def meter @meter end |
#trial_period_days ⇒ Object
Default number of trial days when subscribing a customer to this price using [‘trial_from_plan=true`](stripe.com/docs/api#create_subscription-trial_from_plan).
329 330 331 |
# File 'lib/stripe/resources/price.rb', line 329 def trial_period_days @trial_period_days end |
#usage_type ⇒ Object
Configures how the quantity per period should be determined. Can be either ‘metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`.
331 332 333 |
# File 'lib/stripe/resources/price.rb', line 331 def usage_type @usage_type end |