tax_cloud 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +9 -0
- data/CHANGELOG.rdoc +28 -0
- data/CONTRIBUTORS.txt +20 -0
- data/Gemfile +1 -1
- data/LICENSE.rdoc +22 -0
- data/README.rdoc +112 -28
- data/Rakefile +10 -2
- data/lib/config/locales/en.yml +34 -0
- data/lib/hash.rb +8 -6
- data/lib/savon_soap_xml.rb +33 -0
- data/lib/tasks/tax_cloud.rake +20 -0
- data/lib/tasks/tax_code_groups.rake +39 -0
- data/lib/tasks/tax_codes.rake +45 -0
- data/lib/tax_cloud.rb +43 -16
- data/lib/tax_cloud/address.rb +30 -17
- data/lib/tax_cloud/cart_item.rb +13 -19
- data/lib/tax_cloud/client.rb +48 -0
- data/lib/tax_cloud/configuration.rb +17 -2
- data/lib/tax_cloud/errors.rb +6 -0
- data/lib/tax_cloud/errors/api_error.rb +18 -0
- data/lib/tax_cloud/errors/missing_config_error.rb +13 -0
- data/lib/tax_cloud/errors/missing_config_option_error.rb +19 -0
- data/lib/tax_cloud/errors/soap_error.rb +33 -0
- data/lib/tax_cloud/errors/tax_cloud_error.rb +86 -0
- data/lib/tax_cloud/errors/unexpected_soap_response_error.rb +23 -0
- data/lib/tax_cloud/record.rb +14 -0
- data/lib/tax_cloud/responses.rb +13 -0
- data/lib/tax_cloud/responses/authorized.rb +10 -0
- data/lib/tax_cloud/responses/authorized_with_capture.rb +10 -0
- data/lib/tax_cloud/responses/base.rb +88 -0
- data/lib/tax_cloud/responses/captured.rb +11 -0
- data/lib/tax_cloud/responses/cart_item.rb +24 -0
- data/lib/tax_cloud/responses/generic.rb +35 -0
- data/lib/tax_cloud/responses/lookup.rb +41 -0
- data/lib/tax_cloud/responses/ping.rb +10 -0
- data/lib/tax_cloud/responses/returned.rb +10 -0
- data/lib/tax_cloud/responses/tax_code_groups.rb +33 -0
- data/lib/tax_cloud/responses/tax_codes.rb +33 -0
- data/lib/tax_cloud/responses/tax_codes_by_group.rb +33 -0
- data/lib/tax_cloud/responses/verify_address.rb +29 -0
- data/lib/tax_cloud/tax_code.rb +11 -0
- data/lib/tax_cloud/tax_code_constants.rb +562 -0
- data/lib/tax_cloud/tax_code_group.rb +30 -0
- data/lib/tax_cloud/tax_code_group_constants.rb +31 -0
- data/lib/tax_cloud/tax_code_groups.rb +28 -0
- data/lib/tax_cloud/tax_codes.rb +24 -47
- data/lib/tax_cloud/transaction.rb +39 -34
- data/lib/tax_cloud/version.rb +3 -3
- data/tax_cloud.gemspec +7 -5
- data/test/cassettes/authorized.yml +70 -45
- data/test/cassettes/authorized_with_capture.yml +70 -45
- data/test/cassettes/captured.yml +101 -67
- data/test/cassettes/get_tic_groups.yml +656 -0
- data/test/cassettes/get_tics.yml +952 -0
- data/test/cassettes/get_tics_by_group.yml +49 -0
- data/test/cassettes/invalid_soap_call.yml +651 -0
- data/test/cassettes/lookup.yml +644 -25
- data/test/cassettes/lookup_ny.yml +651 -0
- data/test/cassettes/ping.yml +647 -0
- data/test/cassettes/ping_with_invalid_credentials.yml +647 -0
- data/test/cassettes/ping_with_invalid_response.yml +647 -0
- data/test/cassettes/returned.yml +101 -67
- data/test/cassettes/verify_bad_address.yml +578 -976
- data/test/cassettes/verify_good_address.yml +36 -23
- data/test/helper.rb +4 -19
- data/test/test_address.rb +25 -7
- data/test/test_client.rb +29 -0
- data/test/test_configuration.rb +33 -0
- data/test/test_setup.rb +18 -0
- data/test/test_soap.rb +13 -0
- data/test/test_tax_code_groups.rb +31 -0
- data/test/test_tax_codes.rb +19 -0
- data/test/test_transaction.rb +22 -11
- data/test/test_transaction_ny.rb +27 -0
- data/test/vcr_setup.rb +9 -0
- metadata +134 -24
- data/lib/savon_xml_override.rb +0 -30
@@ -0,0 +1,30 @@
|
|
1
|
+
module TaxCloud #:nodoc:
|
2
|
+
# A group of tax codes.
|
3
|
+
#
|
4
|
+
# See https://taxcloud.net/tic.
|
5
|
+
class TaxCodeGroup < Record
|
6
|
+
|
7
|
+
# Group ID.
|
8
|
+
attr_accessor :group_id
|
9
|
+
# Group description.
|
10
|
+
attr_accessor :description
|
11
|
+
|
12
|
+
# All Tax Codes in this group.
|
13
|
+
def tax_codes
|
14
|
+
@tax_codes ||= begin
|
15
|
+
response = TaxCloud.client.request :get_ti_cs_by_group, { :tic_group => group_id }
|
16
|
+
tax_codes = TaxCloud::Responses::TaxCodesByGroup.parse response
|
17
|
+
Hash[tax_codes.map { |tic| [ tic.ticid, tic ] }]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
# Lookup a tax code by ID.
|
22
|
+
#
|
23
|
+
# === Parameters
|
24
|
+
# [ticid] Tax code ID.
|
25
|
+
def [](ticid)
|
26
|
+
tax_codes[ticid]
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module TaxCloud
|
2
|
+
class TaxCode
|
3
|
+
# Tax Code Groups.
|
4
|
+
class Groups
|
5
|
+
# Administrative
|
6
|
+
ADMINISTRATIVE = 1
|
7
|
+
# Clothing and Related Products
|
8
|
+
CLOTHING_AND_RELATED_PRODUCTS = 2
|
9
|
+
# School Related Products
|
10
|
+
SCHOOL_RELATED_PRODUCTS = 3
|
11
|
+
# Computer Related Products
|
12
|
+
COMPUTER_RELATED_PRODUCTS = 4
|
13
|
+
# Digital Products
|
14
|
+
DIGITAL_PRODUCTS = 5
|
15
|
+
# Food and Food Products
|
16
|
+
FOOD_AND_FOOD_PRODUCTS = 6
|
17
|
+
# Prepared Food
|
18
|
+
PREPARED_FOOD = 7
|
19
|
+
# Drugs
|
20
|
+
DRUGS = 8
|
21
|
+
# Durable Medical Equipment
|
22
|
+
DURABLE_MEDICAL_EQUIPMENT = 9
|
23
|
+
# Mobilty Enhancing Equipment
|
24
|
+
MOBILTY_ENHANCING_EQUIPMENT = 10
|
25
|
+
# Prosthetic Devices
|
26
|
+
PROSTHETIC_DEVICES = 11
|
27
|
+
# Telecommunications
|
28
|
+
TELECOMMUNICATIONS = 12
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module TaxCloud #:nodoc:
|
2
|
+
class TaxCode
|
3
|
+
# A TaxCloud::TaxCode::Group organizes tax codes in a logical group.
|
4
|
+
class Groups
|
5
|
+
|
6
|
+
class << self
|
7
|
+
|
8
|
+
# All tax code groups.
|
9
|
+
def all
|
10
|
+
@tax_code_groups ||= begin
|
11
|
+
response = TaxCloud.client.request :get_tic_groups
|
12
|
+
tax_code_groups = TaxCloud::Responses::TaxCodeGroups.parse response
|
13
|
+
Hash[tax_code_groups.map { |tax_code_group| [ tax_code_group.group_id, tax_code_group ] }]
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# Lookup a tax code group by ID.
|
18
|
+
#
|
19
|
+
# === Parameters
|
20
|
+
# [group_id] Group ID.
|
21
|
+
def [](group_id)
|
22
|
+
all[group_id]
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/tax_cloud/tax_codes.rb
CHANGED
@@ -1,52 +1,29 @@
|
|
1
|
-
module TaxCloud
|
1
|
+
module TaxCloud #:nodoc:
|
2
2
|
class TaxCodes
|
3
|
-
GENERAL = '00000'
|
4
|
-
|
5
|
-
# SHIPPING AND ADMINISTRATIVE
|
6
|
-
GIFT_CARD = '10005'
|
7
|
-
SERVICE_FEE = '10010'
|
8
|
-
INSTALLATION_FEE = '10040'
|
9
|
-
TRADE_IN_VALUE = '10060'
|
10
|
-
TELECOM = '10070'
|
11
|
-
HANDLING_FEE = '11000'
|
12
|
-
POSTAGE = '11010'
|
13
|
-
DMAIL_HANDLING_FEE = '11020'
|
14
|
-
DMAIL_TRANSPORTATION = '11021'
|
15
|
-
DMAIL_POSTAGE = '11022'
|
16
|
-
|
17
|
-
# CLOTHING, SPORTS, AND ACCESSORIES
|
18
|
-
CLOTHING = '20010'
|
19
|
-
ESSENTIAL_CLOTHING = '20015'
|
20
|
-
CLOTHING_ACCESSORY = '20020'
|
21
|
-
PROTECTIVE_EQUIPMENT = '20030'
|
22
|
-
SPORT_EQUIPMENT = '20040'
|
23
|
-
FUR_CLOTHING = '20050'
|
24
|
-
CLOTHING_TAX_HOLIDAY = '20130'
|
25
|
-
SCHOOL_SUPPLY = '20070'
|
26
|
-
|
27
|
-
DISASTER_PREPAREDNESS_SUPPLY = '20150'
|
28
|
-
|
29
|
-
# COMPUTERS, ELECTRONICS, AND APPLIANCES
|
30
|
-
ENERGY_STAR_APPLIANCE = '20060'
|
31
|
-
CUSTOM_SOFTWARE = '30015'
|
32
|
-
SOFTWARE = '30040'
|
33
|
-
COMPUTER = '30100'
|
34
|
-
DIGITAL_PRODUCT = '31000'
|
35
|
-
|
36
|
-
# FOOD RELATED
|
37
|
-
CANDY = '40010'
|
38
|
-
DIETARY_SUPPLEMENT = '40020'
|
39
|
-
FOOD = '40030'
|
40
|
-
VENDING_FOOD = '40040'
|
41
|
-
SOFT_DRINK = '40050'
|
42
|
-
BOTTLED_WATER = '40060'
|
43
|
-
PREPARED_FOOD = '41000'
|
44
|
-
BULK_FOOD__FROM_MANUFACTURER = '41010'
|
45
|
-
BULK_FOOD = '41020'
|
46
|
-
BAKERY_ITEM = '41030'
|
47
|
-
|
48
|
-
# MEDICAL AND HYGENE RELATED
|
49
3
|
|
4
|
+
# General purpose tax code.
|
5
|
+
GENERAL = 00000
|
6
|
+
|
7
|
+
class << self
|
8
|
+
|
9
|
+
# All tax codes
|
10
|
+
def all
|
11
|
+
@tax_codes ||= begin
|
12
|
+
response = TaxCloud.client.request :get_ti_cs
|
13
|
+
tax_codes = TaxCloud::Responses::TaxCodes.parse response
|
14
|
+
Hash[tax_codes.map { |tic| [ tic.ticid, tic ] }]
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
# Lookup a tax code by ID.
|
19
|
+
#
|
20
|
+
# === Parameters
|
21
|
+
# [ticid] Tax code ID.
|
22
|
+
def [](ticid)
|
23
|
+
all[ticid]
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
50
27
|
|
51
28
|
end
|
52
29
|
end
|
@@ -1,27 +1,31 @@
|
|
1
|
-
module TaxCloud
|
1
|
+
module TaxCloud #:nodoc:
|
2
2
|
# Lookup tax rate, authorize, and capture the information to be logged into TaxCloud.
|
3
3
|
#
|
4
4
|
# *Note:* The Transaction must not change between the <tt>lookup</tt> and <tt>authorization</tt> method calls.
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
5
|
+
class Transaction < Record
|
6
|
+
# User-defined customer ID for the <tt>Transaction</tt>.
|
7
|
+
attr_accessor :customer_id
|
8
|
+
# User-defined cart ID for the order.
|
9
|
+
attr_accessor :cart_id
|
10
|
+
# Array of <tt>CartItem</tt>s.
|
11
|
+
attr_accessor :cart_items
|
12
|
+
# The order ID for <tt>authorized</tt>, <tt>captured</tt>, and <tt>authorzied_with_captured</tt> methods.
|
13
|
+
attr_accessor :order_id
|
14
|
+
# The <tt>Address</tt> of which the shipment originates.
|
15
|
+
attr_accessor :origin
|
16
|
+
# The <tt>Address</tt> of which the shipment arrives.
|
17
|
+
attr_accessor :destination
|
15
18
|
|
16
|
-
#
|
19
|
+
# Create a new transaction.
|
20
|
+
# === Parameters
|
21
|
+
# [params] Transaction params.
|
17
22
|
def initialize(params = {})
|
18
23
|
params = { :cart_items => [] }.merge(params)
|
19
|
-
params
|
20
|
-
self.send "#{key}=", value
|
21
|
-
end
|
24
|
+
super params
|
22
25
|
end
|
23
26
|
|
24
|
-
# Lookup the tax rate for the transaction.
|
27
|
+
# Lookup the tax rate for the transaction.
|
28
|
+
# The returned information is based on the originating address, destination address, and cart items.
|
25
29
|
def lookup
|
26
30
|
request_params = {
|
27
31
|
'customerID' => customer_id,
|
@@ -29,13 +33,10 @@ module TaxCloud
|
|
29
33
|
'cartItems' => { 'CartItem' => cart_items.map(&:to_hash) },
|
30
34
|
'origin' => origin.to_hash,
|
31
35
|
'destination' => destination.to_hash
|
32
|
-
}
|
33
|
-
|
34
|
-
response = TaxCloud.client.request :lookup, :body => request_params
|
36
|
+
}
|
35
37
|
|
36
|
-
|
37
|
-
|
38
|
-
return response
|
38
|
+
response = TaxCloud.client.request :lookup, request_params
|
39
|
+
TaxCloud::Responses::Lookup.parse response
|
39
40
|
end
|
40
41
|
|
41
42
|
# Once a purchase has been made and payment has been authorized, this method must be called. A matching Lookup call must have been made before this is called.
|
@@ -49,15 +50,16 @@ module TaxCloud
|
|
49
50
|
'cartID' => cart_id,
|
50
51
|
'orderID' => order_id,
|
51
52
|
'dateAuthorized' => options[:date_authorized]
|
52
|
-
}
|
53
|
+
}
|
53
54
|
|
54
|
-
response = TaxCloud.client.request :authorized,
|
55
|
+
response = TaxCloud.client.request :authorized, request_params
|
56
|
+
TaxCloud::Responses::Authorized.parse response
|
55
57
|
end
|
56
58
|
|
57
59
|
# Complete the transaction. The <tt>order_id</tt> passed into <tt>captured</tt> must match the <tt>order_id</tt> that was passed into <tt>authorized</tt>.
|
58
60
|
#
|
59
61
|
# === Options
|
60
|
-
#
|
62
|
+
# [date_captured] The time the transaction was captured. Default is today.
|
61
63
|
def captured(options = {})
|
62
64
|
options = { :date_captured => Date.today }.merge(options)
|
63
65
|
request_params = {
|
@@ -65,16 +67,17 @@ module TaxCloud
|
|
65
67
|
'cartID' => cart_id,
|
66
68
|
'orderID' => order_id,
|
67
69
|
'dateCaptured' => options[:date_captured]
|
68
|
-
}
|
70
|
+
}
|
69
71
|
|
70
|
-
response = TaxCloud.client.request :captured,
|
72
|
+
response = TaxCloud.client.request :captured, request_params
|
73
|
+
TaxCloud::Responses::Captured.parse response
|
71
74
|
end
|
72
75
|
|
73
76
|
# Combines the <tt>authorized</tt> and <tt>captured</tt> methods into a single call
|
74
77
|
#
|
75
78
|
# === Options
|
76
|
-
#
|
77
|
-
#
|
79
|
+
# [date_authorized] The date the transaction was authorized. Default is today.
|
80
|
+
# [date_captured] - The date the transaction was captured. Default is today.
|
78
81
|
def authorized_with_capture(options = {})
|
79
82
|
options = { :date_authorized => Date.today, :date_captured => Date.today }.merge(options)
|
80
83
|
request_params = {
|
@@ -83,24 +86,26 @@ module TaxCloud
|
|
83
86
|
'orderID' => order_id,
|
84
87
|
'dateAuthorized' => options[:date_authorized],
|
85
88
|
'dateCaptured' => options[:date_captured]
|
86
|
-
}
|
89
|
+
}
|
87
90
|
|
88
|
-
response = TaxCloud.client.request :authorized_with_capture,
|
91
|
+
response = TaxCloud.client.request :authorized_with_capture, request_params
|
92
|
+
TaxCloud::Responses::AuthorizedWithCapture.parse response
|
89
93
|
end
|
90
94
|
|
91
95
|
# Marks any included cart items as returned.
|
92
96
|
#
|
93
97
|
# === Options
|
94
|
-
#
|
98
|
+
# [returned_date] The date the return occured. Default is today.
|
95
99
|
def returned(options = {})
|
96
100
|
options = { :returned_date => Date.today }.merge(options)
|
97
101
|
request_params = {
|
98
102
|
'orderID' => order_id,
|
99
103
|
'cartItems' => { 'CartItem' => cart_items.map(&:to_hash) },
|
100
104
|
'returnedDate' => options[:returned_date]
|
101
|
-
}
|
105
|
+
}
|
102
106
|
|
103
|
-
TaxCloud.client.request :returned,
|
107
|
+
response = TaxCloud.client.request :returned, request_params
|
108
|
+
TaxCloud::Responses::Returned.parse response
|
104
109
|
end
|
105
110
|
end
|
106
111
|
end
|
data/lib/tax_cloud/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
module TaxCloud
|
2
|
-
#
|
3
|
-
VERSION = "0.
|
1
|
+
module TaxCloud #:nodoc:
|
2
|
+
# The version of the <tt>tax_cloud</tt> gem.
|
3
|
+
VERSION = "0.2.0"
|
4
4
|
end
|
data/tax_cloud.gemspec
CHANGED
@@ -10,17 +10,19 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.homepage = "https://github.com/drewtempelmeyer/tax_cloud"
|
11
11
|
s.summary = %q{Calculate sales tax using TaxCloud}
|
12
12
|
s.description = %q{Calculate sales tax using the TaxCloud.net API}
|
13
|
+
s.licenses = ["MIT"]
|
13
14
|
|
14
15
|
s.required_rubygems_version = '>= 1.3.6'
|
15
16
|
s.files = `git ls-files`.split("\n")
|
16
17
|
s.test_files = `git ls-files -- {test}/*`.split("\n")
|
17
18
|
s.require_paths = ["lib"]
|
18
19
|
|
19
|
-
s.add_runtime_dependency 'savon', '
|
20
|
+
s.add_runtime_dependency 'savon', '~> 1.2.0'
|
21
|
+
s.add_runtime_dependency 'i18n', '~> 0.6'
|
22
|
+
s.add_runtime_dependency 'activesupport', '~> 3.0'
|
20
23
|
|
21
|
-
|
22
|
-
s.add_development_dependency 'rake', '>= 0.9.2'
|
24
|
+
s.add_development_dependency 'rake', '~> 10.0'
|
23
25
|
s.add_development_dependency 'rdoc', '>= 2.5.0'
|
24
|
-
s.add_development_dependency 'vcr', '
|
25
|
-
s.add_development_dependency 'webmock', '
|
26
|
+
s.add_development_dependency 'vcr', '~> 2.3'
|
27
|
+
s.add_development_dependency 'webmock', '~> 1.8.0'
|
26
28
|
end
|
@@ -1,63 +1,88 @@
|
|
1
|
-
---
|
2
|
-
|
3
|
-
|
4
|
-
method:
|
5
|
-
uri: https://api.taxcloud.net
|
6
|
-
body:
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.taxcloud.net/1.0/TaxCloud.asmx
|
6
|
+
body:
|
7
|
+
encoding: UTF-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:wsdl="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>708</ins0:cartID><ins0:cartItems><ins0:CartItem><wsdl:Index>0</wsdl:Index><wsdl:ItemID>SKU-TEST</wsdl:ItemID><wsdl:TIC>00000</wsdl:TIC><wsdl:Price>50.0</wsdl:Price><wsdl:Qty>1</wsdl:Qty></ins0:CartItem><ins0:CartItem><wsdl:Index>1</wsdl:Index><wsdl:ItemID>SKU-TEST1</wsdl:ItemID><wsdl:TIC>00000</wsdl:TIC><wsdl:Price>50.0</wsdl:Price><wsdl:Qty>1</wsdl:Qty></ins0:CartItem></ins0:cartItems><ins0:origin><ins0:Address1>888
|
11
|
+
6th Ave</ins0:Address1><ins0:Address2 xsi:nil="true"/><ins0:City>New York</ins0:City><ins0:State>NY</ins0:State><ins0:Zip5>10001</ins0:Zip5><ins0:Zip4
|
12
|
+
xsi:nil="true"/></ins0:origin><ins0:destination><ins0:Address1>888 6th Ave</ins0:Address1><ins0:Address2
|
13
|
+
xsi:nil="true"/><ins0:City>New York</ins0:City><ins0:State>NY</ins0:State><ins0:Zip5>10001</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:
|
11
19
|
- text/xml;charset=UTF-8
|
12
|
-
response:
|
13
|
-
status:
|
20
|
+
response:
|
21
|
+
status:
|
14
22
|
code: 200
|
15
23
|
message: OK
|
16
|
-
headers:
|
17
|
-
|
24
|
+
headers:
|
25
|
+
Cache-Control:
|
18
26
|
- private, max-age=0
|
19
|
-
|
27
|
+
Content-Type:
|
20
28
|
- text/xml; charset=utf-8
|
21
|
-
|
29
|
+
Server:
|
22
30
|
- Microsoft-IIS/7.0
|
23
|
-
|
31
|
+
X-Aspnet-Version:
|
24
32
|
- 2.0.50727
|
25
|
-
|
33
|
+
X-Powered-By:
|
26
34
|
- TaxCloud
|
27
|
-
|
35
|
+
Date:
|
28
36
|
- Sat, 17 Sep 2011 19:21:55 GMT
|
29
|
-
|
30
|
-
-
|
31
|
-
body:
|
32
|
-
|
33
|
-
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
37
|
+
Content-Length:
|
38
|
+
- '869'
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
42
|
+
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>Informational</ResponseType><Messages><ResponseMessage><ResponseType>Informational</ResponseType><Message>The
|
44
|
+
transaction occurred in a non-SSUTA State. TaxCloud will not collect or remit
|
45
|
+
the tax amount for this transaction.</Message></ResponseMessage></Messages><CartID>708</CartID><CartItemsResponse><CartItemResponse><CartItemIndex>0</CartItemIndex><TaxAmount>4.4375</TaxAmount></CartItemResponse><CartItemResponse><CartItemIndex>1</CartItemIndex><TaxAmount>4.4375</TaxAmount></CartItemResponse></CartItemsResponse></LookupResult></LookupResponse></soap:Body></soap:Envelope>
|
46
|
+
http_version: '1.1'
|
47
|
+
recorded_at: Fri, 23 Nov 2012 15:41:40 GMT
|
48
|
+
- request:
|
49
|
+
method: post
|
50
|
+
uri: https://api.taxcloud.net/1.0/TaxCloud.asmx
|
51
|
+
body:
|
52
|
+
encoding: UTF-8
|
53
|
+
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:wsdl="http://taxcloud.net"
|
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>708</ins0:cartID><ins0:orderID>2361</ins0:orderID><ins0:dateAuthorized>2011-09-17</ins0:dateAuthorized><ins0:apiLoginID>api-login-id</ins0:apiLoginID><ins0:apiKey>api-key</ins0:apiKey></ins0:Authorized></env:Body></env:Envelope>
|
56
|
+
headers:
|
57
|
+
Soapaction:
|
58
|
+
- ! '"http://taxcloud.net/Authorized"'
|
59
|
+
Content-Type:
|
42
60
|
- text/xml;charset=UTF-8
|
43
|
-
response:
|
44
|
-
status:
|
61
|
+
response:
|
62
|
+
status:
|
45
63
|
code: 200
|
46
64
|
message: OK
|
47
|
-
headers:
|
48
|
-
|
65
|
+
headers:
|
66
|
+
Cache-Control:
|
49
67
|
- private, max-age=0
|
50
|
-
|
68
|
+
Content-Type:
|
51
69
|
- text/xml; charset=utf-8
|
52
|
-
|
70
|
+
Server:
|
53
71
|
- Microsoft-IIS/7.0
|
54
|
-
|
72
|
+
X-Aspnet-Version:
|
55
73
|
- 2.0.50727
|
56
|
-
|
74
|
+
X-Powered-By:
|
57
75
|
- TaxCloud
|
58
|
-
|
76
|
+
Date:
|
59
77
|
- Sat, 17 Sep 2011 19:21:56 GMT
|
60
|
-
|
61
|
-
-
|
62
|
-
body:
|
63
|
-
|
78
|
+
Content-Length:
|
79
|
+
- '395'
|
80
|
+
body:
|
81
|
+
encoding: UTF-8
|
82
|
+
string: <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
|
83
|
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><AuthorizedResponse
|
84
|
+
xmlns="http://taxcloud.net"><AuthorizedResult><ResponseType>OK</ResponseType><Messages
|
85
|
+
/></AuthorizedResult></AuthorizedResponse></soap:Body></soap:Envelope>
|
86
|
+
http_version: '1.1'
|
87
|
+
recorded_at: Fri, 23 Nov 2012 15:41:40 GMT
|
88
|
+
recorded_with: VCR 2.3.0
|