super_good-solidus_taxjar 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +4 -0
- data/lib/super_good/solidus_taxjar/tax_calculator.rb +11 -1
- data/lib/super_good/solidus_taxjar/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6563c176335daae605e2b63add3f10d670509486f31de788687b3fadfce537c0
|
4
|
+
data.tar.gz: 391562433aaa5a9a91be498f91c7b9dbaec899dc793ad37c942b4a7d809ead59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6de73f35b8304608e370039d5e5c9d4f62ee21f756cee5ef68df8ed17b48b5c612b74e88014bcdc36ebe8eaee02670e27f118b2ab8b2e78f8e2b85a3f10a524a
|
7
|
+
data.tar.gz: ec6978c44dfc0cd05a9d4683ef66c50b773bc4599f173776dca589833a6da6c5c76816d1b486fa620597c785d5734c63f9337ea58a713d3b8f78de7d6a2f630f
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v0.6.1
|
4
|
+
|
5
|
+
- Stopped using the deprecated method `Spree::Address#empty?` in favour of simply checking that we have all of the fields on the address required for doing a TaxJar lookup.
|
6
|
+
|
3
7
|
## v0.6.0
|
4
8
|
|
5
9
|
- Added `SuperGood::SolidusTaxJar.shipping_tax_label_maker` for customizing the labels on the tax adjustments on shipments.
|
@@ -12,7 +12,7 @@ module SuperGood
|
|
12
12
|
|
13
13
|
def calculate
|
14
14
|
return no_tax if SuperGood::SolidusTaxJar.test_mode
|
15
|
-
return no_tax if order.tax_address
|
15
|
+
return no_tax if incomplete_address?(order.tax_address) || order.line_items.none?
|
16
16
|
return no_tax unless taxable_address? order.tax_address
|
17
17
|
|
18
18
|
cache do
|
@@ -150,6 +150,16 @@ module SuperGood
|
|
150
150
|
def line_item_tax_label(taxjar_line_item, spree_line_item)
|
151
151
|
SuperGood::SolidusTaxJar.line_item_tax_label_maker.(taxjar_line_item, spree_line_item)
|
152
152
|
end
|
153
|
+
|
154
|
+
def incomplete_address?(tax_address)
|
155
|
+
[
|
156
|
+
tax_address.address1,
|
157
|
+
tax_address.city,
|
158
|
+
tax_address&.state&.abbr || tax_address.state_name,
|
159
|
+
tax_address.zipcode,
|
160
|
+
tax_address.country.iso
|
161
|
+
].any?(&:blank?)
|
162
|
+
end
|
153
163
|
end
|
154
164
|
end
|
155
165
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: super_good-solidus_taxjar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jared Norman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -195,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
195
195
|
version: '0'
|
196
196
|
requirements: []
|
197
197
|
rubyforge_project:
|
198
|
-
rubygems_version: 2.
|
198
|
+
rubygems_version: 2.7.6
|
199
199
|
signing_key:
|
200
200
|
specification_version: 4
|
201
201
|
summary: Support for using TaxJar to handle tax calculations in Solidus
|