Class: Orb::Models::PerPriceCost

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/per_price_cost.rb,
sig/orb/models/per_price_cost.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(price:, price_id:, subtotal:, total:, quantity: nil) ⇒ Object

Parameters:



# File 'lib/orb/models/per_price_cost.rb', line 36

Instance Attribute Details

#priceOrb::Models::Price::Unit, ...

The price object



10
# File 'lib/orb/models/per_price_cost.rb', line 10

required :price, union: -> { Orb::Price }

#price_idString

The price the cost is associated with

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/orb/models/per_price_cost.rb', line 16

required :price_id, String

#quantityFloat?

The price's quantity for the timeframe

Parameters:

  • value (Float, nil)

Returns:

  • (Float, nil)


34
# File 'lib/orb/models/per_price_cost.rb', line 34

optional :quantity, Float, nil?: true

#subtotalString

Price's contributions for the timeframe, excluding any minimums and discounts.

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/orb/models/per_price_cost.rb', line 22

required :subtotal, String

#totalString

Price's contributions for the timeframe, including minimums and discounts.

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/orb/models/per_price_cost.rb', line 28

required :total, String

Instance Method Details

#to_hash{

Returns:

  • ({)


31
# File 'sig/orb/models/per_price_cost.rbs', line 31

def to_hash: -> {