duty_calculator 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9a22c51c44f8c687b5a3602941b120fcd4212fc
4
- data.tar.gz: 4d80165200d37694f00b2eb78d416d08c9cfd1f3
3
+ metadata.gz: 4e17b38949cd151f57b962118f76e516b0caaa5b
4
+ data.tar.gz: 0b6202df8eebd58bccf47481085e7d280f7b56c2
5
5
  SHA512:
6
- metadata.gz: 9cd7c8c5f67dc351de335a0f94e4e6eedf96be835c6eac740efaa9e02633a96045ea3fe78ef2c41937e5c8e0143a71a4271787823ca9258813a3ac959cde686a
7
- data.tar.gz: f05624803174c7ad03b25c41af4b1feda73eec76fabedda4ecb4214e8df2f521de115877843def49f6fb5d3f117310957e77e54834ede982f31862e18c5be521
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 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
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
- # &currency={ISO currency code} \preferential&output_currency={ISO currency code} \
42
+ # &currency={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
@@ -1,3 +1,3 @@
1
1
  module DutyCalculator
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  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.2
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: 2014-12-12 00:00:00.000000000 Z
11
+ date: 2015-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler