module BWAPI::Client::Admin::Clients::UserGroups

UserGroups module for admin/usergroups endpoints

Public Instance Methods

client_user_groups(client_id, opts = {}) click to toggle source

Get all user groups

@param client_id [Integer] Id of the client @option opts [Integer] page Page of projects to retrieve @option opts [Integer] pageSize Results per page of results @return [Hash] All client user groups

# File lib/bwapi/client/admin/clients/user_groups.rb, line 13
def client_user_groups(client_id, opts = {})
  get "admin/clients/#{client_id}/usergroups", opts
end
create_client_user_group(client_id, opts = {}) click to toggle source

Create new user group

@param client_id [Integer] Id of the client @param opts [Hash] options hash of parameters @option opts [Date] startDate Start date of the client @return [Hash] New client user group

# File lib/bwapi/client/admin/clients/user_groups.rb, line 23
def create_client_user_group(client_id, opts = {})
  post "admin/clients/#{client_id}/usergroups", opts
end
delete_client_user_group(client_id, user_group_id) click to toggle source

Delete specific user group

@param client_id [Integer] Id of the client @param user_group_id [Integer] Id of the user group @return [Hash] Deleted client user group

# File lib/bwapi/client/admin/clients/user_groups.rb, line 41
def delete_client_user_group(client_id, user_group_id)
  delete "admin/clients/#{client_id}/usergroups/#{user_group_id}"
end
update_client_user_group(client_id, user_group_id, opts = {}) click to toggle source

Update existing user group

@param client_id [Integer] Id of the client @param user_group_id [Integer] Id of the user group @return [Hash] Updated client user group

# File lib/bwapi/client/admin/clients/user_groups.rb, line 32
def update_client_user_group(client_id, user_group_id, opts = {})
  put "admin/clients/#{client_id}/usergroups/#{user_group_id}", opts
end