I'm hoping someone can help with this one! When using .first with the below shipping script to attempt to isolate the cheapest expedited rate, the shipping rate name is not returned, but rather "#<ShippingRate:0x7XXXXXXXXX0>" so I cannot isolate which expedited rate is the cheapest (or at least not to my knowledge).
Input.shipping_rates.each do |shipping_rate|
ELIGIBLE_RATE = ELIGIBLE_RATE.sort_by!(&:price)
LOWESTRATE = ELIGIBLE_RATE.first
Does anyone have any tips or examples for this or maybe has a better suggestion on isolating the cheapest expedited rate? The rates are live carrier rates so they change each time. Using something fixed is unfortunately not an option.