avatax 14.4.2 → 14.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/avatax/configuration.rb +1 -1
- data/lib/avatax/tax_service.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a994e8b03d826412896dbe9fd632b6c2154fa3f6
|
4
|
+
data.tar.gz: 394936dcc40bc5cd723dd80b224367902137b21c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbc09be954b6cf3814d0c4aec59397c6736482c0160cef3b087b3f1e18b3b4d91c45d541defab4ecafe48ffbc8edef661a75933df865c0fa2752fd030d02a523
|
7
|
+
data.tar.gz: 478ca93e9eda8c72c92365e8d4dc889e62debf42bb57515aa61d039bd67903538ceddf6bbf17b4751a5f54722e84f874e9002779766bc237dca128ea2ca8f5e5
|
data/lib/avatax/configuration.rb
CHANGED
data/lib/avatax/tax_service.rb
CHANGED
@@ -20,7 +20,7 @@ class AvaTax::TaxService
|
|
20
20
|
uri = @service_url + @@service_path + "get"
|
21
21
|
cred = 'Basic '+ Base64.encode64(@account_number + ":"+ @license_key)
|
22
22
|
#puts JSON.generate(request_hash)
|
23
|
-
res = RestClient.post(uri, JSON.generate(request_hash), :authorization => cred){|response, request, result| response}
|
23
|
+
res = RestClient.post(uri, JSON.generate(request_hash), :authorization => cred, :content_type => 'application/json'){|response, request, result| response}
|
24
24
|
JSON.parse(res.body)
|
25
25
|
end
|
26
26
|
|
@@ -28,7 +28,7 @@ class AvaTax::TaxService
|
|
28
28
|
def cancel(request_hash)
|
29
29
|
uri = @service_url + @@service_path + "cancel"
|
30
30
|
cred = 'Basic '+ Base64.encode64(@account_number + ":"+ @license_key)
|
31
|
-
res = RestClient.post uri, JSON.generate(request_hash), :authorization => cred
|
31
|
+
res = RestClient.post uri, JSON.generate(request_hash), :authorization => cred, :content_type => 'application/json'
|
32
32
|
JSON.parse(res.body)["CancelTaxResult"]
|
33
33
|
#You may notice that this is slightly different from CalcTax, etc. The CancelTax result is nested in this result object - this makes it consumable in a way that is consistant with the other response formats.
|
34
34
|
end
|
@@ -45,7 +45,7 @@ class AvaTax::TaxService
|
|
45
45
|
http.use_ssl = true
|
46
46
|
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
|
47
47
|
cred = 'Basic '+ Base64.encode64(@account_number + ":"+ @license_key)
|
48
|
-
res = http.get(uri.request_uri, 'Authorization' => cred)
|
48
|
+
res = http.get(uri.request_uri, 'Authorization' => cred, 'Content-Type' => 'application/json')
|
49
49
|
JSON.parse(res.body)
|
50
50
|
end
|
51
51
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avatax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.4.
|
4
|
+
version: 14.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anya Stettler
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-09-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|