avalara 0.0.1 → 0.0.2
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.
data/CHANGELOG
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
= 0.0.2 - May 7, 2012 - Updated tests for test endpoint.
|
|
2
|
+
|
|
3
|
+
Looks like the tests were initally run against the production database
|
|
4
|
+
(whops). I re-ran them against test and they're still working.
|
|
5
|
+
No code changes for this, other than documenting the test endpoint.
|
|
6
|
+
|
|
1
7
|
= 0.0.1 - February 3, 2012 - Initial Release with get_tax call
|
|
2
8
|
|
|
3
9
|
Not much in the way of features so far, but the rough draft of the get_tax call is in,
|
|
4
10
|
as well as error and warning message handling. Still need to update the docs with it
|
|
5
|
-
once an API to the gem is finalized.
|
|
11
|
+
once an API to the gem is finalized.
|
|
@@ -10,7 +10,9 @@ class Avalara::Configuration
|
|
|
10
10
|
##
|
|
11
11
|
# Public: Get the API endpoint used by the configuration. Unless explicitly
|
|
12
12
|
# set, the endpoint will default to the official production endpoint at
|
|
13
|
-
# 'https://
|
|
13
|
+
# 'https://rest.avalara.net'.
|
|
14
|
+
#
|
|
15
|
+
# If you want to set this to the test endpoint, use 'https://development.avalara.net'
|
|
14
16
|
#
|
|
15
17
|
# Returns the String for the API endpoint.
|
|
16
18
|
#
|
data/lib/avalara/version.rb
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
|
3
3
|
request: !ruby/struct:VCR::Request
|
|
4
4
|
method: :post
|
|
5
|
-
uri: https://%{API_USERNAME}:%{API_PASSWORD}@
|
|
5
|
+
uri: https://%{API_USERNAME}:%{API_PASSWORD}@development.avalara.net:443/1.0/tax/get
|
|
6
6
|
body: |-
|
|
7
7
|
{
|
|
8
8
|
"CustomerCode": null,
|
|
9
|
-
"DocDate": "2012-
|
|
9
|
+
"DocDate": "2012-05-07",
|
|
10
10
|
"CompanyCode": 83,
|
|
11
11
|
"Lines": [
|
|
12
12
|
{
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
headers:
|
|
30
30
|
date:
|
|
31
|
-
-
|
|
31
|
+
- Mon, 07 May 2012 14:23:37 GMT
|
|
32
32
|
user-agent:
|
|
33
33
|
- avalara/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin11.0.0)
|
|
34
34
|
content-length:
|
|
@@ -42,16 +42,17 @@
|
|
|
42
42
|
- private
|
|
43
43
|
content-type:
|
|
44
44
|
- text/json; charset=utf-8
|
|
45
|
-
server:
|
|
46
|
-
- Microsoft-IIS/7.5
|
|
47
45
|
x-aspnet-version:
|
|
48
46
|
- 4.0.30319
|
|
49
47
|
x-powered-by:
|
|
50
48
|
- ASP.NET
|
|
51
49
|
date:
|
|
52
|
-
-
|
|
50
|
+
- Mon, 07 May 2012 14:23:38 GMT
|
|
53
51
|
content-length:
|
|
54
52
|
- "215"
|
|
53
|
+
set-cookie:
|
|
54
|
+
- TS6198e2=51ee5364a431e5e0170ea5df6a8ee620ecacae9b42d217834fa7daea; Path=/
|
|
55
|
+
- TS6198e2_28=84ef6c201f5e761394125574ad159baeecacae9b42d217830000000000000000004fa7daea5e7e541d5a1551b0; Path=/
|
|
55
56
|
body: |
|
|
56
57
|
{
|
|
57
58
|
"ResultCode": "Error",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
- !ruby/struct:VCR::HTTPInteraction
|
|
3
3
|
request: !ruby/struct:VCR::Request
|
|
4
4
|
method: :post
|
|
5
|
-
uri: https://%{API_USERNAME}:%{API_PASSWORD}@
|
|
5
|
+
uri: https://%{API_USERNAME}:%{API_PASSWORD}@development.avalara.net:443/1.0/tax/get
|
|
6
6
|
body: |-
|
|
7
7
|
{
|
|
8
8
|
"CustomerCode": 1,
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"Addresses": [
|
|
21
21
|
{
|
|
22
|
-
"AddressCode":
|
|
22
|
+
"AddressCode": 1,
|
|
23
23
|
"Line1": "435 Ericksen Avenue Northeast",
|
|
24
24
|
"Line2": "#250",
|
|
25
25
|
"PostalCode": "98110"
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
}
|
|
29
29
|
headers:
|
|
30
30
|
date:
|
|
31
|
-
-
|
|
31
|
+
- Mon, 07 May 2012 14:23:38 GMT
|
|
32
32
|
user-agent:
|
|
33
33
|
- avalara/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin11.0.0)
|
|
34
34
|
content-length:
|
|
35
|
-
- "
|
|
35
|
+
- "371"
|
|
36
36
|
response: !ruby/struct:VCR::Response
|
|
37
37
|
status: !ruby/struct:VCR::ResponseStatus
|
|
38
38
|
code: 200
|
|
@@ -42,21 +42,22 @@
|
|
|
42
42
|
- private
|
|
43
43
|
content-type:
|
|
44
44
|
- text/json; charset=utf-8
|
|
45
|
-
server:
|
|
46
|
-
- Microsoft-IIS/7.5
|
|
47
45
|
x-aspnet-version:
|
|
48
46
|
- 4.0.30319
|
|
49
47
|
x-powered-by:
|
|
50
48
|
- ASP.NET
|
|
51
49
|
date:
|
|
52
|
-
-
|
|
50
|
+
- Mon, 07 May 2012 14:23:38 GMT
|
|
53
51
|
content-length:
|
|
54
52
|
- "885"
|
|
53
|
+
set-cookie:
|
|
54
|
+
- TS6198e2=2821a4f7287e73204216efa3180a1c63fa0d6172cee1ba664fa7daea; Path=/
|
|
55
|
+
- TS6198e2_28=d5d8c6b20060062c4b8472b5cdfa2d01fa0d6172cee1ba660000000000000000004fa7daea3a037d62a56f4c12; Path=/
|
|
55
56
|
body: |
|
|
56
57
|
{
|
|
57
|
-
"DocCode": "
|
|
58
|
+
"DocCode": "0660d7eb-5fc9-45b1-823b-19d09ae6dd25",
|
|
58
59
|
"DocDate": "2012-01-01",
|
|
59
|
-
"Timestamp": "2012-
|
|
60
|
+
"Timestamp": "2012-05-07T14:23:39.0064203Z",
|
|
60
61
|
"TotalAmount": "10",
|
|
61
62
|
"TotalDiscount": "0",
|
|
62
63
|
"TotalExemption": "10",
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: avalara
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Adam Fortuna
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2012-
|
|
13
|
+
date: 2012-05-07 00:00:00 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: hashie
|
|
@@ -143,7 +143,6 @@ files:
|
|
|
143
143
|
- spec/factories/detail_levels.rb
|
|
144
144
|
- spec/factories/invoices.rb
|
|
145
145
|
- spec/factories/lines.rb
|
|
146
|
-
- spec/fixtures/net/geographical_tax_no_sales.yml
|
|
147
146
|
- spec/fixtures/net/get_tax/failure.yml
|
|
148
147
|
- spec/fixtures/net/get_tax/success.yml
|
|
149
148
|
- spec/models/avalara/configuration_spec.rb
|
|
@@ -189,7 +188,6 @@ test_files:
|
|
|
189
188
|
- spec/factories/detail_levels.rb
|
|
190
189
|
- spec/factories/invoices.rb
|
|
191
190
|
- spec/factories/lines.rb
|
|
192
|
-
- spec/fixtures/net/geographical_tax_no_sales.yml
|
|
193
191
|
- spec/fixtures/net/get_tax/failure.yml
|
|
194
192
|
- spec/fixtures/net/get_tax/success.yml
|
|
195
193
|
- spec/models/avalara/configuration_spec.rb
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
- !ruby/struct:VCR::HTTPInteraction
|
|
3
|
-
request: !ruby/struct:VCR::Request
|
|
4
|
-
method: :get
|
|
5
|
-
uri: https://%{API_USERNAME}:%{API_PASSWORD}@rest.avalara.net:443/1.0/tax/47.627935,-122.51702/get?saleamount=100
|
|
6
|
-
body:
|
|
7
|
-
headers:
|
|
8
|
-
date:
|
|
9
|
-
- Wed, 01 Feb 2012 16:23:52 GMT
|
|
10
|
-
user-agent:
|
|
11
|
-
- avalara/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin11.0.0)
|
|
12
|
-
content-length:
|
|
13
|
-
- "0"
|
|
14
|
-
response: !ruby/struct:VCR::Response
|
|
15
|
-
status: !ruby/struct:VCR::ResponseStatus
|
|
16
|
-
code: 200
|
|
17
|
-
message: OK
|
|
18
|
-
headers:
|
|
19
|
-
cache-control:
|
|
20
|
-
- private
|
|
21
|
-
content-type:
|
|
22
|
-
- text/json; charset=utf-8
|
|
23
|
-
server:
|
|
24
|
-
- Microsoft-IIS/7.5
|
|
25
|
-
x-aspnet-version:
|
|
26
|
-
- 4.0.30319
|
|
27
|
-
x-powered-by:
|
|
28
|
-
- ASP.NET
|
|
29
|
-
date:
|
|
30
|
-
- Wed, 01 Feb 2012 16:23:49 GMT
|
|
31
|
-
content-length:
|
|
32
|
-
- "200"
|
|
33
|
-
body: |
|
|
34
|
-
{
|
|
35
|
-
"Rate": 0,
|
|
36
|
-
"Tax": 0,
|
|
37
|
-
"TaxDetails": [
|
|
38
|
-
{
|
|
39
|
-
"Rate": 0,
|
|
40
|
-
"Tax": 0,
|
|
41
|
-
"Region": "WA",
|
|
42
|
-
"Country": "US",
|
|
43
|
-
"JurisType": "State",
|
|
44
|
-
"JurisName": "WASHINGTON",
|
|
45
|
-
"TaxName": "WA STATE TAX"}
|
|
46
|
-
]
|
|
47
|
-
,
|
|
48
|
-
"ResultCode": "Success"}
|
|
49
|
-
|
|
50
|
-
http_version: "1.1"
|
|
51
|
-
- !ruby/struct:VCR::HTTPInteraction
|
|
52
|
-
request: !ruby/struct:VCR::Request
|
|
53
|
-
method: :get
|
|
54
|
-
uri: https://rest.avalara.net:443/1.0/tax/47.627935,-122.51702/get?saleamount=100
|
|
55
|
-
body:
|
|
56
|
-
headers:
|
|
57
|
-
date:
|
|
58
|
-
- Wed, 01 Feb 2012 17:43:34 GMT
|
|
59
|
-
user-agent:
|
|
60
|
-
- avalara/0.0.1 (Rubygems; Ruby 1.9.2 x86_64-darwin11.0.0)
|
|
61
|
-
content-length:
|
|
62
|
-
- "0"
|
|
63
|
-
response: !ruby/struct:VCR::Response
|
|
64
|
-
status: !ruby/struct:VCR::ResponseStatus
|
|
65
|
-
code: 401
|
|
66
|
-
message: Unauthorized
|
|
67
|
-
headers:
|
|
68
|
-
cache-control:
|
|
69
|
-
- private
|
|
70
|
-
content-type:
|
|
71
|
-
- text/json; charset=utf-8
|
|
72
|
-
server:
|
|
73
|
-
- Microsoft-IIS/7.5
|
|
74
|
-
www-authenticate:
|
|
75
|
-
- Basic realm="AvaTax Services"
|
|
76
|
-
x-aspnet-version:
|
|
77
|
-
- 4.0.30319
|
|
78
|
-
x-powered-by:
|
|
79
|
-
- ASP.NET
|
|
80
|
-
date:
|
|
81
|
-
- Wed, 01 Feb 2012 17:43:30 GMT
|
|
82
|
-
content-length:
|
|
83
|
-
- "169"
|
|
84
|
-
body: |
|
|
85
|
-
{
|
|
86
|
-
"ResultCode": "Error",
|
|
87
|
-
"Messages": [
|
|
88
|
-
{
|
|
89
|
-
"Summary": "Required authentication credentials are invalid or missing",
|
|
90
|
-
"Severity": "Error",
|
|
91
|
-
"Source": "Avalara.Web.REST"}
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
http_version: "1.1"
|