super_good-solidus_taxjar 0.11.1 → 0.12.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 +14 -2
- data/lib/super_good/solidus_taxjar/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 383b1f52471f45dc1f4d51c3bcf7c3b6063313202997858a59bc3107444939ee
|
4
|
+
data.tar.gz: 348d9b9942e4def84a74ba612124f337438d0d1260408593058eca9867f821c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0afc95de0aa4073290d7c6c8a5a8c7bb21988c96811eecc4a9be55f0b66339d632861123d814927d1adfa09126cb54d4014d39bde08fe0b16b5a90cebe05057
|
7
|
+
data.tar.gz: f9ae6f8fb17e5f806aafd5e88adc6b31024814d7182823190a20b4ed46c6e43d0a5e4d36b80d83af7898199e72ee8b99bddf53d7420737b0f524ada22585e6a6
|
data/CHANGELOG.md
CHANGED
@@ -30,7 +30,7 @@ module SuperGood
|
|
30
30
|
transaction_date: order.completed_at.to_formatted_s(:iso8601),
|
31
31
|
amount: [order.total - order.additional_tax_total, 0].max,
|
32
32
|
shipping: shipping(order),
|
33
|
-
sales_tax: order
|
33
|
+
sales_tax: sales_tax(order)
|
34
34
|
)
|
35
35
|
end
|
36
36
|
|
@@ -85,7 +85,7 @@ module SuperGood
|
|
85
85
|
product_tax_code: line_item.tax_category&.tax_code,
|
86
86
|
unit_price: line_item.price,
|
87
87
|
discount: discount(line_item),
|
88
|
-
sales_tax: line_item
|
88
|
+
sales_tax: line_item_sales_tax(line_item)
|
89
89
|
}
|
90
90
|
end
|
91
91
|
}
|
@@ -106,6 +106,18 @@ module SuperGood
|
|
106
106
|
def shipping(order)
|
107
107
|
SuperGood::SolidusTaxJar.shipping_calculator.(order)
|
108
108
|
end
|
109
|
+
|
110
|
+
def sales_tax(order)
|
111
|
+
return 0 if order.total.zero?
|
112
|
+
|
113
|
+
order.additional_tax_total
|
114
|
+
end
|
115
|
+
|
116
|
+
def line_item_sales_tax(line_item)
|
117
|
+
return 0 if line_item.order.total.zero?
|
118
|
+
|
119
|
+
line_item.additional_tax_total
|
120
|
+
end
|
109
121
|
end
|
110
122
|
end
|
111
123
|
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.12.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-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
194
194
|
- !ruby/object:Gem::Version
|
195
195
|
version: '0'
|
196
196
|
requirements: []
|
197
|
-
rubygems_version: 3.0.
|
197
|
+
rubygems_version: 3.0.3
|
198
198
|
signing_key:
|
199
199
|
specification_version: 4
|
200
200
|
summary: Support for using TaxJar to handle tax calculations in Solidus
|