/** * The logon method sends the username and password to log on to the service * and returns either a session ID or an error message. * * @access public * * @param XML_RPC_Message &$oParams * * @return generated result (data or error) */ function logon(&$oParams) { $sessionId = null; $oResponseWithError = null; if (!XmlRpcUtils::getScalarValues(array(&$userName, &$password), array(true, true), $oParams, $oResponseWithError)) { return $oResponseWithError; } if ($this->logonServiceImp->logon($userName, $password, $sessionId)) { return XmlRpcUtils::stringTypeResponse($sessionId); } else { return XmlRpcUtils::generateError($this->logonServiceImp->getLastError()); } }
/** * The getCampaignListByAdvertiserIdPagination method returns a list of campaigns * for an advertiser with limit and offset, or returns an error message. * * @access public * * @param XML_RPC_Message &$oParams * * @return generated result (data or error) */ function getCampaignListByAdvertiserIdPagination(&$oParams) { $oResponseWithError = null; if (!XmlRpcUtils::getScalarValues(array(&$sessionId, &$advertiserId, &$limit, &$offset), array(true, true, false, false), $oParams, $oResponseWithError)) { return $oResponseWithError; } $aCampaignList = null; if ($this->_oCampaignServiceImpl->getCampaignListByAdvertiserIdPagination($sessionId, $advertiserId, $limit, $offset, $aCampaignList)) { return XmlRpcUtils::getArrayOfEntityResponse($aCampaignList); } else { return XmlRpcUtils::generateError($this->_oCampaignServiceImpl->getLastError()); } }
public function getVariable(&$oParams) { $sessionId = null; $variableId = null; $oVariableInfo = new OA_Dll_VariableInfo(); $oResponseWithError = null; if (!XmlRpcUtils::getScalarValues(array(&$sessionId, &$variableId), array(true, true), $oParams, $oResponseWithError)) { return $oResponseWithError; } if ($this->oVariableServiceImpl->getVariable($sessionId, $variableId, $oVariableInfo)) { return XmlRpcUtils::getEntityResponse($oVariableInfo); } else { return XmlRpcUtils::generateError($this->oVariableServiceImpl->getLastError()); } }
/** * The getPublisherListByAgencyId method returns a list of publishers * for an agency, or returns an error message. * * @access public * * @param XML_RPC_Message $oParams * * @return generated result (data or error) */ function getPublisherListByAgencyId($oParams) { $oResponseWithError = null; if (!XmlRpcUtils::getScalarValues(array(&$sessionId, &$agencyId), array(true, true), $oParams, $oResponseWithError)) { return $oResponseWithError; } $aPublisherList = null; if ($this->_oPublisherServiceImp->getPublisherListByAgencyId($sessionId, $agencyId, $aPublisherList)) { return XmlRpcUtils::getArrayOfEntityResponse($aPublisherList); } else { return XmlRpcUtils::generateError($this->_oPublisherServiceImp->getLastError()); } }
function updateUserEmailBySsoId($oParams) { $oResponseWithError = null; if (!XmlRpcUtils::getScalarValues(array(&$sessionId, &$ssoUserId, &$email), array(true, true, true), $oParams, $oResponseWithError)) { return $oResponseWithError; } if ($this->_oUserServiceImp->updateUserEmailBySsoId($sessionId, $ssoUserId, $email)) { return XmlRpcUtils::booleanTypeResponse(true); } else { return XmlRpcUtils::generateError($this->_oUserServiceImp->getLastError()); } }
function generateTags($oParams) { $oResponseWithError = null; if (!XmlRpcUtils::getScalarValues(array(&$sessionId, &$zoneId, &$codeType, &$aParams), array(true, true, true, false), $oParams, $oResponseWithError)) { return $oResponseWithError; } if ($this->_oZoneServiceImp->generateTags($sessionId, $zoneId, $codeType, $aParams, $generatedTag)) { return XmlRpcUtils::stringTypeResponse($generatedTag); } else { return XmlRpcUtils::generateError($this->_oZoneServiceImp->getLastError()); } }
/** * This method sets targeting limitations for a channel. * It overrides existing limitations. * * @access public * * @param XML_RPC_Message &$oParams * * @return generated result (boolean or error) */ public function setChannelTargeting(&$oParams) { $oResponseWithError = null; $aTargeting = array(); if (!XmlRpcUtils::getScalarValues(array(&$sessionId, &$channelId), array(true, true), $oParams, $oResponseWithError) || !XmlRpcUtils::getArrayOfStructuresScalarFields($aTargeting, 'OA_Dll_TargetingInfo', $oParams, 2, array('logical', 'type', 'comparison', 'data'), $oResponseWithError)) { return $oResponseWithError; } if ($this->_oChannelServiceImp->setChannelTargeting($sessionId, $channelId, $aTargeting)) { return XmlRpcUtils::booleanTypeResponse(true); } else { return XmlRpcUtils::generateError($this->_oChannelServiceImp->getLastError()); } }
/** * Gets conversion statistics for * a campaign for a specified period, or returns an error message. * * @param XML_RPC_Message &$oParams * @return generated result (data or error) */ public function campaignConversionStatistics(&$oParams) { $oResponseWithError = null; if (!XmlRpcUtils::getScalarValues(array(&$sessionId, &$campaignId, &$oStartDate, &$oEndDate, &$localTZ), array(true, true, false, false, false), $oParams, $oResponseWithError)) { return $oResponseWithError; } $rsStatisticsData = null; if ($this->_oCampaignServiceImp->getCampaignConversionStatistics($sessionId, $campaignId, $oStartDate, $oEndDate, $localTZ, $rsStatisticsData)) { return XmlRpcUtils::arrayOfStructuresResponse(array('campaignID' => 'integer', 'trackerID' => 'integer', 'bannerID' => 'integer', 'conversionTime' => 'date', 'conversionStatus' => 'integer', 'userIp' => 'string', 'action' => 'integer', 'window' => 'integer', 'variables' => 'struct'), $rsStatisticsData); } else { return XmlRpcUtils::generateError($this->_oCampaignServiceImp->getLastError()); } }
function linkUserToManagerAccount($oParams) { $sessionId = null; $userId = null; $managerAccountId = null; $aPermissions = array(); $oResponseWithError = null; if (!XmlRpcUtils::getScalarValues(array(&$sessionId, &$userId, &$managerAccountId), array(true, true, true), $oParams, $oResponseWithError) || !XmlRpcUtils::getNotRequiredNonScalarValue($aPermissions, $oParams, 3, $oResponseWithError)) { return $oResponseWithError; } if ($this->_oUserServiceImp->linkUserToManagerAccount($sessionId, $userId, $managerAccountId, $aPermissions)) { return XmlRpcUtils::booleanTypeResponse(true); } else { return XmlRpcUtils::generateError($this->_oUserServiceImp->getLastError()); } }