//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary>Retrieves the whole User Access 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 AccessFields 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 Access information.</returns> //////////////////////////////////////////////////////////////////////////////////////////////////// protected AccessInfo GetAccessInfo(Directory.Schemas.UserIdType userIdType, AccessFields[] fields) { 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: UserAccessInfoType userAccessInfoResponse = BaseRetrieve<UserAccessInfoType>( DirectoryTools.CreateDirectoryServiceURL(userIdType, url, Constants.DirectoryAccessInfo_Get) , parameters); return DirectorySimplifiers.SimplifyUserAccessInfoType(userAccessInfoResponse); }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary>Retrieves the whole User Access 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 Access information.</returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public Schemas.AccessInfo GetAccessInfo(AccessFields[] fields = null) { return GetAccessInfo(new Directory.Schemas.UserIdType(UserType.alias, connector.GetToken()), fields); }