Class: FriendlyShipping::Services::RL::SerializeTransitTimesRequest
- Inherits:
-
Object
- Object
- FriendlyShipping::Services::RL::SerializeTransitTimesRequest
- Defined in:
- lib/friendly_shipping/services/rl/serialize_transit_times_request.rb
Overview
Serializes an R+L API request to get a shipment transit timing estimate.
Class Method Summary collapse
-
.call(shipment:, options:) ⇒ Hash
The serialized request.
Class Method Details
.call(shipment:, options:) ⇒ Hash
Returns the serialized request.
12 13 14 15 16 17 18 19 20 |
# File 'lib/friendly_shipping/services/rl/serialize_transit_times_request.rb', line 12 def call(shipment:, options:) { PickupDate: .pickup_date.strftime('%m/%d/%Y'), Origin: serialize_location(shipment.origin), Destinations: [ serialize_location(shipment.destination) ] }.compact end |