Пример #1
0
        private UserResponse AddUser()
        {
            var newUser = new UserRequest();
            newUser.Email = USER_EMAIL;
            newUser.FacebookId = "FacebookId";
            newUser.GoogleAppsUserName = "******";
            newUser.FirstName = "FirstName";
            newUser.LastName = "LastName";
            newUser.YahooUserName = "******";
            newUser.PasswordHash = "test123";
            newUser.Active = true;
            newUser.Deleted = false;

            return _gateway.Users.AddUser(newUser);
        }
Пример #2
0
 /// <summary>
 /// Updates an existing User
 /// </summary>
 /// <param name="updatedUser">The User to be updated</param>
 /// <param name="userId">The user id.</param>
 /// <param name="format">The format of the Response</param>
 /// <returns>
 /// A UserResponse object that corresponds to the updated User
 /// </returns>
 public UserResponse UpdateUser(UserRequest updatedUser, string userId, string format = ContentFormat.XML)
 {
     return _service.Put<UserRequest, UserResponse>(string.Format("{0}/{1}.{2}", _gatewayURL, userId, format), updatedUser);
 }
Пример #3
0
 /// <summary>
 /// Adds a new User
 /// </summary>
 /// <param name="user">The User to be added</param>
 /// <param name="format">The format of the Response</param>
 /// <returns>The UserResponse object that corresponds to the newly-added User</returns>
 public UserResponse AddUser(UserRequest user, string format = ContentFormat.XML)
 {
     return _service.Post<UserRequest, UserResponse>(string.Format("{0}/{1}", _gatewayURL, format), user);
 }