Ejemplo n.º 1
0
 /**
  * Lists vpn users
  *
  * @param ListVpnUsersData   $requestData List vpn users request data object
  * @param PaginationType         $pagination  Pagination
  * @return VpnUserResponseList|null
  */
 public function listVpnUsers(ListVpnUsersData $requestData = null, PaginationType $pagination = null)
 {
     $result = null;
     $args = array();
     if ($requestData !== null) {
         $args = $requestData->toArray();
     }
     if ($pagination !== null) {
         array_push($args, $pagination->toArray());
     }
     $response = $this->getClient()->call('listVpnUsers', $args);
     if ($response->hasError() === false) {
         $resultObject = $response->getResult();
         if (!empty($resultObject) && property_exists($resultObject, 'count') && $resultObject->count > 0) {
             $result = $this->_loadVpnUserList($resultObject->vpnuser);
         }
     }
     return $result;
 }
Ejemplo n.º 2
0
 /**
  * Lists vpn users
  *
  * @param ListVpnUsersData|array   $filter List vpn users request data object
  * @param PaginationType           $pagination  Pagination
  * @return VpnUserResponseList|null
  */
 public function listUsers($filter = null, PaginationType $pagination = null)
 {
     if ($filter !== null && !$filter instanceof ListVpnUsersData) {
         $filter = ListVpnUsersData::initArray($filter);
     }
     return $this->getApiHandler()->listVpnUsers($filter, $pagination);
 }