solidus_avatax_certified 2.0.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -4
- data/README.md +10 -3
- data/app/assets/javascripts/spree/backend/address_validator.js +1 -1
- data/app/assets/javascripts/spree/frontend/address_validator.js +1 -1
- data/app/models/spree/adjustment_decorator.rb +1 -0
- data/app/models/spree/calculator/avalara_transaction.rb +1 -1
- data/app/models/tax_svc.rb +0 -1
- data/lib/solidus_avatax_certified/version.rb +1 -1
- data/solidus_avatax_certified.gemspec +1 -1
- data/spec/factories/avalara_order_factory.rb +2 -2
- data/spec/factories/avalara_shipping_method_factory.rb +1 -1
- data/spec/factories/tax_rate_factory.rb +2 -2
- data/spec/models/spree/avalara_transaction_spec.rb +1 -1
- data/spec/models/spree/order_decorator_spec.rb +1 -1
- data/spec/models/spree/refund_decorator_spec.rb +1 -1
- data/spec/models/spree/shipping_rate_decorator_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b407d1d1459d4a007f6a0a7b84df7c6c420dfad
|
4
|
+
data.tar.gz: df24b1e69eeb5772f1cb25249c6222db2ac368f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cf57a151ae1e1d9f0f309bbb327387933ad3f3caf4cc9ab1c46df49dde076957a7bc5e45d21a01fdb27770e9e1de578e061935c64e9a81c37a52b87eafebc34
|
7
|
+
data.tar.gz: 95b5fd1b3d0f3acd47284a32f7d6f2ee27edfacefce615db20066dde455cf2500d982656aaff16391468d4eacf92154037d50feb9716fbf80ec0336d231f7bb3
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
branch = '
|
3
|
+
branch = 'master'
|
4
4
|
gem "solidus", github: "solidusio/solidus", branch: branch
|
5
5
|
gem "solidus_auth_devise", github: "solidusio/solidus_auth_devise"
|
6
6
|
|
@@ -13,7 +13,4 @@ gem "rails-controller-testing", group: :test
|
|
13
13
|
gem 'pg'
|
14
14
|
gem 'mysql2'
|
15
15
|
|
16
|
-
gem 'pg'
|
17
|
-
gem 'mysql2'
|
18
|
-
|
19
16
|
gemspec
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Build Status](https://travis-ci.org/boomerdigital/solidus_avatax_certified.svg?branch=
|
1
|
+
[![Build Status](https://travis-ci.org/boomerdigital/solidus_avatax_certified.svg?branch=v2.1)](https://travis-ci.org/boomerdigital/solidus_avatax_certified)
|
2
2
|
|
3
3
|
SolidusAvataxCertified
|
4
4
|
===========
|
@@ -13,10 +13,17 @@ From Avalara's own explanation of the certification program:
|
|
13
13
|
|
14
14
|
> Avalara’s partners who have created certified integrations for AvaTax have demonstrated that those integrations contain elements which are essential to providing customers with easy-to-use software that gives accurate sales tax calculations. The certification criteria used to demonstrate these elements are based on Avalara’s years of experience integrating into ERP, ecommerce and point-of-sale applications.
|
15
15
|
|
16
|
+
**[For Installation and Setup instructions, please visit our wiki.](https://github.com/boomerdigital/solidus_avatax_certified/wiki)**
|
16
17
|
|
17
|
-
|
18
|
+
Version Compatibility Chart
|
19
|
+
---------------------------
|
20
|
+
|
21
|
+
| Solidus Version | Avatax Branch | Latest Avatax Version |
|
22
|
+
|:---------------:|:-------------:|:---------------------:|
|
23
|
+
| v1.0 - v2.0 | v1.0-v2.0 | 1.1.0 |
|
24
|
+
| v2.1 - v2.2 | master | 2.0.0 |
|
25
|
+
| v2.3 | v2.3 | 3.0.0 |
|
18
26
|
|
19
|
-
**[For Installation and Setup instructions, please visit our wiki.](https://github.com/boomerdigital/solidus_avatax_certified/wiki)**
|
20
27
|
|
21
28
|
Testing
|
22
29
|
-------
|
@@ -37,7 +37,7 @@ AddressValidator.prototype = {
|
|
37
37
|
|
38
38
|
$.each(["Line1", "Line2", "City", "PostalCode"], function(index, value){
|
39
39
|
var keyVal = controller.getKeyByValue(value);
|
40
|
-
$(wrapper + " input[id*='" + keyVal + "']").val(data.
|
40
|
+
$(wrapper + " input[id*='" + keyVal + "']").val(data.Address[value]);
|
41
41
|
}.bind(address));
|
42
42
|
|
43
43
|
this.showFlash(data);
|
@@ -39,7 +39,7 @@ AddressValidator.prototype = {
|
|
39
39
|
|
40
40
|
$.each(["Line1", "Line2", "City", "PostalCode"], function(index, value){
|
41
41
|
var keyVal = controller.getKeyByValue(value);
|
42
|
-
$(wrapper + " input[id*='" + keyVal + "']").val(data.
|
42
|
+
$(wrapper + " input[id*='" + keyVal + "']").val(data.Address[value]);
|
43
43
|
}.bind(address));
|
44
44
|
|
45
45
|
this.showFlash(data);
|
@@ -59,7 +59,7 @@ module Spree
|
|
59
59
|
|
60
60
|
def long_cache_key(order)
|
61
61
|
key = order.avatax_cache_key
|
62
|
-
key <<
|
62
|
+
key << order.tax_address.try(:cache_key)
|
63
63
|
order.line_items.each do |line_item|
|
64
64
|
key << line_item.avatax_cache_key
|
65
65
|
end
|
data/app/models/tax_svc.rb
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.require_path = "lib"
|
22
22
|
s.requirements << "none"
|
23
23
|
|
24
|
-
s.add_dependency "solidus_core", [">= 2.
|
24
|
+
s.add_dependency "solidus_core", [">= 2.3.0.alpha", "< 3.0.0"]
|
25
25
|
s.add_dependency "json", "~> 1.8"
|
26
26
|
s.add_dependency "addressable", "~> 2.4"
|
27
27
|
s.add_dependency "rest-client", "~> 1.7"
|
@@ -25,9 +25,9 @@ FactoryGirl.define do
|
|
25
25
|
create(:global_zone, default_tax: true)
|
26
26
|
end
|
27
27
|
if Spree::TaxCategory.first.nil?
|
28
|
-
create(:clothing_tax_rate,
|
28
|
+
create(:clothing_tax_rate, tax_categories: [create(:tax_category)], included_in_price: evaluator.tax_included)
|
29
29
|
else
|
30
|
-
create(:clothing_tax_rate,
|
30
|
+
create(:clothing_tax_rate, tax_categories: [Spree::TaxCategory.first], included_in_price: evaluator.tax_included)
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -14,7 +14,7 @@ FactoryGirl.define do
|
|
14
14
|
create(:country)
|
15
15
|
end
|
16
16
|
shipping_tax_rate = create(:shipping_tax_rate, included_in_price: evaluator.tax_included)
|
17
|
-
shipping_method.tax_category = shipping_tax_rate.
|
17
|
+
shipping_method.tax_category = shipping_tax_rate.tax_categories.first
|
18
18
|
if shipping_method.shipping_categories.empty?
|
19
19
|
shipping_method.shipping_categories << (Spree::ShippingCategory.first || create(:shipping_category))
|
20
20
|
end
|
@@ -2,7 +2,7 @@ FactoryGirl.define do
|
|
2
2
|
factory :clothing_tax_rate, class: Spree::TaxRate do
|
3
3
|
name 'Tax'
|
4
4
|
amount 0.0
|
5
|
-
|
5
|
+
tax_categories {[ Spree::TaxCategory.find_by(tax_code: 'PC030000') || create(:tax_category) ]}
|
6
6
|
association(:calculator, factory: :avalara_transaction_calculator)
|
7
7
|
zone { Spree::Zone.find_or_create_by(name: 'GlobalZone') }
|
8
8
|
show_rate_in_label false
|
@@ -11,7 +11,7 @@ FactoryGirl.define do
|
|
11
11
|
factory :shipping_tax_rate, class: Spree::TaxRate do
|
12
12
|
name 'Shipping Tax'
|
13
13
|
amount 0.0
|
14
|
-
|
14
|
+
tax_categories {[ Spree::TaxCategory.find_by(tax_code: 'FR000000') || create(:tax_category, tax_code: 'FR000000') ]}
|
15
15
|
association(:calculator, factory: :avalara_transaction_calculator)
|
16
16
|
zone { Spree::Zone.find_or_create_by(name: 'GlobalZone') }
|
17
17
|
show_rate_in_label false
|
@@ -114,7 +114,7 @@ describe Spree::AvalaraTransaction, :vcr do
|
|
114
114
|
end
|
115
115
|
|
116
116
|
subject do
|
117
|
-
VCR.use_cassette('capture_with_customer_usage_type'
|
117
|
+
VCR.use_cassette('capture_with_customer_usage_type') do
|
118
118
|
order.avalara_transaction.commit_avatax('SalesInvoice')
|
119
119
|
end
|
120
120
|
end
|
@@ -15,7 +15,7 @@ describe Spree::Order, :vcr do
|
|
15
15
|
|
16
16
|
describe '#cancel_avalara' do
|
17
17
|
subject do
|
18
|
-
VCR.use_cassette(
|
18
|
+
VCR.use_cassette("order_cancel") do
|
19
19
|
avalara_order.avalara_capture_finalize
|
20
20
|
avalara_order.cancel_avalara
|
21
21
|
end
|
@@ -3,7 +3,7 @@ require 'spec_helper'
|
|
3
3
|
describe Spree::ShippingRate, type: :model do
|
4
4
|
let!(:shipping_tax_category) { create(:tax_category, name: 'Shipping', tax_code: 'FR000000') }
|
5
5
|
let!(:zone) { create(:zone, name: 'North America', default_tax: true, zone_members: []) }
|
6
|
-
let!(:tax_rate) { create(:tax_rate,
|
6
|
+
let!(:tax_rate) { create(:tax_rate, tax_categories: [shipping_tax_category], amount: 0.00, included_in_price: false, zone: zone) }
|
7
7
|
|
8
8
|
let(:shipment) { build(:shipment) }
|
9
9
|
let(:shipping_method) { build(:shipping_method) }
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_avatax_certified
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allison Reilly
|
@@ -16,20 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.3.0.alpha
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
22
|
+
version: 3.0.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 2.
|
29
|
+
version: 2.3.0.alpha
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 3.0.0
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: json
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|