TaxCloud 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/README +93 -0
- data/config.ru +2 -0
- data/doc/Gemfile.html +143 -0
- data/doc/Helper.html +249 -0
- data/doc/Object.html +193 -0
- data/doc/README.html +245 -0
- data/doc/TaxCloud.html +244 -0
- data/doc/TaxCloud/Address.html +356 -0
- data/doc/TaxCloud/AuthorizedResponse.html +226 -0
- data/doc/TaxCloud/AuthorizedService.html +304 -0
- data/doc/TaxCloud/AuthorizedWithCaptureResponse.html +246 -0
- data/doc/TaxCloud/BaseService.html +243 -0
- data/doc/TaxCloud/CapturedResponse.html +226 -0
- data/doc/TaxCloud/CartItem.html +341 -0
- data/doc/TaxCloud/CartItemResponse.html +256 -0
- data/doc/TaxCloud/CartItemsResponse.html +286 -0
- data/doc/TaxCloud/GetTICsResponse.html +284 -0
- data/doc/TaxCloud/LookupResponse.html +259 -0
- data/doc/TaxCloud/LookupService.html +230 -0
- data/doc/TaxCloud/MessageType.html +205 -0
- data/doc/TaxCloud/ResponseBase.html +214 -0
- data/doc/TaxCloud/ResponseMessage.html +212 -0
- data/doc/TaxCloud/ResponseType.html +212 -0
- data/doc/TaxCloud/ReturnedResponse.html +226 -0
- data/doc/TaxCloud/ReturnedService.html +231 -0
- data/doc/TaxCloud/TIC.html +272 -0
- data/doc/TaxCloud/TICService.html +292 -0
- data/doc/TaxCloud/VerifyAddressResult.html +361 -0
- data/doc/TaxCloud/VerifyAddressService.html +236 -0
- data/doc/created.rid +33 -0
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +130 -0
- data/doc/js/darkfish.js +153 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +543 -0
- data/doc/table_of_contents.html +200 -0
- data/lib/address.rb +27 -0
- data/lib/cartitem.rb +28 -0
- data/lib/response/authorized_response.rb +15 -0
- data/lib/response/authorized_with_capture_response.rb +16 -0
- data/lib/response/captured_response.rb +15 -0
- data/lib/response/cart_item_response.rb +11 -0
- data/lib/response/cart_items_response.rb +22 -0
- data/lib/response/get_ti_cs_response.rb +18 -0
- data/lib/response/lookup_response.rb +24 -0
- data/lib/response/message_type.rb +12 -0
- data/lib/response/response_base.rb +10 -0
- data/lib/response/response_message.rb +9 -0
- data/lib/response/response_type.rb +9 -0
- data/lib/response/returned_response.rb +15 -0
- data/lib/response/verify_address_result.rb +21 -0
- data/lib/service/authorized_service.rb +40 -0
- data/lib/service/base_service.rb +13 -0
- data/lib/service/lookup_service.rb +20 -0
- data/lib/service/returned_service.rb +19 -0
- data/lib/service/tic_service.rb +26 -0
- data/lib/service/verify_address_service.rb +26 -0
- data/lib/tic.rb +14 -0
- data/spec/helper.rb +38 -0
- data/spec/service/authorized_service_spec.rb +66 -0
- data/spec/service/lookup_service_spec.rb +45 -0
- data/spec/service/returned_service_spec.rb +36 -0
- data/spec/service/tic_serivce_spec.rb +47 -0
- data/spec/service/verify_address_service_spec.rb +24 -0
- data/spec/spec_helper.rb +12 -0
- data/taxcloud.gemspec +18 -0
- metadata +117 -3
@@ -0,0 +1,200 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>Table of Contents - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
|
16
|
+
<script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
|
17
|
+
<script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
|
18
|
+
<script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
|
19
|
+
<script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
|
20
|
+
<script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
|
21
|
+
|
22
|
+
|
23
|
+
<body class="indexpage">
|
24
|
+
<h1>Table of Contents - RDoc Documentation</h1>
|
25
|
+
|
26
|
+
<h2>Pages</h2>
|
27
|
+
<ul>
|
28
|
+
<li class="file">
|
29
|
+
<a href="Gemfile.html">Gemfile</a>
|
30
|
+
</li>
|
31
|
+
<li class="file">
|
32
|
+
<a href="README.html">README</a>
|
33
|
+
|
34
|
+
<img class="toc-toggle" src="images/transparent.png" alt="" title="toggle headings">
|
35
|
+
<ul class="initially-hidden">
|
36
|
+
<li><a href="README.html#label-TaxCloud+Sales+Tax+Calculation+Service">TaxCloud Sales Tax Calculation Service</a>
|
37
|
+
<li><a href="README.html#label-Getting+Started">Getting Started</a>
|
38
|
+
<li><a href="README.html#label-Using+the+web+services">Using the web services</a>
|
39
|
+
<li><a href="README.html#label-Integration">Integration</a>
|
40
|
+
<li><a href="README.html#label-Tests">Tests</a>
|
41
|
+
<li><a href="README.html#label-Support">Support</a>
|
42
|
+
<li><a href="README.html#label-Description+of+Contents">Description of Contents</a>
|
43
|
+
</ul>
|
44
|
+
</li>
|
45
|
+
|
46
|
+
</ul>
|
47
|
+
|
48
|
+
<h2 id="classes">Classes/Modules</h2>
|
49
|
+
<ul>
|
50
|
+
<li class="module">
|
51
|
+
<a href="TaxCloud.html">TaxCloud</a>
|
52
|
+
</li>
|
53
|
+
<li class="class">
|
54
|
+
<a href="TaxCloud.html">TaxCloud</a>
|
55
|
+
</li>
|
56
|
+
<li class="class">
|
57
|
+
<a href="TaxCloud/Address.html">TaxCloud::Address</a>
|
58
|
+
</li>
|
59
|
+
<li class="class">
|
60
|
+
<a href="TaxCloud/AuthorizedResponse.html">TaxCloud::AuthorizedResponse</a>
|
61
|
+
</li>
|
62
|
+
<li class="class">
|
63
|
+
<a href="TaxCloud/AuthorizedService.html">TaxCloud::AuthorizedService</a>
|
64
|
+
</li>
|
65
|
+
<li class="class">
|
66
|
+
<a href="TaxCloud/AuthorizedWithCaptureResponse.html">TaxCloud::AuthorizedWithCaptureResponse</a>
|
67
|
+
</li>
|
68
|
+
<li class="class">
|
69
|
+
<a href="TaxCloud/BaseService.html">TaxCloud::BaseService</a>
|
70
|
+
</li>
|
71
|
+
<li class="class">
|
72
|
+
<a href="TaxCloud/CapturedResponse.html">TaxCloud::CapturedResponse</a>
|
73
|
+
</li>
|
74
|
+
<li class="class">
|
75
|
+
<a href="TaxCloud/CartItem.html">TaxCloud::CartItem</a>
|
76
|
+
</li>
|
77
|
+
<li class="class">
|
78
|
+
<a href="TaxCloud/CartItemResponse.html">TaxCloud::CartItemResponse</a>
|
79
|
+
</li>
|
80
|
+
<li class="class">
|
81
|
+
<a href="TaxCloud/CartItemsResponse.html">TaxCloud::CartItemsResponse</a>
|
82
|
+
</li>
|
83
|
+
<li class="class">
|
84
|
+
<a href="TaxCloud/GetTICsResponse.html">TaxCloud::GetTICsResponse</a>
|
85
|
+
</li>
|
86
|
+
<li class="class">
|
87
|
+
<a href="TaxCloud/LookupResponse.html">TaxCloud::LookupResponse</a>
|
88
|
+
</li>
|
89
|
+
<li class="class">
|
90
|
+
<a href="TaxCloud/LookupService.html">TaxCloud::LookupService</a>
|
91
|
+
</li>
|
92
|
+
<li class="class">
|
93
|
+
<a href="TaxCloud/MessageType.html">TaxCloud::MessageType</a>
|
94
|
+
</li>
|
95
|
+
<li class="class">
|
96
|
+
<a href="TaxCloud/ResponseBase.html">TaxCloud::ResponseBase</a>
|
97
|
+
</li>
|
98
|
+
<li class="class">
|
99
|
+
<a href="TaxCloud/ResponseMessage.html">TaxCloud::ResponseMessage</a>
|
100
|
+
</li>
|
101
|
+
<li class="class">
|
102
|
+
<a href="TaxCloud/ResponseType.html">TaxCloud::ResponseType</a>
|
103
|
+
</li>
|
104
|
+
<li class="class">
|
105
|
+
<a href="TaxCloud/ReturnedResponse.html">TaxCloud::ReturnedResponse</a>
|
106
|
+
</li>
|
107
|
+
<li class="class">
|
108
|
+
<a href="TaxCloud/ReturnedService.html">TaxCloud::ReturnedService</a>
|
109
|
+
</li>
|
110
|
+
<li class="class">
|
111
|
+
<a href="TaxCloud/TIC.html">TaxCloud::TIC</a>
|
112
|
+
</li>
|
113
|
+
<li class="class">
|
114
|
+
<a href="TaxCloud/TICService.html">TaxCloud::TICService</a>
|
115
|
+
</li>
|
116
|
+
<li class="class">
|
117
|
+
<a href="TaxCloud/VerifyAddressResult.html">TaxCloud::VerifyAddressResult</a>
|
118
|
+
</li>
|
119
|
+
<li class="class">
|
120
|
+
<a href="TaxCloud/VerifyAddressService.html">TaxCloud::VerifyAddressService</a>
|
121
|
+
</li>
|
122
|
+
<li class="module">
|
123
|
+
<a href="Helper.html">Helper</a>
|
124
|
+
</li>
|
125
|
+
<li class="class">
|
126
|
+
<a href="Object.html">Object</a>
|
127
|
+
</li>
|
128
|
+
|
129
|
+
</ul>
|
130
|
+
|
131
|
+
<h2 id="methods">Methods</h2>
|
132
|
+
<ul>
|
133
|
+
|
134
|
+
<li class="method"><a href="TaxCloud.html#method-c-hi">::hi — TaxCloud</a>
|
135
|
+
|
136
|
+
<li class="method"><a href="TaxCloud/CapturedResponse.html#method-c-new">::new — TaxCloud::CapturedResponse</a>
|
137
|
+
|
138
|
+
<li class="method"><a href="TaxCloud/CartItem.html#method-c-new">::new — TaxCloud::CartItem</a>
|
139
|
+
|
140
|
+
<li class="method"><a href="TaxCloud/Address.html#method-c-new">::new — TaxCloud::Address</a>
|
141
|
+
|
142
|
+
<li class="method"><a href="TaxCloud/AuthorizedResponse.html#method-c-new">::new — TaxCloud::AuthorizedResponse</a>
|
143
|
+
|
144
|
+
<li class="method"><a href="TaxCloud/AuthorizedWithCaptureResponse.html#method-c-new">::new — TaxCloud::AuthorizedWithCaptureResponse</a>
|
145
|
+
|
146
|
+
<li class="method"><a href="TaxCloud/TIC.html#method-c-new">::new — TaxCloud::TIC</a>
|
147
|
+
|
148
|
+
<li class="method"><a href="TaxCloud/CartItemResponse.html#method-c-new">::new — TaxCloud::CartItemResponse</a>
|
149
|
+
|
150
|
+
<li class="method"><a href="TaxCloud/CartItemsResponse.html#method-c-new">::new — TaxCloud::CartItemsResponse</a>
|
151
|
+
|
152
|
+
<li class="method"><a href="TaxCloud/BaseService.html#method-c-new">::new — TaxCloud::BaseService</a>
|
153
|
+
|
154
|
+
<li class="method"><a href="TaxCloud/GetTICsResponse.html#method-c-new">::new — TaxCloud::GetTICsResponse</a>
|
155
|
+
|
156
|
+
<li class="method"><a href="TaxCloud/ReturnedResponse.html#method-c-new">::new — TaxCloud::ReturnedResponse</a>
|
157
|
+
|
158
|
+
<li class="method"><a href="TaxCloud/LookupResponse.html#method-c-new">::new — TaxCloud::LookupResponse</a>
|
159
|
+
|
160
|
+
<li class="method"><a href="TaxCloud/VerifyAddressResult.html#method-c-new">::new — TaxCloud::VerifyAddressResult</a>
|
161
|
+
|
162
|
+
<li class="method"><a href="TaxCloud/AuthorizedService.html#method-i-authorized">#authorized — TaxCloud::AuthorizedService</a>
|
163
|
+
|
164
|
+
<li class="method"><a href="TaxCloud/AuthorizedService.html#method-i-authorized_with_capture">#authorized_with_capture — TaxCloud::AuthorizedService</a>
|
165
|
+
|
166
|
+
<li class="method"><a href="TaxCloud/AuthorizedService.html#method-i-captured">#captured — TaxCloud::AuthorizedService</a>
|
167
|
+
|
168
|
+
<li class="method"><a href="TaxCloud/VerifyAddressResult.html#method-i-get_address">#get_address — TaxCloud::VerifyAddressResult</a>
|
169
|
+
|
170
|
+
<li class="method"><a href="TaxCloud/CartItemsResponse.html#method-i-get_taxes">#get_taxes — TaxCloud::CartItemsResponse</a>
|
171
|
+
|
172
|
+
<li class="method"><a href="TaxCloud/GetTICsResponse.html#method-i-get_tic">#get_tic — TaxCloud::GetTICsResponse</a>
|
173
|
+
|
174
|
+
<li class="method"><a href="TaxCloud/TICService.html#method-i-get_tic_groups">#get_tic_groups — TaxCloud::TICService</a>
|
175
|
+
|
176
|
+
<li class="method"><a href="TaxCloud/TICService.html#method-i-get_tics">#get_tics — TaxCloud::TICService</a>
|
177
|
+
|
178
|
+
<li class="method"><a href="TaxCloud/TICService.html#method-i-get_tics_by_group">#get_tics_by_group — TaxCloud::TICService</a>
|
179
|
+
|
180
|
+
<li class="method"><a href="TaxCloud/LookupService.html#method-i-lookup">#lookup — TaxCloud::LookupService</a>
|
181
|
+
|
182
|
+
<li class="method"><a href="TaxCloud/ReturnedService.html#method-i-returned">#returned — TaxCloud::ReturnedService</a>
|
183
|
+
|
184
|
+
<li class="method"><a href="TaxCloud/Address.html#method-i-to_hash">#to_hash — TaxCloud::Address</a>
|
185
|
+
|
186
|
+
<li class="method"><a href="TaxCloud/CartItem.html#method-i-to_hash">#to_hash — TaxCloud::CartItem</a>
|
187
|
+
|
188
|
+
<li class="method"><a href="Helper.html#method-i-variable_init">#variable_init — Helper</a>
|
189
|
+
|
190
|
+
<li class="method"><a href="TaxCloud/VerifyAddressService.html#method-i-verify_address">#verify_address — TaxCloud::VerifyAddressService</a>
|
191
|
+
|
192
|
+
</ul>
|
193
|
+
|
194
|
+
|
195
|
+
<footer id="validator-badges">
|
196
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
197
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
198
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
199
|
+
</footer>
|
200
|
+
|
data/lib/address.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
module TaxCloud
|
2
|
+
|
3
|
+
class Address
|
4
|
+
|
5
|
+
attr_accessor :address1, :address2, :city, :state, :zip5, :zip4
|
6
|
+
|
7
|
+
def initialize(attrs = {})
|
8
|
+
attrs.each do |sym, val|
|
9
|
+
self.send "#{sym}=", val
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
def to_hash
|
15
|
+
{
|
16
|
+
'Address1' => address1,
|
17
|
+
'Address2' => address2,
|
18
|
+
'City' => city,
|
19
|
+
'State' => state,
|
20
|
+
'Zip5' => zip5,
|
21
|
+
'Zip4' => zip4
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
data/lib/cartitem.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'builder'
|
2
|
+
|
3
|
+
module TaxCloud
|
4
|
+
|
5
|
+
class CartItem
|
6
|
+
attr_accessor :index, :item_id, :tic, :price, :quantity
|
7
|
+
|
8
|
+
def initialize(attrs = {})
|
9
|
+
attrs.each do |sym, val|
|
10
|
+
self.send "#{sym}=", val
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def to_hash
|
15
|
+
{
|
16
|
+
'Index' => index,
|
17
|
+
'ItemID' => item_id,
|
18
|
+
'TIC' => tic,
|
19
|
+
'Price' => price,
|
20
|
+
'Qty' => quantity
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module TaxCloud
|
2
|
+
|
3
|
+
class CartItemsResponse
|
4
|
+
attr_accessor :cart_item_response #Array of cart_item_response
|
5
|
+
|
6
|
+
def initialize(attrs = {})
|
7
|
+
@cart_item_response = attrs[:cart_item_response]
|
8
|
+
end
|
9
|
+
|
10
|
+
def get_taxes(cart_item_index)
|
11
|
+
# the response may or may not be an array
|
12
|
+
if !cart_item_response[cart_item_index].nil?
|
13
|
+
taxes = cart_item_response[cart_item_index][:tax_amount]
|
14
|
+
else
|
15
|
+
taxes = cart_item_response[:tax_amount]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module TaxCloud
|
2
|
+
require 'TIC'
|
3
|
+
|
4
|
+
class GetTICsResponse < ResponseBase
|
5
|
+
attr_accessor :ti_cs
|
6
|
+
|
7
|
+
def initialize(attrs = {})
|
8
|
+
attrs.each do |sym, val|
|
9
|
+
self.send "#{sym}=", val
|
10
|
+
end
|
11
|
+
super
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_tic(index)
|
15
|
+
tic = TaxCloud::TIC.new(ti_cs.first.first)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module TaxCloud
|
2
|
+
|
3
|
+
require 'response/cart_items_response'
|
4
|
+
require 'response/response_base'
|
5
|
+
|
6
|
+
class LookupResponse < ResponseBase
|
7
|
+
|
8
|
+
attr_accessor :cart_id, :cart_items_response
|
9
|
+
|
10
|
+
def initialize(attrs = {})
|
11
|
+
attrs.each do |sym, val|
|
12
|
+
self.send "#{sym}=", val
|
13
|
+
end
|
14
|
+
super
|
15
|
+
end
|
16
|
+
|
17
|
+
def cart_items_response
|
18
|
+
response = TaxCloud::CartItemsResponse.new(@cart_items_response)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|