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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3736689d2d8927f029e447408ee98d02b0aabd71
4
- data.tar.gz: 12f35a4c17e68dc07d5db16149563dba452882dd
3
+ metadata.gz: a994e8b03d826412896dbe9fd632b6c2154fa3f6
4
+ data.tar.gz: 394936dcc40bc5cd723dd80b224367902137b21c
5
5
  SHA512:
6
- metadata.gz: 4abca3a479c296590de269d39e6bdd36c0934baf3c8dda00269138318426758d122ebab67a55a988d79ad598fad9a121ec56652b0ebbecf96c57a161c8a815d7
7
- data.tar.gz: 43a9e9c5f5590c39bac0912c2ccefff39cc9fc491f0c074eac96144eefc0cec8c94ebfa83c490ac5eff699981f129e3187ab3d5af752394b4fbbc6266a2c353e
6
+ metadata.gz: bbc09be954b6cf3814d0c4aec59397c6736482c0160cef3b087b3f1e18b3b4d91c45d541defab4ecafe48ffbc8edef661a75933df865c0fa2752fd030d02a523
7
+ data.tar.gz: 478ca93e9eda8c72c92365e8d4dc889e62debf42bb57515aa61d039bd67903538ceddf6bbf17b4751a5f54722e84f874e9002779766bc237dca128ea2ca8f5e5
@@ -13,7 +13,7 @@ module AvaTax
13
13
 
14
14
  def account_number(acct_num = nil)
15
15
  return @account_number if @account_number and acct_num.nil?
16
- @account_number = acct_num
16
+ @account_number = acct_num.to_s
17
17
  end
18
18
 
19
19
  def license_key(license = nil)
@@ -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.2
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-08-15 00:00:00.000000000 Z
12
+ date: 2014-09-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json