diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/super_good/solidus_taxjar/discount_calculator.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/super_good/solidus_taxjar/discount_calculator.rb b/lib/super_good/solidus_taxjar/discount_calculator.rb new file mode 100644 index 0000000..747a9d0 --- /dev/null +++ b/lib/super_good/solidus_taxjar/discount_calculator.rb @@ -0,0 +1,17 @@ +module SuperGood + module SolidusTaxJar + class DiscountCalculator + def initialize(line_item) + @line_item = line_item + end + + def discount + -line_item.promo_total + end + + private + + attr_reader :line_item + end + end +end |