_isSuccess; } public function setServiceDetails($serviceDetails) { $this->_serviceDetails = $serviceDetails; return $this; } public function getServiceDetails() { return array_filter($this->_serviceDetails); } public function setIsSuccess($isSuccess = true) { $this->_isSuccess = $isSuccess; return $this; } public function setData($data) { $this->_data = $data; return $this; } public function getData() { return $this->_data; } public function getDataField($field) { if (!empty($field) && array_key_exists($field, $this->_data)) { return $this->_data[$field]; } return false; } /** * Method prepares service response * * @abstract * @param $response * @return App_Service_Shipping_ResponseAbstract */ abstract public function prepareServiceResponse($response); public function prepareFreeShippingResponse() { $this->setIsSuccess()->setData(array( 'serviceDetails' => $this->getServiceDetails(), 'rate' => array( 'total' => 0 ) )); return $this; } }