Class: Seam::Clients::AcsSystems
- Inherits:
-
Object
- Object
- Seam::Clients::AcsSystems
- Defined in:
- lib/seam/routes/acs_systems.rb
Instance Method Summary collapse
-
#get(acs_system_id:) ⇒ Seam::Resources::AcsSystem
Returns a specified access system.
-
#initialize(client:, defaults:) ⇒ AcsSystems
constructor
A new instance of AcsSystems.
-
#list(connected_account_id: nil, customer_key: nil, search: nil) ⇒ Seam::Resources::AcsSystem
Returns a list of all access systems.
-
#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.
-
#report_devices(acs_system_id:, acs_encoders: nil, acs_entrances: nil) ⇒ nil
Reports ACS system device status including encoders and entrances.
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.
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.
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: 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.
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.
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 |