Class: Orb::Models::PriceInterval
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::PriceInterval
- Defined in:
- lib/orb/models/price_interval.rb,
sig/orb/models/price_interval.rbs
Instance Attribute Summary collapse
-
#billing_cycle_day ⇒ Integer
The day of the month that Orb bills for this price.
-
#can_defer_billing ⇒ Boolean
For in-arrears prices.
-
#current_billing_period_end_date ⇒ Time?
The end of the current billing period.
-
#current_billing_period_start_date ⇒ Time?
The start date of the current billing period.
-
#end_date ⇒ Time?
The end date of the price interval.
-
#filter ⇒ String?
An additional filter to apply to usage queries.
-
#fixed_fee_quantity_transitions ⇒ Array<Orb::Models::FixedFeeQuantityTransition>?
The fixed fee quantity transitions for this price interval.
- #id ⇒ String
-
#metric_parameter_overrides ⇒ Hash{Symbol=>Object}?
Override values for parameterized billable metric variables.
-
#price ⇒ Orb::Models::Price::Unit, ...
The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item.
-
#start_date ⇒ Time
The start date of the price interval.
-
#usage_customer_ids ⇒ Array<String>?
A list of customer IDs whose usage events will be aggregated and billed under this price interval.
Instance Method Summary collapse
-
#initialize(id:, billing_cycle_day:, can_defer_billing:, current_billing_period_end_date:, current_billing_period_start_date:, end_date:, filter:, fixed_fee_quantity_transitions:, price:, start_date:, usage_customer_ids:, metric_parameter_overrides: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see PriceInterval for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id:, billing_cycle_day:, can_defer_billing:, current_billing_period_end_date:, current_billing_period_start_date:, end_date:, filter:, fixed_fee_quantity_transitions:, price:, start_date:, usage_customer_ids:, metric_parameter_overrides: nil) ⇒ Object
Some parameter documentations has been truncated, see Orb::Models::PriceInterval for more details.
The Price Interval resource represents a period of time for which a price will bill on a subscription. A subscription’s price intervals define its billing behavior.
|
|
# File 'lib/orb/models/price_interval.rb', line 101
|
Instance Attribute Details
#billing_cycle_day ⇒ Integer
The day of the month that Orb bills for this price
15 |
# File 'lib/orb/models/price_interval.rb', line 15 required :billing_cycle_day, Integer |
#can_defer_billing ⇒ Boolean
For in-arrears prices. If true, and the price interval ends mid-cycle, the final line item will be deferred to the next scheduled invoice instead of being billed mid-cycle.
23 |
# File 'lib/orb/models/price_interval.rb', line 23 required :can_defer_billing, Orb::Internal::Type::Boolean |
#current_billing_period_end_date ⇒ Time?
The end of the current billing period. This is an exclusive timestamp, such that the instant returned is exactly the end of the billing period. Set to null if this price interval is not currently active.
31 |
# File 'lib/orb/models/price_interval.rb', line 31 required :current_billing_period_end_date, Time, nil?: true |
#current_billing_period_start_date ⇒ Time?
The start date of the current billing period. This is an inclusive timestamp; the instant returned is exactly the beginning of the billing period. Set to null if this price interval is not currently active.
39 |
# File 'lib/orb/models/price_interval.rb', line 39 required :current_billing_period_start_date, Time, nil?: true |
#end_date ⇒ Time?
The end date of the price interval. This is the date that Orb stops billing for this price.
46 |
# File 'lib/orb/models/price_interval.rb', line 46 required :end_date, Time, nil?: true |
#filter ⇒ String?
An additional filter to apply to usage queries.
52 |
# File 'lib/orb/models/price_interval.rb', line 52 required :filter, String, nil?: true |
#fixed_fee_quantity_transitions ⇒ Array<Orb::Models::FixedFeeQuantityTransition>?
The fixed fee quantity transitions for this price interval. This is only relevant for fixed fees.
59 60 61 |
# File 'lib/orb/models/price_interval.rb', line 59 required :fixed_fee_quantity_transitions, -> { Orb::Internal::Type::ArrayOf[Orb::FixedFeeQuantityTransition] }, nil?: true |
#id ⇒ String
9 |
# File 'lib/orb/models/price_interval.rb', line 9 required :id, String |
#metric_parameter_overrides ⇒ Hash{Symbol=>Object}?
Override values for parameterized billable metric variables. Keys are parameter names, values are the override values.
97 98 99 |
# File 'lib/orb/models/price_interval.rb', line 97 optional :metric_parameter_overrides, Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown], nil?: true |
#price ⇒ Orb::Models::Price::Unit, ...
The Price resource represents a price that can be billed on a subscription, resulting in a charge on an invoice in the form of an invoice line item. Prices take a quantity and determine an amount to bill.
Orb supports a few different pricing models out of the box. Each of these models is serialized differently in a given Price object. The model_type field determines the key for the configuration object that is present.
For more on the types of prices, see the core concepts documentation
76 |
# File 'lib/orb/models/price_interval.rb', line 76 required :price, union: -> { Orb::Price } |
#start_date ⇒ Time
The start date of the price interval. This is the date that Orb starts billing for this price.
83 |
# File 'lib/orb/models/price_interval.rb', line 83 required :start_date, Time |
#usage_customer_ids ⇒ Array<String>?
A list of customer IDs whose usage events will be aggregated and billed under this price interval.
90 |
# File 'lib/orb/models/price_interval.rb', line 90 required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true |
Instance Method Details
#to_hash ⇒ {
59 |
# File 'sig/orb/models/price_interval.rbs', line 59
def to_hash: -> {
|