private UserProfile GetProfile(Guid commerceId) { var profile = _authenticationClient.GetProfileByCommerceId(commerceId); if (profile == null || !profile.Result.Success) { return(null); } return(new UserProfile { Title = GetActiveTitle(profile), FirstName = GetActiveFirstName(profile), Surname = GetActiveLastName(profile), EmailAddress = profile.Email, NonRegisteredEmailAddress = profile.NonRegisteredEmail, UserType = ConvertProfileToUserType(profile), MatchStatus = ConvertAccountStatusToRegistrationStatus(profile) }); }