/** * Returns real time shipping rates for the particular shipment * * @return ShippingRateSet */ public function getRealTimeRates(Shipment $shipment) { $rates = new ShippingRateSet(); $app = self::getApplication(); foreach ($app->getEnabledRealTimeShippingServices() as $handler) { $rates->merge(ShipmentDeliveryRate::getRealTimeRates($app->getShippingHandler($handler), $shipment)); } return $rates; }