private function _genDiagnosisNotification($transactionId)
 {
     $res = new \Application\Proto\SupDiagnosisAsync\DiagnosisNotification();
     $result = new \Application\Proto\Result();
     $result->setCode('OK');
     $result->setReason('Operation successful');
     $res->setResult($result);
     $simId = new \Application\Proto\SupProvision\Sim\SimId();
     $simId->setImsi('1288228282');
     $res->setSimId($simId);
     $res->setTaskId('taskId');
     $res->setType(\Application\Proto\SupDiagnosis\Diagnosis\DiagnosisType::TYPE_2);
     $res->setResult(\Application\Proto\SupDiagnosisAsync\DiagnosisNotification\DiagnosisResult::GSM_UP);
     $dateInterval = new \Application\Proto\DateInterval();
     $dateInterval->setStartDate('2011-11-11');
     $dateInterval->setEndDate('2011-12-11');
     $res->setTime($dateInterval);
     $req = new \Application\Proto\AsyncNotification\Service\Request();
     $req->setToken($transactionId);
     $req->setProto('business.service.supdiagnosisasync.diagnosisasync');
     $req->message = $res;
     return $req;
 }
Esempio n. 2
0
 protected function _getExpenseDetailEricsson(SimModel $sim, $from, $until)
 {
     /** @var $req \Application\Proto\Subscription\ExpenseDetail\Response */
     $req = $this->_createProto('getSimExpenseDetail');
     // Amplia uses the IMSI to identify the SIM
     $id = new \Application\Proto\SubscriptionId();
     $id->setId($sim->getId());
     $id->setType(\Application\Proto\SubscriptionId\IdType::ID);
     $req->setSubscriptionId($id);
     // Dates are in the format YYYY-MM-DDTHHMM+0000
     $int = new \Application\Proto\DateInterval();
     $int->setStartDate($from);
     $int->setEndDate($until);
     $req->setInterval($int);
     /** @var $response \Application\Proto\SupSpotlight\Presence\KeepAliveHistoryListResponse */
     $response = $this->_sendRequest('getSimExpenseDetail', array('protoMessage' => $req));
     if ($this->_checkGetResponse($response)) {
         $data = $response->serialize(new Codec\PhpArray());
         $data = $this->_mapEricssonExpenseDetailToModel($data);
         return $data;
     }
     return NULL;
 }