Class: Workarea::Pricing::Discount::QuantityFixedPrice::ItemShares
- Inherits:
-
Object
- Object
- Workarea::Pricing::Discount::QuantityFixedPrice::ItemShares
- Defined in:
- app/models/workarea/pricing/discount/quantity_fixed_price/item_shares.rb
Overview
This class does the calculation of how much each item should receive off for a Workarea::Pricing::Discount::QuantityFixedPrice.
It acts like a hash, where the key is the item id and the value is the amount that item should receive off.
Instance Method Summary collapse
-
#initialize(discount, order, applications) ⇒ ItemShares
constructor
A new instance of ItemShares.
Constructor Details
#initialize(discount, order, applications) ⇒ ItemShares
Returns a new instance of ItemShares.
14 15 16 17 18 |
# File 'app/models/workarea/pricing/discount/quantity_fixed_price/item_shares.rb', line 14 def initialize(discount, order, applications) @discount = discount @order = order @applications = applications end |