//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary>Retrieves a subset of the User Personal 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 PersonalFields 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 Personal information.</returns> //////////////////////////////////////////////////////////////////////////////////////////////////// protected PersonalInfo GetPersonalInfo(Directory.Schemas.UserIdType userIdType, PersonalFields[] 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: UserPersonalInfoType userPersonalInfoResponse = BaseRetrieve<UserPersonalInfoType>( DirectoryTools.CreateDirectoryServiceURL(userIdType, url, Constants.DirectoryPersonalInfo_Get) , parameters); return DirectorySimplifiers.SimplifyUserPersonalInfoType(userPersonalInfoResponse); }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary>Retrieves the whole User Personal 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 Personal information.</returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public Schemas.PersonalInfo GetPersonalInfo(PersonalFields[] fields = null) { return GetPersonalInfo(new Directory.Schemas.UserIdType(UserType.alias, connector.GetToken()), fields); }