super_good-solidus_taxjar 0.9.1 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80be38145d2165c2206c5bdd3277603644addb503a53407371e6bfadc88b02d2
|
4
|
+
data.tar.gz: ba2a05e2396e17515bcb0979291f3e1c6997c8d8d0dc2455eaeab1cb868d2ded
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 616500538680d8caa58649021782d96994ed79528cd51084a872965d57a388424d0c7ec3ea20a78becc8d1c730c43b97251f1d9629913d6d8f11a49eccc399cd
|
7
|
+
data.tar.gz: 9ca2bbc6c923180b1ee060fc8823a243c61c94181a5802e403da64100ef0cc286d37186665b925fa66ba2cb0fcf0528ba6ca6e0bb76d4dc7c7efc83fc5838354
|
data/CHANGELOG.md
CHANGED
@@ -16,6 +16,7 @@ module SuperGood
|
|
16
16
|
attr_accessor :discount_calculator
|
17
17
|
attr_accessor :exception_handler
|
18
18
|
attr_accessor :line_item_tax_label_maker
|
19
|
+
attr_accessor :shipping_calculator
|
19
20
|
attr_accessor :shipping_tax_label_maker
|
20
21
|
attr_accessor :taxable_address_check
|
21
22
|
attr_accessor :test_mode
|
@@ -28,6 +29,7 @@ module SuperGood
|
|
28
29
|
Rails.logger.error "An error occurred while fetching TaxJar tax rates - #{e}: #{e.message}"
|
29
30
|
}
|
30
31
|
self.line_item_tax_label_maker = ->(taxjar_line_item, spree_line_item) { "Sales Tax" }
|
32
|
+
self.shipping_calculator = ->(order) { order.shipment_total }
|
31
33
|
self.shipping_tax_label_maker = ->(shipment, shipping_tax) { "Sales Tax" }
|
32
34
|
self.taxable_address_check = ->(address) { true }
|
33
35
|
self.test_mode = false
|
@@ -29,7 +29,7 @@ module SuperGood
|
|
29
29
|
transaction_id: order.number,
|
30
30
|
transaction_date: order.completed_at.to_formatted_s(:iso8601),
|
31
31
|
amount: order.total - order.additional_tax_total,
|
32
|
-
shipping: order
|
32
|
+
shipping: shipping(order),
|
33
33
|
sales_tax: order.additional_tax_total
|
34
34
|
)
|
35
35
|
end
|
@@ -94,6 +94,10 @@ module SuperGood
|
|
94
94
|
def discount(line_item)
|
95
95
|
::SuperGood::SolidusTaxJar.discount_calculator.new(line_item).discount
|
96
96
|
end
|
97
|
+
|
98
|
+
def shipping(order)
|
99
|
+
SuperGood::SolidusTaxJar.shipping_calculator.(order)
|
100
|
+
end
|
97
101
|
end
|
98
102
|
end
|
99
103
|
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.10.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-
|
11
|
+
date: 2019-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|