Sha256: 36f1f901f7cd3d7180b6192698d3a0b4dc2234fcc1817563849bde8880e7a074

Contents?: true

Size: 652 Bytes

Versions: 25

Compression:

Stored size: 652 Bytes

Contents

# frozen_string_literal: true

module FriendlyShipping
  module Services
    class Usps
      class SerializeTimeInTransitRequest
        def self.call(shipment:, options:, login:)
          xml_builder = Nokogiri::XML::Builder.new do |xml|
            xml.SDCGetLocationsRequest(USERID: login) do
              xml.MailClass 0 # all mail classes
              xml.OriginZIP shipment.origin.zip
              xml.DestinationZIP shipment.destination.zip
              xml.AcceptDate options.pickup.strftime('%d-%b-%Y')
              xml.NonEMDetail true
            end
          end
          xml_builder.to_xml
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
friendly_shipping-0.9.0 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.8.1 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.8.0 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.7.3 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.7.2 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.7.1 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.7.0 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.6.5 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.6.4 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.6.3 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.6.2 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.6.1 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.6.0 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.5.3 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.5.2 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.5.1 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.5 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.4.14 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.4.13 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
friendly_shipping-0.4.12 lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb