TaxCloud 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. data/.gitignore +8 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +79 -0
  4. data/README +93 -0
  5. data/config.ru +2 -0
  6. data/doc/Gemfile.html +143 -0
  7. data/doc/Helper.html +249 -0
  8. data/doc/Object.html +193 -0
  9. data/doc/README.html +245 -0
  10. data/doc/TaxCloud.html +244 -0
  11. data/doc/TaxCloud/Address.html +356 -0
  12. data/doc/TaxCloud/AuthorizedResponse.html +226 -0
  13. data/doc/TaxCloud/AuthorizedService.html +304 -0
  14. data/doc/TaxCloud/AuthorizedWithCaptureResponse.html +246 -0
  15. data/doc/TaxCloud/BaseService.html +243 -0
  16. data/doc/TaxCloud/CapturedResponse.html +226 -0
  17. data/doc/TaxCloud/CartItem.html +341 -0
  18. data/doc/TaxCloud/CartItemResponse.html +256 -0
  19. data/doc/TaxCloud/CartItemsResponse.html +286 -0
  20. data/doc/TaxCloud/GetTICsResponse.html +284 -0
  21. data/doc/TaxCloud/LookupResponse.html +259 -0
  22. data/doc/TaxCloud/LookupService.html +230 -0
  23. data/doc/TaxCloud/MessageType.html +205 -0
  24. data/doc/TaxCloud/ResponseBase.html +214 -0
  25. data/doc/TaxCloud/ResponseMessage.html +212 -0
  26. data/doc/TaxCloud/ResponseType.html +212 -0
  27. data/doc/TaxCloud/ReturnedResponse.html +226 -0
  28. data/doc/TaxCloud/ReturnedService.html +231 -0
  29. data/doc/TaxCloud/TIC.html +272 -0
  30. data/doc/TaxCloud/TICService.html +292 -0
  31. data/doc/TaxCloud/VerifyAddressResult.html +361 -0
  32. data/doc/TaxCloud/VerifyAddressService.html +236 -0
  33. data/doc/created.rid +33 -0
  34. data/doc/images/add.png +0 -0
  35. data/doc/images/brick.png +0 -0
  36. data/doc/images/brick_link.png +0 -0
  37. data/doc/images/bug.png +0 -0
  38. data/doc/images/bullet_black.png +0 -0
  39. data/doc/images/bullet_toggle_minus.png +0 -0
  40. data/doc/images/bullet_toggle_plus.png +0 -0
  41. data/doc/images/date.png +0 -0
  42. data/doc/images/delete.png +0 -0
  43. data/doc/images/find.png +0 -0
  44. data/doc/images/loadingAnimation.gif +0 -0
  45. data/doc/images/macFFBgHack.png +0 -0
  46. data/doc/images/package.png +0 -0
  47. data/doc/images/page_green.png +0 -0
  48. data/doc/images/page_white_text.png +0 -0
  49. data/doc/images/page_white_width.png +0 -0
  50. data/doc/images/plugin.png +0 -0
  51. data/doc/images/ruby.png +0 -0
  52. data/doc/images/tag_blue.png +0 -0
  53. data/doc/images/tag_green.png +0 -0
  54. data/doc/images/transparent.png +0 -0
  55. data/doc/images/wrench.png +0 -0
  56. data/doc/images/wrench_orange.png +0 -0
  57. data/doc/images/zoom.png +0 -0
  58. data/doc/index.html +130 -0
  59. data/doc/js/darkfish.js +153 -0
  60. data/doc/js/jquery.js +18 -0
  61. data/doc/js/navigation.js +142 -0
  62. data/doc/js/search.js +94 -0
  63. data/doc/js/search_index.js +1 -0
  64. data/doc/js/searcher.js +228 -0
  65. data/doc/rdoc.css +543 -0
  66. data/doc/table_of_contents.html +200 -0
  67. data/lib/address.rb +27 -0
  68. data/lib/cartitem.rb +28 -0
  69. data/lib/response/authorized_response.rb +15 -0
  70. data/lib/response/authorized_with_capture_response.rb +16 -0
  71. data/lib/response/captured_response.rb +15 -0
  72. data/lib/response/cart_item_response.rb +11 -0
  73. data/lib/response/cart_items_response.rb +22 -0
  74. data/lib/response/get_ti_cs_response.rb +18 -0
  75. data/lib/response/lookup_response.rb +24 -0
  76. data/lib/response/message_type.rb +12 -0
  77. data/lib/response/response_base.rb +10 -0
  78. data/lib/response/response_message.rb +9 -0
  79. data/lib/response/response_type.rb +9 -0
  80. data/lib/response/returned_response.rb +15 -0
  81. data/lib/response/verify_address_result.rb +21 -0
  82. data/lib/service/authorized_service.rb +40 -0
  83. data/lib/service/base_service.rb +13 -0
  84. data/lib/service/lookup_service.rb +20 -0
  85. data/lib/service/returned_service.rb +19 -0
  86. data/lib/service/tic_service.rb +26 -0
  87. data/lib/service/verify_address_service.rb +26 -0
  88. data/lib/tic.rb +14 -0
  89. data/spec/helper.rb +38 -0
  90. data/spec/service/authorized_service_spec.rb +66 -0
  91. data/spec/service/lookup_service_spec.rb +45 -0
  92. data/spec/service/returned_service_spec.rb +36 -0
  93. data/spec/service/tic_serivce_spec.rb +47 -0
  94. data/spec/service/verify_address_service_spec.rb +24 -0
  95. data/spec/spec_helper.rb +12 -0
  96. data/taxcloud.gemspec +18 -0
  97. metadata +117 -3
