dhl-get_quote 0.4.26 → 0.4.27

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -46,7 +46,7 @@ Or install it yourself as:
46
46
  :depth => 19
47
47
  )
48
48
 
49
- resp = r.post
49
+ response = r.post
50
50
  if response.error?
51
51
  raise "There was an error: #{resp.raw_xml}"
52
52
  else
@@ -261,7 +261,7 @@ If you need data from the response that is not exposed by this gem, you can acce
261
261
 
262
262
  #### Accessing offered services
263
263
 
264
- In cases where you have either sent many special service code, or you are evaluating all available services (via the 'OSINFO' special service code), you can obtain a list of all the services with the #offred_services() and #all_services() methods. Both methods return an array of Dhl::GetQuote::MarketService objects.
264
+ In cases where you have either sent many special service code, or you are evaluating all available services (via the 'OSINFO' special service code), you can obtain a list of all the services with the #offered_services() and #all_services() methods. Both methods return an array of Dhl::GetQuote::MarketService objects.
265
265
 
266
266
  The #offered_services() method returns only those services intended to be shown to the end user an optional services (XCH) they can apply. These would be services with either 'TransInd' or 'MrkSrvInd' set to 'Y'.
267
267
 
@@ -24,7 +24,6 @@ Gem::Specification.new do |gem|
24
24
  gem.add_development_dependency 'rake', '10.0.4'
25
25
  gem.add_development_dependency 'rspec', '2.13.0'
26
26
  gem.add_development_dependency 'rspec-must', '0.0.1'
27
- # gem.add_development_dependency 'autotest'
28
- # gem.add_development_dependency 'debugger'
27
+ gem.add_development_dependency 'debugger'
29
28
 
30
29
  end
@@ -91,7 +91,17 @@ protected
91
91
  end
92
92
 
93
93
  def market_services
94
- @market_services ||= @parsed_xml["DCTResponse"]["GetQuoteResponse"]["Srvs"]["Srv"]["MrkSrv"]
94
+ @market_services ||= begin
95
+ srv = @parsed_xml["DCTResponse"]["GetQuoteResponse"]["Srvs"]["Srv"]
96
+ a = []
97
+ if srv.is_a? Array
98
+ srv.each{|aa| a << aa["MrkSrv"]}
99
+ else
100
+ a << srv["MrkSrv"]
101
+ end
102
+ a.flatten
103
+ end
104
+ # @parsed_xml["DCTResponse"]["GetQuoteResponse"]["Srvs"]["Srv"]["MrkSrv"]
95
105
  end
96
106
 
97
107
  end
@@ -1,5 +1,5 @@
1
1
  class Dhl
2
2
  class GetQuote
3
- VERSION = "0.4.26"
3
+ VERSION = "0.4.27"
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.26
4
+ version: 0.4.27
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-05-29 00:00:00.000000000 Z
13
+ date: 2013-05-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -108,6 +108,22 @@ dependencies:
108
108
  - - '='
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.0.1
111
+ - !ruby/object:Gem::Dependency
112
+ name: debugger
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
111
127
  description: Get shipping quotes from DHL
112
128
  email:
113
129
  - mnielsen@deseretbook.com