Class: SpreeAvatax::Calculator
- Inherits:
-
Spree::Calculator
- Object
- Spree::Calculator
- SpreeAvatax::Calculator
show all
- Defined in:
- app/models/spree_avatax/calculator.rb
Overview
This is a no-op calculator that just returns the existing value. We hook our tax calculations in SpreeAvatax::TaxComputer at the order level instead of here at the line item level
Defined Under Namespace
Classes: DoNotUseCompute, TooManyPossibleAdjustments
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.description ⇒ Object
12
13
14
|
# File 'app/models/spree_avatax/calculator.rb', line 12
def self.description
Spree.t(:avatax_description)
end
|
Instance Method Details
#compute(computable) ⇒ Object
16
17
18
|
# File 'app/models/spree_avatax/calculator.rb', line 16
def compute(computable)
raise DoNotUseCompute.new("The avatax calculator should never use #compute")
end
|
#compute_shipping_rate(shipping_rate) ⇒ Object
20
21
22
23
24
|
# File 'app/models/spree_avatax/calculator.rb', line 20
def compute_shipping_rate(shipping_rate)
0
end
|