active_shipping 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_shipping/carriers/fedex.rb +2 -2
- data/lib/active_shipping/version.rb +1 -1
- data/test/unit/carriers/fedex_test.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c27b2374a64a55c68a9b78eac1d7feb97550a41
|
4
|
+
data.tar.gz: 49e411902c19f7db17242a8ee2cd4d8e00a3be2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9ed243e3a7234568d0c67eb8c2d8c35f887222b69a422b9b4a77a2dc666182540f0d8949e43e9db9282772e0718d0555df33c9dcc50fc3023ad2236abfe2a66
|
7
|
+
data.tar.gz: ce6824f5dd320b1b94493d660bd0c970e02a1c5fc453fff0f584f4b713b034e78b1cb790715c24ad16facc59f4f7aea2ef4c504f11a654405cd6d7a74098d36e
|
@@ -242,8 +242,8 @@ module ActiveShipping
|
|
242
242
|
# Reference Numbers
|
243
243
|
reference_numbers = Array(package.options[:reference_numbers])
|
244
244
|
if reference_numbers.size > 0
|
245
|
-
|
246
|
-
|
245
|
+
reference_numbers.each do |reference_number_info|
|
246
|
+
xml.CustomerReferences do
|
247
247
|
xml.CustomerReferenceType(reference_number_info[:type] || "CUSTOMER_REFERENCE")
|
248
248
|
xml.Value(reference_number_info[:value])
|
249
249
|
end
|
@@ -605,14 +605,23 @@ class FedExTest < Minitest::Test
|
|
605
605
|
|
606
606
|
def test_create_shipment_reference
|
607
607
|
packages = package_fixtures.values_at(:wii)
|
608
|
-
packages.each
|
608
|
+
packages.each do |p|
|
609
|
+
p.options[:reference_numbers] = [
|
610
|
+
{ :value => "FOO-123"},
|
611
|
+
{ :type => "INVOICE_NUMBER", :value => "BAR-456" }
|
612
|
+
]
|
613
|
+
end
|
609
614
|
|
610
615
|
result = Nokogiri::XML(@carrier.send(:build_shipment_request,
|
611
616
|
location_fixtures[:beverly_hills],
|
612
617
|
location_fixtures[:annapolis],
|
613
618
|
packages,
|
614
619
|
:test => true))
|
615
|
-
|
620
|
+
|
621
|
+
assert_equal result.search('RequestedPackageLineItems/CustomerReferences[first()]/Value').text, "FOO-123"
|
622
|
+
assert_equal result.search('RequestedPackageLineItems/CustomerReferences[first()]/CustomerReferenceType').text, "CUSTOMER_REFERENCE"
|
623
|
+
assert_equal result.search('RequestedPackageLineItems/CustomerReferences[last()]/Value').text, "BAR-456"
|
624
|
+
assert_equal result.search('RequestedPackageLineItems/CustomerReferences[last()]/CustomerReferenceType').text, "INVOICE_NUMBER"
|
616
625
|
end
|
617
626
|
|
618
627
|
def test_create_shipment_label_format_option
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_shipping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: quantified
|