@@ -0,0 +1,8 @@
1
+ .bundle
2
+ db/*.sqlite3
3
+ log/*.log
4
+ tmp/
5
+ *.gem
6
+ .idea
7
+ .idea/*
8
+ .rspec
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'savon' #, '0.9.6'
4
+
5
+ group :development, :test do
6
+ gem 'rspec-rails', ">= 2.0.0.beta"
7
+ end
8
+
9
+
@@ -0,0 +1,79 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ abstract (1.0.0)
5
+ actionpack (3.0.10)
6
+ activemodel (= 3.0.10)
7
+ activesupport (= 3.0.10)
8
+ builder (~> 2.1.2)
9
+ erubis (~> 2.6.6)
10
+ i18n (~> 0.5.0)
11
+ rack (~> 1.2.1)
12
+ rack-mount (~> 0.6.14)
13
+ rack-test (~> 0.5.7)
14
+ tzinfo (~> 0.3.23)
15
+ activemodel (3.0.10)
16
+ activesupport (= 3.0.10)
17
+ builder (~> 2.1.2)
18
+ i18n (~> 0.5.0)
19
+ activesupport (3.0.10)
20
+ akami (1.0.0)
21
+ gyoku (>= 0.4.0)
22
+ builder (2.1.2)
23
+ diff-lcs (1.1.3)
24
+ erubis (2.6.6)
25
+ abstract (>= 1.0.0)
26
+ gyoku (0.4.4)
27
+ builder (>= 2.1.2)
28
+ httpi (0.9.5)
29
+ rack
30
+ i18n (0.5.0)
31
+ json (1.6.6)
32
+ nokogiri (1.5.0)
33
+ nori (1.0.2)
34
+ rack (1.2.5)
35
+ rack-mount (0.6.14)
36
+ rack (>= 1.0.0)
37
+ rack-test (0.5.7)
38
+ rack (>= 1.0)
39
+ railties (3.0.10)
40
+ actionpack (= 3.0.10)
41
+ activesupport (= 3.0.10)
42
+ rake (>= 0.8.7)
43
+ rdoc (~> 3.4)
44
+ thor (~> 0.14.4)
45
+ rake (0.9.2.2)
46
+ rdoc (3.12)
47
+ json (~> 1.4)
48
+ rspec (2.6.0)
49
+ rspec-core (~> 2.6.0)
50
+ rspec-expectations (~> 2.6.0)
51
+ rspec-mocks (~> 2.6.0)
52
+ rspec-core (2.6.4)
53
+ rspec-expectations (2.6.0)
54
+ diff-lcs (~> 1.1.2)
55
+ rspec-mocks (2.6.0)
56
+ rspec-rails (2.6.1)
57
+ actionpack (~> 3.0)
58
+ activesupport (~> 3.0)
59
+ railties (~> 3.0)
60
+ rspec (~> 2.6.0)
61
+ savon (0.9.7)
62
+ akami (~> 1.0)
63
+ builder (>= 2.1.2)
64
+ gyoku (>= 0.4.0)
65
+ httpi (~> 0.9)
66
+ nokogiri (>= 1.4.0)
67
+ nori (~> 1.0)
68
+ wasabi (~> 2.0)
69
+ thor (0.14.6)
70
+ tzinfo (0.3.33)
71
+ wasabi (2.0.0)
72
+ nokogiri (>= 1.4.0)
73
+
74
+ PLATFORMS
75
+ ruby
76
+
77
+ DEPENDENCIES
78
+ rspec-rails (>= 2.0.0.beta)
79
+ savon
data/README ADDED
@@ -0,0 +1,93 @@
1
+ == TaxCloud Sales Tax Calculation Service
2
+
3
+ TaxCloud is a free hosted service that calculates the sales tax due on your transactions. Using TaxCloud
4
+ is as easy as calculating real-time shipping, a common feature in most shopping carts today. When you
5
+ calculate real-time shipping, your website sends a request to the shipper to determine the cost of
6
+ shipping at a certain speed to a particular location. TaxCloud works the same way.
7
+
8
+ When a customer is ready to check out, TaxCloud sends your website the sales tax amount based on the
9
+ origin, destination, and class of goods. Your website displays that sales tax amount and adds it on
10
+ to the customer’s total. The customer finishes checking out, and your website notifies TaxCloud that
11
+ the purchase was completed, allowing us to keep record the transaction for you.
12
+
13
+ TaxCloud operates on a real-time web services API.
14
+
15
+ See http://www.TaxCloud.net for more information and to sign up for a free account
16
+
17
+
18
+ == Getting Started
19
+
20
+ 1. Create a TaxCloud merchant account at http://www.TaxCloud.net
21
+
22
+ 2. Add a website to your TaxCloud account. This will generate an API ID and API Key that you will
23
+ need to use the service.
24
+
25
+ 3. Optional - create a USPS ID to use the address verification service. It is recommended to verify
26
+ each address to get the nine digit zip code. This allows TaxCloud to determine the most accurate rate.
27
+
28
+ 4. Add the TaxCloud gem to your application.
29
+
30
+ 5. Call the TaxCloud web services to calculate sales tax.
31
+
32
+
33
+ == Using the web services
34
+
35
+ TaxCloud's API is build as a standard SOAP web service. This gem is not required
36
+ to use TaxCloud. It is meant to give examples of how to use the service.
37
+
38
+ TaxCloud determines a sales tax rate based on the merchant's origin address, the
39
+ customer's shipping address and the type of project. There are three main services
40
+ that will need to be integrated: verify_address(), lookup(), and authorized_and_capture().
41
+
42
+ This process is designed with a shopping cart checkout in mind, but it can be used for
43
+ other applications. In a shopping cart the process would be to verify the customer's
44
+ shipping address, and then call lookup() with the addresses and the items in the shopping
45
+ cart. This will return the tax to apply to each item in the cart. Shipping is also included
46
+ in the calculation as it can sometimes be taxable.
47
+
48
+ Once the tax has been added to the order and you are ready to complete the transaction the
49
+ authorized_and_captured() service is called and the transaction details are recorded.
50
+
51
+ You can reverse a cancelled order by calling the returned() service.
52
+
53
+ There are also services available to look up the TIC codes available in the TaxCloud system.
54
+ The Taxability Identifier Codes define the type of product being sold so that the correct tax
55
+ can be applied. More information is available at: http://www.taxcloud.net/tic/
56
+
57
+
58
+ == Integration
59
+
60
+ The lib directory contains a number of 'services' which makes it easy to call
61
+ the TaxCloud services. Each service represents one of the web services described
62
+ above. They can be called from any point in your application by passing in a few parameters.
63
+ All the required classes are included.
64
+
65
+
66
+ == Tests
67
+
68
+ The included RSpec tests demonstrate how to use the services. You will need to configure
69
+ your TaxCloud API ID, API Key and USPS ID in helper.rb to run the tests.
70
+
71
+
72
+ == Support
73
+
74
+ You can contact service@taxcloud.net with any questions you may have.
75
+
76
+ == Description of Contents
77
+
78
+ |-- lib
79
+ | |-- response
80
+ | |-- service
81
+ | |--
82
+ |-- spec
83
+ | |-- service
84
+
85
+
86
+
87
+ lib
88
+ Includes TaxCloud specific classes, service classes and example response classes.
89
+
90
+ spec
91
+ Unit tests which demonstrate how to integrate with the TaxCloud services.
92
+
93
+
@@ -0,0 +1,2 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
@@ -0,0 +1,143 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>Gemfile - 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="file">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="project-metadata">
47
+ <nav id="fileindex-section" class="section project-section">
48
+ <h3 class="section-header">Pages</h3>
49
+
50
+ <ul>
51
+
52
+ <li class="file"><a href="./Gemfile.html">Gemfile</a>
53
+
54
+ <li class="file"><a href="./README.html">README</a>
55
+
56
+ </ul>
57
+ </nav>
58
+
59
+ <nav id="classindex-section" class="section project-section">
60
+ <h3 class="section-header">Class and Module Index</h3>
61
+
62
+ <ul class="link-list">
63
+
64
+ <li><a href="./TaxCloud.html">TaxCloud</a>
65
+
66
+ <li><a href="./TaxCloud.html">TaxCloud</a>
67
+
68
+ <li><a href="./TaxCloud/Address.html">TaxCloud::Address</a>
69
+
70
+ <li><a href="./TaxCloud/AuthorizedResponse.html">TaxCloud::AuthorizedResponse</a>
71
+
72
+ <li><a href="./TaxCloud/AuthorizedService.html">TaxCloud::AuthorizedService</a>
73
+
74
+ <li><a href="./TaxCloud/AuthorizedWithCaptureResponse.html">TaxCloud::AuthorizedWithCaptureResponse</a>
75
+
76
+ <li><a href="./TaxCloud/BaseService.html">TaxCloud::BaseService</a>
77
+
78
+ <li><a href="./TaxCloud/CapturedResponse.html">TaxCloud::CapturedResponse</a>
79
+
80
+ <li><a href="./TaxCloud/CartItem.html">TaxCloud::CartItem</a>
81
+
82
+ <li><a href="./TaxCloud/CartItemResponse.html">TaxCloud::CartItemResponse</a>
83
+
84
+ <li><a href="./TaxCloud/CartItemsResponse.html">TaxCloud::CartItemsResponse</a>
85
+
86
+ <li><a href="./TaxCloud/GetTICsResponse.html">TaxCloud::GetTICsResponse</a>
87
+
88
+ <li><a href="./TaxCloud/LookupResponse.html">TaxCloud::LookupResponse</a>
89
+
90
+ <li><a href="./TaxCloud/LookupService.html">TaxCloud::LookupService</a>
91
+
92
+ <li><a href="./TaxCloud/MessageType.html">TaxCloud::MessageType</a>
93
+
94
+ <li><a href="./TaxCloud/ResponseBase.html">TaxCloud::ResponseBase</a>
95
+
96
+ <li><a href="./TaxCloud/ResponseMessage.html">TaxCloud::ResponseMessage</a>
97
+
98
+ <li><a href="./TaxCloud/ResponseType.html">TaxCloud::ResponseType</a>
99
+
100
+ <li><a href="./TaxCloud/ReturnedResponse.html">TaxCloud::ReturnedResponse</a>
101
+
102
+ <li><a href="./TaxCloud/ReturnedService.html">TaxCloud::ReturnedService</a>
103
+
104
+ <li><a href="./TaxCloud/TIC.html">TaxCloud::TIC</a>
105
+
106
+ <li><a href="./TaxCloud/TICService.html">TaxCloud::TICService</a>
107
+
108
+ <li><a href="./TaxCloud/VerifyAddressResult.html">TaxCloud::VerifyAddressResult</a>
109
+
110
+ <li><a href="./TaxCloud/VerifyAddressService.html">TaxCloud::VerifyAddressService</a>
111
+
112
+ <li><a href="./Helper.html">Helper</a>
113
+
114
+ <li><a href="./Object.html">Object</a>
115
+
116
+ </ul>
117
+ </nav>
118
+
119
+ </div>
120
+ </nav>
121
+
122
+ <div id="documentation" class="description">
123
+
124
+ <p>source ‘<a href="http://rubygems.org">rubygems.org</a>’</p>
125
+
126
+ <p>gem ‘savon’ #, ‘0.9.6’</p>
127
+
128
+ <p>group :development, :test do</p>
129
+
130
+ <pre>gem 'rspec-rails', &quot;&gt;= 2.0.0.beta&quot;</pre>
131
+
132
+ <p>end</p>
133
+
134
+ </div>
135
+
136
+
137
+
138
+ <footer id="validator-badges">
139
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
140
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
141
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
142
+ </footer>
143
+
@@ -0,0 +1,249 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>module Helper - 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 id="top" class="module">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="./index.html">Home</a>
28
+ <a href="./table_of_contents.html#classes">Classes</a>
29
+ <a href="./table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>spec/helper.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+
60
+
61
+ <!-- Method Quickref -->
62
+ <nav id="method-list-section" class="section">
63
+ <h3 class="section-header">Methods</h3>
64
+
65
+ <ul class="link-list">
66
+
67
+ <li><a href="#method-i-variable_init">#variable_init</a>
68
+
69
+ </ul>
70
+ </nav>
71
+
72
+ </div>
73
+
74
+ <div id="project-metadata">
75
+ <nav id="fileindex-section" class="section project-section">
76
+ <h3 class="section-header">Pages</h3>
77
+
78
+ <ul>
79
+
80
+ <li class="file"><a href="./Gemfile.html">Gemfile</a>
81
+
82
+ <li class="file"><a href="./README.html">README</a>
83
+
84
+ </ul>
85
+ </nav>
86
+
87
+ <nav id="classindex-section" class="section project-section">
88
+ <h3 class="section-header">Class and Module Index</h3>
89
+
90
+ <ul class="link-list">
91
+
92
+ <li><a href="./TaxCloud.html">TaxCloud</a>
93
+
94
+ <li><a href="./TaxCloud.html">TaxCloud</a>
95
+
96
+ <li><a href="./TaxCloud/Address.html">TaxCloud::Address</a>
97
+
98
+ <li><a href="./TaxCloud/AuthorizedResponse.html">TaxCloud::AuthorizedResponse</a>
99
+
100
+ <li><a href="./TaxCloud/AuthorizedService.html">TaxCloud::AuthorizedService</a>
101
+
102
+ <li><a href="./TaxCloud/AuthorizedWithCaptureResponse.html">TaxCloud::AuthorizedWithCaptureResponse</a>
103
+
104
+ <li><a href="./TaxCloud/BaseService.html">TaxCloud::BaseService</a>
105
+
106
+ <li><a href="./TaxCloud/CapturedResponse.html">TaxCloud::CapturedResponse</a>
107
+
108
+ <li><a href="./TaxCloud/CartItem.html">TaxCloud::CartItem</a>
109
+
110
+ <li><a href="./TaxCloud/CartItemResponse.html">TaxCloud::CartItemResponse</a>
111
+
112
+ <li><a href="./TaxCloud/CartItemsResponse.html">TaxCloud::CartItemsResponse</a>
113
+
114
+ <li><a href="./TaxCloud/GetTICsResponse.html">TaxCloud::GetTICsResponse</a>
115
+
116
+ <li><a href="./TaxCloud/LookupResponse.html">TaxCloud::LookupResponse</a>
117
+
118
+ <li><a href="./TaxCloud/LookupService.html">TaxCloud::LookupService</a>
119
+
120
+ <li><a href="./TaxCloud/MessageType.html">TaxCloud::MessageType</a>
121
+
122
+ <li><a href="./TaxCloud/ResponseBase.html">TaxCloud::ResponseBase</a>
123
+
124
+ <li><a href="./TaxCloud/ResponseMessage.html">TaxCloud::ResponseMessage</a>
125
+
126
+ <li><a href="./TaxCloud/ResponseType.html">TaxCloud::ResponseType</a>
127
+
128
+ <li><a href="./TaxCloud/ReturnedResponse.html">TaxCloud::ReturnedResponse</a>
129
+
130
+ <li><a href="./TaxCloud/ReturnedService.html">TaxCloud::ReturnedService</a>
131
+
132
+ <li><a href="./TaxCloud/TIC.html">TaxCloud::TIC</a>
133
+
134
+ <li><a href="./TaxCloud/TICService.html">TaxCloud::TICService</a>
135
+
136
+ <li><a href="./TaxCloud/VerifyAddressResult.html">TaxCloud::VerifyAddressResult</a>
137
+
138
+ <li><a href="./TaxCloud/VerifyAddressService.html">TaxCloud::VerifyAddressService</a>
139
+
140
+ <li><a href="./Helper.html">Helper</a>
141
+
142
+ <li><a href="./Object.html">Object</a>
143
+
144
+ </ul>
145
+ </nav>
146
+
147
+ </div>
148
+ </nav>
149
+
150
+ <div id="documentation">
151
+ <h1 class="module">module Helper</h1>
152
+
153
+ <div id="description" class="description">
154
+
155
+ </div><!-- description -->
156
+
157
+
158
+
159
+
160
+ <section id="5Buntitled-5D" class="documentation-section">
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <!-- Methods -->
170
+
171
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
172
+ <h3 class="section-header">Public Instance Methods</h3>
173
+
174
+
175
+ <div id="method-i-variable_init" class="method-detail ">
176
+
177
+ <div class="method-heading">
178
+ <span class="method-name">variable_init</span><span
179
+ class="method-args">()</span>
180
+ <span class="method-click-advice">click to toggle source</span>
181
+ </div>
182
+
183
+
184
+ <div class="method-description">
185
+
186
+
187
+
188
+
189
+
190
+ <div class="method-source-code" id="variable_init-source">
191
+ <pre><span class="ruby-comment"># File spec/helper.rb, line 3</span>
192
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">variable_init</span>
193
+ <span class="ruby-ivar">@client</span> = <span class="ruby-constant">Savon</span><span class="ruby-operator">::</span><span class="ruby-constant">Client</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword">do</span>
194
+ <span class="ruby-identifier">wsdl</span>.<span class="ruby-identifier">document</span> = <span class="ruby-string">&quot;https://api.taxcloud.net/1.0/TaxCloud.asmx?wsdl&quot;</span>
195
+ <span class="ruby-keyword">end</span>
196
+ <span class="ruby-identifier">cart_item</span> = <span class="ruby-constant">TaxCloud</span><span class="ruby-operator">::</span><span class="ruby-constant">CartItem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:index</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>, <span class="ruby-value">:item_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>, <span class="ruby-value">:tic</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'00000'</span>, <span class="ruby-value">:price</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'19.99'</span>, <span class="ruby-value">:quantity</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>)
197
+ <span class="ruby-identifier">cart_item1</span> = <span class="ruby-constant">TaxCloud</span><span class="ruby-operator">::</span><span class="ruby-constant">CartItem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:index</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>, <span class="ruby-value">:item_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>, <span class="ruby-value">:tic</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'20010'</span>, <span class="ruby-value">:price</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'9.99'</span>, <span class="ruby-value">:quantity</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>)
198
+
199
+ <span class="ruby-comment"># Add a cart item for shipping charges, if applicable</span>
200
+ <span class="ruby-identifier">cart_item2</span> = <span class="ruby-constant">TaxCloud</span><span class="ruby-operator">::</span><span class="ruby-constant">CartItem</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:index</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">2</span>, <span class="ruby-value">:item_id</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">99999</span>, <span class="ruby-value">:tic</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'11010'</span>, <span class="ruby-value">:price</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'19.99'</span>, <span class="ruby-value">:quantity</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value">1</span>)
201
+
202
+ <span class="ruby-ivar">@cart_items</span> = <span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>
203
+ <span class="ruby-ivar">@cart_items</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">cart_item</span>
204
+ <span class="ruby-ivar">@cart_items</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">cart_item1</span>
205
+ <span class="ruby-ivar">@cart_items</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">cart_item2</span>
206
+
207
+ <span class="ruby-ivar">@origin</span> = <span class="ruby-constant">TaxCloud</span><span class="ruby-operator">::</span><span class="ruby-constant">Address</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:address1</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'162 East Avenue'</span>, <span class="ruby-value">:address2</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Third Floor'</span>, <span class="ruby-value">:city</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Norwalk'</span>, <span class="ruby-value">:state</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'CT'</span>, <span class="ruby-value">:zip5</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'06851'</span>)
208
+
209
+ <span class="ruby-comment">#origin = verify_address(client, origin)</span>
210
+
211
+ <span class="ruby-ivar">@destination</span> = <span class="ruby-constant">TaxCloud</span><span class="ruby-operator">::</span><span class="ruby-constant">Address</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">:address1</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'3121 West Government Way'</span>, <span class="ruby-value">:address2</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Suite 2B'</span>, <span class="ruby-value">:city</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'Seattle'</span>, <span class="ruby-value">:state</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'WA'</span>, <span class="ruby-value">:zip5</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-string">'98199'</span>)
212
+
213
+ <span class="ruby-comment">#destination = verify_address(client, destination)</span>
214
+ <span class="ruby-ivar">@customer_id</span> = <span class="ruby-value">1</span>
215
+ <span class="ruby-ivar">@cart_id</span> = <span class="ruby-keyword">nil</span>
216
+ <span class="ruby-ivar">@order_id</span> = <span class="ruby-value">1</span>
217
+
218
+ <span class="ruby-comment"># You will have to populate these values from your TaxCloud merchant account</span>
219
+ <span class="ruby-ivar">@api_id</span> = <span class="ruby-string">&quot;&quot;</span>
220
+ <span class="ruby-ivar">@api_key</span> = <span class="ruby-string">&quot;&quot;</span>
221
+ <span class="ruby-ivar">@usps_id</span> = <span class="ruby-string">&quot;&quot;</span>
222
+
223
+ <span class="ruby-ivar">@date_authorized</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>
224
+ <span class="ruby-ivar">@date_captured</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>
225
+ <span class="ruby-ivar">@returned_date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>
226
+ <span class="ruby-keyword">end</span></pre>
227
+ </div><!-- variable_init-source -->
228
+
229
+ </div>
230
+
231
+
232
+
233
+
234
+ </div><!-- variable_init-method -->
235
+
236
+
237
+ </section><!-- public-instance-method-details -->
238
+
239
+ </section><!-- 5Buntitled-5D -->
240
+
241
+ </div><!-- documentation -->
242
+
243
+
244
+ <footer id="validator-badges">
245
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
246
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
247
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
248
+ </footer>
249
+