active_shipping 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -4
- data/VERSION +1 -1
- data/active_shipping.gemspec +4 -2
- data/lib/active_shipping.rb +2 -0
- data/lib/active_shipping/shipping/carriers/fedex.rb +10 -3
- data/lib/active_shipping/shipping/location_response.rb +14 -0
- data/lib/active_shipping/shipping/return_label_response.rb +14 -0
- metadata +5 -3
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/active_shipping.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{active_shipping}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["James MacAulay", "Tobias Luetke", "Cody Fauser", "Jimmy Baker"]
|
12
|
-
s.date = %q{2010-03-
|
12
|
+
s.date = %q{2010-03-30}
|
13
13
|
s.description = %q{Shipping API extension for Active Merchant.}
|
14
14
|
s.email = %q{jmacaulay@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -44,11 +44,13 @@ Gem::Specification.new do |s|
|
|
44
44
|
"lib/active_shipping/shipping/contact.rb",
|
45
45
|
"lib/active_shipping/shipping/label.rb",
|
46
46
|
"lib/active_shipping/shipping/location.rb",
|
47
|
+
"lib/active_shipping/shipping/location_response.rb",
|
47
48
|
"lib/active_shipping/shipping/package.rb",
|
48
49
|
"lib/active_shipping/shipping/party.rb",
|
49
50
|
"lib/active_shipping/shipping/rate_estimate.rb",
|
50
51
|
"lib/active_shipping/shipping/rate_response.rb",
|
51
52
|
"lib/active_shipping/shipping/response.rb",
|
53
|
+
"lib/active_shipping/shipping/return_label_response.rb",
|
52
54
|
"lib/active_shipping/shipping/return_shipment.rb",
|
53
55
|
"lib/active_shipping/shipping/shipment.rb",
|
54
56
|
"lib/active_shipping/shipping/shipment_event.rb",
|
data/lib/active_shipping.rb
CHANGED
@@ -45,6 +45,8 @@ require 'active_shipping/shipping/tracking_response'
|
|
45
45
|
require 'active_shipping/shipping/package'
|
46
46
|
require 'active_shipping/shipping/location'
|
47
47
|
require 'active_shipping/shipping/rate_estimate'
|
48
|
+
require 'active_shipping/shipping/location_response'
|
49
|
+
require 'active_shipping/shipping/return_label_response'
|
48
50
|
|
49
51
|
require 'active_shipping/shipping/contact'
|
50
52
|
require 'active_shipping/shipping/party'
|
@@ -119,7 +119,6 @@ module ActiveMerchant
|
|
119
119
|
response = commit(save_request(req), (options[:test] || false)).gsub(/<(\/)?.*?\:(.*?)>/, '<\1\2>')
|
120
120
|
|
121
121
|
parse_location_validation_request(response, location)
|
122
|
-
response
|
123
122
|
end
|
124
123
|
|
125
124
|
protected
|
@@ -159,6 +158,11 @@ module ActiveMerchant
|
|
159
158
|
location.score = 0
|
160
159
|
message
|
161
160
|
end
|
161
|
+
LocationResponse.new(success, message, Hash.from_xml(response),
|
162
|
+
:xml => response,
|
163
|
+
:request => last_request,
|
164
|
+
:location => location
|
165
|
+
)
|
162
166
|
end
|
163
167
|
|
164
168
|
def parse_return_label_response(response, shipment)
|
@@ -173,9 +177,12 @@ module ActiveMerchant
|
|
173
177
|
shipment.transit_time = parent.elements['//TransitTime'][0].to_s
|
174
178
|
|
175
179
|
shipment
|
176
|
-
else
|
177
|
-
message
|
178
180
|
end
|
181
|
+
ReturnLabelResponse.new(success, message, Hash.from_xml(response),
|
182
|
+
:xml => response,
|
183
|
+
:request => last_request,
|
184
|
+
:shipment => shipment
|
185
|
+
)
|
179
186
|
end
|
180
187
|
|
181
188
|
def build_return_label_request(shipment)
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- James MacAulay
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2010-03-
|
20
|
+
date: 2010-03-30 00:00:00 -04:00
|
21
21
|
default_executable:
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
@@ -69,11 +69,13 @@ files:
|
|
69
69
|
- lib/active_shipping/shipping/contact.rb
|
70
70
|
- lib/active_shipping/shipping/label.rb
|
71
71
|
- lib/active_shipping/shipping/location.rb
|
72
|
+
- lib/active_shipping/shipping/location_response.rb
|
72
73
|
- lib/active_shipping/shipping/package.rb
|
73
74
|
- lib/active_shipping/shipping/party.rb
|
74
75
|
- lib/active_shipping/shipping/rate_estimate.rb
|
75
76
|
- lib/active_shipping/shipping/rate_response.rb
|
76
77
|
- lib/active_shipping/shipping/response.rb
|
78
|
+
- lib/active_shipping/shipping/return_label_response.rb
|
77
79
|
- lib/active_shipping/shipping/return_shipment.rb
|
78
80
|
- lib/active_shipping/shipping/shipment.rb
|
79
81
|
- lib/active_shipping/shipping/shipment_event.rb
|