duty_calculator 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +4 -0
- data/.travis.yml +16 -0
- data/Gemfile +9 -0
- data/LICENSE.txt +22 -0
- data/README.md +32 -0
- data/Rakefile +10 -0
- data/duty_calculator.gemspec +28 -0
- data/lib/config/defaults.yml +4 -0
- data/lib/duty_calculator.rb +27 -0
- data/lib/duty_calculator/calculation.rb +57 -0
- data/lib/duty_calculator/category.rb +10 -0
- data/lib/duty_calculator/client.rb +29 -0
- data/lib/duty_calculator/configuration.rb +24 -0
- data/lib/duty_calculator/currency.rb +10 -0
- data/lib/duty_calculator/error_messages.rb +54 -0
- data/lib/duty_calculator/version.rb +3 -0
- data/spec/duty_calculator/configuration_spec.rb +31 -0
- data/spec/duty_calculator/currency_spec.rb +11 -0
- data/spec/spec_helper.rb +18 -0
- metadata +165 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b3c4b31932cae832814571496bd4b0507a0454ad
|
4
|
+
data.tar.gz: c840f6489f535e44ba51128efffb1160f36c5aee
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6d2d67347a93c14d79f75c271c4339f8ee2140bdc5121b36391a34c7fa2b26415f628336dc23d3b1c2e4884753a5229b36da794bfc8133cfae9508bd1e3e6f72
|
7
|
+
data.tar.gz: 43c34e3cb1bc5ad7d6c3135c7664eb0a87ae534b61baf09048b5c143292604f066dc6b842417ef9b7ab77f52396fc30cb7c89dc63cdfb59bdc00d0be11a9357a
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Thomas Hanley
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+

