Class: Seam::Resources::Batch

Inherits:
BaseResource show all
Defined in:
lib/seam/resources/batch.rb

Overview

A batch of workspace resources.

Instance Attribute Summary collapse

Attributes inherited from BaseResource

#client, #data

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_codesObject

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_grantsObject

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_methodsObject

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_groupsObject

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_credentialsObject

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_encodersObject

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:

  1. Credential creation Configure the access parameters for the credential.
  2. 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_entrancesObject

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_systemsObject

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_usersObject

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_attemptsObject

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_sessionsObject

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_webviewsObject

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_accountsObject

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

#devicesObject

Represents a device that has been connected to Seam.



97
98
99
# File 'lib/seam/resources/batch.rb', line 97

def devices
  @devices
end

#eventsObject

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_keysObject

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_thresholdsObject

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

#spacesObject

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_programsObject

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_schedulesObject

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_codesObject

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_devicesObject

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_identitiesObject

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

#workspacesObject

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