Sha256: fd61a13be62ae65a429205f540824ac2ef12285eef11c96cffd0d08174da4c53

Contents?: true

Size: 675 Bytes

Versions: 5

Compression:

Stored size: 675 Bytes

Contents

# frozen_string_literal: true

module FriendlyShipping
  module Services
    class Ups
      class SerializeShipmentAddressSnippet < SerializeAddressSnippet
        class << self
          private

          def residential_address_indicator(xml, location)
            # Shipment creation uses a different element to indicate residential addresses.
            # Rates use ResidentialAddressIndicator whereas shipments use ResidentialAddress.
            # Presence indicates residential address. Absence indicates commercial address.
            #
            xml.ResidentialAddressIndicator unless location.commercial?
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
friendly_shipping-0.4.4 lib/friendly_shipping/services/ups/serialize_shipment_address_snippet.rb
friendly_shipping-0.4.3 lib/friendly_shipping/services/ups/serialize_shipment_address_snippet.rb
friendly_shipping-0.4.2 lib/friendly_shipping/services/ups/serialize_shipment_address_snippet.rb
friendly_shipping-0.4.1 lib/friendly_shipping/services/ups/serialize_shipment_address_snippet.rb
friendly_shipping-0.4.0 lib/friendly_shipping/services/ups/serialize_shipment_address_snippet.rb