diff options
author | Jared Norman <jared@super.gd> | 2019-01-08 16:29:17 -0800 |
---|---|---|
committer | Jared Norman <jared@super.gd> | 2019-01-08 16:29:17 -0800 |
commit | 9aa754d59bebc0da7e177e0841eb6f00f5c800a9 (patch) | |
tree | 9e64ac9216dd6ef2993abad52c342fc7420a4bca /lib/super_good/solidus_taxjar | |
parent | 8f972451158f8ce6e743c3c3a5b7a187db23dcef (diff) |
Add dummy calculator
This implements the interface required by Solidus, however it currently
just reports no taxes.
Diffstat (limited to 'lib/super_good/solidus_taxjar')
-rw-r--r-- | lib/super_good/solidus_taxjar/tax_calculator.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/super_good/solidus_taxjar/tax_calculator.rb b/lib/super_good/solidus_taxjar/tax_calculator.rb new file mode 100644 index 0000000..e2a398e --- /dev/null +++ b/lib/super_good/solidus_taxjar/tax_calculator.rb @@ -0,0 +1,29 @@ +module SuperGood + module SolidusTaxJar + class TaxCalculator + def initialize(order) + @order = order + end + + def calculate + Spree::Tax::OrderTax.new( + order_id: order.id, + line_item_taxes: line_item_rates, + shipment_taxes: shipment_rates + ) + end + + private + + attr_reader :order + + def line_item_rates + [] + end + + def shipment_rates + [] + end + end + end +end |