Package zendeskapi.models.groups

Examples of zendeskapi.models.groups.GroupMembership


   * @return
   * @throws ZendeskApiException
   */
  public MultipleGroupMembershipResponse setGroupMembershipAsDefault(long userId, long groupMembershipId) throws ZendeskApiException {
    try {
      return genericPut("users/" + userId + "/group_memberships/" + groupMembershipId + "/make_default.json", new GroupMembership(), MultipleGroupMembershipResponse.class);
    } catch (Exception e) {
      throw new ZendeskApiException("Failed to set default group memebership to " + groupMembershipId + " for user id " + userId, e);
    }
  }
View Full Code Here


    User user = new User();
    user.setName("Test user 1");
    user.setEmail("test.user1@linxugrotto.org.uk");
    user.setRole("agent");
    User createdUser = API.getUsers().createUser(user).getUser();
    GroupMembership groupMembership = new GroupMembership();
    groupMembership.setUserId(createdUser.getId());
    groupMembership.setGroupId(group.getId());

    // Create
    IndividualGroupMembershipResponse igmr = API.getGroups().createGroupMembership(groupMembership);
    Assert.assertTrue(igmr.getGroupMembership().getId() > 0);
View Full Code Here

TOP

Related Classes of zendeskapi.models.groups.GroupMembership

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.