diff options
author | Jared Norman <jared@super.gd> | 2019-01-22 15:46:48 -0800 |
---|---|---|
committer | Jared Norman <jared@super.gd> | 2019-01-22 15:46:48 -0800 |
commit | 16d3fe5066f6b5a014fe2126cda2c58f16f1a202 (patch) | |
tree | 2c22e0b25bd2e0f8fd24d453678ca8c50ef4253e | |
parent | 0d91f0d5e5a38fb35c788b9305a507bf1f53ecfb (diff) |
Use promo total instead of adjustment total
-rw-r--r-- | lib/super_good/solidus_taxjar/api.rb | 2 | ||||
-rw-r--r-- | spec/super_good/solidus_taxjar/api_spec.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/super_good/solidus_taxjar/api.rb b/lib/super_good/solidus_taxjar/api.rb index 1ceb866..1065ae5 100644 --- a/lib/super_good/solidus_taxjar/api.rb +++ b/lib/super_good/solidus_taxjar/api.rb @@ -37,7 +37,7 @@ module SuperGood id: line_item.id, quantity: line_item.quantity, unit_price: line_item.price, - discount: -line_item.adjustment_total, + discount: -line_item.promo_total, product_tax_code: line_item.tax_category&.tax_code } end diff --git a/spec/super_good/solidus_taxjar/api_spec.rb b/spec/super_good/solidus_taxjar/api_spec.rb index 510084a..cbacad5 100644 --- a/spec/super_good/solidus_taxjar/api_spec.rb +++ b/spec/super_good/solidus_taxjar/api_spec.rb @@ -70,7 +70,7 @@ RSpec.describe SuperGood::SolidusTaxJar::API do variant: variant, price: 10, quantity: 3, - adjustment_total: -2 + promo_total: -2 ) end |