Class: Seam::Resources::Batch
- Inherits:
-
BaseResource
- Object
- BaseResource
- Seam::Resources::Batch
- Defined in:
- lib/seam/resources/batch.rb
Overview
A batch of workspace resources.
Instance Attribute Summary collapse
-
#access_codes ⇒ Object
Represents a smart lock access code.
-
#access_grants ⇒ Object
Represents an Access Grant.
-
#access_methods ⇒ Object
Represents an access method for an Access Grant.
-
#acs_access_groups ⇒ Object
Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users.
-
#acs_credentials ⇒ Object
Means by which an access control system user gains access at an entrance.
-
#acs_encoders ⇒ Object
Represents a hardware device that encodes credential data onto physical cards within an access control system.
-
#acs_entrances ⇒ Object
Represents an entrance within an access control system.
-
#acs_systems ⇒ Object
Represents an access control system.
-
#acs_users ⇒ Object
Represents a user in an access system.
-
#action_attempts ⇒ Object
Represents an action attempt that enables you to keep track of the progress of your action that affects a physical device or system.actions against a device.
-
#client_sessions ⇒ Object
Represents a client session.
-
#connect_webviews ⇒ Object
Represents a Connect Webview.
-
#connected_accounts ⇒ Object
Represents a connected account.
-
#devices ⇒ Object
Represents a device that has been connected to Seam.
-
#events ⇒ Object
Represents an event.
-
#instant_keys ⇒ Object
Represents a Seam Instant Key.
-
#noise_thresholds ⇒ Object
Represents a noise threshold for a noise sensor.
-
#spaces ⇒ Object
Represents a space that is a logical grouping of devices and entrances.
-
#thermostat_daily_programs ⇒ Object
Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time.
-
#thermostat_schedules ⇒ Object
Represents a thermostat schedule that activates a configured climate preset on a thermostat at a specified starting time and deactivates the climate preset at a specified ending time.
-
#unmanaged_access_codes ⇒ Object
Represents an unmanaged smart lock access code.
-
#unmanaged_devices ⇒ Object
Represents an unmanaged device.
-
#user_identities ⇒ Object
Represents a user identity associated with an application user account.
-
#workspaces ⇒ Object
Represents a Seam workspace.
Attributes inherited from BaseResource
Method Summary
Methods inherited from BaseResource
date_accessor, #initialize, #inspect, load_from_response, #update_from_response
Constructor Details
This class inherits a constructor from Seam::Resources::BaseResource
Instance Attribute Details
#access_codes ⇒ Object
Represents a smart lock access code.
An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate.
Seam supports programming two types of access codes: ongoing and time-bound. To differentiate between the two, refer to the type property of the access code. Ongoing codes display as ongoing, whereas time-bound codes are labeled time_bound. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both starts_at and ends_at empty. A time-bound access code will be programmed at the starts_at time and removed at the ends_at time.
In addition, for certain devices, Seam also supports offline access codes. Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code.
For granting a person access to a space, Access Grants are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.
16 17 18 |
# File 'lib/seam/resources/batch.rb', line 16 def access_codes @access_codes end |
#access_grants ⇒ Object
Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity while creating the new Access Grant.
18 19 20 |
# File 'lib/seam/resources/batch.rb', line 18 def access_grants @access_grants end |
#access_methods ⇒ Object
Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key.
20 21 22 |
# File 'lib/seam/resources/batch.rb', line 20 def access_methods @access_methods end |
#acs_access_groups ⇒ Object
Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users.
Some access control systems use access group, which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes.
To learn whether your access control system supports access groups, see the corresponding system integration guide.
26 27 28 |
# File 'lib/seam/resources/batch.rb', line 26 def acs_access_groups @acs_access_groups end |
#acs_credentials ⇒ Object
Means by which an access control system user gains access at an entrance. The acs_credential object represents a credential that provides an ACS user access within an access control system.
An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs.
For each acs_credential, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type.
For granting a person access to a space, Access Grants are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials.
34 35 36 |
# File 'lib/seam/resources/batch.rb', line 34 def acs_credentials @acs_credentials end |
#acs_encoders ⇒ Object
Represents a hardware device that encodes credential data onto physical cards within an access control system.
Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps:
- Credential creation Configure the access parameters for the credential.
- Card encoding Write the credential data onto the card using a compatible card encoder.
Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed.
See Working with Card Encoders and Scanners.
To verify if your access control system requires a card encoder, see the corresponding system integration guide.
49 50 51 |
# File 'lib/seam/resources/batch.rb', line 49 def acs_encoders @acs_encoders end |
#acs_entrances ⇒ Object
Represents an entrance within an access control system.
In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the acs_entrance resources in your workspace or get these details for a specific acs_entrance. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance.
53 54 55 |
# File 'lib/seam/resources/batch.rb', line 53 def acs_entrances @acs_entrances end |
#acs_systems ⇒ Object
Represents an access control system.
Within an acs_system, create acs_users and acs_credentials to grant access to the acs_users.
For details about the resources associated with an access control system, see the access control systems namespace.
59 60 61 |
# File 'lib/seam/resources/batch.rb', line 59 def acs_systems @acs_systems end |
#acs_users ⇒ Object
Represents a user in an access system.
An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period.
For details about how to configure users in your access system, see the corresponding system integration guide.
65 66 67 |
# File 'lib/seam/resources/batch.rb', line 65 def acs_users @acs_users end |
#action_attempts ⇒ Object
Represents an action attempt that enables you to keep track of the progress of your action that affects a physical device or system.actions against a device. Action attempts are useful because the physical world is intrinsically asynchronous.
When you request for a device to perform an action, the Seam API immediately returns an action attempt object. In the background, the Seam API performs the action.
See also Action Attempts.
71 72 73 |
# File 'lib/seam/resources/batch.rb', line 71 def action_attempts @action_attempts end |
#client_sessions ⇒ Object
Represents a client session. If you want to restrict your users' access to their own devices, use client sessions.
You create each client session with a custom user_identifier_key. Normally, the user_identifier_key is a user ID that your application provides.
When calling the Seam API from your backend using an API key, you can pass the user_identifier_key as a parameter to limit results to the associated client session. For example, /devices/list?user_identifier_key=123 only returns devices associated with the client session created with the user_identifier_key 123.
A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own.
See also Get Started with React.
81 82 83 |
# File 'lib/seam/resources/batch.rb', line 81 def client_sessions @client_sessions end |
#connect_webviews ⇒ Object
Represents a Connect Webview.
Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API.
Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox.
To enable a user to connect their device or system account to Seam through your app, first create a connect_webview. Once created, this connect_webview includes a URL that you can use to open an iframe or new window containing the Connect Webview for your user.
When you create a Connect Webview, specify the desired provider category key in the provider_category parameter. Alternately, to specify a list of providers explicitly, use the accepted_providers parameter with a list of device provider keys.
To list all providers within a category, use /devices/list_device_providers with the desired provider_category filter. To list all provider keys, use /devices/list_device_providers with no filters.
93 94 95 |
# File 'lib/seam/resources/batch.rb', line 93 def connect_webviews @connect_webviews end |
#connected_accounts ⇒ Object
Represents a connected account. A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks.
95 96 97 |
# File 'lib/seam/resources/batch.rb', line 95 def connected_accounts @connected_accounts end |
#devices ⇒ Object
Represents a device that has been connected to Seam.
97 98 99 |
# File 'lib/seam/resources/batch.rb', line 97 def devices @devices end |
#events ⇒ Object
Represents an event. Events let you know when something interesting happens in your workspace. For example, when a lock is unlocked, Seam creates a lock.unlocked event. When a device's battery level is low, Seam creates a device.battery_low event.
As with other API resources, you can retrieve an individual event or a list of events. Seam also provides a separate webhook system for sending the event objects directly to an endpoint on your sever. Manage webhooks through Seam Console. You can also use the webhooks sandbox in Seam Console to see the different payloads for each event and test them against your own endpoints.
101 102 103 |
# File 'lib/seam/resources/batch.rb', line 101 def events @events end |
#instant_keys ⇒ Object
Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app.
There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work.
105 106 107 |
# File 'lib/seam/resources/batch.rb', line 105 def instant_keys @instant_keys end |
#noise_thresholds ⇒ Object
Represents a noise threshold for a noise sensor. Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them.
107 108 109 |
# File 'lib/seam/resources/batch.rb', line 107 def noise_thresholds @noise_thresholds end |
#spaces ⇒ Object
Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient.
109 110 111 |
# File 'lib/seam/resources/batch.rb', line 109 def spaces @spaces end |
#thermostat_daily_programs ⇒ Object
Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time.
111 112 113 |
# File 'lib/seam/resources/batch.rb', line 111 def thermostat_daily_programs @thermostat_daily_programs end |
#thermostat_schedules ⇒ Object
Represents a thermostat schedule that activates a configured climate preset on a thermostat at a specified starting time and deactivates the climate preset at a specified ending time.
113 114 115 |
# File 'lib/seam/resources/batch.rb', line 113 def thermostat_schedules @thermostat_schedules end |
#unmanaged_access_codes ⇒ Object
Represents an unmanaged smart lock access code.
An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly.
When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes.
Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace.
Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes:
125 126 127 |
# File 'lib/seam/resources/batch.rb', line 125 def unmanaged_access_codes @unmanaged_access_codes end |
#unmanaged_devices ⇒ Object
Represents an unmanaged device. An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any access codes on an unmanaged device are unmanaged. To control an unmanaged device with Seam, convert it to a managed device.
127 128 129 |
# File 'lib/seam/resources/batch.rb', line 127 def unmanaged_devices @unmanaged_devices end |
#user_identities ⇒ Object
Represents a user identity associated with an application user account.
129 130 131 |
# File 'lib/seam/resources/batch.rb', line 129 def user_identities @user_identities end |
#workspaces ⇒ Object
Represents a Seam workspace. A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A sandbox workspace is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a production workspace.
131 132 133 |
# File 'lib/seam/resources/batch.rb', line 131 def workspaces @workspaces end |