seam 2.132.0 → 2.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/seam/resources/access_code.rb +55 -2
- data/lib/seam/resources/access_grant.rb +39 -2
- data/lib/seam/resources/access_method.rb +34 -2
- data/lib/seam/resources/acs_access_group.rb +32 -1
- data/lib/seam/resources/acs_credential.rb +61 -2
- data/lib/seam/resources/acs_encoder.rb +25 -1
- data/lib/seam/resources/acs_entrance.rb +48 -1
- data/lib/seam/resources/acs_system.rb +41 -1
- data/lib/seam/resources/acs_user.rb +50 -1
- data/lib/seam/resources/action_attempt.rb +10 -1
- data/lib/seam/resources/batch.rb +126 -1
- data/lib/seam/resources/client_session.rb +35 -2
- data/lib/seam/resources/connect_webview.rb +50 -2
- data/lib/seam/resources/connected_account.rb +33 -1
- data/lib/seam/resources/customer_portal.rb +16 -2
- data/lib/seam/resources/device.rb +70 -1
- data/lib/seam/resources/device_provider.rb +48 -1
- data/lib/seam/resources/event.rb +184 -2
- data/lib/seam/resources/instant_key.rb +22 -2
- data/lib/seam/resources/noise_threshold.rb +15 -1
- data/lib/seam/resources/pagination.rb +7 -1
- data/lib/seam/resources/phone.rb +16 -1
- data/lib/seam/resources/space.rb +22 -1
- data/lib/seam/resources/thermostat_daily_program.rb +12 -1
- data/lib/seam/resources/thermostat_schedule.rb +23 -2
- data/lib/seam/resources/unmanaged_access_code.rb +41 -2
- data/lib/seam/resources/unmanaged_access_grant.rb +31 -2
- data/lib/seam/resources/unmanaged_access_method.rb +28 -2
- data/lib/seam/resources/unmanaged_device.rb +60 -1
- data/lib/seam/resources/unmanaged_user_identity.rb +16 -1
- data/lib/seam/resources/user_identity.rb +18 -1
- data/lib/seam/resources/webhook.rb +9 -1
- data/lib/seam/resources/workspace.rb +20 -1
- data/lib/seam/routes/access_codes.rb +147 -0
- data/lib/seam/routes/access_codes_simulate.rb +5 -0
- data/lib/seam/routes/access_codes_unmanaged.rb +34 -0
- data/lib/seam/routes/access_grants.rb +59 -0
- data/lib/seam/routes/access_grants_unmanaged.rb +20 -0
- data/lib/seam/routes/access_methods.rb +35 -0
- data/lib/seam/routes/access_methods_unmanaged.rb +9 -0
- data/lib/seam/routes/acs_access_groups.rb +28 -0
- data/lib/seam/routes/acs_credentials.rb +49 -0
- data/lib/seam/routes/acs_encoders.rb +25 -0
- data/lib/seam/routes/acs_encoders_simulate.rb +19 -0
- data/lib/seam/routes/acs_entrances.rb +30 -0
- data/lib/seam/routes/acs_systems.rb +20 -0
- data/lib/seam/routes/acs_users.rb +72 -0
- data/lib/seam/routes/action_attempts.rb +9 -0
- data/lib/seam/routes/client_sessions.rb +48 -0
- data/lib/seam/routes/connect_webviews.rb +36 -0
- data/lib/seam/routes/connected_accounts.rb +31 -0
- data/lib/seam/routes/connected_accounts_simulate.rb +3 -0
- data/lib/seam/routes/customers.rb +57 -0
- data/lib/seam/routes/devices.rb +45 -0
- data/lib/seam/routes/devices_simulate.rb +28 -0
- data/lib/seam/routes/devices_unmanaged.rb +36 -0
- data/lib/seam/routes/events.rb +35 -0
- data/lib/seam/routes/instant_keys.rb +10 -0
- data/lib/seam/routes/locks.rb +35 -0
- data/lib/seam/routes/locks_simulate.rb +7 -0
- data/lib/seam/routes/noise_sensors.rb +19 -0
- data/lib/seam/routes/noise_sensors_noise_thresholds.rb +27 -0
- data/lib/seam/routes/noise_sensors_simulate.rb +3 -0
- data/lib/seam/routes/phones.rb +10 -0
- data/lib/seam/routes/phones_simulate.rb +6 -0
- data/lib/seam/routes/spaces.rb +61 -0
- data/lib/seam/routes/thermostats.rb +112 -0
- data/lib/seam/routes/thermostats_daily_programs.rb +13 -0
- data/lib/seam/routes/thermostats_schedules.rb +28 -0
- data/lib/seam/routes/thermostats_simulate.rb +13 -0
- data/lib/seam/routes/user_identities.rb +67 -0
- data/lib/seam/routes/user_identities_unmanaged.rb +16 -0
- data/lib/seam/routes/webhooks.rb +16 -0
- data/lib/seam/routes/workspaces.rb +31 -0
- data/lib/seam/version.rb +1 -1
- metadata +2 -2
|
@@ -8,12 +8,21 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Gets an unmanaged access method (where is_managed = false).
|
|
12
|
+
# @param access_method_id ID of unmanaged access method to get.
|
|
13
|
+
# @return [Seam::Resources::UnmanagedAccessMethod] OK
|
|
11
14
|
def get(access_method_id:)
|
|
12
15
|
res = @client.post("/access_methods/unmanaged/get", {access_method_id: access_method_id}.compact)
|
|
13
16
|
|
|
14
17
|
Seam::Resources::UnmanagedAccessMethod.load_from_response(res.body["access_method"])
|
|
15
18
|
end
|
|
16
19
|
|
|
20
|
+
# Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant.
|
|
21
|
+
# @param access_grant_id ID of Access Grant to list unmanaged access methods for.
|
|
22
|
+
# @param acs_entrance_id ID of the entrance for which you want to retrieve all unmanaged access methods.
|
|
23
|
+
# @param device_id ID of the device for which you want to retrieve all unmanaged access methods.
|
|
24
|
+
# @param space_id ID of the space for which you want to retrieve all unmanaged access methods.
|
|
25
|
+
# @return [Seam::Resources::UnmanagedAccessMethod] OK
|
|
17
26
|
def list(access_grant_id:, acs_entrance_id: nil, device_id: nil, space_id: nil)
|
|
18
27
|
res = @client.post("/access_methods/unmanaged/list", {access_grant_id: access_grant_id, acs_entrance_id: acs_entrance_id, device_id: device_id, space_id: space_id}.compact)
|
|
19
28
|
|
|
@@ -8,42 +8,70 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
12
|
+
# @param acs_access_group_id ID of the access group to which you want to add an access system user.
|
|
13
|
+
# @param acs_user_id ID of the access system user that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id.
|
|
14
|
+
# @param user_identity_id ID of the desired user identity that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created.
|
|
15
|
+
# @return [nil] OK
|
|
11
16
|
def add_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
12
17
|
@client.post("/acs/access_groups/add_user", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
13
18
|
|
|
14
19
|
nil
|
|
15
20
|
end
|
|
16
21
|
|
|
22
|
+
# Deletes a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
23
|
+
# @param acs_access_group_id ID of the access group that you want to delete.
|
|
24
|
+
# @return [nil] OK
|
|
17
25
|
def delete(acs_access_group_id:)
|
|
18
26
|
@client.post("/acs/access_groups/delete", {acs_access_group_id: acs_access_group_id}.compact)
|
|
19
27
|
|
|
20
28
|
nil
|
|
21
29
|
end
|
|
22
30
|
|
|
31
|
+
# Returns a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
32
|
+
# @param acs_access_group_id ID of the access group that you want to get.
|
|
33
|
+
# @return [Seam::Resources::AcsAccessGroup] OK
|
|
23
34
|
def get(acs_access_group_id:)
|
|
24
35
|
res = @client.post("/acs/access_groups/get", {acs_access_group_id: acs_access_group_id}.compact)
|
|
25
36
|
|
|
26
37
|
Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_group"])
|
|
27
38
|
end
|
|
28
39
|
|
|
40
|
+
# Returns a list of all [access groups](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
41
|
+
# @param acs_system_id ID of the access system for which you want to retrieve all access groups.
|
|
42
|
+
# @param acs_user_id ID of the access system user for which you want to retrieve all access groups.
|
|
43
|
+
# @param search String for which to search. Filters returned access groups to include all records that satisfy a partial match using `name` or `acs_access_group_id`.
|
|
44
|
+
# @param user_identity_id ID of the user identity for which you want to retrieve all access groups.
|
|
45
|
+
# @return [Seam::Resources::AcsAccessGroup] OK
|
|
29
46
|
def list(acs_system_id: nil, acs_user_id: nil, search: nil, user_identity_id: nil)
|
|
30
47
|
res = @client.post("/acs/access_groups/list", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, search: search, user_identity_id: user_identity_id}.compact)
|
|
31
48
|
|
|
32
49
|
Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_groups"])
|
|
33
50
|
end
|
|
34
51
|
|
|
52
|
+
# Returns a list of all accessible entrances for a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
53
|
+
# @param acs_access_group_id ID of the access group for which you want to retrieve all accessible entrances.
|
|
54
|
+
# @return [Seam::Resources::AcsEntrance] OK
|
|
35
55
|
def list_accessible_entrances(acs_access_group_id:)
|
|
36
56
|
res = @client.post("/acs/access_groups/list_accessible_entrances", {acs_access_group_id: acs_access_group_id}.compact)
|
|
37
57
|
|
|
38
58
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
39
59
|
end
|
|
40
60
|
|
|
61
|
+
# Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
62
|
+
# @param acs_access_group_id ID of the access group for which you want to retrieve all access system users.
|
|
63
|
+
# @return [Seam::Resources::AcsUser] OK
|
|
41
64
|
def list_users(acs_access_group_id:)
|
|
42
65
|
res = @client.post("/acs/access_groups/list_users", {acs_access_group_id: acs_access_group_id}.compact)
|
|
43
66
|
|
|
44
67
|
Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
|
|
45
68
|
end
|
|
46
69
|
|
|
70
|
+
# Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
71
|
+
# @param acs_access_group_id ID of the access group from which you want to remove an access system user.
|
|
72
|
+
# @param acs_user_id ID of the access system user that you want to remove from an access group.
|
|
73
|
+
# @param user_identity_id ID of the user identity associated with the user that you want to remove from an access group.
|
|
74
|
+
# @return [nil] OK
|
|
47
75
|
def remove_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
48
76
|
@client.post("/acs/access_groups/remove_user", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
49
77
|
|
|
@@ -8,48 +8,97 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Assigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
12
|
+
# @param acs_credential_id ID of the credential that you want to assign to an access system user.
|
|
13
|
+
# @param acs_user_id ID of the access system user to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id.
|
|
14
|
+
# @param user_identity_id ID of the user identity to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created.
|
|
15
|
+
# @return [nil] OK
|
|
11
16
|
def assign(acs_credential_id:, acs_user_id: nil, user_identity_id: nil)
|
|
12
17
|
@client.post("/acs/credentials/assign", {acs_credential_id: acs_credential_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
13
18
|
|
|
14
19
|
nil
|
|
15
20
|
end
|
|
16
21
|
|
|
22
|
+
# Creates a new [credential](https://docs.seam.co/low-level-apis/managing-credentials) for a specified [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential.
|
|
23
|
+
# @param access_method Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
|
|
24
|
+
# @param acs_system_id ID of the access system to which the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`.
|
|
25
|
+
# @param acs_user_id ID of the access system user to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`.
|
|
26
|
+
# @param allowed_acs_entrance_ids Set of IDs of the [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) for which the new credential grants access.
|
|
27
|
+
# @param assa_abloy_vostio_metadata Vostio-specific metadata for the new credential.
|
|
28
|
+
# @param code Access (PIN) code for the new credential. There may be manufacturer-specific code restrictions. For details, see the applicable [device or system integration guide](https://docs.seam.co/device-and-system-integration-guides).
|
|
29
|
+
# @param credential_manager_acs_system_id ACS system ID of the credential manager for the new credential.
|
|
30
|
+
# @param ends_at Date and time at which the validity of the new credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`.
|
|
31
|
+
# @param is_multi_phone_sync_credential Indicates whether the new credential is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials).
|
|
32
|
+
# @param salto_space_metadata Salto Space-specific metadata for the new credential.
|
|
33
|
+
# @param starts_at Date and time at which the validity of the new credential starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
34
|
+
# @param user_identity_id ID of the user identity to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. If the access system contains a user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the access system user. If the access system does not have a corresponding user, one is created.
|
|
35
|
+
# @param visionline_metadata Visionline-specific metadata for the new credential.
|
|
36
|
+
# @return [Seam::Resources::AcsCredential] OK
|
|
17
37
|
def create(access_method:, acs_system_id: nil, acs_user_id: nil, allowed_acs_entrance_ids: nil, assa_abloy_vostio_metadata: nil, code: nil, credential_manager_acs_system_id: nil, ends_at: nil, is_multi_phone_sync_credential: nil, salto_space_metadata: nil, starts_at: nil, user_identity_id: nil, visionline_metadata: nil)
|
|
18
38
|
res = @client.post("/acs/credentials/create", {access_method: access_method, acs_system_id: acs_system_id, acs_user_id: acs_user_id, allowed_acs_entrance_ids: allowed_acs_entrance_ids, assa_abloy_vostio_metadata: assa_abloy_vostio_metadata, code: code, credential_manager_acs_system_id: credential_manager_acs_system_id, ends_at: ends_at, is_multi_phone_sync_credential: is_multi_phone_sync_credential, salto_space_metadata: salto_space_metadata, starts_at: starts_at, user_identity_id: user_identity_id, visionline_metadata: visionline_metadata}.compact)
|
|
19
39
|
|
|
20
40
|
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credential"])
|
|
21
41
|
end
|
|
22
42
|
|
|
43
|
+
# Deletes a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
44
|
+
# @param acs_credential_id ID of the credential that you want to delete.
|
|
45
|
+
# @return [nil] OK
|
|
23
46
|
def delete(acs_credential_id:)
|
|
24
47
|
@client.post("/acs/credentials/delete", {acs_credential_id: acs_credential_id}.compact)
|
|
25
48
|
|
|
26
49
|
nil
|
|
27
50
|
end
|
|
28
51
|
|
|
52
|
+
# Returns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
53
|
+
# @param acs_credential_id ID of the credential that you want to get.
|
|
54
|
+
# @return [Seam::Resources::AcsCredential] OK
|
|
29
55
|
def get(acs_credential_id:)
|
|
30
56
|
res = @client.post("/acs/credentials/get", {acs_credential_id: acs_credential_id}.compact)
|
|
31
57
|
|
|
32
58
|
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credential"])
|
|
33
59
|
end
|
|
34
60
|
|
|
61
|
+
# Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
62
|
+
# @param acs_user_id ID of the access system user for which you want to retrieve all credentials.
|
|
63
|
+
# @param acs_system_id ID of the access system for which you want to retrieve all credentials.
|
|
64
|
+
# @param user_identity_id ID of the user identity for which you want to retrieve all credentials.
|
|
65
|
+
# @param created_before Date and time, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, before which events to return were created.
|
|
66
|
+
# @param is_multi_phone_sync_credential Indicates whether you want to retrieve only multi-phone sync credentials or non-multi-phone sync credentials.
|
|
67
|
+
# @param limit Number of credentials to return.
|
|
68
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
69
|
+
# @param search String for which to search. Filters returned credentials to include all records that satisfy a partial match using `display_name`, `code`, `card_number`, `acs_user_id` or `acs_credential_id`.
|
|
70
|
+
# @return [Seam::Resources::AcsCredential] OK
|
|
35
71
|
def list(acs_user_id: nil, acs_system_id: nil, user_identity_id: nil, created_before: nil, is_multi_phone_sync_credential: nil, limit: nil, page_cursor: nil, search: nil)
|
|
36
72
|
res = @client.post("/acs/credentials/list", {acs_user_id: acs_user_id, acs_system_id: acs_system_id, user_identity_id: user_identity_id, created_before: created_before, is_multi_phone_sync_credential: is_multi_phone_sync_credential, limit: limit, page_cursor: page_cursor, search: search}.compact)
|
|
37
73
|
|
|
38
74
|
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credentials"])
|
|
39
75
|
end
|
|
40
76
|
|
|
77
|
+
# Returns a list of all [entrances](https://docs.seam.co/api/acs/entrances) to which a [credential](https://docs.seam.co/api/acs/credentials) grants access.
|
|
78
|
+
# @param acs_credential_id ID of the credential for which you want to retrieve all entrances to which the credential grants access.
|
|
79
|
+
# @return [Seam::Resources::AcsEntrance] OK
|
|
41
80
|
def list_accessible_entrances(acs_credential_id:)
|
|
42
81
|
res = @client.post("/acs/credentials/list_accessible_entrances", {acs_credential_id: acs_credential_id}.compact)
|
|
43
82
|
|
|
44
83
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
45
84
|
end
|
|
46
85
|
|
|
86
|
+
# Unassigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
87
|
+
# @param acs_credential_id ID of the credential that you want to unassign from an access system user.
|
|
88
|
+
# @param acs_user_id ID of the access system user from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id.
|
|
89
|
+
# @param user_identity_id ID of the user identity from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id.
|
|
90
|
+
# @return [nil] OK
|
|
47
91
|
def unassign(acs_credential_id:, acs_user_id: nil, user_identity_id: nil)
|
|
48
92
|
@client.post("/acs/credentials/unassign", {acs_credential_id: acs_credential_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
49
93
|
|
|
50
94
|
nil
|
|
51
95
|
end
|
|
52
96
|
|
|
97
|
+
# Updates the code and ends at date and time for a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
98
|
+
# @param acs_credential_id ID of the credential that you want to update.
|
|
99
|
+
# @param code Replacement access (PIN) code for the credential that you want to update.
|
|
100
|
+
# @param ends_at Replacement date and time at which the validity of the credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after the `starts_at` value that you set when creating the credential.
|
|
101
|
+
# @return [nil] OK
|
|
53
102
|
def update(acs_credential_id:, code: nil, ends_at: nil)
|
|
54
103
|
@client.post("/acs/credentials/update", {acs_credential_id: acs_credential_id, code: code, ends_at: ends_at}.compact)
|
|
55
104
|
|
|
@@ -14,6 +14,11 @@ module Seam
|
|
|
14
14
|
@simulate ||= Seam::Clients::AcsEncodersSimulate.new(client: @client, defaults: @defaults)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
# Encodes an existing [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id`
|
|
18
|
+
# @param acs_encoder_id ID of the `acs_encoder` to use to encode the `acs_credential`.
|
|
19
|
+
# @param access_method_id ID of the `access_method` to encode onto a card.
|
|
20
|
+
# @param acs_credential_id ID of the `acs_credential` to encode onto a card.
|
|
21
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
17
22
|
def encode_credential(acs_encoder_id:, access_method_id: nil, acs_credential_id: nil, wait_for_action_attempt: nil)
|
|
18
23
|
res = @client.post("/acs/encoders/encode_credential", {acs_encoder_id: acs_encoder_id, access_method_id: access_method_id, acs_credential_id: acs_credential_id}.compact)
|
|
19
24
|
|
|
@@ -22,18 +27,32 @@ module Seam
|
|
|
22
27
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
23
28
|
end
|
|
24
29
|
|
|
30
|
+
# Returns a specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
|
|
31
|
+
# @param acs_encoder_id ID of the encoder that you want to get.
|
|
32
|
+
# @return [Seam::Resources::AcsEncoder] OK
|
|
25
33
|
def get(acs_encoder_id:)
|
|
26
34
|
res = @client.post("/acs/encoders/get", {acs_encoder_id: acs_encoder_id}.compact)
|
|
27
35
|
|
|
28
36
|
Seam::Resources::AcsEncoder.load_from_response(res.body["acs_encoder"])
|
|
29
37
|
end
|
|
30
38
|
|
|
39
|
+
# Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
|
|
40
|
+
# @param acs_system_id ID of the access system for which you want to retrieve all encoders.
|
|
41
|
+
# @param acs_system_ids IDs of the access systems for which you want to retrieve all encoders.
|
|
42
|
+
# @param acs_encoder_ids IDs of the encoders that you want to retrieve.
|
|
43
|
+
# @param limit Number of encoders to return.
|
|
44
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
45
|
+
# @return [Seam::Resources::AcsEncoder] OK
|
|
31
46
|
def list(acs_system_id: nil, acs_system_ids: nil, acs_encoder_ids: nil, limit: nil, page_cursor: nil)
|
|
32
47
|
res = @client.post("/acs/encoders/list", {acs_system_id: acs_system_id, acs_system_ids: acs_system_ids, acs_encoder_ids: acs_encoder_ids, limit: limit, page_cursor: page_cursor}.compact)
|
|
33
48
|
|
|
34
49
|
Seam::Resources::AcsEncoder.load_from_response(res.body["acs_encoders"])
|
|
35
50
|
end
|
|
36
51
|
|
|
52
|
+
# Scans an encoded [acs_credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
|
|
53
|
+
# @param acs_encoder_id ID of the encoder to use for the scan.
|
|
54
|
+
# @param salto_ks_metadata Salto KS-specific metadata for the scan action.
|
|
55
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
37
56
|
def scan_credential(acs_encoder_id:, salto_ks_metadata: nil, wait_for_action_attempt: nil)
|
|
38
57
|
res = @client.post("/acs/encoders/scan_credential", {acs_encoder_id: acs_encoder_id, salto_ks_metadata: salto_ks_metadata}.compact)
|
|
39
58
|
|
|
@@ -42,6 +61,12 @@ module Seam
|
|
|
42
61
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
43
62
|
end
|
|
44
63
|
|
|
64
|
+
# Scans a physical card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`.
|
|
65
|
+
# @param acs_encoder_id ID of the `acs_encoder` to use to scan the credential.
|
|
66
|
+
# @param acs_user_id ID of the `acs_user` to assign the scanned credential to.
|
|
67
|
+
# @param salto_ks_metadata Salto KS-specific metadata for the scan action.
|
|
68
|
+
# @param user_identity_id ID of the `user_identity` to assign the scanned credential to. If the ACS system contains an ACS user linked to this user identity, it is used. Otherwise, one is created.
|
|
69
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
45
70
|
def scan_to_assign_credential(acs_encoder_id:, acs_user_id: nil, salto_ks_metadata: nil, user_identity_id: nil, wait_for_action_attempt: nil)
|
|
46
71
|
res = @client.post("/acs/encoders/scan_to_assign_credential", {acs_encoder_id: acs_encoder_id, acs_user_id: acs_user_id, salto_ks_metadata: salto_ks_metadata, user_identity_id: user_identity_id}.compact)
|
|
47
72
|
|
|
@@ -8,24 +8,43 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
12
|
+
# @param acs_encoder_id ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`.
|
|
13
|
+
# @param error_code Code of the error to simulate.
|
|
14
|
+
# @param acs_credential_id ID of the `acs_credential` that will fail to be encoded onto a card in the next request.
|
|
15
|
+
# @return [nil] OK
|
|
11
16
|
def next_credential_encode_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id: nil)
|
|
12
17
|
@client.post("/acs/encoders/simulate/next_credential_encode_will_fail", {acs_encoder_id: acs_encoder_id, error_code: error_code, acs_credential_id: acs_credential_id}.compact)
|
|
13
18
|
|
|
14
19
|
nil
|
|
15
20
|
end
|
|
16
21
|
|
|
22
|
+
# Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
23
|
+
# @param acs_encoder_id ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`.
|
|
24
|
+
# @param scenario Scenario to simulate.
|
|
25
|
+
# @return [nil] OK
|
|
17
26
|
def next_credential_encode_will_succeed(acs_encoder_id:, scenario: nil)
|
|
18
27
|
@client.post("/acs/encoders/simulate/next_credential_encode_will_succeed", {acs_encoder_id: acs_encoder_id, scenario: scenario}.compact)
|
|
19
28
|
|
|
20
29
|
nil
|
|
21
30
|
end
|
|
22
31
|
|
|
32
|
+
# Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
33
|
+
# @param acs_encoder_id ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request.
|
|
34
|
+
# @param error_code
|
|
35
|
+
# @param acs_credential_id_on_seam
|
|
36
|
+
# @return [nil] OK
|
|
23
37
|
def next_credential_scan_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id_on_seam: nil)
|
|
24
38
|
@client.post("/acs/encoders/simulate/next_credential_scan_will_fail", {acs_encoder_id: acs_encoder_id, error_code: error_code, acs_credential_id_on_seam: acs_credential_id_on_seam}.compact)
|
|
25
39
|
|
|
26
40
|
nil
|
|
27
41
|
end
|
|
28
42
|
|
|
43
|
+
# Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
44
|
+
# @param acs_encoder_id ID of the `acs_encoder` that will be used in the next request to scan the `acs_credential`.
|
|
45
|
+
# @param acs_credential_id_on_seam ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation.
|
|
46
|
+
# @param scenario Scenario to simulate.
|
|
47
|
+
# @return [nil] OK
|
|
29
48
|
def next_credential_scan_will_succeed(acs_encoder_id:, acs_credential_id_on_seam: nil, scenario: nil)
|
|
30
49
|
@client.post("/acs/encoders/simulate/next_credential_scan_will_succeed", {acs_encoder_id: acs_encoder_id, acs_credential_id_on_seam: acs_credential_id_on_seam, scenario: scenario}.compact)
|
|
31
50
|
|
|
@@ -10,30 +10,60 @@ module Seam
|
|
|
10
10
|
@defaults = defaults
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# Returns a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
|
|
14
|
+
# @param acs_entrance_id ID of the entrance that you want to get.
|
|
15
|
+
# @return [Seam::Resources::AcsEntrance] OK
|
|
13
16
|
def get(acs_entrance_id:)
|
|
14
17
|
res = @client.post("/acs/entrances/get", {acs_entrance_id: acs_entrance_id}.compact)
|
|
15
18
|
|
|
16
19
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrance"])
|
|
17
20
|
end
|
|
18
21
|
|
|
22
|
+
# Grants a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
|
|
23
|
+
# @param acs_entrance_id ID of the entrance to which you want to grant an access system user access.
|
|
24
|
+
# @param acs_user_id ID of the access system user to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id.
|
|
25
|
+
# @param user_identity_id ID of the user identity to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created.
|
|
26
|
+
# @return [nil] OK
|
|
19
27
|
def grant_access(acs_entrance_id:, acs_user_id: nil, user_identity_id: nil)
|
|
20
28
|
@client.post("/acs/entrances/grant_access", {acs_entrance_id: acs_entrance_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
21
29
|
|
|
22
30
|
nil
|
|
23
31
|
end
|
|
24
32
|
|
|
33
|
+
# Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
|
|
34
|
+
# @param access_method_id ID of the access method for which you want to retrieve all entrances to which it grants access.
|
|
35
|
+
# @param acs_credential_id ID of the credential for which you want to retrieve all entrances.
|
|
36
|
+
# @param acs_entrance_ids IDs of the entrances for which you want to retrieve all entrances.
|
|
37
|
+
# @param acs_system_id ID of the access system for which you want to retrieve all entrances.
|
|
38
|
+
# @param connected_account_id ID of the connected account for which you want to retrieve all entrances.
|
|
39
|
+
# @param customer_key Customer key for which you want to list entrances.
|
|
40
|
+
# @param limit Maximum number of records to return per page.
|
|
41
|
+
# @param location_id
|
|
42
|
+
# @deprecated location_id: Use `space_id`.
|
|
43
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
44
|
+
# @param search String for which to search. Filters returned entrances to include all records that satisfy a partial match using `display_name`.
|
|
45
|
+
# @param space_id ID of the space for which you want to list entrances.
|
|
46
|
+
# @return [Seam::Resources::AcsEntrance] OK
|
|
25
47
|
def list(access_method_id: nil, acs_credential_id: nil, acs_entrance_ids: nil, acs_system_id: nil, connected_account_id: nil, customer_key: nil, limit: nil, location_id: nil, page_cursor: nil, search: nil, space_id: nil)
|
|
26
48
|
res = @client.post("/acs/entrances/list", {access_method_id: access_method_id, acs_credential_id: acs_credential_id, acs_entrance_ids: acs_entrance_ids, acs_system_id: acs_system_id, connected_account_id: connected_account_id, customer_key: customer_key, limit: limit, location_id: location_id, page_cursor: page_cursor, search: search, space_id: space_id}.compact)
|
|
27
49
|
|
|
28
50
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
29
51
|
end
|
|
30
52
|
|
|
53
|
+
# Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
|
|
54
|
+
# @param acs_entrance_id ID of the entrance for which you want to list all credentials that grant access.
|
|
55
|
+
# @param include_if Conditions that credentials must meet to be included in the returned list.
|
|
56
|
+
# @return [Seam::Resources::AcsCredential] OK
|
|
31
57
|
def list_credentials_with_access(acs_entrance_id:, include_if: nil)
|
|
32
58
|
res = @client.post("/acs/entrances/list_credentials_with_access", {acs_entrance_id: acs_entrance_id, include_if: include_if}.compact)
|
|
33
59
|
|
|
34
60
|
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credentials"])
|
|
35
61
|
end
|
|
36
62
|
|
|
63
|
+
# Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation.
|
|
64
|
+
# @param acs_credential_id ID of the cloud_key credential to use for the unlock operation.
|
|
65
|
+
# @param acs_entrance_id ID of the entrance to unlock.
|
|
66
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
37
67
|
def unlock(acs_credential_id:, acs_entrance_id:, wait_for_action_attempt: nil)
|
|
38
68
|
res = @client.post("/acs/entrances/unlock", {acs_credential_id: acs_credential_id, acs_entrance_id: acs_entrance_id}.compact)
|
|
39
69
|
|
|
@@ -8,24 +8,44 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Returns a specified [access system](https://docs.seam.co/low-level-apis/access-systems).
|
|
12
|
+
# @param acs_system_id ID of the access system that you want to get.
|
|
13
|
+
# @return [Seam::Resources::AcsSystem] OK
|
|
11
14
|
def get(acs_system_id:)
|
|
12
15
|
res = @client.post("/acs/systems/get", {acs_system_id: acs_system_id}.compact)
|
|
13
16
|
|
|
14
17
|
Seam::Resources::AcsSystem.load_from_response(res.body["acs_system"])
|
|
15
18
|
end
|
|
16
19
|
|
|
20
|
+
# Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems).
|
|
21
|
+
#
|
|
22
|
+
# 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.
|
|
23
|
+
# @param connected_account_id ID of the connected account by which you want to filter the list of access systems.
|
|
24
|
+
# @param customer_key Customer key for which you want to list access systems.
|
|
25
|
+
# @param search String for which to search. Filters returned access systems to include all records that satisfy a partial match using `name` or `acs_system_id`.
|
|
26
|
+
# @return [Seam::Resources::AcsSystem] OK
|
|
17
27
|
def list(connected_account_id: nil, customer_key: nil, search: nil)
|
|
18
28
|
res = @client.post("/acs/systems/list", {connected_account_id: connected_account_id, customer_key: customer_key, search: search}.compact)
|
|
19
29
|
|
|
20
30
|
Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
|
|
21
31
|
end
|
|
22
32
|
|
|
33
|
+
# Returns a list of all credential manager systems that are compatible with a specified [access system](https://docs.seam.co/low-level-apis/access-systems).
|
|
34
|
+
#
|
|
35
|
+
# 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.
|
|
36
|
+
# @param acs_system_id ID of the access system for which you want to retrieve all compatible credential manager systems.
|
|
37
|
+
# @return [Seam::Resources::AcsSystem] OK
|
|
23
38
|
def list_compatible_credential_manager_acs_systems(acs_system_id:)
|
|
24
39
|
res = @client.post("/acs/systems/list_compatible_credential_manager_acs_systems", {acs_system_id: acs_system_id}.compact)
|
|
25
40
|
|
|
26
41
|
Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
|
|
27
42
|
end
|
|
28
43
|
|
|
44
|
+
# Reports ACS system device status including encoders and entrances.
|
|
45
|
+
# @param acs_system_id ID of the ACS system to report resources for
|
|
46
|
+
# @param acs_encoders Array of ACS encoders to report
|
|
47
|
+
# @param acs_entrances Array of ACS entrances to report
|
|
48
|
+
# @return [nil] OK
|
|
29
49
|
def report_devices(acs_system_id:, acs_encoders: nil, acs_entrances: nil)
|
|
30
50
|
@client.post("/acs/systems/report_devices", {acs_system_id: acs_system_id, acs_encoders: acs_encoders, acs_entrances: acs_entrances}.compact)
|
|
31
51
|
|
|
@@ -8,66 +8,138 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
12
|
+
# @param acs_access_group_id ID of the access group to which you want to add an access system user.
|
|
13
|
+
# @param acs_user_id ID of the access system user that you want to add to an access group.
|
|
14
|
+
# @return [nil] OK
|
|
11
15
|
def add_to_access_group(acs_access_group_id:, acs_user_id:)
|
|
12
16
|
@client.post("/acs/users/add_to_access_group", {acs_access_group_id: acs_access_group_id, acs_user_id: acs_user_id}.compact)
|
|
13
17
|
|
|
14
18
|
nil
|
|
15
19
|
end
|
|
16
20
|
|
|
21
|
+
# Creates a new [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
22
|
+
# @param acs_system_id ID of the access system to which you want to add the new access system user.
|
|
23
|
+
# @param full_name Full name of the new access system user.
|
|
24
|
+
# @param access_schedule `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`.
|
|
25
|
+
# @param acs_access_group_ids Array of access group IDs to indicate the access groups to which you want to add the new access system user.
|
|
26
|
+
# @param email
|
|
27
|
+
# @deprecated email: use email_address.
|
|
28
|
+
# @param email_address Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
29
|
+
# @param phone_number Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`).
|
|
30
|
+
# @param user_identity_id ID of the user identity with which you want to associate the new access system user.
|
|
31
|
+
# @return [Seam::Resources::AcsUser] OK
|
|
17
32
|
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)
|
|
18
33
|
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)
|
|
19
34
|
|
|
20
35
|
Seam::Resources::AcsUser.load_from_response(res.body["acs_user"])
|
|
21
36
|
end
|
|
22
37
|
|
|
38
|
+
# Deletes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
39
|
+
# @param acs_system_id ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id.
|
|
40
|
+
# @param acs_user_id ID of the access system user that you want to delete. You must provide either acs_user_id or user_identity_id
|
|
41
|
+
# @param user_identity_id ID of the user identity that you want to delete. You must provide either acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id.
|
|
42
|
+
# @return [nil] OK
|
|
23
43
|
def delete(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
24
44
|
@client.post("/acs/users/delete", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
25
45
|
|
|
26
46
|
nil
|
|
27
47
|
end
|
|
28
48
|
|
|
49
|
+
# Returns a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
50
|
+
# @param acs_user_id ID of the access system user that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
51
|
+
# @param acs_system_id ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
52
|
+
# @param user_identity_id ID of the user identity that you want to get. You can only provide acs_user_id or user_identity_id.
|
|
53
|
+
# @return [Seam::Resources::AcsUser] OK
|
|
29
54
|
def get(acs_user_id: nil, acs_system_id: nil, user_identity_id: nil)
|
|
30
55
|
res = @client.post("/acs/users/get", {acs_user_id: acs_user_id, acs_system_id: acs_system_id, user_identity_id: user_identity_id}.compact)
|
|
31
56
|
|
|
32
57
|
Seam::Resources::AcsUser.load_from_response(res.body["acs_user"])
|
|
33
58
|
end
|
|
34
59
|
|
|
60
|
+
# Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
61
|
+
# @param acs_system_id ID of the `acs_system` for which you want to retrieve all access system users.
|
|
62
|
+
# @param created_before Timestamp by which to limit returned access system users. Returns users created before this timestamp.
|
|
63
|
+
# @param limit Maximum number of records to return per page.
|
|
64
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
65
|
+
# @param search String for which to search. Filters returned access system users to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `acs_user_id`, `user_identity_id`, `user_identity_full_name` or `user_identity_phone_number`.
|
|
66
|
+
# @param user_identity_email_address Email address of the user identity for which you want to retrieve all access system users.
|
|
67
|
+
# @param user_identity_id ID of the user identity for which you want to retrieve all access system users.
|
|
68
|
+
# @param user_identity_phone_number Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`).
|
|
69
|
+
# @return [Seam::Resources::AcsUser] OK
|
|
35
70
|
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)
|
|
36
71
|
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)
|
|
37
72
|
|
|
38
73
|
Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
|
|
39
74
|
end
|
|
40
75
|
|
|
76
|
+
# Lists the [entrances](https://docs.seam.co/api/acs/entrances) to which a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) has access.
|
|
77
|
+
# @param acs_system_id ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id.
|
|
78
|
+
# @param acs_user_id ID of the access system user for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id.
|
|
79
|
+
# @param user_identity_id ID of the user identity for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id.
|
|
80
|
+
# @return [Seam::Resources::AcsEntrance] OK
|
|
41
81
|
def list_accessible_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
42
82
|
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)
|
|
43
83
|
|
|
44
84
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
45
85
|
end
|
|
46
86
|
|
|
87
|
+
# Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups).
|
|
88
|
+
# @param acs_access_group_id ID of the access group from which you want to remove an access system user.
|
|
89
|
+
# @param acs_user_id ID of the access system user that you want to remove from an access group. You can only provide acs_user_id or user_identity_id.
|
|
90
|
+
# @param user_identity_id ID of the user identity that you want to remove from an access group. You can only provide acs_user_id or user_identity_id.
|
|
91
|
+
# @return [nil] OK
|
|
47
92
|
def remove_from_access_group(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
48
93
|
@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)
|
|
49
94
|
|
|
50
95
|
nil
|
|
51
96
|
end
|
|
52
97
|
|
|
98
|
+
# Revokes access to all [entrances](https://docs.seam.co/api/acs/entrances) for a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
99
|
+
# @param acs_system_id ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id.
|
|
100
|
+
# @param acs_user_id ID of the access system user for whom you want to revoke access. You can only provide acs_user_id or user_identity_id.
|
|
101
|
+
# @param user_identity_id ID of the user identity for whom you want to revoke access. You can only provide acs_user_id or user_identity_id.
|
|
102
|
+
# @return [nil] OK
|
|
53
103
|
def revoke_access_to_all_entrances(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
54
104
|
@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)
|
|
55
105
|
|
|
56
106
|
nil
|
|
57
107
|
end
|
|
58
108
|
|
|
109
|
+
# [Suspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://docs.seam.co/api/acs/users/unsuspend) them.
|
|
110
|
+
# @param acs_system_id ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
111
|
+
# @param acs_user_id ID of the access system user that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
112
|
+
# @param user_identity_id ID of the user identity that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
113
|
+
# @return [nil] OK
|
|
59
114
|
def suspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
60
115
|
@client.post("/acs/users/suspend", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
61
116
|
|
|
62
117
|
nil
|
|
63
118
|
end
|
|
64
119
|
|
|
120
|
+
# [Unsuspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). While [suspending an access system user](https://docs.seam.co/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access.
|
|
121
|
+
# @param acs_system_id ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id.
|
|
122
|
+
# @param acs_user_id ID of the access system user that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
123
|
+
# @param user_identity_id ID of the user identity that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id.
|
|
124
|
+
# @return [nil] OK
|
|
65
125
|
def unsuspend(acs_system_id: nil, acs_user_id: nil, user_identity_id: nil)
|
|
66
126
|
@client.post("/acs/users/unsuspend", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
67
127
|
|
|
68
128
|
nil
|
|
69
129
|
end
|
|
70
130
|
|
|
131
|
+
# Updates the properties of a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
132
|
+
# @param access_schedule `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`.
|
|
133
|
+
# @param acs_system_id ID of the access system that you want to update. You can only provide acs_system_id with user_identity_id.
|
|
134
|
+
# @param acs_user_id ID of the access system user that you want to update. You can only provide acs_user_id or user_identity_id.
|
|
135
|
+
# @param email
|
|
136
|
+
# @deprecated email: use email_address.
|
|
137
|
+
# @param email_address Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
138
|
+
# @param full_name Full name of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management).
|
|
139
|
+
# @param hid_acs_system_id ID of the HID access control system associated with the user.
|
|
140
|
+
# @param phone_number Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`).
|
|
141
|
+
# @param user_identity_id ID of the user identity that you want to update. You can only provide acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id.
|
|
142
|
+
# @return [nil] OK
|
|
71
143
|
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)
|
|
72
144
|
@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)
|
|
73
145
|
|
|
@@ -10,6 +10,9 @@ module Seam
|
|
|
10
10
|
@defaults = defaults
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# Returns a specified [action attempt](https://docs.seam.co/core-concepts/action-attempts).
|
|
14
|
+
# @param action_attempt_id ID of the action attempt that you want to get.
|
|
15
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
13
16
|
def get(action_attempt_id:, wait_for_action_attempt: nil)
|
|
14
17
|
res = @client.post("/action_attempts/get", {action_attempt_id: action_attempt_id}.compact)
|
|
15
18
|
|
|
@@ -18,6 +21,12 @@ module Seam
|
|
|
18
21
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
19
22
|
end
|
|
20
23
|
|
|
24
|
+
# Returns a list of the [action attempts](https://docs.seam.co/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s.
|
|
25
|
+
# @param action_attempt_ids IDs of the action attempts that you want to retrieve.
|
|
26
|
+
# @param device_id ID of the device to filter action attempts by.
|
|
27
|
+
# @param limit Maximum number of records to return per page.
|
|
28
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
29
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
21
30
|
def list(action_attempt_ids: nil, device_id: nil, limit: nil, page_cursor: nil)
|
|
22
31
|
res = @client.post("/action_attempts/list", {action_attempt_ids: action_attempt_ids, device_id: device_id, limit: limit, page_cursor: page_cursor}.compact)
|
|
23
32
|
|