tax_cloud 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +30 -0
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +85 -0
- data/Gemfile +0 -1
- data/LICENSE.md +21 -0
- data/README.md +200 -0
- data/Rakefile +0 -10
- data/lib/tax_cloud/errors/tax_cloud_error.rb +1 -1
- data/lib/tax_cloud/responses/authorized.rb +1 -1
- data/lib/tax_cloud/responses/authorized_with_capture.rb +1 -1
- data/lib/tax_cloud/responses/captured.rb +1 -1
- data/lib/tax_cloud/responses/cart_item.rb +1 -1
- data/lib/tax_cloud/responses/lookup.rb +1 -1
- data/lib/tax_cloud/responses/ping.rb +1 -1
- data/lib/tax_cloud/responses/returned.rb +1 -1
- data/lib/tax_cloud/responses/tax_code_groups.rb +1 -1
- data/lib/tax_cloud/responses/tax_codes.rb +1 -1
- data/lib/tax_cloud/responses/tax_codes_by_group.rb +1 -1
- data/lib/tax_cloud/responses/verify_address.rb +1 -1
- data/lib/tax_cloud/version.rb +1 -1
- data/lib/tax_cloud.rb +1 -1
- data/tax_cloud.gemspec +1 -0
- data/test/cassettes/authorized.yml +6 -6
- data/test/cassettes/authorized_with_capture.yml +6 -6
- data/test/cassettes/authorized_with_localized_time.yml +6 -6
- data/test/cassettes/captured.yml +7 -7
- data/test/cassettes/get_tic_groups.yml +5 -5
- data/test/cassettes/get_tics.yml +5 -5
- data/test/cassettes/get_tics_by_group.yml +5 -5
- data/test/cassettes/invalid_soap_call.yml +5 -5
- data/test/cassettes/lookup.yml +5 -5
- data/test/cassettes/lookup_ny.yml +5 -5
- data/test/cassettes/ping.yml +5 -5
- data/test/cassettes/ping_with_invalid_credentials.yml +5 -5
- data/test/cassettes/ping_with_invalid_response.yml +5 -5
- data/test/cassettes/returned.yml +7 -7
- data/test/cassettes/verify_bad_address.yml +5 -5
- data/test/cassettes/verify_good_address.yml +5 -5
- data/test/test_address.rb +4 -4
- metadata +21 -7
- data/.travis.yml +0 -6
- data/CHANGELOG.rdoc +0 -53
- data/LICENSE.rdoc +0 -22
- data/README.rdoc +0 -144
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55a0579c5212968283b84a2e6a87921e8d741d182e4f23337d480435c26dbec6
|
4
|
+
data.tar.gz: 7cb858801bc88041e2b402962c5dc05d91afb6b52dc3fe793c4a943014b7d1bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efc17316081884f02aebf3d1064e81df78515e5b8ee9355c224d8be53ef7529833648295c692ab332d35018092c940b2c21d2356450fa67761db7cd563b472ca
|
7
|
+
data.tar.gz: b256cb07f74161ad04c869c258e75549fbed0920c2ce3a030e60a126518df9d32111df50afaba455b69682a31fc64f8cf30960b0c9e6c660da64f4b3c72fc994
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Reference https://github.com/actions/starter-workflows/blob/main/ci/ruby.yml
|
2
|
+
name: test
|
3
|
+
on: [push, pull_request]
|
4
|
+
jobs:
|
5
|
+
lint:
|
6
|
+
name: RuboCop
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
steps:
|
9
|
+
- uses: actions/checkout@v3
|
10
|
+
- name: Set up Ruby
|
11
|
+
uses: ruby/setup-ruby@v1
|
12
|
+
with:
|
13
|
+
ruby-version: 2.7
|
14
|
+
bundler-cache: true
|
15
|
+
- name: Run RuboCop
|
16
|
+
run: bundle exec rubocop
|
17
|
+
test:
|
18
|
+
runs-on: ubuntu-latest
|
19
|
+
strategy:
|
20
|
+
matrix:
|
21
|
+
ruby-version: ['2.6', '2.7']
|
22
|
+
name: test (${{ matrix.ruby-version }})
|
23
|
+
steps:
|
24
|
+
- uses: actions/checkout@v3
|
25
|
+
- uses: ruby/setup-ruby@v1
|
26
|
+
with:
|
27
|
+
ruby-version: ${{ matrix.ruby-version }}
|
28
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
29
|
+
- run: bundle exec rake test
|
30
|
+
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
### 0.5.0 (7/21/2023)
|
2
|
+
|
3
|
+
* Update README, CHANGELOG, and LICENSE from RDoc to Markdown -
|
4
|
+
@brchristian.
|
5
|
+
* Migrate from Travis CI to GitHub Actions -
|
6
|
+
@rchekaluk.
|
7
|
+
* Update WSDL endpoint URL as recommended by TaxCloud to
|
8
|
+
https://api.taxcloud.com/1.0/?wsdl - @mrmarcondes.
|
9
|
+
|
10
|
+
|
11
|
+
### 0.4.0 (12/7/2020)
|
12
|
+
|
13
|
+
* Add `open_timeout` and `read_timeout` options into configuration -
|
14
|
+
@ka8725.
|
15
|
+
* Switch to using BigDecimal for `tax_amount` to avoid floating point
|
16
|
+
arithmetic errors - @paulhenrich.
|
17
|
+
* Require ruby 2.6.0+
|
18
|
+
* Upgrade to rubocop latest
|
19
|
+
* Add `TargetRubyVersion: 2.6` to rubocop config (based on
|
20
|
+
https://www.ruby-lang.org/en/downloads/branches/ oldest "normal
|
21
|
+
maintenance" version)
|
22
|
+
* Add `required_ruby_version` to gemspec
|
23
|
+
* addresses rubocop violations
|
24
|
+
|
25
|
+
* Update WSDL endpoint URL as recommended by TaxCloud to
|
26
|
+
https://asmx.taxcloud.com/1.0/?wsdl - @brchristian.
|
27
|
+
|
28
|
+
|
29
|
+
### 0.3.0 (1/9/2014)
|
30
|
+
|
31
|
+
* #19: Support Savon 2 - @drewtempelmeyer.
|
32
|
+
* Implemented Rubocop, Ruby style linter - @dblock.
|
33
|
+
* Ruby 1.8.7 and 1.9.2 are no longer supported - @dblock.
|
34
|
+
|
35
|
+
|
36
|
+
### 0.2.2 (4/29/2013)
|
37
|
+
|
38
|
+
* Relaxed thirdparty gem dependency versions - @mperham.
|
39
|
+
|
40
|
+
|
41
|
+
### 0.2.1 (3/3/2013)
|
42
|
+
|
43
|
+
* Fixed date formatting in API requests with localized applications -
|
44
|
+
@soulcutter.
|
45
|
+
|
46
|
+
|
47
|
+
### 0.2.0 (11/26/2012)
|
48
|
+
|
49
|
+
* The gem is now licensed under the MIT license - @dblock.
|
50
|
+
* Raise specialized configuration and SOAP errors - @dblock.
|
51
|
+
* Added `TaxCloud::Client.ping` - @dblock.
|
52
|
+
* Returning a verified `TaxCloud::Address` from `TaxCloud::Address.verify` -
|
53
|
+
@dblock.
|
54
|
+
* Added `TaxCloud::Address.zip` that returns a 9-digit address zip code,
|
55
|
+
when available - @dblock.
|
56
|
+
* Returning a `TaxCloud::Responses::Lookup` from
|
57
|
+
`TaxCloud::Transaction.lookup` - @dblock.
|
58
|
+
* Returning transaction state, ie. `"OK"` from all other TaxCloud
|
59
|
+
transactions. Exceptions are raised on error - @dblock.
|
60
|
+
* Added support for tax codes and tax code groups lookup with
|
61
|
+
`TaxCloud::TaxCodes` and `TaxCloud::TaxCode::Groups` - @dblock.
|
62
|
+
|
63
|
+
|
64
|
+
### 0.1.5 (5/9/2012)
|
65
|
+
|
66
|
+
* Fixed compatibility with Ruby 1.8.7 and 1.9.3, removed super from
|
67
|
+
constructors for classes which inherit from `Object` - @gfmurphy.
|
68
|
+
|
69
|
+
|
70
|
+
### 0.1.4 (10/20/2011)
|
71
|
+
|
72
|
+
* Upgraded rdoc - @drewtempelmeyer.
|
73
|
+
* Fixed `.gemspec` dependency declaration for savon - @drewtempelmeyer.
|
74
|
+
|
75
|
+
|
76
|
+
### 0.1.3 (9/19/2011)
|
77
|
+
|
78
|
+
* Added support for the "returned" request - @danielmorrison.
|
79
|
+
* Refactoreted tests to use vcr and webmock - @danielmorrison.
|
80
|
+
|
81
|
+
|
82
|
+
### 0.1.0 (8/23/2011)
|
83
|
+
|
84
|
+
* Initial public release - @drewtempelmeyer.
|
85
|
+
|
data/Gemfile
CHANGED
data/LICENSE.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2011-2020 Drew Tempelmeyer & Contributors
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
# TaxCloud
|
2
|
+
|
3
|
+
[![Build Status](https://github.com/txcrb/tax_cloud/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/txcrb/tax_cloud/actions)
|
4
|
+
|
5
|
+
[TaxCloud](http://www.taxcloud.com) is a free service to calculate sales tax
|
6
|
+
and generate tax reports. The `tax_cloud` gem allows you to easily integrate
|
7
|
+
with TaxCloud's API.
|
8
|
+
|
9
|
+
### Getting Started
|
10
|
+
Create a [TaxCloud](http://www.taxcloud.com) merchant account at
|
11
|
+
http://www.taxcloud.net. Add a website to your account under
|
12
|
+
[Locations](https://taxcloud.net/account/locations). This will generate an API
|
13
|
+
ID and API Key that you will need to use the service.
|
14
|
+
|
15
|
+
[TaxCloud](http://www.taxcloud.com) also offers an optional address
|
16
|
+
verification API. To use it, you need a USPS (United States Postal Service)
|
17
|
+
Address API Username. To obtain your USPS Username:
|
18
|
+
1. Go through the Web Tools API Portal registration process at
|
19
|
+
https://registration.shippingapis.com/
|
20
|
+
2. Once you have registered for your account, you will receive an email with
|
21
|
+
your USPS username and password.
|
22
|
+
3. Enter your USPS username in your TaxCloud initializer (see below).
|
23
|
+
|
24
|
+
|
25
|
+
### Setup
|
26
|
+
Add the gem to your Gemfile.
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
gem 'tax_cloud'
|
30
|
+
```
|
31
|
+
|
32
|
+
Configure your environment. For example, create an initializer in Rails in
|
33
|
+
`config/initializers/tax_cloud.rb`.
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
TaxCloud.configure do |config|
|
37
|
+
config.api_login_id = 'your_tax_cloud_api_login_id'
|
38
|
+
config.api_key = 'your_tax_cloud_api_key'
|
39
|
+
config.usps_username = 'your_usps_username' # optional
|
40
|
+
config.open_timeout = 1 # optional
|
41
|
+
config.read_timeout = 1 # optional
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
45
|
+
The `open_timeout` and `read_timeout` options are used to specify waiting time
|
46
|
+
for the TaxCloud web service response in seconds. Default values:
|
47
|
+
`open_timeout = 2` and `read_timeout = 2`.
|
48
|
+
|
49
|
+
### Using TaxCloud
|
50
|
+
Define the destination and origin addresses using `TaxCloud::Address`.
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
origin = TaxCloud::Address.new(
|
54
|
+
address1: '162 East Avenue',
|
55
|
+
address2: 'Third Floor',
|
56
|
+
city: 'Norwalk',
|
57
|
+
state: 'CT',
|
58
|
+
zip5: '06851'
|
59
|
+
)
|
60
|
+
destination = TaxCloud::Address.new(
|
61
|
+
address1: '3121 West Government Way',
|
62
|
+
address2: 'Suite 2B',
|
63
|
+
city: 'Seattle',
|
64
|
+
state: 'WA',
|
65
|
+
zip5: '98199'
|
66
|
+
)
|
67
|
+
```
|
68
|
+
|
69
|
+
Create your Transaction and set up your cart items
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
transaction = TaxCloud::Transaction.new(
|
73
|
+
customer_id: '1',
|
74
|
+
cart_id: '1',
|
75
|
+
origin: origin,
|
76
|
+
destination: destination
|
77
|
+
)
|
78
|
+
transaction.cart_items << TaxCloud::CartItem.new(
|
79
|
+
index: 0,
|
80
|
+
item_id: 'SKU-100',
|
81
|
+
tic: TaxCloud::TaxCodes::GENERAL,
|
82
|
+
price: 10.00,
|
83
|
+
quantity: 1
|
84
|
+
)
|
85
|
+
lookup = transaction.lookup # this will return a TaxCloud::Responses::Lookup instance
|
86
|
+
lookup.tax_amount # total tax amount
|
87
|
+
lookup.cart_items.each do |cart_item|
|
88
|
+
cart_item.tax_amount # tax for a single item
|
89
|
+
end
|
90
|
+
```
|
91
|
+
|
92
|
+
After you've authorized and captured the transaction via your merchant
|
93
|
+
account, you should do the same with TaxCloud for maintaining accurate tax
|
94
|
+
information.
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
transaction.order_id = 100
|
98
|
+
transaction.authorized_with_capture # returns "OK" or raises an error
|
99
|
+
```
|
100
|
+
|
101
|
+
Later, you may need to mark some cart items as returned. TaxCloud will ignore
|
102
|
+
any cart items that you don't include.
|
103
|
+
|
104
|
+
```ruby
|
105
|
+
transaction.order_id = 100
|
106
|
+
transaction.cart_items << TaxCloud::CartItem.new(
|
107
|
+
index: 0,
|
108
|
+
item_id: 'SKU-100',
|
109
|
+
tic: TaxCloud::TaxCodes::GENERAL,
|
110
|
+
price: 10.00,
|
111
|
+
quantity: 1
|
112
|
+
)
|
113
|
+
transaction.returned # returns "OK" or raises an error
|
114
|
+
```
|
115
|
+
|
116
|
+
### Verifying Addresses
|
117
|
+
|
118
|
+
[TaxCloud](http://www.taxcloud.com) optionally integrates with the USPS
|
119
|
+
Address API. An address can be verified, which can also yield a 9-digit zip
|
120
|
+
code that helps determine a more accurate tax rate.
|
121
|
+
|
122
|
+
```ruby
|
123
|
+
address = TaxCloud::Address.new({
|
124
|
+
address1: '888 6th Ave',
|
125
|
+
city: 'New York',
|
126
|
+
state: 'New York',
|
127
|
+
zip5: '10001'
|
128
|
+
})
|
129
|
+
|
130
|
+
verified_address = address.verify
|
131
|
+
verified_address.zip5 # 10001
|
132
|
+
verified_address.zip4 # 3502
|
133
|
+
verified_address.zip # 10001-3502
|
134
|
+
```
|
135
|
+
|
136
|
+
### Tax Codes
|
137
|
+
[TaxCloud](http://www.taxcloud.com) maintains a list of all Taxability
|
138
|
+
Information Codes or TICs, which can be found at https://taxcloud.net/tic.
|
139
|
+
|
140
|
+
You can obtain all tax codes as well as lookup a tax code by ID.
|
141
|
+
|
142
|
+
```ruby
|
143
|
+
TaxCloud::TaxCodes.all # a hash of all codes
|
144
|
+
tax_code = TaxCloud::TaxCodes[TaxCloud::TaxCodes::DIRECT_MAIL_RELATED]
|
145
|
+
tax_code.ticid # 11000 or TaxCloud::TaxCodes::DIRECT_MAIL_RELATED
|
146
|
+
tax_code.description # "Direct-mail related"
|
147
|
+
```
|
148
|
+
|
149
|
+
Tax codes are organized in groups.
|
150
|
+
|
151
|
+
```ruby
|
152
|
+
TaxCloud::TaxCode::Groups.all # a hash of all groups
|
153
|
+
tax_code_group = TaxCloud::TaxCode::Groups[TaxCloud::TaxCode::Groups::SCHOOL_RELATED_PRODUCTS]
|
154
|
+
tax_code_group.group_id # 3 or TaxCloud::TaxCode::Groups::SCHOOL_RELATED_PRODUCTS
|
155
|
+
tax_code_group.description # School Related Products
|
156
|
+
tax_code_group.tax_codes # a hash of all codes in this group
|
157
|
+
```
|
158
|
+
|
159
|
+
Tax code constants are defined in `tax_code_constants.rb` and tax code group
|
160
|
+
constants in `tax_code_group_constants.rb`. These files can be generated by
|
161
|
+
running the following rake tasks.
|
162
|
+
|
163
|
+
```
|
164
|
+
TAXCLOUD_API_LOGIN_ID=... TAXCLOUD_API_KEY=... TAXCLOUD_USPS_USERNAME=... tax_cloud:tax_codes
|
165
|
+
TAXCLOUD_API_LOGIN_ID=... TAXCLOUD_API_KEY=... TAXCLOUD_USPS_USERNAME=... tax_cloud:tax_code_groups
|
166
|
+
```
|
167
|
+
|
168
|
+
### Tax States
|
169
|
+
TaxCloud manages a list of states in which you can calculate sales tax. The
|
170
|
+
default setup will only have SSUTA (Streamlined Sales and Use Tax Agreement)
|
171
|
+
states enabled. All other states will return $0 for tax values. To enable
|
172
|
+
other states, go to https://taxcloud.com/go/states-management/. You can find
|
173
|
+
more information about SSUTA
|
174
|
+
[here](http://www.streamlinedsalestax.org/index.php?page=About-Us).
|
175
|
+
|
176
|
+
### Running Tests
|
177
|
+
* VCR and WebMock are used to replay requests and avoid hitting the API each
|
178
|
+
time. To refresh the mocks, simply delete the `test/cassettes` directory.
|
179
|
+
* Run tests.
|
180
|
+
rake test
|
181
|
+
|
182
|
+
* If you need to record new requests against TaxCloud, set your keys first.
|
183
|
+
TAXCLOUD_API_LOGIN_ID=... TAXCLOUD_API_KEY=... TAXCLOUD_USPS_USERNAME=... rake test
|
184
|
+
|
185
|
+
The mocks will filter out your configuration details.
|
186
|
+
|
187
|
+
|
188
|
+
### Bugs, fixes, etc
|
189
|
+
* Fork.
|
190
|
+
* Write test(s).
|
191
|
+
* Fix.
|
192
|
+
* Commit.
|
193
|
+
* Submit pull request.
|
194
|
+
|
195
|
+
|
196
|
+
### License
|
197
|
+
|
198
|
+
Copyright Drew Tempelmeyer and contributors, 2011-2020.
|
199
|
+
|
200
|
+
This gem is licensed under the MIT license.
|
data/Rakefile
CHANGED
@@ -2,24 +2,14 @@
|
|
2
2
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
4
|
require 'rake/testtask'
|
5
|
-
require 'rdoc/task'
|
6
5
|
require 'vcr'
|
7
6
|
|
8
|
-
README = 'README.rdoc'
|
9
|
-
|
10
7
|
Rake::TestTask.new(:test) do |test|
|
11
8
|
test.libs << 'lib' << 'test'
|
12
9
|
test.pattern = 'test/test_*.rb'
|
13
10
|
test.verbose = false
|
14
11
|
end
|
15
12
|
|
16
|
-
RDoc::Task.new do |rd|
|
17
|
-
rd.main = README
|
18
|
-
rd.rdoc_files.include(README, 'CHANGELOG.rdoc', 'LICENSE.rdoc', 'lib/**/*.rb')
|
19
|
-
rd.rdoc_dir = 'doc'
|
20
|
-
rd.title = 'tax_cloud'
|
21
|
-
end
|
22
|
-
|
23
13
|
load 'lib/tasks/tax_cloud.rake'
|
24
14
|
load 'lib/tasks/tax_codes.rake'
|
25
15
|
load 'lib/tasks/tax_code_groups.rake'
|
@@ -44,7 +44,7 @@ module TaxCloud #:nodoc:
|
|
44
44
|
#
|
45
45
|
# Returns a localized error message string.
|
46
46
|
def translate(key, options)
|
47
|
-
::I18n.translate("#{BASE_KEY}.#{key}", { locale: :en }.merge(options)).strip
|
47
|
+
::I18n.translate("#{BASE_KEY}.#{key}", **{ locale: :en }.merge(options)).strip
|
48
48
|
end
|
49
49
|
|
50
50
|
# Create the problem.
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud Authorized API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=Authorized.
|
8
8
|
class Authorized < Generic
|
9
9
|
response_key :authorized
|
10
10
|
end
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud AuthorizedWithCapture API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=AuthorizedWithCapture.
|
8
8
|
class AuthorizedWithCapture < Generic
|
9
9
|
response_key :authorized_with_capture
|
10
10
|
end
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud Captured API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=Captured.
|
8
8
|
class Captured < Generic
|
9
9
|
response_key :captured
|
10
10
|
end
|
@@ -6,7 +6,7 @@ module TaxCloud #:nodoc:
|
|
6
6
|
module Responses #:nodoc:
|
7
7
|
# A single item in the response to a TaxCloud Lookup API call.
|
8
8
|
#
|
9
|
-
# See https://
|
9
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=Lookup.
|
10
10
|
class CartItem
|
11
11
|
# The index of the cart item.
|
12
12
|
attr_accessor :cart_item_index
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud Lookup API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=Lookup.
|
8
8
|
class Lookup < Base
|
9
9
|
# Cart ID.
|
10
10
|
attr_accessor :cart_id
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud Ping API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=Ping.
|
8
8
|
class Ping < Generic
|
9
9
|
response_key :ping
|
10
10
|
end
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud Returned API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=Returned.
|
8
8
|
class Returned < Generic
|
9
9
|
response_key :returned
|
10
10
|
end
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud getTICGroups API call.
|
6
6
|
#
|
7
|
-
# https://
|
7
|
+
# https://api.taxcloud.com/1.0/TaxCloud.asmx?op=GetTICGroups
|
8
8
|
class TaxCodeGroups < Base
|
9
9
|
response_type 'get_tic_groups_response/get_tic_groups_result/response_type'
|
10
10
|
error_message 'get_tic_groups_response/get_tic_groups_result/messages/response_message/message'
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud getTICs API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=GetTICs.
|
8
8
|
class TaxCodes < Base
|
9
9
|
response_type 'get_ti_cs_response/get_ti_cs_result/response_type'
|
10
10
|
error_message 'get_ti_cs_response/get_ti_cs_result/messages/response_message/message'
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud getTICsByGroup API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=GetTICsByGroup.
|
8
8
|
class TaxCodesByGroup < Base
|
9
9
|
response_type 'get_ti_cs_by_group_response/get_ti_cs_by_group_result/response_type'
|
10
10
|
error_message 'get_ti_cs_by_group_response/get_ti_cs_by_group_result/messages/response_message/message'
|
@@ -4,7 +4,7 @@ module TaxCloud #:nodoc:
|
|
4
4
|
module Responses #:nodoc:
|
5
5
|
# Response to a TaxCloud VerifyAddress API call.
|
6
6
|
#
|
7
|
-
# See https://
|
7
|
+
# See https://api.taxcloud.com/1.0/TaxCloud.asmx?op=VerifyAddress.
|
8
8
|
class VerifyAddress < Base
|
9
9
|
error_number 'verify_address_response/verify_address_result/err_number'
|
10
10
|
error_message 'verify_address_response/verify_address_result/err_description'
|
data/lib/tax_cloud/version.rb
CHANGED
data/lib/tax_cloud.rb
CHANGED
@@ -29,7 +29,7 @@ I18n.load_path << File.join(File.dirname(__FILE__), 'config', 'locales', 'en.yml
|
|
29
29
|
# For information on configuring and using the TaxCloud API, look at the <tt>README</tt> file.
|
30
30
|
module TaxCloud
|
31
31
|
# WSDL location for TaxCloud API.
|
32
|
-
WSDL_URL = 'https://
|
32
|
+
WSDL_URL = 'https://api.taxcloud.com/1.0/?wsdl'
|
33
33
|
|
34
34
|
# TaxCloud API version.
|
35
35
|
API_VERSION = '1.0'
|
data/tax_cloud.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.taxcloud.com/1.0/?wsdl
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -719,17 +719,17 @@ http_interactions:
|
|
719
719
|
part=\"Body\" />\r\n </wsdl:output>\r\n </wsdl:operation>\r\n </wsdl:binding>\r\n
|
720
720
|
\ <wsdl:service name=\"TaxCloud\">\r\n <wsdl:documentation xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">TaxCloud
|
721
721
|
Web Service</wsdl:documentation>\r\n <wsdl:port name=\"TaxCloudSoap\" binding=\"tns:TaxCloudSoap\">\r\n
|
722
|
-
\ <soap:address location=\"https://
|
722
|
+
\ <soap:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
723
723
|
/>\r\n </wsdl:port>\r\n <wsdl:port name=\"TaxCloudSoap12\" binding=\"tns:TaxCloudSoap12\">\r\n
|
724
|
-
\ <soap12:address location=\"https://
|
724
|
+
\ <soap12:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
725
725
|
/>\r\n </wsdl:port>\r\n <wsdl:port name=\"TaxCloudHttpPost\" binding=\"tns:TaxCloudHttpPost\">\r\n
|
726
|
-
\ <http:address location=\"https://
|
726
|
+
\ <http:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
727
727
|
/>\r\n </wsdl:port>\r\n </wsdl:service>\r\n</wsdl:definitions>"
|
728
728
|
http_version:
|
729
729
|
recorded_at: Thu, 09 Jan 2014 16:03:39 GMT
|
730
730
|
- request:
|
731
731
|
method: post
|
732
|
-
uri: https://
|
732
|
+
uri: https://api.taxcloud.com/1.0/TaxCloud.asmx
|
733
733
|
body:
|
734
734
|
encoding: US-ASCII
|
735
735
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
@@ -779,7 +779,7 @@ http_interactions:
|
|
779
779
|
recorded_at: Fri, 01 Mar 2013 22:58:17 GMT
|
780
780
|
- request:
|
781
781
|
method: post
|
782
|
-
uri: https://
|
782
|
+
uri: https://api.taxcloud.com/1.0/TaxCloud.asmx
|
783
783
|
body:
|
784
784
|
encoding: US-ASCII
|
785
785
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.taxcloud.com/1.0/?wsdl
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -719,17 +719,17 @@ http_interactions:
|
|
719
719
|
part=\"Body\" />\r\n </wsdl:output>\r\n </wsdl:operation>\r\n </wsdl:binding>\r\n
|
720
720
|
\ <wsdl:service name=\"TaxCloud\">\r\n <wsdl:documentation xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">TaxCloud
|
721
721
|
Web Service</wsdl:documentation>\r\n <wsdl:port name=\"TaxCloudSoap\" binding=\"tns:TaxCloudSoap\">\r\n
|
722
|
-
\ <soap:address location=\"https://
|
722
|
+
\ <soap:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
723
723
|
/>\r\n </wsdl:port>\r\n <wsdl:port name=\"TaxCloudSoap12\" binding=\"tns:TaxCloudSoap12\">\r\n
|
724
|
-
\ <soap12:address location=\"https://
|
724
|
+
\ <soap12:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
725
725
|
/>\r\n </wsdl:port>\r\n <wsdl:port name=\"TaxCloudHttpPost\" binding=\"tns:TaxCloudHttpPost\">\r\n
|
726
|
-
\ <http:address location=\"https://
|
726
|
+
\ <http:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
727
727
|
/>\r\n </wsdl:port>\r\n </wsdl:service>\r\n</wsdl:definitions>"
|
728
728
|
http_version:
|
729
729
|
recorded_at: Thu, 09 Jan 2014 16:03:39 GMT
|
730
730
|
- request:
|
731
731
|
method: post
|
732
|
-
uri: https://
|
732
|
+
uri: https://api.taxcloud.com/1.0/TaxCloud.asmx
|
733
733
|
body:
|
734
734
|
encoding: US-ASCII
|
735
735
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
@@ -779,7 +779,7 @@ http_interactions:
|
|
779
779
|
recorded_at: Fri, 01 Mar 2013 22:58:18 GMT
|
780
780
|
- request:
|
781
781
|
method: post
|
782
|
-
uri: https://
|
782
|
+
uri: https://api.taxcloud.com/1.0/TaxCloud.asmx
|
783
783
|
body:
|
784
784
|
encoding: US-ASCII
|
785
785
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
@@ -2,7 +2,7 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: get
|
5
|
-
uri: https://
|
5
|
+
uri: https://api.taxcloud.com/1.0/?wsdl
|
6
6
|
body:
|
7
7
|
encoding: US-ASCII
|
8
8
|
string: ''
|
@@ -719,17 +719,17 @@ http_interactions:
|
|
719
719
|
part=\"Body\" />\r\n </wsdl:output>\r\n </wsdl:operation>\r\n </wsdl:binding>\r\n
|
720
720
|
\ <wsdl:service name=\"TaxCloud\">\r\n <wsdl:documentation xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">TaxCloud
|
721
721
|
Web Service</wsdl:documentation>\r\n <wsdl:port name=\"TaxCloudSoap\" binding=\"tns:TaxCloudSoap\">\r\n
|
722
|
-
\ <soap:address location=\"https://
|
722
|
+
\ <soap:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
723
723
|
/>\r\n </wsdl:port>\r\n <wsdl:port name=\"TaxCloudSoap12\" binding=\"tns:TaxCloudSoap12\">\r\n
|
724
|
-
\ <soap12:address location=\"https://
|
724
|
+
\ <soap12:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
725
725
|
/>\r\n </wsdl:port>\r\n <wsdl:port name=\"TaxCloudHttpPost\" binding=\"tns:TaxCloudHttpPost\">\r\n
|
726
|
-
\ <http:address location=\"https://
|
726
|
+
\ <http:address location=\"https://api.taxcloud.com/1.0/TaxCloud.asmx\"
|
727
727
|
/>\r\n </wsdl:port>\r\n </wsdl:service>\r\n</wsdl:definitions>"
|
728
728
|
http_version:
|
729
729
|
recorded_at: Thu, 09 Jan 2014 16:03:39 GMT
|
730
730
|
- request:
|
731
731
|
method: post
|
732
|
-
uri: https://
|
732
|
+
uri: https://api.taxcloud.com/1.0/TaxCloud.asmx
|
733
733
|
body:
|
734
734
|
encoding: US-ASCII
|
735
735
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
@@ -779,7 +779,7 @@ http_interactions:
|
|
779
779
|
recorded_at: Sat, 02 Mar 2013 04:12:51 GMT
|
780
780
|
- request:
|
781
781
|
method: post
|
782
|
-
uri: https://
|
782
|
+
uri: https://api.taxcloud.com/1.0/TaxCloud.asmx
|
783
783
|
body:
|
784
784
|
encoding: US-ASCII
|
785
785
|
string: <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|