summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2019-01-10 11:49:25 -0800
committerJared Norman <jared@super.gd>2019-01-10 11:49:25 -0800
commit19cf30bbe4739a67cc4009746bdaeade1bdf38ac (patch)
treeb9b51de86e4f9fc7be00247f6e27baed7d7d44f0
parent6c3c27ebb2312e41205eb11d2e4252292269b27b (diff)
Use tax_address rather than ship_address
-rw-r--r--lib/super_good/solidus_taxjar/api.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/super_good/solidus_taxjar/api.rb b/lib/super_good/solidus_taxjar/api.rb
index a6b425c..6d16388 100644
--- a/lib/super_good/solidus_taxjar/api.rb
+++ b/lib/super_good/solidus_taxjar/api.rb
@@ -21,14 +21,14 @@ module SuperGood
attr_reader :taxjar_client
def order_params(order)
- ship_address = order.ship_address
+ tax_address = order.tax_address
{
- to_country: ship_address.country.iso,
- to_zip: ship_address.zipcode,
- to_city: ship_address.city,
- to_state: ship_address&.state&.abbr || ship_address.state_name,
- to_street: ship_address.address1,
+ to_country: tax_address.country.iso,
+ to_zip: tax_address.zipcode,
+ to_city: tax_address.city,
+ to_state: tax_address&.state&.abbr || tax_address.state_name,
+ to_street: tax_address.address1,
amount: order.item_total,
shipping: order.shipment_total,