tax_cloud 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/CHANGELOG.rdoc +4 -0
- data/CONTRIBUTORS.txt +7 -4
- data/README.rdoc +11 -6
- data/lib/tax_cloud/transaction.rb +14 -7
- data/lib/tax_cloud/version.rb +1 -1
- data/test/cassettes/authorized.yml +35 -24
- data/test/cassettes/authorized_with_capture.yml +35 -24
- data/test/cassettes/authorized_with_localized_time.yml +99 -0
- data/test/cassettes/captured.yml +49 -32
- data/test/cassettes/lookup.yml +9 -607
- data/test/cassettes/lookup_ny.yml +7 -605
- data/test/cassettes/returned.yml +49 -32
- data/test/test_transaction.rb +15 -2
- data/test/test_transaction_ny.rb +2 -2
- metadata +3 -2
data/.gitignore
CHANGED
data/CHANGELOG.rdoc
CHANGED
data/CONTRIBUTORS.txt
CHANGED
@@ -5,16 +5,19 @@ Lead Developers
|
|
5
5
|
* Drew Tempelmeyer
|
6
6
|
* Twitter: @tempelmeyer
|
7
7
|
* App.net: @tempelmeyer
|
8
|
-
*
|
8
|
+
* Github: drewtempelmeyer
|
9
9
|
|
10
10
|
* Daniel Doubrovkine
|
11
11
|
* Twitter: @dblockdotorg
|
12
|
-
*
|
12
|
+
* Github: dblock
|
13
13
|
|
14
14
|
Contributors
|
15
15
|
=======================
|
16
16
|
* Daniel Morrison
|
17
|
-
*
|
17
|
+
* Github: danielmorrison
|
18
18
|
|
19
19
|
* George F Murphy
|
20
|
-
*
|
20
|
+
* Github: gfmurphy
|
21
|
+
|
22
|
+
* Bradley Schaefer
|
23
|
+
* Github: soulcutter
|
data/README.rdoc
CHANGED
@@ -5,16 +5,17 @@
|
|
5
5
|
TaxCloud[http://www.taxcloud.com] is a free service to calculate sales tax and generate tax reports. The <tt>tax_cloud</tt> gem allows you to easily integrate with TaxCloud's API.
|
6
6
|
|
7
7
|
=== Getting Started
|
8
|
-
|
8
|
+
Create a TaxCloud[http://www.taxcloud.com] merchant account at http://www.taxcloud.net. Add a website to your account under Locations[https://taxcloud.net/account/locations]. This will generate an API ID and API Key that you will need to use the service.
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
TaxCloud[http://www.taxcloud.com] also offers an optional address verification API. To use it, you need a USPS (United States Postal Service) Address API UserID. To obtain your USPS UserID:
|
11
|
+
1. Download and Install the USPS Shipping Assistant from http://www.usps.com/shippingassistant.
|
12
|
+
2. Launch the USPS Shipping Assistant and go through the Shipping Assistant registration process.
|
13
|
+
3. Once you have registered for your Shipping Assistant account, you can find your USPS Shipping Assistant UserID in the "About" box, in parentheses to the right of the name of the registered user.
|
13
14
|
|
14
15
|
=== Setup
|
15
16
|
Add the gem to your Gemfile.
|
16
17
|
|
17
|
-
gem 'tax_cloud', '~> 0.
|
18
|
+
gem 'tax_cloud', '~> 0.2.0'
|
18
19
|
|
19
20
|
Configure your environment. For example, create an initializer in Rails in <tt>config/initializers/tax_cloud.rb</tt>.
|
20
21
|
|
@@ -114,6 +115,9 @@ Tax code constants are defined in <tt>tax_code_constants.rb</tt> and tax code gr
|
|
114
115
|
TAXCLOUD_API_LOGIN_ID=... TAXCLOUD_API_KEY=... TAXCLOUD_USPS_USERNAME=... tax_cloud:tax_codes
|
115
116
|
TAXCLOUD_API_LOGIN_ID=... TAXCLOUD_API_KEY=... TAXCLOUD_USPS_USERNAME=... tax_cloud:tax_code_groups
|
116
117
|
|
118
|
+
=== Tax States
|
119
|
+
TaxCloud manages a list of states in which you can calculate sales tax. The default setup will only have SSUTA (Streamlined Sales and Use Tax Agreement) states enabled. All other states will return $0 for tax values. To enable other states, go to https://taxcloud.net/account/states. You can find more information about SSUTA here[http://www.streamlinedsalestax.org/index.php?page=About-Us].
|
120
|
+
|
117
121
|
=== Running Tests
|
118
122
|
* VCR and WebMock are used to replay requests and avoid hitting the API each time. To refresh the mocks, simply delete the <tt>test/cassettes</tt> directory.
|
119
123
|
* Run tests.
|
@@ -131,5 +135,6 @@ Tax code constants are defined in <tt>tax_code_constants.rb</tt> and tax code gr
|
|
131
135
|
|
132
136
|
=== License
|
133
137
|
|
134
|
-
|
138
|
+
Copyright Drew Tempelmeyer and contributors, 2011-2013.
|
135
139
|
|
140
|
+
This gem is licened under the MIT license.
|
@@ -9,7 +9,7 @@ module TaxCloud #:nodoc:
|
|
9
9
|
attr_accessor :cart_id
|
10
10
|
# Array of <tt>CartItem</tt>s.
|
11
11
|
attr_accessor :cart_items
|
12
|
-
# The order ID for <tt>authorized</tt>, <tt>captured</tt>, and <tt>
|
12
|
+
# The order ID for <tt>authorized</tt>, <tt>captured</tt>, and <tt>authorized_with_captured</tt> methods.
|
13
13
|
attr_accessor :order_id
|
14
14
|
# The <tt>Address</tt> of which the shipment originates.
|
15
15
|
attr_accessor :origin
|
@@ -24,7 +24,7 @@ module TaxCloud #:nodoc:
|
|
24
24
|
super params
|
25
25
|
end
|
26
26
|
|
27
|
-
# Lookup the tax rate for the transaction.
|
27
|
+
# Lookup the tax rate for the transaction.
|
28
28
|
# The returned information is based on the originating address, destination address, and cart items.
|
29
29
|
def lookup
|
30
30
|
request_params = {
|
@@ -45,11 +45,12 @@ module TaxCloud #:nodoc:
|
|
45
45
|
# * <tt>date_authorized</tt> - The date the transaction was authorized. Default is today.
|
46
46
|
def authorized(options = {})
|
47
47
|
options = { :date_authorized => Date.today }.merge(options)
|
48
|
+
|
48
49
|
request_params = {
|
49
50
|
'customerID' => customer_id,
|
50
51
|
'cartID' => cart_id,
|
51
52
|
'orderID' => order_id,
|
52
|
-
'dateAuthorized' => options[:date_authorized]
|
53
|
+
'dateAuthorized' => xml_date(options[:date_authorized])
|
53
54
|
}
|
54
55
|
|
55
56
|
response = TaxCloud.client.request :authorized, request_params
|
@@ -66,7 +67,7 @@ module TaxCloud #:nodoc:
|
|
66
67
|
'customerID' => customer_id,
|
67
68
|
'cartID' => cart_id,
|
68
69
|
'orderID' => order_id,
|
69
|
-
'dateCaptured' => options[:date_captured]
|
70
|
+
'dateCaptured' => xml_date(options[:date_captured])
|
70
71
|
}
|
71
72
|
|
72
73
|
response = TaxCloud.client.request :captured, request_params
|
@@ -84,8 +85,8 @@ module TaxCloud #:nodoc:
|
|
84
85
|
'customerID' => customer_id,
|
85
86
|
'cartID' => cart_id,
|
86
87
|
'orderID' => order_id,
|
87
|
-
'dateAuthorized' => options[:date_authorized],
|
88
|
-
'dateCaptured' => options[:date_captured]
|
88
|
+
'dateAuthorized' => xml_date(options[:date_authorized]),
|
89
|
+
'dateCaptured' => xml_date(options[:date_captured])
|
89
90
|
}
|
90
91
|
|
91
92
|
response = TaxCloud.client.request :authorized_with_capture, request_params
|
@@ -101,11 +102,17 @@ module TaxCloud #:nodoc:
|
|
101
102
|
request_params = {
|
102
103
|
'orderID' => order_id,
|
103
104
|
'cartItems' => { 'CartItem' => cart_items.map(&:to_hash) },
|
104
|
-
'returnedDate' => options[:returned_date]
|
105
|
+
'returnedDate' => xml_date(options[:returned_date])
|
105
106
|
}
|
106
107
|
|
107
108
|
response = TaxCloud.client.request :returned, request_params
|
108
109
|
TaxCloud::Responses::Returned.parse response
|
109
110
|
end
|
111
|
+
|
112
|
+
private
|
113
|
+
|
114
|
+
def xml_date(val)
|
115
|
+
val.respond_to?(:strftime) ? val.strftime("%Y-%m-%d") : val
|
116
|
+
end
|
110
117
|
end
|
111
118
|
end
|
data/lib/tax_cloud/version.rb
CHANGED
@@ -4,19 +4,25 @@ http_interactions:
|
|
4
4
|
method: post
|
5
5
|
uri: https://api.taxcloud.net/1.0/TaxCloud.asmx
|
6
6
|
body:
|
7
|
-
encoding:
|
7
|
+
encoding: US-ASCII
|
8
8
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:
|
10
|
-
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:Lookup><ins0:customerID>42</ins0:customerID><ins0:cartID>
|
11
|
-
|
12
|
-
xsi:nil="true"/></ins0:origin><ins0:destination><ins0:Address1>
|
13
|
-
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://taxcloud.net"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:Lookup><ins0:customerID>42</ins0:customerID><ins0:cartID>3986542345855989589</ins0:cartID><ins0:cartItems><ins0:CartItem><tns:Index>0</tns:Index><tns:ItemID>SKU-TEST</tns:ItemID><tns:TIC>0</tns:TIC><tns:Price>50.0</tns:Price><tns:Qty>1</tns:Qty></ins0:CartItem><ins0:CartItem><tns:Index>1</tns:Index><tns:ItemID>SKU-TEST1</tns:ItemID><tns:TIC>0</tns:TIC><tns:Price>100.0</tns:Price><tns:Qty>1</tns:Qty></ins0:CartItem></ins0:cartItems><ins0:origin><ins0:Address1>162
|
11
|
+
East Avenue</ins0:Address1><ins0:Address2>Third Floor</ins0:Address2><ins0:City>Norwalk</ins0:City><ins0:State>CT</ins0:State><ins0:Zip5>06851</ins0:Zip5><ins0:Zip4
|
12
|
+
xsi:nil="true"/></ins0:origin><ins0:destination><ins0:Address1>3121 West Government
|
13
|
+
Way</ins0:Address1><ins0:Address2>Suite 2B</ins0:Address2><ins0:City>Seattle</ins0:City><ins0:State>WA</ins0:State><ins0:Zip5>98199</ins0:Zip5><ins0:Zip4
|
14
14
|
xsi:nil="true"/></ins0:destination><ins0:apiLoginID>api-login-id</ins0:apiLoginID><ins0:apiKey>api-key</ins0:apiKey></ins0:Lookup></env:Body></env:Envelope>
|
15
15
|
headers:
|
16
16
|
Soapaction:
|
17
17
|
- ! '"http://taxcloud.net/Lookup"'
|
18
18
|
Content-Type:
|
19
19
|
- text/xml;charset=UTF-8
|
20
|
+
Content-Length:
|
21
|
+
- '1337'
|
22
|
+
Accept:
|
23
|
+
- ! '*/*'
|
24
|
+
User-Agent:
|
25
|
+
- Ruby
|
20
26
|
response:
|
21
27
|
status:
|
22
28
|
code: 200
|
@@ -29,35 +35,40 @@ http_interactions:
|
|
29
35
|
Server:
|
30
36
|
- Microsoft-IIS/7.0
|
31
37
|
X-Aspnet-Version:
|
32
|
-
-
|
38
|
+
- 4.0.30319
|
33
39
|
X-Powered-By:
|
34
40
|
- TaxCloud
|
35
41
|
Date:
|
36
|
-
-
|
42
|
+
- Fri, 01 Mar 2013 22:58:18 GMT
|
37
43
|
Content-Length:
|
38
|
-
- '
|
44
|
+
- '645'
|
39
45
|
body:
|
40
|
-
encoding:
|
46
|
+
encoding: US-ASCII
|
41
47
|
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
42
48
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LookupResponse
|
43
|
-
xmlns="http://taxcloud.net"><LookupResult><ResponseType>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
recorded_at: Fri, 23 Nov 2012 15:41:40 GMT
|
49
|
+
xmlns="http://taxcloud.net"><LookupResult><ResponseType>OK</ResponseType><Messages
|
50
|
+
/><CartID>3986542345855989589</CartID><CartItemsResponse><CartItemResponse><CartItemIndex>0</CartItemIndex><TaxAmount>4.75</TaxAmount></CartItemResponse><CartItemResponse><CartItemIndex>1</CartItemIndex><TaxAmount>9.5</TaxAmount></CartItemResponse></CartItemsResponse></LookupResult></LookupResponse></soap:Body></soap:Envelope>
|
51
|
+
http_version:
|
52
|
+
recorded_at: Fri, 01 Mar 2013 22:58:17 GMT
|
48
53
|
- request:
|
49
54
|
method: post
|
50
55
|
uri: https://api.taxcloud.net/1.0/TaxCloud.asmx
|
51
56
|
body:
|
52
|
-
encoding:
|
57
|
+
encoding: US-ASCII
|
53
58
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
54
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:
|
55
|
-
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:Authorized><ins0:customerID>42</ins0:customerID><ins0:cartID>
|
59
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://taxcloud.net"
|
60
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:Authorized><ins0:customerID>42</ins0:customerID><ins0:cartID>3986542345855989589</ins0:cartID><ins0:orderID>13067285929819324594</ins0:orderID><ins0:dateAuthorized>2013-03-01</ins0:dateAuthorized><ins0:apiLoginID>api-login-id</ins0:apiLoginID><ins0:apiKey>api-key</ins0:apiKey></ins0:Authorized></env:Body></env:Envelope>
|
56
61
|
headers:
|
57
62
|
Soapaction:
|
58
63
|
- ! '"http://taxcloud.net/Authorized"'
|
59
64
|
Content-Type:
|
60
65
|
- text/xml;charset=UTF-8
|
66
|
+
Content-Length:
|
67
|
+
- '632'
|
68
|
+
Accept:
|
69
|
+
- ! '*/*'
|
70
|
+
User-Agent:
|
71
|
+
- Ruby
|
61
72
|
response:
|
62
73
|
status:
|
63
74
|
code: 200
|
@@ -70,19 +81,19 @@ http_interactions:
|
|
70
81
|
Server:
|
71
82
|
- Microsoft-IIS/7.0
|
72
83
|
X-Aspnet-Version:
|
73
|
-
-
|
84
|
+
- 4.0.30319
|
74
85
|
X-Powered-By:
|
75
86
|
- TaxCloud
|
76
87
|
Date:
|
77
|
-
-
|
88
|
+
- Fri, 01 Mar 2013 22:58:18 GMT
|
78
89
|
Content-Length:
|
79
90
|
- '395'
|
80
91
|
body:
|
81
|
-
encoding:
|
92
|
+
encoding: US-ASCII
|
82
93
|
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
83
94
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AuthorizedResponse
|
84
95
|
xmlns="http://taxcloud.net"><AuthorizedResult><ResponseType>OK</ResponseType><Messages
|
85
96
|
/></AuthorizedResult></AuthorizedResponse></soap:Body></soap:Envelope>
|
86
|
-
http_version:
|
87
|
-
recorded_at: Fri,
|
88
|
-
recorded_with: VCR 2.
|
97
|
+
http_version:
|
98
|
+
recorded_at: Fri, 01 Mar 2013 22:58:18 GMT
|
99
|
+
recorded_with: VCR 2.4.0
|
@@ -4,19 +4,25 @@ http_interactions:
|
|
4
4
|
method: post
|
5
5
|
uri: https://api.taxcloud.net/1.0/TaxCloud.asmx
|
6
6
|
body:
|
7
|
-
encoding:
|
7
|
+
encoding: US-ASCII
|
8
8
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:
|
10
|
-
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:Lookup><ins0:customerID>42</ins0:customerID><ins0:cartID>
|
11
|
-
|
12
|
-
xsi:nil="true"/></ins0:origin><ins0:destination><ins0:Address1>
|
13
|
-
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://taxcloud.net"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:Lookup><ins0:customerID>42</ins0:customerID><ins0:cartID>10582497585337056761</ins0:cartID><ins0:cartItems><ins0:CartItem><tns:Index>0</tns:Index><tns:ItemID>SKU-TEST</tns:ItemID><tns:TIC>0</tns:TIC><tns:Price>50.0</tns:Price><tns:Qty>1</tns:Qty></ins0:CartItem><ins0:CartItem><tns:Index>1</tns:Index><tns:ItemID>SKU-TEST1</tns:ItemID><tns:TIC>0</tns:TIC><tns:Price>100.0</tns:Price><tns:Qty>1</tns:Qty></ins0:CartItem></ins0:cartItems><ins0:origin><ins0:Address1>162
|
11
|
+
East Avenue</ins0:Address1><ins0:Address2>Third Floor</ins0:Address2><ins0:City>Norwalk</ins0:City><ins0:State>CT</ins0:State><ins0:Zip5>06851</ins0:Zip5><ins0:Zip4
|
12
|
+
xsi:nil="true"/></ins0:origin><ins0:destination><ins0:Address1>3121 West Government
|
13
|
+
Way</ins0:Address1><ins0:Address2>Suite 2B</ins0:Address2><ins0:City>Seattle</ins0:City><ins0:State>WA</ins0:State><ins0:Zip5>98199</ins0:Zip5><ins0:Zip4
|
14
14
|
xsi:nil="true"/></ins0:destination><ins0:apiLoginID>api-login-id</ins0:apiLoginID><ins0:apiKey>api-key</ins0:apiKey></ins0:Lookup></env:Body></env:Envelope>
|
15
15
|
headers:
|
16
16
|
Soapaction:
|
17
17
|
- ! '"http://taxcloud.net/Lookup"'
|
18
18
|
Content-Type:
|
19
19
|
- text/xml;charset=UTF-8
|
20
|
+
Content-Length:
|
21
|
+
- '1338'
|
22
|
+
Accept:
|
23
|
+
- ! '*/*'
|
24
|
+
User-Agent:
|
25
|
+
- Ruby
|
20
26
|
response:
|
21
27
|
status:
|
22
28
|
code: 200
|
@@ -29,35 +35,40 @@ http_interactions:
|
|
29
35
|
Server:
|
30
36
|
- Microsoft-IIS/7.0
|
31
37
|
X-Aspnet-Version:
|
32
|
-
-
|
38
|
+
- 4.0.30319
|
33
39
|
X-Powered-By:
|
34
40
|
- TaxCloud
|
35
41
|
Date:
|
36
|
-
-
|
42
|
+
- Fri, 01 Mar 2013 22:58:18 GMT
|
37
43
|
Content-Length:
|
38
|
-
- '
|
44
|
+
- '646'
|
39
45
|
body:
|
40
|
-
encoding:
|
46
|
+
encoding: US-ASCII
|
41
47
|
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
42
48
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LookupResponse
|
43
|
-
xmlns="http://taxcloud.net"><LookupResult><ResponseType>
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
recorded_at: Fri, 23 Nov 2012 15:41:40 GMT
|
49
|
+
xmlns="http://taxcloud.net"><LookupResult><ResponseType>OK</ResponseType><Messages
|
50
|
+
/><CartID>10582497585337056761</CartID><CartItemsResponse><CartItemResponse><CartItemIndex>0</CartItemIndex><TaxAmount>4.75</TaxAmount></CartItemResponse><CartItemResponse><CartItemIndex>1</CartItemIndex><TaxAmount>9.5</TaxAmount></CartItemResponse></CartItemsResponse></LookupResult></LookupResponse></soap:Body></soap:Envelope>
|
51
|
+
http_version:
|
52
|
+
recorded_at: Fri, 01 Mar 2013 22:58:18 GMT
|
48
53
|
- request:
|
49
54
|
method: post
|
50
55
|
uri: https://api.taxcloud.net/1.0/TaxCloud.asmx
|
51
56
|
body:
|
52
|
-
encoding:
|
57
|
+
encoding: US-ASCII
|
53
58
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
54
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:
|
55
|
-
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:AuthorizedWithCapture><ins0:customerID>42</ins0:customerID><ins0:cartID>
|
59
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://taxcloud.net"
|
60
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:AuthorizedWithCapture><ins0:customerID>42</ins0:customerID><ins0:cartID>10582497585337056761</ins0:cartID><ins0:orderID>1374195209248249394</ins0:orderID><ins0:dateAuthorized>2013-03-01</ins0:dateAuthorized><ins0:dateCaptured>2013-03-01</ins0:dateCaptured><ins0:apiLoginID>api-login-id</ins0:apiLoginID><ins0:apiKey>api-key</ins0:apiKey></ins0:AuthorizedWithCapture></env:Body></env:Envelope>
|
56
61
|
headers:
|
57
62
|
Soapaction:
|
58
63
|
- ! '"http://taxcloud.net/AuthorizedWithCapture"'
|
59
64
|
Content-Type:
|
60
65
|
- text/xml;charset=UTF-8
|
66
|
+
Content-Length:
|
67
|
+
- '703'
|
68
|
+
Accept:
|
69
|
+
- ! '*/*'
|
70
|
+
User-Agent:
|
71
|
+
- Ruby
|
61
72
|
response:
|
62
73
|
status:
|
63
74
|
code: 200
|
@@ -70,19 +81,19 @@ http_interactions:
|
|
70
81
|
Server:
|
71
82
|
- Microsoft-IIS/7.0
|
72
83
|
X-Aspnet-Version:
|
73
|
-
-
|
84
|
+
- 4.0.30319
|
74
85
|
X-Powered-By:
|
75
86
|
- TaxCloud
|
76
87
|
Date:
|
77
|
-
-
|
88
|
+
- Fri, 01 Mar 2013 22:58:19 GMT
|
78
89
|
Content-Length:
|
79
90
|
- '439'
|
80
91
|
body:
|
81
|
-
encoding:
|
92
|
+
encoding: US-ASCII
|
82
93
|
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
83
94
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AuthorizedWithCaptureResponse
|
84
95
|
xmlns="http://taxcloud.net"><AuthorizedWithCaptureResult><ResponseType>OK</ResponseType><Messages
|
85
96
|
/></AuthorizedWithCaptureResult></AuthorizedWithCaptureResponse></soap:Body></soap:Envelope>
|
86
|
-
http_version:
|
87
|
-
recorded_at: Fri,
|
88
|
-
recorded_with: VCR 2.
|
97
|
+
http_version:
|
98
|
+
recorded_at: Fri, 01 Mar 2013 22:58:18 GMT
|
99
|
+
recorded_with: VCR 2.4.0
|
@@ -0,0 +1,99 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.taxcloud.net/1.0/TaxCloud.asmx
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
9
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://taxcloud.net"
|
10
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:Lookup><ins0:customerID>42</ins0:customerID><ins0:cartID>2852191080421965029</ins0:cartID><ins0:cartItems><ins0:CartItem><tns:Index>0</tns:Index><tns:ItemID>SKU-TEST</tns:ItemID><tns:TIC>0</tns:TIC><tns:Price>50.0</tns:Price><tns:Qty>1</tns:Qty></ins0:CartItem><ins0:CartItem><tns:Index>1</tns:Index><tns:ItemID>SKU-TEST1</tns:ItemID><tns:TIC>0</tns:TIC><tns:Price>100.0</tns:Price><tns:Qty>1</tns:Qty></ins0:CartItem></ins0:cartItems><ins0:origin><ins0:Address1>162
|
11
|
+
East Avenue</ins0:Address1><ins0:Address2>Third Floor</ins0:Address2><ins0:City>Norwalk</ins0:City><ins0:State>CT</ins0:State><ins0:Zip5>06851</ins0:Zip5><ins0:Zip4
|
12
|
+
xsi:nil="true"/></ins0:origin><ins0:destination><ins0:Address1>3121 West Government
|
13
|
+
Way</ins0:Address1><ins0:Address2>Suite 2B</ins0:Address2><ins0:City>Seattle</ins0:City><ins0:State>WA</ins0:State><ins0:Zip5>98199</ins0:Zip5><ins0:Zip4
|
14
|
+
xsi:nil="true"/></ins0:destination><ins0:apiLoginID>api-login-id</ins0:apiLoginID><ins0:apiKey>api-key</ins0:apiKey></ins0:Lookup></env:Body></env:Envelope>
|
15
|
+
headers:
|
16
|
+
Soapaction:
|
17
|
+
- ! '"http://taxcloud.net/Lookup"'
|
18
|
+
Content-Type:
|
19
|
+
- text/xml;charset=UTF-8
|
20
|
+
Content-Length:
|
21
|
+
- '1337'
|
22
|
+
Accept:
|
23
|
+
- ! '*/*'
|
24
|
+
User-Agent:
|
25
|
+
- Ruby
|
26
|
+
response:
|
27
|
+
status:
|
28
|
+
code: 200
|
29
|
+
message: OK
|
30
|
+
headers:
|
31
|
+
Cache-Control:
|
32
|
+
- private, max-age=0
|
33
|
+
Content-Type:
|
34
|
+
- text/xml; charset=utf-8
|
35
|
+
Server:
|
36
|
+
- Microsoft-IIS/7.0
|
37
|
+
X-Aspnet-Version:
|
38
|
+
- 4.0.30319
|
39
|
+
X-Powered-By:
|
40
|
+
- TaxCloud
|
41
|
+
Date:
|
42
|
+
- Sat, 02 Mar 2013 04:12:52 GMT
|
43
|
+
Content-Length:
|
44
|
+
- '645'
|
45
|
+
body:
|
46
|
+
encoding: US-ASCII
|
47
|
+
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
48
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><LookupResponse
|
49
|
+
xmlns="http://taxcloud.net"><LookupResult><ResponseType>OK</ResponseType><Messages
|
50
|
+
/><CartID>2852191080421965029</CartID><CartItemsResponse><CartItemResponse><CartItemIndex>0</CartItemIndex><TaxAmount>4.75</TaxAmount></CartItemResponse><CartItemResponse><CartItemIndex>1</CartItemIndex><TaxAmount>9.5</TaxAmount></CartItemResponse></CartItemsResponse></LookupResult></LookupResponse></soap:Body></soap:Envelope>
|
51
|
+
http_version:
|
52
|
+
recorded_at: Sat, 02 Mar 2013 04:12:51 GMT
|
53
|
+
- request:
|
54
|
+
method: post
|
55
|
+
uri: https://api.taxcloud.net/1.0/TaxCloud.asmx
|
56
|
+
body:
|
57
|
+
encoding: US-ASCII
|
58
|
+
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
59
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://taxcloud.net"
|
60
|
+
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ins0="http://taxcloud.net"><env:Body><ins0:Authorized><ins0:customerID>42</ins0:customerID><ins0:cartID>2852191080421965029</ins0:cartID><ins0:orderID>16907336367917376559</ins0:orderID><ins0:dateAuthorized>2013-02-01</ins0:dateAuthorized><ins0:apiLoginID>api-login-id</ins0:apiLoginID><ins0:apiKey>api-key</ins0:apiKey></ins0:Authorized></env:Body></env:Envelope>
|
61
|
+
headers:
|
62
|
+
Soapaction:
|
63
|
+
- ! '"http://taxcloud.net/Authorized"'
|
64
|
+
Content-Type:
|
65
|
+
- text/xml;charset=UTF-8
|
66
|
+
Content-Length:
|
67
|
+
- '632'
|
68
|
+
Accept:
|
69
|
+
- ! '*/*'
|
70
|
+
User-Agent:
|
71
|
+
- Ruby
|
72
|
+
response:
|
73
|
+
status:
|
74
|
+
code: 200
|
75
|
+
message: OK
|
76
|
+
headers:
|
77
|
+
Cache-Control:
|
78
|
+
- private, max-age=0
|
79
|
+
Content-Type:
|
80
|
+
- text/xml; charset=utf-8
|
81
|
+
Server:
|
82
|
+
- Microsoft-IIS/7.0
|
83
|
+
X-Aspnet-Version:
|
84
|
+
- 4.0.30319
|
85
|
+
X-Powered-By:
|
86
|
+
- TaxCloud
|
87
|
+
Date:
|
88
|
+
- Sat, 02 Mar 2013 04:12:52 GMT
|
89
|
+
Content-Length:
|
90
|
+
- '395'
|
91
|
+
body:
|
92
|
+
encoding: US-ASCII
|
93
|
+
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
94
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AuthorizedResponse
|
95
|
+
xmlns="http://taxcloud.net"><AuthorizedResult><ResponseType>OK</ResponseType><Messages
|
96
|
+
/></AuthorizedResult></AuthorizedResponse></soap:Body></soap:Envelope>
|
97
|
+
http_version:
|
98
|
+
recorded_at: Sat, 02 Mar 2013 04:12:51 GMT
|
99
|
+
recorded_with: VCR 2.4.0
|