Class: FriendlyShipping::Services::Usps::SerializeTimeInTransitRequest
- Inherits:
-
Object
- Object
- FriendlyShipping::Services::Usps::SerializeTimeInTransitRequest
- Defined in:
- lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb
Class Method Summary collapse
Class Method Details
.call(shipment:, options:, login:) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/friendly_shipping/services/usps/serialize_time_in_transit_request.rb', line 7 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 .pickup.strftime('%d-%b-%Y') xml.NonEMDetail true end end xml_builder.to_xml end |