Class: Orb::Models::PerPriceCost

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

Parameters:



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

Instance Attribute Details

#price_idString

The price the cost is associated with

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

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.

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.

Returns:

  • (String)


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

required :total, String