/** * From the passed in IOrderSummaryIterable object build * the passed in Varien_Data_Collection object. * * @param IOrderSummaryIterable * @param EbayEnterprise_Order_Model_Search_Process_Response_ICollection * @return EbayEnterprise_Order_Model_Search_Process_Response_ICollection */ protected function _buildResponseCollection(IOrderSummaryIterable $summaries, EbayEnterprise_Order_Model_Search_Process_Response_ICollection $collection) { /** @var IOrderSummary $summary */ foreach ($summaries as $summary) { $collection->addItem($this->_factory->getNewVarienObject($this->_map->extract($summary))); } return $collection->sort(); }
public function addLink($name, $path, $label) { $this->_links[$name] = $this->_factory->getNewVarienObject(['name' => $name, 'label' => $label, 'url' => empty($path) ? '' : $this->getUrl($path, ['order_id' => $this->getOrder()->getRealOrderId()])]); return $this; }
/** * Get the tracking data. * * @param EbayEnterprise_Order_Model_Detail_Process_Response_Shipment * @param string * @return Varien_Object */ protected function getTrack(EbayEnterprise_Order_Model_Detail_Process_Response_Shipment $shipment, $track) { /** @var Mage_Shipping_Model_Tracking_Result_Status | null */ $trackingInfo = $this->getTrackingInfo($shipment, $track); return $this->factory->getNewVarienObject(['carrier' => $trackingInfo ? $trackingInfo->getCarrier() : $shipment->getCarrier(), 'carrier_title' => $trackingInfo ? $trackingInfo->getCarrierTitle() : $shipment->getShippingCarrierTitle(), 'tracking' => $track, 'popup' => true, 'url' => $trackingInfo ? $trackingInfo->getUrl() : null]); }