active_shipping 0.9.5 → 0.9.6
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.
data/CHANGELOG
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
* Include address name for rate requests to Shipwire if provided [dennis]
|
2
|
+
* Add support for address name to Location [dennis]
|
1
3
|
* Add fix for updated USPS API to strip any encoded html and trailing asterisks from rate names [dennis]
|
2
4
|
* Add carrier CanadaPost [william]
|
3
5
|
* Update FedEx rates and added ability to auto-generate rate name from code that gets returned by FedEx [dennis]
|
@@ -74,6 +74,7 @@ module ActiveMerchant
|
|
74
74
|
|
75
75
|
def add_address(xml, destination)
|
76
76
|
xml.tag! 'AddressInfo', :type => 'Ship' do
|
77
|
+
xml.tag! 'Name', destination.name unless destination.name.blank?
|
77
78
|
xml.tag! 'Address1', destination.address1
|
78
79
|
xml.tag! 'Address2', destination.address2 unless destination.address2.blank?
|
79
80
|
xml.tag! 'Address3', destination.address3 unless destination.address3.blank?
|
@@ -7,6 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
:postal_code,
|
8
8
|
:province,
|
9
9
|
:city,
|
10
|
+
:name,
|
10
11
|
:address1,
|
11
12
|
:address2,
|
12
13
|
:address3,
|
@@ -27,6 +28,7 @@ module ActiveMerchant #:nodoc:
|
|
27
28
|
@postal_code = options[:postal_code] || options[:postal] || options[:zip]
|
28
29
|
@province = options[:province] || options[:state] || options[:territory] || options[:region]
|
29
30
|
@city = options[:city]
|
31
|
+
@name = options[:name]
|
30
32
|
@address1 = options[:address1]
|
31
33
|
@address2 = options[:address2]
|
32
34
|
@address3 = options[:address3]
|
@@ -39,6 +41,7 @@ module ActiveMerchant #:nodoc:
|
|
39
41
|
def self.from(object, options={})
|
40
42
|
return object if object.is_a? ActiveMerchant::Shipping::Location
|
41
43
|
attr_mappings = {
|
44
|
+
:name => [:name],
|
42
45
|
:country => [:country_code, :country],
|
43
46
|
:postal_code => [:postal_code, :zip, :postal],
|
44
47
|
:province => [:province_code, :state_code, :territory_code, :region_code, :province, :state, :territory, :region],
|
@@ -82,7 +85,7 @@ module ActiveMerchant #:nodoc:
|
|
82
85
|
|
83
86
|
def prettyprint
|
84
87
|
chunks = []
|
85
|
-
chunks << [@address1,@address2,@address3].reject {|e| e.blank?}.join("\n")
|
88
|
+
chunks << [@name, @address1,@address2,@address3].reject {|e| e.blank?}.join("\n")
|
86
89
|
chunks << [@city,@province,@postal_code].reject {|e| e.blank?}.join(', ')
|
87
90
|
chunks << @country
|
88
91
|
chunks.reject {|e| e.blank?}.join("\n")
|
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: 55
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 6
|
10
|
+
version: 0.9.6
|
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-01-
|
21
|
+
date: 2011-01-11 00:00:00 +01:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|