Class: Seam::Clients::AcsUsers

Inherits:
Object
  • Object
show all
Defined in:
lib/seam/routes/clients/acs_users.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:, defaults:) ⇒ AcsUsers

Returns a new instance of AcsUsers.



6
7
8
9
# File 'lib/seam/routes/clients/acs_users.rb', line 6

def initialize(client:, defaults:)
  @client = client
  @defaults = defaults
end

Instance Method Details

#add_to_access_group(acs_access_group_id:, acs_user_id:) ⇒ Object



11
12
13
14
15
# File 'lib/seam/routes/clients/acs_users.rb', line 11

def add_to_access_group(acs_access_group_id:, acs_user_id:)
  @client.post("/acs/users/add_to_access_group", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id}.compact)

  nil
end

#create(acs_system_id:, full_name:, access_schedule: nil, acs_access_group_ids: nil, email: nil, email_address: nil, phone_number: nil, user_identity_id: nil) ⇒ Object



17
18
19
20
21
# File 'lib/seam/routes/clients/acs_users.rb', line 17

def create(acs_system_id:, full_name:, access_schedule: nil, acs_access_group_ids: nil, email: nil, email_address: nil, phone_number: nil, user_identity_id: nil)
  res = @client.post("/acs/users/create", {acs_system_id: acs_system_id, full_name: full_name, access_schedule: access_schedule, acs_access_group_ids: acs_access_group_ids, email: email, email_address: email_address, phone_number: phone_number, user_identity_id: user_identity_id}.compact)

  Seam::Resources::AcsUser.load_from_response(res.body["acs_user"])
end

#delete(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) ⇒ Object



23
24
25
26
27
# File 'lib/seam/routes/clients/acs_users.rb', line 23

def delete(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
  @client.post("/acs/users/delete", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)

  nil
end

#get(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) ⇒ Object



29
30
31
32
33
# File 'lib/seam/routes/clients/acs_users.rb', line 29

def get(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
  res = @client.post("/acs/users/get", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)

  Seam::Resources::AcsUser.load_from_response(res.body["acs_user"])
end

#list(acs_system_id: nil, created_before: nil, limit: nil, page_cursor: nil, search: nil, user_identity_email_address: nil, user_identity_id: nil, user_identity_phone_number: nil) ⇒ Object



35
36
37
38
39
# File 'lib/seam/routes/clients/acs_users.rb', line 35

def list(acs_system_id: nil, created_before: nil, limit: nil, page_cursor: nil, search: nil, user_identity_email_address: nil, user_identity_id: nil, user_identity_phone_number: nil)
  res = @client.post("/acs/users/list", {acs_system_id: acs_system_id, created_before: created_before, limit: limit, page_cursor: page_cursor, search: search, user_identity_email_address: user_identity_email_address, user_identity_id: user_identity_id, user_identity_phone_number: user_identity_phone_number}.compact)

  Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
end

#list_accessible_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) ⇒ Object



41
42
43
44
45
# File 'lib/seam/routes/clients/acs_users.rb', line 41

def list_accessible_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
  res = @client.post("/acs/users/list_accessible_entrances", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)

  Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
end

#remove_from_access_group(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil) ⇒ Object



47
48
49
50
51
# File 'lib/seam/routes/clients/acs_users.rb', line 47

def remove_from_access_group(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
  @client.post("/acs/users/remove_from_access_group", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)

  nil
end

#revoke_access_to_all_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) ⇒ Object



53
54
55
56
57
# File 'lib/seam/routes/clients/acs_users.rb', line 53

def revoke_access_to_all_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
  @client.post("/acs/users/revoke_access_to_all_entrances", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)

  nil
end

#suspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) ⇒ Object



59
60
61
62
63
# File 'lib/seam/routes/clients/acs_users.rb', line 59

def suspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
  @client.post("/acs/users/suspend", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)

  nil
end

#unsuspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil) ⇒ Object



65
66
67
68
69
# File 'lib/seam/routes/clients/acs_users.rb', line 65

def unsuspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
  @client.post("/acs/users/unsuspend", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)

  nil
end

#update(access_schedule: nil, acs_system_id: nil, acs_user_id: nil, email: nil, email_address: nil, full_name: nil, hid_acs_system_id: nil, phone_number: nil, user_identity_id: nil) ⇒ Object



71
72
73
74
75
# File 'lib/seam/routes/clients/acs_users.rb', line 71

def update(access_schedule: nil, acs_system_id: nil, acs_user_id: nil, email: nil, email_address: nil, full_name: nil, hid_acs_system_id: nil, phone_number: nil, user_identity_id: nil)
  @client.post("/acs/users/update", {access_schedule: access_schedule, acs_system_id: acs_system_id, acs_user_id: acs_user_id, email: email, email_address: email_address, full_name: full_name, hid_acs_system_id: hid_acs_system_id, phone_number: phone_number, user_identity_id: user_identity_id}.compact)

  nil
end