|
2
|
+
# DutyCalculator
|
3
|
+
|
4
|
+
TODO: Write a gem description
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'duty_calculator'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install duty_calculator
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
TODO: Write usage instructions here
|
25
|
+
|
26
|
+
## Contributing
|
27
|
+
|
28
|
+
1. Fork it ( https://github.com/[my-github-username]/duty_calculator/fork )
|
29
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
30
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
31
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
32
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'duty_calculator/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "duty_calculator"
|
8
|
+
spec.version = DutyCalculator::VERSION
|
9
|
+
spec.authors = ["Thomas Hanley"]
|
10
|
+
spec.email = ["tom@walkerandcompany.com"]
|
11
|
+
spec.summary = %q{Wrapper for dutycalculator.com}
|
12
|
+
spec.description = %q{API documentation http://www.dutycalculator.com/api-center/dutycalculator-api-2-1-documentation/}
|
13
|
+
spec.homepage = "https://github.com/tjhanley/duty-calculator"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_dependency "faraday", "~> 0.9"
|
24
|
+
spec.add_dependency "faraday_middleware", "~> 0.9"
|
25
|
+
spec.add_runtime_dependency "hashie", "~> 2.1"
|
26
|
+
spec.add_runtime_dependency "multi_xml", "~> 0.5"
|
27
|
+
spec.add_runtime_dependency "addressable", "~> 2.3"
|
28
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require "duty_calculator/version"
|
2
|
+
require "duty_calculator/configuration"
|
3
|
+
require "duty_calculator/currency"
|
4
|
+
require "duty_calculator/category"
|
5
|
+
require "duty_calculator/calculation"
|
6
|
+
require "duty_calculator/error_messages"
|
7
|
+
|
8
|
+
require "faraday"
|
9
|
+
require "faraday_middleware"
|
10
|
+
|
11
|
+
module DutyCalculator
|
12
|
+
class << self
|
13
|
+
attr_writer :configuration
|
14
|
+
|
15
|
+
def configure
|
16
|
+
yield(configuration)
|
17
|
+
end
|
18
|
+
|
19
|
+
def configuration
|
20
|
+
@configuration ||= Configuration.new
|
21
|
+
end
|
22
|
+
|
23
|
+
def reset
|
24
|
+
@configuration = Configuration.new
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require "duty_calculator/client"
|
2
|
+
require "addressable/uri"
|
3
|
+
module DutyCalculator
|
4
|
+
class Calculation
|
5
|
+
class << self
|
6
|
+
def validate_params(params)
|
7
|
+
required = %w{from to province shipping_mode commercial_importer imported_wt imported_value classify_by shipping
|
8
|
+
insurance currency preferential_rates detailed_result incl_hs_codes cat hs country_of_hs_code desc
|
9
|
+
sku value weight qty origin reference}
|
10
|
+
msg = []
|
11
|
+
required.each do |r|
|
12
|
+
msg << r unless params.has_key?(r)
|
13
|
+
end
|
14
|
+
raise ArgumentError, "Missing arguments from hash #{msg.to_s}" if msg.size
|
15
|
+
return params
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
=begin
|
20
|
+
# https://docs.google.com/a/walkerandcobrands.com/document/d/16e_lh7MIjLGYvS_qZL7pUzOvTVte-cqTnr4jGo_VtIM/pub
|
21
|
+
# from={ISO alpha-3 country code or alpha-2 country code} \
|
22
|
+
# &to={ISO alpha-3 country code or alpha-2 country code} \
|
23
|
+
# &province={ISO alpha-2 province code of ‘importing to’ country (only required for Canada and Brazil)} \
|
24
|
+
# &shipping_mode={shipping mode} \
|
25
|
+
# &commercial_importer={importer status (only required for Russia)} \
|
26
|
+
# &imported_wt={total weight of products imported during the month (only required for Russia)} \
|
27
|
+
# &imported_value={total value of products imported during the month (only required for Russia)} \
|
28
|
+
# &classify_by={items classification identifier} \
|
29
|
+
# &cat[0]={item ID or category ID} \
|
30
|
+
# &hs[0]={item HS code} \
|
31
|
+
# &country_of_hs_code[0]={ISO alpha-3 country code or alpha-2 country code} \
|
32
|
+
# &desc[0]={product description} \
|
33
|
+
# &sku[0]={item sku } \
|
34
|
+
# &value[0]={value per one item} \
|
35
|
+
# &weight[0]={weight of one item} \
|
36
|
+
# &qty[0]={item quantity} \
|
37
|
+
# &origin[0]={ISO alpha-3 country code or alpha-2 country code} \
|
38
|
+
# &reference[0]={product reference} \
|
39
|
+
# &shipping={shipping cost} \
|
40
|
+
# &insurance={cost of insurance} \
|
41
|
+
# ¤cy={ISO currency code} \preferential&output_currency={ISO currency code} \
|
42
|
+
# &preferential_rates={1 to apply FTA and preferential rates, 0 to ignore FTA and preferential rates} \
|
43
|
+
# &detailed_result={1 for detailed result, 0 for short result} \
|
44
|
+
# &incl_hs_codes={include HS code for each item in response}
|
45
|
+
#
|
46
|
+
=end
|
47
|
+
def self.get(params={})
|
48
|
+
|
49
|
+
uri = Addressable::URI.new
|
50
|
+
uri.query_values = validate_params(params)
|
51
|
+
|
52
|
+
conn = DutyCalculator::Client.new
|
53
|
+
conn.get "#{DutyCalculator::Client.api_base}/calculation"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'duty_calculator'
|
2
|
+
module DutyCalculator
|
3
|
+
class Client
|
4
|
+
def self.new
|
5
|
+
::Faraday.new(url: DutyCalculator.configuration.api_root) do |faraday|
|
6
|
+
# middleware
|
7
|
+
faraday.use FaradayMiddleware::FollowRedirects
|
8
|
+
faraday.use FaradayMiddleware::EncodeJson
|
9
|
+
# request defs
|
10
|
+
faraday.use Faraday::Request::UrlEncoded
|
11
|
+
# response defs
|
12
|
+
faraday.use Faraday::Response::ParseXml
|
13
|
+
faraday.use Faraday::Response::Mashify
|
14
|
+
faraday.use Faraday::Response::RaiseError unless DutyCalculator.configuration.debug
|
15
|
+
faraday.response :logger if DutyCalculator.configuration.debug
|
16
|
+
|
17
|
+
faraday.adapter ::Faraday.default_adapter
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.api_base
|
22
|
+
if DutyCalculator.configuration.sandbox
|
23
|
+
return "#{DutyCalculator.configuration.api_version}/sandbox/#{DutyCalculator.configuration.api_key}"
|
24
|
+
else
|
25
|
+
return "#{DutyCalculator.configuration.api_version}/#{DutyCalculator.configuration.api_key}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require "yaml"
|
2
|
+
|
3
|
+
require "duty_calculator"
|
4
|
+
|
5
|
+
module DutyCalculator
|
6
|
+
class Configuration
|
7
|
+
attr_accessor :api_root, :api_version, :api_key, :api_base, :sandbox, :debug
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
defaults = load_defaults
|
11
|
+
@api_root = defaults[:api_root]
|
12
|
+
@api_version = defaults[:api_version]
|
13
|
+
|
14
|
+
@sandbox = defaults[:sandbox]
|
15
|
+
|
16
|
+
@debug = defaults[:debug]
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
def load_defaults
|
21
|
+
YAML.load_file(File.join(File.dirname(__FILE__),'..','config','defaults.yml'))
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require "duty_calculator/client"
|
2
|
+
|
3
|
+
module DutyCalculator
|
4
|
+
class ErrorMessages
|
5
|
+
ERRORS = {"4042" => "Specified API key could not be used with API 2.1",
|
6
|
+
"4043" => "This API key is for sandbox access only",
|
7
|
+
"4044" => "Request URI is invalid",
|
8
|
+
"4045" => "Access denied to the specified calculation. It belongs to a different user.",
|
9
|
+
"4046" => "Client id is invalid or missing",
|
10
|
+
"4061" => "Account does not support called service: Classification service - get HS codes, duty & tax rates and import restrictions",
|
11
|
+
"4062" => "Account does not support called service: Documents service",
|
12
|
+
"4063" => "Account does not support called operation: Classification service - get DutyCalculator item ID",
|
13
|
+
"4064" => "Account does not support called operation: Reporting service","4401" => "Parameter is missing",
|
14
|
+
"4421" => "Bad parameter: shipping cost can't be empty",
|
15
|
+
"4422" => "Bad parameter: shipment weight can't be empty",
|
16
|
+
"4423" => "Bad parameter: imported weight can't be empty",
|
17
|
+
"4424" => "Bad parameter: imported value can't be empty",
|
18
|
+
"4425" => "Bad parameter: insurance value can't be empty",
|
19
|
+
"4426" => "Bad parameter: both category and description for reference <product reference> can't be empty",
|
20
|
+
"4427" => "Bad parameter: SKU for reference <product reference> can't be empty",
|
21
|
+
"4428" => "Bad parameter: HS code for reference <product reference> can't be empty",
|
22
|
+
"4429" => "Bad parameter: description for reference <product reference> can't be empty","4701" => "Bad parameter: <parameter name> is invalid",
|
23
|
+
"4721" => "Classification for the selected import to country is not possible",
|
24
|
+
"4722" => "Bad parameter: country from code",
|
25
|
+
"4723" => "Bad parameter: country to code",
|
26
|
+
"4724" => "Bad parameter: country province to code",
|
27
|
+
"4725" => "Bad parameter: currency code",
|
28
|
+
"4726" => "Bad parameter: output currency code",
|
29
|
+
"4727" => "Bad parameter: importer status",
|
30
|
+
"4728" => "Bad parameter: products count is zero",
|
31
|
+
"4729" => "Bad parameter: values count is not equal with products count",
|
32
|
+
"4730" => "Bad parameter: DutyCalculator Item ID for reference <product reference> is invalid",
|
33
|
+
"4731" => "Bad parameter: quantity for reference <product reference> is invalid",
|
34
|
+
"4732" => "Bad parameter: weight for reference <product reference> is invalid",
|
35
|
+
"4733" => "Bad parameter: amount for reference <product reference> is invalid",
|
36
|
+
"4734" => "Bad parameter: amount unit for reference <product reference> should be one of the following: pcs, doz, gr",
|
37
|
+
"4735" => "Bad parameter: country of origin",
|
38
|
+
"4736" => "Bad parameter: classify_by",
|
39
|
+
"4737" => "Bad parameter: not all SKU stock keeping units have been classified",
|
40
|
+
"4738" => "Bad parameter: HS code for reference <product reference> could not be matched. Please file classification request",
|
41
|
+
"4739" => "Bad parameter: duty calculation id",
|
42
|
+
"4740" => "Bad parameter: internal order id",
|
43
|
+
"4741" => "Bad parameter: internal shipment id",
|
44
|
+
"4742" => "Bad parameter: internal credit note id",
|
45
|
+
"4743" => "Bad parameter: order type",
|
46
|
+
"4745" => "Bad parameter: product reference <product reference> not found",
|
47
|
+
"4746" => "Bad parameter: HS codes count is not equal with descriptions count",
|
48
|
+
"4747" => "Reference <product reference> could not be autoclassified",
|
49
|
+
"4755" => "Bad parameter: shipping mode is invalid"}
|
50
|
+
def self.for_code(code)
|
51
|
+
ERRORS[code]
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module DutyCalculator
|
4
|
+
describe Configuration do
|
5
|
+
let(:api_root) {'http://www.dutycalculator.com/'}
|
6
|
+
let(:api_version) {'api2.1'}
|
7
|
+
let(:sandbox) {'true'}
|
8
|
+
let(:debug) {'true'}
|
9
|
+
|
10
|
+
describe 'has defaults' do
|
11
|
+
it 'should default value' do
|
12
|
+
expect(Configuration.new.api_root).to eq(api_root)
|
13
|
+
expect(Configuration.new.api_version).to eq(api_version)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
describe 'can override defaults' do
|
17
|
+
it 'can set value' do
|
18
|
+
config = Configuration.new
|
19
|
+
config.api_root = api_root
|
20
|
+
config.api_version = api_version
|
21
|
+
config.sandbox = sandbox
|
22
|
+
config.debug = debug
|
23
|
+
|
24
|
+
expect(config.api_root).to eq(api_root)
|
25
|
+
expect(config.api_version).to eq(api_version)
|
26
|
+
expect(config.sandbox).to eq(sandbox)
|
27
|
+
expect(config.debug).to eq(debug)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "duty_calculator"
|
2
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
3
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
4
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
5
|
+
# loaded once.
|
6
|
+
#
|
7
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
8
|
+
RSpec.configure do |config|
|
9
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
10
|
+
config.run_all_when_everything_filtered = true
|
11
|
+
config.filter_run :focus
|
12
|
+
|
13
|
+
# Run specs in random order to surface order dependencies. If you find an
|
14
|
+
# order dependency and want to debug it, you can fix the order by providing
|
15
|
+
# the seed, which is printed after each run.
|
16
|
+
# --seed 1234
|
17
|
+
config.order = 'random'
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: duty_calculator
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Thomas Hanley
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-12-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faraday
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.9'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.9'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: faraday_middleware
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.9'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.9'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: hashie
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.1'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: multi_xml
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.5'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.5'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: addressable
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.3'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.3'
|
111
|
+
description: API documentation http://www.dutycalculator.com/api-center/dutycalculator-api-2-1-documentation/
|
112
|
+
email:
|
113
|
+
- tom@walkerandcompany.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
120
|
+
- ".travis.yml"
|
121
|
+
- Gemfile
|
122
|
+
- LICENSE.txt
|
123
|
+
- README.md
|
124
|
+
- Rakefile
|
125
|
+
- duty_calculator.gemspec
|
126
|
+
- lib/config/defaults.yml
|
127
|
+
- lib/duty_calculator.rb
|
128
|
+
- lib/duty_calculator/calculation.rb
|
129
|
+
- lib/duty_calculator/category.rb
|
130
|
+
- lib/duty_calculator/client.rb
|
131
|
+
- lib/duty_calculator/configuration.rb
|
132
|
+
- lib/duty_calculator/currency.rb
|
133
|
+
- lib/duty_calculator/error_messages.rb
|
134
|
+
- lib/duty_calculator/version.rb
|
135
|
+
- spec/duty_calculator/configuration_spec.rb
|
136
|
+
- spec/duty_calculator/currency_spec.rb
|
137
|
+
- spec/spec_helper.rb
|
138
|
+
homepage: https://github.com/tjhanley/duty-calculator
|
139
|
+
licenses:
|
140
|
+
- MIT
|
141
|
+
metadata: {}
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 2.2.2
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: Wrapper for dutycalculator.com
|
162
|
+
test_files:
|
163
|
+
- spec/duty_calculator/configuration_spec.rb
|
164
|
+
- spec/duty_calculator/currency_spec.rb
|
165
|
+
- spec/spec_helper.rb
|