/** * Fills request object with Dhl config parameters * * @param \Magento\Framework\Object $requestObject * @return \Magento\Framework\Object */ protected function _addParams(\Magento\Framework\Object $requestObject) { foreach ($this->_requestVariables as $code => $objectCode) { if ($this->_request->getDhlId()) { $value = $this->_request->getData($objectCode['code']); } else { $value = $this->getConfigData($code); } $requestObject->setData($objectCode['setCode'], $value); } return $requestObject; }