Class: Seam::Clients::AcsSystems

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

Instance Method Summary collapse

Constructor Details

#initialize(client:, defaults:) ⇒ AcsSystems

Returns a new instance of AcsSystems.



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

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

Instance Method Details

#get(acs_system_id:) ⇒ Seam::Resources::AcsSystem

Returns a specified access system.

Parameters:

  • acs_system_id

    ID of the access system that you want to get.

Returns:



14
15
16
17
18
# File 'lib/seam/routes/acs_systems.rb', line 14

def get(acs_system_id:)
  res = @client.post("/acs/systems/get", {acs_system_id: acs_system_id}.compact)

  Seam::Resources::AcsSystem.load_from_response(res.body["acs_system"])
end

#list(connected_account_id: nil, customer_key: nil, search: nil) ⇒ Seam::Resources::AcsSystem

Returns a list of all access systems.

To filter the list of returned access systems by a specific connected account ID, include the connected_account_id in the request body. If you omit the connected_account_id parameter, the response includes all access systems connected to your workspace.

Parameters:

  • connected_account_id (defaults to: nil)

    ID of the connected account by which you want to filter the list of access systems.

  • customer_key (defaults to: nil)

    Customer key for which you want to list access systems.

  • search (defaults to: nil)

    String for which to search. Filters returned access systems to include all records that satisfy a partial match using name or acs_system_id.

Returns:



27
28
29
30
31
# File 'lib/seam/routes/acs_systems.rb', line 27

def list(connected_account_id: nil, customer_key: nil, search: nil)
  res = @client.post("/acs/systems/list", {connected_account_id: , customer_key: customer_key, search: search}.compact)

  Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
end

#list_compatible_credential_manager_acs_systems(acs_system_id:) ⇒ Seam::Resources::AcsSystem

Returns a list of all credential manager systems that are compatible with a specified access system.

Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding acs_system_id in the request body.

Parameters:

  • acs_system_id

    ID of the access system for which you want to retrieve all compatible credential manager systems.

Returns:



38
39
40
41
42
# File 'lib/seam/routes/acs_systems.rb', line 38

def list_compatible_credential_manager_acs_systems(acs_system_id:)
  res = @client.post("/acs/systems/list_compatible_credential_manager_acs_systems", {acs_system_id: acs_system_id}.compact)

  Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
end

#report_devices(acs_system_id:, acs_encoders: nil, acs_entrances: nil) ⇒ nil

Reports ACS system device status including encoders and entrances.

Parameters:

  • acs_system_id

    ID of the ACS system to report resources for

  • acs_encoders (defaults to: nil)

    Array of ACS encoders to report

  • acs_entrances (defaults to: nil)

    Array of ACS entrances to report

Returns:

  • (nil)

    OK



49
50
51
52
53
# File 'lib/seam/routes/acs_systems.rb', line 49

def report_devices(acs_system_id:, acs_encoders: nil, acs_entrances: nil)
  @client.post("/acs/systems/report_devices", {acs_system_id: acs_system_id, acs_encoders: acs_encoders, acs_entrances: acs_entrances}.compact)

  nil
end