Class: FriendlyShipping::Services::RL::SerializeRateQuoteRequest
- Inherits:
-
Object
- Object
- FriendlyShipping::Services::RL::SerializeRateQuoteRequest
- Defined in:
- lib/friendly_shipping/services/rl/serialize_rate_quote_request.rb
Overview
Serializes an R+L API request to get a shipping rate quote.
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 21 22 23 24 |
# File 'lib/friendly_shipping/services/rl/serialize_rate_quote_request.rb', line 12 def call(shipment:, options:) { RateQuote: { PickupDate: .pickup_date.strftime('%m/%d/%Y'), Origin: serialize_location(shipment.origin), Destination: serialize_location(shipment.destination), Items: serialize_items(shipment, ), DeclaredValue: .declared_value, AdditionalServices: .additional_service_codes, Pallets: serialize_pallets(shipment) }.compact }.compact end |