///////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary>Retrieves the whole User Terminal Information resource block from the directory.</summary> /// <param name="userIdType">The customer Identifier: Type and Value. /// Whom information is going to be retrieved.</param> /// <param name="fields">Array of TerminalFields enumerators. /// A filter object to specify which information fields are required. /// If null this function will return all info.</param> /// <returns>An object containing the requested fields of user Terminal information.</returns> //////////////////////////////////////////////////////////////////////////////////////////////////// protected TerminalInfo GetTerminalInfo(Directory.Schemas.UserIdType userIdType, TerminalFields[] fields = null) { var parameters = CreateParameters(); if (fields != null) { string fieldsQueried = string.Format("'{0}'",HttpTools.CovertEnumToQueryParameter(fields)); parameters.Add("fields", fieldsQueried); } //Dont need to select the apropiate parser/serializer for the operation: //The Bluevia´s complex response object, as result of the call: UserTerminalInfoType userTerminalInfoType = BaseRetrieve<UserTerminalInfoType>( DirectoryTools.CreateDirectoryServiceURL(userIdType, url, Constants.DirectoryTerminalInfo_Get) , parameters); return DirectorySimplifiers.SimplifyUserTerminalInfoType(userTerminalInfoType); }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary>Retrieves the whole User Terminal Information resource block from the directory. /// Applications will only be able to retrieve directory information on themselves.</summary> /// <param name="fields">Optional: An array of the Access Info fields to be retrieved. /// If not included this function will return all info.</param> /// <returns>An object containing the requested fields of user Terminal information.</returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public Schemas.TerminalInfo GetTerminalInfo(TerminalFields[] fields = null) { return GetTerminalInfo(new Directory.Schemas.UserIdType(UserType.alias, connector.GetToken()), fields); }