protected function _changeOneSimManualLocation($simId, $location) { $methodName = self::METHOD_NAME_ONE_SIM_CHANGE_MANUAL_LOCATION; /** * @var $proto Proto\Subscription\ChangeManLocationQuery */ $proto = $this->_createProto($methodName); $subscription = new SubscriptionId(); $subscription->setType(SubscriptionId\IdType::ID); $subscription->setId($simId); $proto->setSubscriptionId($subscription); // Remove location at E/// if is null if ($location !== null) { $locationProto = new Proto\Location(); $locationProto->setLatitude($location->getLatitude()); $locationProto->setLongitude($location->getLongitude()); $proto->setLocation($locationProto); } $response = $this->_sendRequest($methodName, array('protoMessage' => $proto)); return $this->_checkPutResponse($response); }
protected function _changeManualLocation($simIds, $location) { $methodName = self::METHOD_NAME_CHANGE_MANUAL_LOCATION; /** * @var $proto Proto\Inventory\ChangeManLocationQuery */ $proto = $this->_createProto($methodName); $watcher = $this->_constructWatcherToTransaction(); $watcher->params->action = "simChangeManualLocation"; if ($location) { $watcher->params->location = $location->exportData(); } else { $watcher->params->action = "simRemoveManualLocation"; } $subsSelect = $this->_generateSubscriptionSelect($simIds, SubscriptionId\IdType::ID, $watcher); $proto->setSubscriptions($subsSelect); // Remove location at E/// if is null if ($location !== null) { $locationProto = new Proto\Location(); $locationProto->setLatitude($location->getLatitude()); $locationProto->setLongitude($location->getLongitude()); $proto->setLocation($locationProto); } // Return the transaction ID return $this->_sendAsyncRequest($methodName, $proto, $simIds, array(), $watcher); }