duty_calculator 0.0.2 → 0.0.3
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 +4 -4
- data/lib/duty_calculator/calculation.rb +6 -4
- data/lib/duty_calculator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e17b38949cd151f57b962118f76e516b0caaa5b
|
4
|
+
data.tar.gz: 0b6202df8eebd58bccf47481085e7d280f7b56c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de3cd369e239766070b6063cd4d8c1a449f224ec7d79d973156d1bd9c366e46d2e95648429b6a50c6ebc6ad9a58944d530e95fe1ea4542f339c6b5016790d53c
|
7
|
+
data.tar.gz: d13462fcd66f9895397c1061555768f4921ec940b9430661a9cbf667affc47ea1c1e76d9668b61d1a71259ca01839d204cbde81c0da4bd22830a904f1ef2bd3a
|
@@ -4,8 +4,9 @@ module DutyCalculator
|
|
4
4
|
class Calculation
|
5
5
|
class << self
|
6
6
|
def validate_params(params)
|
7
|
-
required = %w{from to
|
8
|
-
insurance currency preferential_rates detailed_result incl_hs_codes cat
|
7
|
+
required = %w{from to shipping_mode classify_by shipping
|
8
|
+
insurance currency preferential_rates detailed_result incl_hs_codes cat
|
9
|
+
hs country_of_hs_code desc
|
9
10
|
sku value weight qty origin reference}
|
10
11
|
msg = []
|
11
12
|
required.each do |r|
|
@@ -38,7 +39,8 @@ module DutyCalculator
|
|
38
39
|
# &reference[0]={product reference} \
|
39
40
|
# &shipping={shipping cost} \
|
40
41
|
# &insurance={cost of insurance} \
|
41
|
-
# ¤cy={ISO currency code} \preferential
|
42
|
+
# ¤cy={ISO currency code} \preferential
|
43
|
+
# &output_currency={ISO currency code} \
|
42
44
|
# &preferential_rates={1 to apply FTA and preferential rates, 0 to ignore FTA and preferential rates} \
|
43
45
|
# &detailed_result={1 for detailed result, 0 for short result} \
|
44
46
|
# &incl_hs_codes={include HS code for each item in response}
|
@@ -49,7 +51,7 @@ module DutyCalculator
|
|
49
51
|
uri.query_values = validate_params(params)
|
50
52
|
|
51
53
|
conn = DutyCalculator::Client.new
|
52
|
-
resp = conn.get "#{DutyCalculator::Client.api_base}/calculation"
|
54
|
+
resp = conn.get "#{DutyCalculator::Client.api_base}/calculation?#{uri.query}"
|
53
55
|
resp.body
|
54
56
|
end
|
55
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duty_calculator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Hanley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|