Пример #1
0
 /**
  * Adds vpn users
  *
  * @param AddVpnUserData $requestData Add vpn user request data object
  * @return VpnUserResponseData
  */
 public function addVpnUser(AddVpnUserData $requestData)
 {
     $result = null;
     $response = $this->getClient()->call('addVpnUser', $requestData->toArray());
     if ($response->hasError() === false) {
         $resultObject = $response->getResult();
         if (!empty($resultObject)) {
             $result = $this->_loadVpnUserData($resultObject);
         }
     }
     return $result;
 }
Пример #2
0
 /**
  * Adds vpn users
  *
  * @param AddVpnUserData|array $request Add vpn user request data object
  * @return VpnUserResponseData
  */
 public function addUser($request)
 {
     if ($request !== null && !$request instanceof AddVpnUserData) {
         $request = AddVpnUserData::initArray($request);
     }
     return $this->getApiHandler()->addVpnUser($request);
 }