Exemplo n.º 1
0
 public function updateOneSimConsumptionControl(ConsumptionControlLimitModel $data, $simId, $idType = SubscriptionId\IdType::ID)
 {
     $methodName = self::METHOD_NAME_ONE_SIM_UPDATE_CONSUMPTION_CONTROL;
     /**
      * @var $proto \Application\Proto\Subscription\UpdateConsumptionControlQ
      */
     $proto = $this->_createProto($methodName);
     $subscription = new SubscriptionId();
     $subscription->setType($idType);
     $subscription->setId($simId);
     $proto->setSubscriptionId($subscription);
     $consumptionLimits = new \Application\Proto\ConsumptionControlLimit();
     $limits = $this->_mapLimitsToEricsson($data->exportData());
     $consumptionLimits->parse($limits, new \DrSlump\Protobuf\Codec\PhpArray());
     $proto->setLimits($consumptionLimits);
     $response = $this->_sendRequest($methodName, array('protoMessage' => $proto));
     return $this->_checkPutResponse($response);
 }
Exemplo n.º 2
0
 public function updateConsumptionControl(\Application\Model\Sim\ConsumptionControlLimitModel $limits, $data, $idType = SubscriptionId\IdType::ID)
 {
     $this->getCache()->clean();
     $methodName = 'updateSimConsumptionControl';
     $watcher = $this->_constructWatcherToTransaction();
     $watcher->params->action = "simUpdateConsumptionControl";
     $watcher->params->consumptionLimits = $limits->exportData();
     /**
      * @var $proto \Application\Proto\Inventory\UpdateConsumptionControlQ
      */
     $proto = $this->_createSubscriptionsProto($methodName, $data, $idType, $watcher);
     $consumptionControlLimit = new \Application\Proto\ConsumptionControlLimit();
     $limits = $this->_mapLimitsToEricsson($limits->exportData());
     $consumptionControlLimit->parse($limits, new \DrSlump\Protobuf\Codec\PhpArray());
     $proto->setLimits($consumptionControlLimit);
     // Return the transaction ID
     return $this->_sendAsyncRequest($methodName, $proto, $data, array(), $watcher);
 }