Class: Orb::Models::PriceInterval

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

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: , current_billing_period_end_date: , current_billing_period_start_date: , end_date: , filter: , fixed_fee_quantity_transitions: , price: , start_date: , usage_customer_ids: ) ⇒ 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 84

Instance Attribute Details

#billing_cycle_dayInteger

The day of the month that Orb bills for this price

Returns:

  • (Integer)


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

required :billing_cycle_day, Integer

#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.

Returns:

  • (Time, nil)


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

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.

Returns:

  • (Time, nil)


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

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.

Returns:

  • (Time, nil)


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

required :end_date, Time, nil?: true

#filterString?

An additional filter to apply to usage queries.

Returns:

  • (String, nil)


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

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.



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

required :fixed_fee_quantity_transitions,
-> { Orb::Internal::Type::ArrayOf[Orb::FixedFeeQuantityTransition] },
nil?: true

#idString

Returns:

  • (String)


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

required :id, String

#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](/core-concepts#plan-and-price)



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

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.

Returns:

  • (Time)


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

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.

Returns:

  • (Array<String>, nil)


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

required :usage_customer_ids, Orb::Internal::Type::ArrayOf[String], nil?: true