Class: SpreeCmCommissioner::Adjustable::Adjuster::PricingAction

Inherits:
Spree::Adjustable::Adjuster::Base
  • Object
show all
Defined in:
app/models/spree_cm_commissioner/adjustable/adjuster/pricing_action.rb

Instance Method Summary collapse

Instance Method Details

#updateObject



5
6
7
8
9
10
# File 'app/models/spree_cm_commissioner/adjustable/adjuster/pricing_action.rb', line 5

def update
  pricing_adjustments = adjustments.pricing_action.eligible.reload
  pricing_total = pricing_adjustments.sum(&:amount)

  update_totals(pricing_total)
end