Class: Seam::Clients::AcsAccessGroups
- Inherits:
-
Object
- Object
- Seam::Clients::AcsAccessGroups
- Defined in:
- lib/seam/routes/clients/acs_access_groups.rb
Instance Method Summary collapse
- #add_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) ⇒ Object
- #get(acs_access_group_id:) ⇒ Object
-
#initialize(client:, defaults:) ⇒ AcsAccessGroups
constructor
A new instance of AcsAccessGroups.
- #list(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) ⇒ Object
- #list_accessible_entrances(acs_access_group_id:) ⇒ Object
- #list_users(acs_access_group_id:) ⇒ Object
- #remove_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) ⇒ Object
Constructor Details
#initialize(client:, defaults:) ⇒ AcsAccessGroups
Returns a new instance of AcsAccessGroups.
6 7 8 9 |
# File 'lib/seam/routes/clients/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) ⇒ Object
11 12 13 14 15 |
# File 'lib/seam/routes/clients/acs_access_groups.rb', line 11 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 |
#get(acs_access_group_id:) ⇒ Object
17 18 19 20 21 |
# File 'lib/seam/routes/clients/acs_access_groups.rb', line 17 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, user_identity_id: nil) ⇒ Object
23 24 25 26 27 |
# File 'lib/seam/routes/clients/acs_access_groups.rb', line 23 def list(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) res = @client.post("/acs/access_groups/list", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, 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:) ⇒ Object
29 30 31 32 33 |
# File 'lib/seam/routes/clients/acs_access_groups.rb', line 29 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:) ⇒ Object
35 36 37 38 39 |
# File 'lib/seam/routes/clients/acs_access_groups.rb', line 35 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) ⇒ Object
41 42 43 44 45 |
# File 'lib/seam/routes/clients/acs_access_groups.rb', line 41 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 |