Class: Seam::Clients::AcsAccessGroups
- Inherits:
-
Object
- Object
- Seam::Clients::AcsAccessGroups
- Defined in:
- lib/seam/routes/acs_access_groups.rb
Instance Method Summary collapse
-
#add_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) ⇒ nil
Adds a specified access system user to a specified access group.
-
#delete(acs_access_group_id:) ⇒ nil
Deletes a specified access group.
-
#get(acs_access_group_id:) ⇒ Seam::Resources::AcsAccessGroup
Returns a specified access group.
-
#initialize(client:, defaults:) ⇒ AcsAccessGroups
constructor
A new instance of AcsAccessGroups.
-
#list(acs_system_id: nil, acs_user_id: nil, search: nil, user_identity_id: nil) ⇒ Seam::Resources::AcsAccessGroup
Returns a list of all access groups.
-
#list_accessible_entrances(acs_access_group_id:) ⇒ Seam::Resources::AcsEntrance
Returns a list of all accessible entrances for a specified access group.
-
#list_users(acs_access_group_id:) ⇒ Seam::Resources::AcsUser
Returns a list of all access system users in an access group.
-
#remove_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) ⇒ nil
Removes a specified access system user from a specified access group.
Constructor Details
#initialize(client:, defaults:) ⇒ AcsAccessGroups
Returns a new instance of AcsAccessGroups.
6 7 8 9 |
# File 'lib/seam/routes/acs_access_groups.rb', line 6 def initialize(client:, defaults:) @client = client @defaults = defaults end |
Instance Method Details
#add_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) ⇒ nil
Adds a specified access system user to a specified access group.
16 17 18 19 20 |
# File 'lib/seam/routes/acs_access_groups.rb', line 16 def add_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) @client.post("/acs/access_groups/add_user", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact) nil end |
#delete(acs_access_group_id:) ⇒ nil
Deletes a specified access group.
25 26 27 28 29 |
# File 'lib/seam/routes/acs_access_groups.rb', line 25 def delete(acs_access_group_id:) @client.post("/acs/access_groups/delete", {acs_access_group_id: acs_access_group_id}.compact) nil end |
#get(acs_access_group_id:) ⇒ Seam::Resources::AcsAccessGroup
Returns a specified access group.
34 35 36 37 38 |
# File 'lib/seam/routes/acs_access_groups.rb', line 34 def get(acs_access_group_id:) res = @client.post("/acs/access_groups/get", {acs_access_group_id: acs_access_group_id}.compact) Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_group"]) end |
#list(acs_system_id: nil, acs_user_id: nil, search: nil, user_identity_id: nil) ⇒ Seam::Resources::AcsAccessGroup
Returns a list of all access groups.
46 47 48 49 50 |
# File 'lib/seam/routes/acs_access_groups.rb', line 46 def list(acs_system_id: nil, acs_user_id: nil, search: nil, user_identity_id: nil) res = @client.post("/acs/access_groups/list", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, search: search, user_identity_id: user_identity_id}.compact) Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_groups"]) end |
#list_accessible_entrances(acs_access_group_id:) ⇒ Seam::Resources::AcsEntrance
Returns a list of all accessible entrances for a specified access group.
55 56 57 58 59 |
# File 'lib/seam/routes/acs_access_groups.rb', line 55 def list_accessible_entrances(acs_access_group_id:) res = @client.post("/acs/access_groups/list_accessible_entrances", {acs_access_group_id: acs_access_group_id}.compact) Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"]) end |
#list_users(acs_access_group_id:) ⇒ Seam::Resources::AcsUser
Returns a list of all access system users in an access group.
64 65 66 67 68 |
# File 'lib/seam/routes/acs_access_groups.rb', line 64 def list_users(acs_access_group_id:) res = @client.post("/acs/access_groups/list_users", {acs_access_group_id: acs_access_group_id}.compact) Seam::Resources::AcsUser.load_from_response(res.body["acs_users"]) end |
#remove_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) ⇒ nil
Removes a specified access system user from a specified access group.
75 76 77 78 79 |
# File 'lib/seam/routes/acs_access_groups.rb', line 75 def remove_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) @client.post("/acs/access_groups/remove_user", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact) nil end |