Class: FriendlyShipping::Services::TForceFreight::GenerateRatesRequestHash
- Inherits:
-
Object
- Object
- FriendlyShipping::Services::TForceFreight::GenerateRatesRequestHash
- Defined in:
- lib/friendly_shipping/services/tforce_freight/generate_rates_request_hash.rb
Overview
Generates a rates request hash for JSON serialization.
Class Method Summary collapse
-
.call(shipment:, options:) ⇒ Hash
Rates request hash.
Class Method Details
.call(shipment:, options:) ⇒ Hash
Returns rates request hash.
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/friendly_shipping/services/tforce_freight/generate_rates_request_hash.rb', line 12 def call(shipment:, options:) { requestOptions: (), shipFrom: GenerateLocationHash.call(location: shipment.origin), shipTo: GenerateLocationHash.call(location: shipment.destination), payment: payment(), serviceOptions: (), commodities: .commodity_information_generator.call(shipment: shipment, options: ) } end |