active_shipping 0.9.9 → 0.9.10
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.
|
@@ -79,6 +79,11 @@ module ActiveMerchant
|
|
|
79
79
|
'-50000' => "Internal problem - Please contact Sell Online Help Desk"
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
NON_ISO_COUNTRY_NAMES = {
|
|
83
|
+
'Russian Federation' => 'Russia'
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
82
87
|
def requirements
|
|
83
88
|
[:login]
|
|
84
89
|
end
|
|
@@ -131,7 +136,7 @@ module ActiveMerchant
|
|
|
131
136
|
#NOTE: These tags MUST be after line items
|
|
132
137
|
request << XmlNode.new('city', destination.city)
|
|
133
138
|
request << XmlNode.new('provOrState', destination.province)
|
|
134
|
-
request << XmlNode.new('country', destination.country)
|
|
139
|
+
request << XmlNode.new('country', handle_non_iso_country_names(destination.country))
|
|
135
140
|
request << XmlNode.new('postalCode', destination.postal_code)
|
|
136
141
|
end
|
|
137
142
|
end
|
|
@@ -254,6 +259,10 @@ module ActiveMerchant
|
|
|
254
259
|
def dollar_amount(cents)
|
|
255
260
|
"%0.2f" % (cents / 100.0)
|
|
256
261
|
end
|
|
262
|
+
|
|
263
|
+
def handle_non_iso_country_names(country)
|
|
264
|
+
NON_ISO_COUNTRY_NAMES[country.to_s] || country
|
|
265
|
+
end
|
|
257
266
|
end
|
|
258
267
|
end
|
|
259
268
|
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_shipping
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 47
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 9
|
|
9
|
-
-
|
|
10
|
-
version: 0.9.
|
|
9
|
+
- 10
|
|
10
|
+
version: 0.9.10
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- James MacAulay
|
|
@@ -18,7 +18,7 @@ autorequire:
|
|
|
18
18
|
bindir: bin
|
|
19
19
|
cert_chain: []
|
|
20
20
|
|
|
21
|
-
date: 2011-
|
|
21
|
+
date: 2011-03-09 00:00:00 +01:00
|
|
22
22
|
default_executable:
|
|
23
23
|
dependencies:
|
|
24
24
|
- !ruby/object:Gem::Dependency
|