super_good-solidus_taxjar 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/super_good/solidus_taxjar/api_params.rb +10 -2
- data/lib/super_good/solidus_taxjar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5c894c77b9759569d51ee5f1e8812e87141354365db29a5dc7d901b1daf7bd5
|
4
|
+
data.tar.gz: 523521443feeb3ce517fda157af541e9b08d2d1c0c2c458066e7fd761dea3bf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cf54bcbf49aec4cf143d1353d6025d1acd2350b3432fd071d5a27ac309f366e634a84cc6774f35172638afba8fd2e04c77494dbdcca511dc2894d78f8f03a39
|
7
|
+
data.tar.gz: 359013164861393434349aaee5c02632f1c5d10665402222572921cf5fa22d1a67b455d78502cd79183bc83e8f4f7d2fb2d94c163e82c6e966bc8646f6d4d536
|
data/CHANGELOG.md
CHANGED
@@ -63,7 +63,7 @@ module SuperGood
|
|
63
63
|
|
64
64
|
def line_items_params(line_items)
|
65
65
|
{
|
66
|
-
line_items: line_items.map do |line_item|
|
66
|
+
line_items: valid_line_items(line_items).map do |line_item|
|
67
67
|
{
|
68
68
|
id: line_item.id,
|
69
69
|
quantity: line_item.quantity,
|
@@ -77,7 +77,7 @@ module SuperGood
|
|
77
77
|
|
78
78
|
def transaction_line_items_params(line_items)
|
79
79
|
{
|
80
|
-
line_items: line_items.map do |line_item|
|
80
|
+
line_items: valid_line_items(line_items).map do |line_item|
|
81
81
|
{
|
82
82
|
id: line_item.id,
|
83
83
|
quantity: line_item.quantity,
|
@@ -91,6 +91,14 @@ module SuperGood
|
|
91
91
|
}
|
92
92
|
end
|
93
93
|
|
94
|
+
def valid_line_items(line_items)
|
95
|
+
# The API appears to error when sent line items with no quantity...
|
96
|
+
# but why would you do that anyway.
|
97
|
+
line_items.reject do |line_item|
|
98
|
+
line_item.quantity.zero?
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
94
102
|
def discount(line_item)
|
95
103
|
::SuperGood::SolidusTaxJar.discount_calculator.new(line_item).discount
|
96
104
|
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.
|
4
|
+
version: 0.11.0
|
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-04-
|
11
|
+
date: 2019-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|