Class: Orb::Models::PriceInterval

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/price_interval.rb,
sig/orb/models/price_interval.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Parameters:



# File 'lib/orb/models/price_interval.rb', line 101

Instance Attribute Details

#billing_cycle_dayInteger

The day of the month that Orb bills for this price

Parameters:

  • value (Integer)

Returns:

  • (Integer)


15
# File 'lib/orb/models/price_interval.rb', line 15

required :billing_cycle_day, Integer

#can_defer_billingBoolean

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.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


23
# File 'lib/orb/models/price_interval.rb', line 23

required :can_defer_billing, Orb::Internal::Type::Boolean

#current_billing_period_end_dateTime?

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.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


31
# File 'lib/orb/models/price_interval.rb', line 31

required :current_billing_period_end_date, Time, nil?: true

#current_billing_period_start_dateTime?

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.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


39
# File 'lib/orb/models/price_interval.rb', line 39

required :current_billing_period_start_date, Time, nil?: true

#end_dateTime?

The end date of the price interval. This is the date that Orb stops billing for this price.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


46
# File 'lib/orb/models/price_interval.rb', line 46

required :end_date, Time, nil?: true

#filterString?

An additional filter to apply to usage queries.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


52
# File 'lib/orb/models/price_interval.rb', line 52

required :filter, String, nil?: true

#fixed_fee_quantity_transitionsArray<Orb::Models::FixedFeeQuantityTransition>?

The fixed fee quantity transitions for this price interval. This is only relevant for fixed fees.

Parameters:

Returns:



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

#idString

Parameters:

  • value (String)

Returns:

  • (String)


9
# File 'lib/orb/models/price_interval.rb', line 9

required :id, String

#metric_parameter_overridesHash{Symbol=>Object}?

Override values for parameterized billable metric variables. Keys are parameter names, values are the override values.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:

  • (Hash{Symbol=>Object}, nil)


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

#priceOrb::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_dateTime

The start date of the price interval. This is the date that Orb starts billing for this price.

Parameters:

  • value (Time)

Returns:

  • (Time)


83
# File 'lib/orb/models/price_interval.rb', line 83

required :start_date, Time

#usage_customer_idsArray<String>?

A list of customer IDs whose usage events will be aggregated and billed under this price interval.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


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{

Returns:

  • ({)


59
# File 'sig/orb/models/price_interval.rbs', line 59

def to_hash: -> {