/** * Identify if method expects Parent resource ID to be present in the request. * * @param Zend\Server\Reflection\ReflectionMethod $methodReflection * @return bool */ protected function _isParentResourceIdExpected(ReflectionMethod $methodReflection) { $isIdFieldExpected = false; if ($this->_helper->isSubresource($methodReflection)) { $methodsWithParentId = array(Mage_Webapi_Controller_ActionAbstract::METHOD_CREATE, Mage_Webapi_Controller_ActionAbstract::METHOD_LIST, Mage_Webapi_Controller_ActionAbstract::METHOD_MULTI_UPDATE, Mage_Webapi_Controller_ActionAbstract::METHOD_MULTI_DELETE, Mage_Webapi_Controller_ActionAbstract::METHOD_MULTI_CREATE); $methodName = $this->_helper->getMethodNameWithoutVersionSuffix($methodReflection); if (in_array($methodName, $methodsWithParentId)) { $isIdFieldExpected = true; } } return $isIdFieldExpected; }