Method: ActiveShipping::FedEx#build_freight_shipment_detail_node

Defined in:
lib/active_shipping/carriers/fedex.rb

#build_freight_shipment_detail_node(xml, freight_options, packages, imperial) ⇒ Object (protected)



364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/active_shipping/carriers/fedex.rb', line 364

def build_freight_shipment_detail_node(xml, freight_options, packages, imperial)
  xml.FreightShipmentDetail do
    # TODO: case of different freight account numbers?
    xml.FedExFreightAccountNumber(freight_options[:account])
    build_location_node(xml, 'FedExFreightBillingContactAndAddress', freight_options[:billing_location])
    xml.Role(freight_options[:role])

    packages.each do |pkg|
      xml.LineItems do
        xml.FreightClass(freight_options[:freight_class])
        xml.Packaging(freight_options[:packaging])
        build_package_weight_node(xml, pkg, imperial)
        build_package_dimensions_node(xml, pkg, imperial)
      end
    end
  end
end