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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35f8804deab23b0097e6634e38f5362e7405deb1
4
- data.tar.gz: 5d613b26ea25932bb680d0445727af22e491db98
3
+ metadata.gz: 6c27b2374a64a55c68a9b78eac1d7feb97550a41
4
+ data.tar.gz: 49e411902c19f7db17242a8ee2cd4d8e00a3be2c
5
5
  SHA512:
6
- metadata.gz: f47ae3a28f3bbbf2ca8e8ad8f9a661e1b4946f7f2099315e95e3aa0e0e76462f06f3ee567898e4113eef96a9eadd53c5f586a9168efee27a5b1ad2e2dea1ca5f
7
- data.tar.gz: 2aaf97578666abda403a35e48ad38c45111ab6944bf860c7ad29f8cfb9354e85fe03b16e69e89e49898f632cb28a2b18dd36c7d10b5810b265f24e4939d3f34d
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
- xml.CustomerReferences do
246
- reference_numbers.each do |reference_number_info|
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
@@ -1,3 +1,3 @@
1
1
  module ActiveShipping
2
- VERSION = "1.9.1"
2
+ VERSION = "1.9.2"
3
3
  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 {|p| p.options[:reference_numbers] = [{:value => "FOO-123"}] }
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
- assert_equal result.search('RequestedPackageLineItems/CustomerReferences/Value').text, "FOO-123"
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.1
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-07 00:00:00.000000000 Z
11
+ date: 2016-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: quantified