dhl-get_quote 0.4.25 → 0.4.26

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -338,9 +338,9 @@ To do this, call Dhl::GetQuote::configure and pass a block:
338
338
  The above block sets defaults for use thereafter. You would then not have to pass site\_id or password in to Dhl::GetQuote::new():
339
339
 
340
340
  ```ruby
341
- Dhl::GetQuote::configure do
342
- side_id "SomeSiteId"
343
- password "p4ssw0rd"
341
+ Dhl::GetQuote::configure do |c|
342
+ c.side_id "SomeSiteId"
343
+ c.password "p4ssw0rd"
344
344
  end
345
345
 
346
346
  request = Dhl::GetQuote::new()
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.email = ["mnielsen@deseretbook.com"]
11
11
  gem.description = %q{Get shipping quotes from DHL}
12
12
  gem.summary = %q{Gem to interface with DHL's XML-PI shipping quote service.}
13
- gem.homepage = ""
13
+ gem.homepage = "https://github.com/deseretbook/dhl-get_quote"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -36,7 +36,10 @@ class Dhl::GetQuote::Response
36
36
  validate_currency_role_type_code!(currency_role_type_code)
37
37
 
38
38
  return if error?
39
- qtd_s_in_ad_cur = @parsed_xml["DCTResponse"]["GetQuoteResponse"]["BkgDetails"]["QtdShp"]["QtdSInAdCur"]
39
+
40
+ qtd_shp = [ @parsed_xml["DCTResponse"]["GetQuoteResponse"]["BkgDetails"]["QtdShp"] ].flatten
41
+ qtd_s_in_ad_cur = qtd_shp.detect{|q|q["TransInd"] == "Y"}["QtdSInAdCur"]
42
+
40
43
  pricing = if x = qtd_s_in_ad_cur.detect{|q|q["CurrencyRoleTypeCode"]==currency_role_type_code}
41
44
  x
42
45
  else
@@ -1,5 +1,5 @@
1
1
  class Dhl
2
2
  class GetQuote
3
- VERSION = "0.4.25"
3
+ VERSION = "0.4.26"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhl-get_quote
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.25
4
+ version: 0.4.26
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-25 00:00:00.000000000 Z
13
+ date: 2013-05-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -139,7 +139,7 @@ files:
139
139
  - spec/lib/dhl/get_quote/response_spec.rb
140
140
  - spec/spec_helper.rb
141
141
  - tpl/request.xml.erb
142
- homepage: ''
142
+ homepage: https://github.com/deseretbook/dhl-get_quote
143
143
  licenses: []
144
144
  post_install_message:
145
145
  rdoc_options: []