seam 2.139.0 → 2.141.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 +69 -66
- data/README.md +86 -0
- data/lib/seam/http_without_workspace.rb +4 -4
- data/lib/seam/null.rb +23 -0
- data/lib/seam/paginator.rb +4 -1
- data/lib/seam/request.rb +49 -1
- data/lib/seam/resources/access_code.rb +74 -0
- data/lib/seam/resources/access_grant.rb +60 -0
- data/lib/seam/resources/access_method.rb +39 -0
- data/lib/seam/resources/acs_access_group.rb +45 -0
- data/lib/seam/resources/acs_credential.rb +67 -0
- data/lib/seam/resources/acs_encoder.rb +11 -0
- data/lib/seam/resources/acs_entrance.rb +95 -0
- data/lib/seam/resources/acs_system.rb +36 -0
- data/lib/seam/resources/acs_user.rb +66 -0
- data/lib/seam/resources/action_attempt.rb +192 -0
- data/lib/seam/resources/batch.rb +24 -0
- data/lib/seam/resources/client_session.rb +12 -0
- data/lib/seam/resources/connect_webview.rb +19 -0
- data/lib/seam/resources/connected_account.rb +50 -0
- data/lib/seam/resources/customer_portal.rb +5 -0
- data/lib/seam/resources/device.rb +622 -4
- data/lib/seam/resources/device_provider.rb +24 -0
- data/lib/seam/resources/event.rb +142 -3
- data/lib/seam/resources/instant_key.rb +13 -0
- data/lib/seam/resources/noise_threshold.rb +7 -0
- data/lib/seam/resources/pagination.rb +3 -0
- data/lib/seam/resources/phone.rb +29 -0
- data/lib/seam/resources/space.rb +19 -0
- data/lib/seam/resources/thermostat_daily_program.rb +9 -0
- data/lib/seam/resources/thermostat_schedule.rb +15 -0
- data/lib/seam/resources/unmanaged_access_code.rb +51 -0
- data/lib/seam/resources/unmanaged_access_grant.rb +56 -0
- data/lib/seam/resources/unmanaged_access_method.rb +36 -0
- data/lib/seam/resources/unmanaged_device.rb +80 -0
- data/lib/seam/resources/unmanaged_user_identity.rb +20 -0
- data/lib/seam/resources/user_identity.rb +21 -0
- data/lib/seam/resources/webhook.rb +4 -0
- data/lib/seam/resources/workspace.rb +15 -0
- data/lib/seam/routes/access_codes.rb +79 -79
- data/lib/seam/routes/access_codes_simulate.rb +3 -3
- data/lib/seam/routes/access_codes_unmanaged.rb +27 -23
- data/lib/seam/routes/access_grants.rb +57 -45
- data/lib/seam/routes/access_grants_unmanaged.rb +13 -13
- data/lib/seam/routes/access_methods.rb +32 -24
- data/lib/seam/routes/access_methods_unmanaged.rb +7 -7
- data/lib/seam/routes/acs_access_groups.rb +21 -21
- data/lib/seam/routes/acs_credentials.rb +40 -40
- data/lib/seam/routes/acs_encoders.rb +16 -16
- data/lib/seam/routes/acs_encoders_simulate.rb +11 -11
- data/lib/seam/routes/acs_entrances.rb +20 -20
- data/lib/seam/routes/acs_systems.rb +11 -11
- data/lib/seam/routes/acs_users.rb +83 -55
- data/lib/seam/routes/action_attempts.rb +6 -6
- data/lib/seam/routes/client_sessions.rb +38 -34
- data/lib/seam/routes/connect_webviews.rb +20 -20
- data/lib/seam/routes/connected_accounts.rb +24 -20
- data/lib/seam/routes/connected_accounts_simulate.rb +1 -1
- data/lib/seam/routes/customers.rb +50 -50
- data/lib/seam/routes/devices.rb +33 -29
- data/lib/seam/routes/devices_simulate.rb +7 -7
- data/lib/seam/routes/devices_unmanaged.rb +25 -26
- data/lib/seam/routes/events.rb +40 -32
- data/lib/seam/routes/instant_keys.rb +11 -7
- data/lib/seam/routes/locks.rb +20 -27
- data/lib/seam/routes/locks_simulate.rb +3 -3
- data/lib/seam/routes/noise_sensors.rb +8 -19
- data/lib/seam/routes/noise_sensors_noise_thresholds.rb +21 -21
- data/lib/seam/routes/noise_sensors_simulate.rb +1 -1
- data/lib/seam/routes/phones.rb +7 -7
- data/lib/seam/routes/phones_simulate.rb +4 -4
- data/lib/seam/routes/spaces.rb +53 -45
- data/lib/seam/routes/thermostats.rb +75 -86
- data/lib/seam/routes/thermostats_daily_programs.rb +9 -9
- data/lib/seam/routes/thermostats_schedules.rb +22 -22
- data/lib/seam/routes/thermostats_simulate.rb +9 -9
- data/lib/seam/routes/user_identities.rb +50 -46
- data/lib/seam/routes/user_identities_unmanaged.rb +11 -11
- data/lib/seam/routes/webhooks.rb +10 -10
- data/lib/seam/routes/workspaces.rb +19 -19
- data/lib/seam/strict_url_search_params_serializer.rb +17 -0
- data/lib/seam/url_search_params.rb +102 -0
- data/lib/seam/url_search_params_serializer.rb +217 -0
- data/lib/seam/version.rb +1 -1
- data/lib/seam.rb +3 -0
- metadata +12 -11
|
@@ -9,24 +9,24 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Get an unmanaged Access Grant (where is_managed = false).
|
|
12
|
-
# @param access_grant_id ID of unmanaged Access Grant to get.
|
|
12
|
+
# @param access_grant_id [String] ID of unmanaged Access Grant to get.
|
|
13
13
|
# @return [Seam::Resources::UnmanagedAccessGrant] OK
|
|
14
14
|
def get(access_grant_id:)
|
|
15
|
-
res = @client.
|
|
15
|
+
res = @client.get("/access_grants/unmanaged/get", {access_grant_id: access_grant_id}.compact)
|
|
16
16
|
|
|
17
17
|
Seam::Resources::UnmanagedAccessGrant.load_from_response(res.body["access_grant"])
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
# Gets unmanaged Access Grants (where is_managed = false).
|
|
21
|
-
# @param acs_entrance_id ID of the entrance by which you want to filter the list of unmanaged Access Grants.
|
|
22
|
-
# @param acs_system_id ID of the access system by which you want to filter the list of unmanaged Access Grants.
|
|
23
|
-
# @param limit Numerical limit on the number of unmanaged access grants to return.
|
|
24
|
-
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
25
|
-
# @param reservation_key Filter unmanaged Access Grants by reservation_key.
|
|
26
|
-
# @param user_identity_id ID of user identity by which you want to filter the list of unmanaged Access Grants.
|
|
21
|
+
# @param acs_entrance_id [String, nil] ID of the entrance by which you want to filter the list of unmanaged Access Grants.
|
|
22
|
+
# @param acs_system_id [String, nil] ID of the access system by which you want to filter the list of unmanaged Access Grants.
|
|
23
|
+
# @param limit [Float, nil] Numerical limit on the number of unmanaged access grants to return.
|
|
24
|
+
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
25
|
+
# @param reservation_key [String, nil] Filter unmanaged Access Grants by reservation_key.
|
|
26
|
+
# @param user_identity_id [String, nil] ID of user identity by which you want to filter the list of unmanaged Access Grants.
|
|
27
27
|
# @return [Seam::Resources::UnmanagedAccessGrant] OK
|
|
28
28
|
def list(acs_entrance_id: nil, acs_system_id: nil, limit: nil, page_cursor: nil, reservation_key: nil, user_identity_id: nil)
|
|
29
|
-
res = @client.
|
|
29
|
+
res = @client.get("/access_grants/unmanaged/list", {acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, limit: limit, page_cursor: page_cursor, reservation_key: reservation_key, user_identity_id: user_identity_id}.compact)
|
|
30
30
|
|
|
31
31
|
Seam::Resources::UnmanagedAccessGrant.load_from_response(res.body["access_grants"])
|
|
32
32
|
end
|
|
@@ -36,12 +36,12 @@ module Seam
|
|
|
36
36
|
# This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged.
|
|
37
37
|
#
|
|
38
38
|
# When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed.
|
|
39
|
-
# @param access_grant_id ID of the unmanaged Access Grant to update.
|
|
40
|
-
# @param is_managed Must be set to true to convert the unmanaged access grant to managed.
|
|
41
|
-
# @param access_grant_key Unique key for the access grant. If not provided, the existing key will be preserved.
|
|
39
|
+
# @param access_grant_id [String] ID of the unmanaged Access Grant to update.
|
|
40
|
+
# @param is_managed [Boolean] Must be set to true to convert the unmanaged access grant to managed.
|
|
41
|
+
# @param access_grant_key [String, nil] Unique key for the access grant. If not provided, the existing key will be preserved.
|
|
42
42
|
# @return [nil] OK
|
|
43
43
|
def update(access_grant_id:, is_managed:, access_grant_key: nil)
|
|
44
|
-
@client.
|
|
44
|
+
@client.patch("/access_grants/unmanaged/update", {access_grant_id: access_grant_id, is_managed: is_managed, access_grant_key: access_grant_key}.compact)
|
|
45
45
|
|
|
46
46
|
nil
|
|
47
47
|
end
|
|
@@ -15,8 +15,8 @@ module Seam
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
# Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method.
|
|
18
|
-
# @param access_method_id ID of the `access_method` to assign the credential to.
|
|
19
|
-
# @param card_number Card number of the credential to assign.
|
|
18
|
+
# @param access_method_id [String] ID of the `access_method` to assign the credential to.
|
|
19
|
+
# @param card_number [String] Card number of the credential to assign.
|
|
20
20
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
21
21
|
def assign_card(access_method_id:, card_number:, wait_for_action_attempt: nil)
|
|
22
22
|
res = @client.post("/access_methods/assign_card", {access_method_id: access_method_id, card_number: card_number}.compact)
|
|
@@ -27,19 +27,23 @@ module Seam
|
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
# Deletes an access method.
|
|
30
|
-
# @param access_method_id ID of access method to delete.
|
|
31
|
-
# @param access_grant_id ID of access grant whose access methods should be deleted.
|
|
32
|
-
# @param reservation_key Reservation key of the access grant whose access methods should be deleted.
|
|
30
|
+
# @param access_method_id [String, nil] ID of access method to delete.
|
|
31
|
+
# @param access_grant_id [String, nil] ID of access grant whose access methods should be deleted.
|
|
32
|
+
# @param reservation_key [String, nil] Reservation key of the access grant whose access methods should be deleted.
|
|
33
33
|
# @return [nil] OK
|
|
34
34
|
def delete(access_method_id: nil, access_grant_id: nil, reservation_key: nil)
|
|
35
|
-
|
|
35
|
+
if access_method_id.nil? && access_grant_id.nil? && reservation_key.nil?
|
|
36
|
+
raise TypeError, "At least one parameter is required for /access_methods/delete"
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
@client.delete("/access_methods/delete", {access_method_id: access_method_id, access_grant_id: access_grant_id, reservation_key: reservation_key}.compact)
|
|
36
40
|
|
|
37
41
|
nil
|
|
38
42
|
end
|
|
39
43
|
|
|
40
44
|
# Encodes an existing access method onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
|
|
41
|
-
# @param access_method_id ID of the `access_method` to encode onto a card.
|
|
42
|
-
# @param acs_encoder_id ID of the `acs_encoder` to use to encode the `access_method`.
|
|
45
|
+
# @param access_method_id [String] ID of the `access_method` to encode onto a card.
|
|
46
|
+
# @param acs_encoder_id [String] ID of the `acs_encoder` to use to encode the `access_method`.
|
|
43
47
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
44
48
|
def encode(access_method_id:, acs_encoder_id:, wait_for_action_attempt: nil)
|
|
45
49
|
res = @client.post("/access_methods/encode", {access_method_id: access_method_id, acs_encoder_id: acs_encoder_id}.compact)
|
|
@@ -50,18 +54,18 @@ module Seam
|
|
|
50
54
|
end
|
|
51
55
|
|
|
52
56
|
# Gets an access method.
|
|
53
|
-
# @param access_method_id ID of access method to get.
|
|
57
|
+
# @param access_method_id [String] ID of access method to get.
|
|
54
58
|
# @return [Seam::Resources::AccessMethod] OK
|
|
55
59
|
def get(access_method_id:)
|
|
56
|
-
res = @client.
|
|
60
|
+
res = @client.get("/access_methods/get", {access_method_id: access_method_id}.compact)
|
|
57
61
|
|
|
58
62
|
Seam::Resources::AccessMethod.load_from_response(res.body["access_method"])
|
|
59
63
|
end
|
|
60
64
|
|
|
61
65
|
# Gets all related resources for one or more Access Methods.
|
|
62
|
-
# @param access_method_ids IDs of the access methods that you want to get along with their related resources.
|
|
63
|
-
# @param exclude
|
|
64
|
-
# @param include
|
|
66
|
+
# @param access_method_ids [Array<String>] IDs of the access methods that you want to get along with their related resources.
|
|
67
|
+
# @param exclude [Array<String>, nil]
|
|
68
|
+
# @param include [Array<String>, nil]
|
|
65
69
|
# @return [Seam::Resources::Batch] OK
|
|
66
70
|
def get_related(access_method_ids:, exclude: nil, include: nil)
|
|
67
71
|
res = @client.post("/access_methods/get_related", {access_method_ids: access_method_ids, exclude: exclude, include: include}.compact)
|
|
@@ -70,24 +74,28 @@ module Seam
|
|
|
70
74
|
end
|
|
71
75
|
|
|
72
76
|
# Lists all access methods, usually filtered by Access Grant.
|
|
73
|
-
# @param access_code_id ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`.
|
|
74
|
-
# @param access_grant_id ID of Access Grant to list access methods for.
|
|
75
|
-
# @param access_grant_key Key of Access Grant to list access methods for.
|
|
76
|
-
# @param acs_entrance_id ID of the entrance for which you want to retrieve all access methods that grant access to it.
|
|
77
|
-
# @param device_id ID of the device by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`.
|
|
78
|
-
# @param limit Maximum number of records to return per page.
|
|
79
|
-
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
80
|
-
# @param space_id ID of the space by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`.
|
|
77
|
+
# @param access_code_id [String, nil] ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`.
|
|
78
|
+
# @param access_grant_id [String, nil] ID of Access Grant to list access methods for.
|
|
79
|
+
# @param access_grant_key [String, nil] Key of Access Grant to list access methods for.
|
|
80
|
+
# @param acs_entrance_id [String, nil] ID of the entrance for which you want to retrieve all access methods that grant access to it.
|
|
81
|
+
# @param device_id [String, nil] ID of the device by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`.
|
|
82
|
+
# @param limit [Integer, nil] Maximum number of records to return per page.
|
|
83
|
+
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
84
|
+
# @param space_id [String, nil] ID of the space by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`.
|
|
81
85
|
# @return [Seam::Resources::AccessMethod] OK
|
|
82
86
|
def list(access_code_id: nil, access_grant_id: nil, access_grant_key: nil, acs_entrance_id: nil, device_id: nil, limit: nil, page_cursor: nil, space_id: nil)
|
|
83
|
-
|
|
87
|
+
if access_code_id.nil? && access_grant_id.nil? && access_grant_key.nil? && acs_entrance_id.nil? && device_id.nil? && limit.nil? && page_cursor.nil? && space_id.nil?
|
|
88
|
+
raise TypeError, "At least one parameter is required for /access_methods/list"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
res = @client.get("/access_methods/list", {access_code_id: access_code_id, access_grant_id: access_grant_id, access_grant_key: access_grant_key, acs_entrance_id: acs_entrance_id, device_id: device_id, limit: limit, page_cursor: page_cursor, space_id: space_id}.compact)
|
|
84
92
|
|
|
85
93
|
Seam::Resources::AccessMethod.load_from_response(res.body["access_methods"])
|
|
86
94
|
end
|
|
87
95
|
|
|
88
96
|
# Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation.
|
|
89
|
-
# @param access_method_id ID of the cloud_key `access_method` to use for the unlock operation.
|
|
90
|
-
# @param acs_entrance_id ID of the entrance to unlock.
|
|
97
|
+
# @param access_method_id [String] ID of the cloud_key `access_method` to use for the unlock operation.
|
|
98
|
+
# @param acs_entrance_id [String] ID of the entrance to unlock.
|
|
91
99
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
92
100
|
def unlock_door(access_method_id:, acs_entrance_id:, wait_for_action_attempt: nil)
|
|
93
101
|
res = @client.post("/access_methods/unlock_door", {access_method_id: access_method_id, acs_entrance_id: acs_entrance_id}.compact)
|
|
@@ -9,22 +9,22 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Gets an unmanaged access method (where is_managed = false).
|
|
12
|
-
# @param access_method_id ID of unmanaged access method to get.
|
|
12
|
+
# @param access_method_id [String] ID of unmanaged access method to get.
|
|
13
13
|
# @return [Seam::Resources::UnmanagedAccessMethod] OK
|
|
14
14
|
def get(access_method_id:)
|
|
15
|
-
res = @client.
|
|
15
|
+
res = @client.get("/access_methods/unmanaged/get", {access_method_id: access_method_id}.compact)
|
|
16
16
|
|
|
17
17
|
Seam::Resources::UnmanagedAccessMethod.load_from_response(res.body["access_method"])
|
|
18
18
|
end
|
|
19
19
|
|
|
20
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.
|
|
21
|
+
# @param access_grant_id [String] ID of Access Grant to list unmanaged access methods for.
|
|
22
|
+
# @param acs_entrance_id [String, nil] ID of the entrance for which you want to retrieve all unmanaged access methods.
|
|
23
|
+
# @param device_id [String, nil] ID of the device for which you want to retrieve all unmanaged access methods.
|
|
24
|
+
# @param space_id [String, nil] ID of the space for which you want to retrieve all unmanaged access methods.
|
|
25
25
|
# @return [Seam::Resources::UnmanagedAccessMethod] OK
|
|
26
26
|
def list(access_grant_id:, acs_entrance_id: nil, device_id: nil, space_id: nil)
|
|
27
|
-
res = @client.
|
|
27
|
+
res = @client.get("/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)
|
|
28
28
|
|
|
29
29
|
Seam::Resources::UnmanagedAccessMethod.load_from_response(res.body["access_methods"])
|
|
30
30
|
end
|
|
@@ -9,71 +9,71 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
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.
|
|
12
|
+
# @param acs_access_group_id [String] ID of the access group to which you want to add an access system user.
|
|
13
|
+
# @param acs_user_id [String, nil] 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 [String, nil] 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
15
|
# @return [nil] OK
|
|
16
16
|
def add_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
17
|
-
@client.
|
|
17
|
+
@client.put("/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)
|
|
18
18
|
|
|
19
19
|
nil
|
|
20
20
|
end
|
|
21
21
|
|
|
22
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.
|
|
23
|
+
# @param acs_access_group_id [String] ID of the access group that you want to delete.
|
|
24
24
|
# @return [nil] OK
|
|
25
25
|
def delete(acs_access_group_id:)
|
|
26
|
-
@client.
|
|
26
|
+
@client.delete("/acs/access_groups/delete", {acs_access_group_id: acs_access_group_id}.compact)
|
|
27
27
|
|
|
28
28
|
nil
|
|
29
29
|
end
|
|
30
30
|
|
|
31
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.
|
|
32
|
+
# @param acs_access_group_id [String] ID of the access group that you want to get.
|
|
33
33
|
# @return [Seam::Resources::AcsAccessGroup] OK
|
|
34
34
|
def get(acs_access_group_id:)
|
|
35
|
-
res = @client.
|
|
35
|
+
res = @client.get("/acs/access_groups/get", {acs_access_group_id: acs_access_group_id}.compact)
|
|
36
36
|
|
|
37
37
|
Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_group"])
|
|
38
38
|
end
|
|
39
39
|
|
|
40
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.
|
|
41
|
+
# @param acs_system_id [String, nil] ID of the access system for which you want to retrieve all access groups.
|
|
42
|
+
# @param acs_user_id [String, nil] ID of the access system user for which you want to retrieve all access groups.
|
|
43
|
+
# @param search [String, nil] 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 [String, nil] ID of the user identity for which you want to retrieve all access groups.
|
|
45
45
|
# @return [Seam::Resources::AcsAccessGroup] OK
|
|
46
46
|
def list(acs_system_id: nil, acs_user_id: nil, search: nil, user_identity_id: nil)
|
|
47
|
-
res = @client.
|
|
47
|
+
res = @client.get("/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)
|
|
48
48
|
|
|
49
49
|
Seam::Resources::AcsAccessGroup.load_from_response(res.body["acs_access_groups"])
|
|
50
50
|
end
|
|
51
51
|
|
|
52
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.
|
|
53
|
+
# @param acs_access_group_id [String] ID of the access group for which you want to retrieve all accessible entrances.
|
|
54
54
|
# @return [Seam::Resources::AcsEntrance] OK
|
|
55
55
|
def list_accessible_entrances(acs_access_group_id:)
|
|
56
|
-
res = @client.
|
|
56
|
+
res = @client.get("/acs/access_groups/list_accessible_entrances", {acs_access_group_id: acs_access_group_id}.compact)
|
|
57
57
|
|
|
58
58
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
59
59
|
end
|
|
60
60
|
|
|
61
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.
|
|
62
|
+
# @param acs_access_group_id [String] ID of the access group for which you want to retrieve all access system users.
|
|
63
63
|
# @return [Seam::Resources::AcsUser] OK
|
|
64
64
|
def list_users(acs_access_group_id:)
|
|
65
|
-
res = @client.
|
|
65
|
+
res = @client.get("/acs/access_groups/list_users", {acs_access_group_id: acs_access_group_id}.compact)
|
|
66
66
|
|
|
67
67
|
Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
|
|
68
68
|
end
|
|
69
69
|
|
|
70
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.
|
|
71
|
+
# @param acs_access_group_id [String] ID of the access group from which you want to remove an access system user.
|
|
72
|
+
# @param acs_user_id [String, nil] ID of the access system user that you want to remove from an access group.
|
|
73
|
+
# @param user_identity_id [String, nil] ID of the user identity associated with the user that you want to remove from an access group.
|
|
74
74
|
# @return [nil] OK
|
|
75
75
|
def remove_user(acs_access_group_id:, acs_user_id: nil, user_identity_id: nil)
|
|
76
|
-
@client.
|
|
76
|
+
@client.delete("/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)
|
|
77
77
|
|
|
78
78
|
nil
|
|
79
79
|
end
|
|
@@ -9,30 +9,30 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
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.
|
|
12
|
+
# @param acs_credential_id [String] ID of the credential that you want to assign to an access system user.
|
|
13
|
+
# @param acs_user_id [String, nil] 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 [String, nil] 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
15
|
# @return [nil] OK
|
|
16
16
|
def assign(acs_credential_id:, acs_user_id: nil, user_identity_id: nil)
|
|
17
|
-
@client.
|
|
17
|
+
@client.patch("/acs/credentials/assign", {acs_credential_id: acs_credential_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
18
18
|
|
|
19
19
|
nil
|
|
20
20
|
end
|
|
21
21
|
|
|
22
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.
|
|
23
|
+
# @param access_method [String] Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
|
|
24
|
+
# @param acs_system_id [String, nil] 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 [String, nil] 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 [Array<String>, nil] 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 [Hash, nil] Vostio-specific metadata for the new credential.
|
|
28
|
+
# @param code [String, nil] 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 [String, nil] ACS system ID of the credential manager for the new credential.
|
|
30
|
+
# @param ends_at [Time, nil] 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 [Boolean, nil] 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 [Hash, nil] Salto Space-specific metadata for the new credential.
|
|
33
|
+
# @param starts_at [Time, nil] 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 [String, nil] 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 [Hash, nil] Visionline-specific metadata for the new credential.
|
|
36
36
|
# @return [Seam::Resources::AcsCredential] OK
|
|
37
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)
|
|
38
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)
|
|
@@ -41,66 +41,66 @@ module Seam
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
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.
|
|
44
|
+
# @param acs_credential_id [String] ID of the credential that you want to delete.
|
|
45
45
|
# @return [nil] OK
|
|
46
46
|
def delete(acs_credential_id:)
|
|
47
|
-
@client.
|
|
47
|
+
@client.delete("/acs/credentials/delete", {acs_credential_id: acs_credential_id}.compact)
|
|
48
48
|
|
|
49
49
|
nil
|
|
50
50
|
end
|
|
51
51
|
|
|
52
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.
|
|
53
|
+
# @param acs_credential_id [String] ID of the credential that you want to get.
|
|
54
54
|
# @return [Seam::Resources::AcsCredential] OK
|
|
55
55
|
def get(acs_credential_id:)
|
|
56
|
-
res = @client.
|
|
56
|
+
res = @client.get("/acs/credentials/get", {acs_credential_id: acs_credential_id}.compact)
|
|
57
57
|
|
|
58
58
|
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credential"])
|
|
59
59
|
end
|
|
60
60
|
|
|
61
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`.
|
|
62
|
+
# @param acs_user_id [String, nil] ID of the access system user for which you want to retrieve all credentials.
|
|
63
|
+
# @param acs_system_id [String, nil] ID of the access system for which you want to retrieve all credentials.
|
|
64
|
+
# @param user_identity_id [String, nil] ID of the user identity for which you want to retrieve all credentials.
|
|
65
|
+
# @param created_before [Time, nil] 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 [Boolean, nil] Indicates whether you want to retrieve only multi-phone sync credentials or non-multi-phone sync credentials.
|
|
67
|
+
# @param limit [Float, nil] Number of credentials to return.
|
|
68
|
+
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
69
|
+
# @param search [String, nil] 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
70
|
# @return [Seam::Resources::AcsCredential] OK
|
|
71
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)
|
|
72
|
-
res = @client.
|
|
72
|
+
res = @client.get("/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)
|
|
73
73
|
|
|
74
74
|
Seam::Resources::AcsCredential.load_from_response(res.body["acs_credentials"])
|
|
75
75
|
end
|
|
76
76
|
|
|
77
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.
|
|
78
|
+
# @param acs_credential_id [String] ID of the credential for which you want to retrieve all entrances to which the credential grants access.
|
|
79
79
|
# @return [Seam::Resources::AcsEntrance] OK
|
|
80
80
|
def list_accessible_entrances(acs_credential_id:)
|
|
81
|
-
res = @client.
|
|
81
|
+
res = @client.get("/acs/credentials/list_accessible_entrances", {acs_credential_id: acs_credential_id}.compact)
|
|
82
82
|
|
|
83
83
|
Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
|
|
84
84
|
end
|
|
85
85
|
|
|
86
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.
|
|
87
|
+
# @param acs_credential_id [String] ID of the credential that you want to unassign from an access system user.
|
|
88
|
+
# @param acs_user_id [String, nil] 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 [String, nil] 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
90
|
# @return [nil] OK
|
|
91
91
|
def unassign(acs_credential_id:, acs_user_id: nil, user_identity_id: nil)
|
|
92
|
-
@client.
|
|
92
|
+
@client.patch("/acs/credentials/unassign", {acs_credential_id: acs_credential_id, acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
|
|
93
93
|
|
|
94
94
|
nil
|
|
95
95
|
end
|
|
96
96
|
|
|
97
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.
|
|
98
|
+
# @param acs_credential_id [String] ID of the credential that you want to update.
|
|
99
|
+
# @param code [String, nil] Replacement access (PIN) code for the credential that you want to update.
|
|
100
|
+
# @param ends_at [Time, nil] 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
101
|
# @return [nil] OK
|
|
102
102
|
def update(acs_credential_id:, code: nil, ends_at: nil)
|
|
103
|
-
@client.
|
|
103
|
+
@client.patch("/acs/credentials/update", {acs_credential_id: acs_credential_id, code: code, ends_at: ends_at}.compact)
|
|
104
104
|
|
|
105
105
|
nil
|
|
106
106
|
end
|
|
@@ -15,9 +15,9 @@ module Seam
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
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.
|
|
18
|
+
# @param acs_encoder_id [String] ID of the `acs_encoder` to use to encode the `acs_credential`.
|
|
19
|
+
# @param access_method_id [String, nil] ID of the `access_method` to encode onto a card.
|
|
20
|
+
# @param acs_credential_id [String, nil] ID of the `acs_credential` to encode onto a card.
|
|
21
21
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
22
22
|
def encode_credential(acs_encoder_id:, access_method_id: nil, acs_credential_id: nil, wait_for_action_attempt: nil)
|
|
23
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)
|
|
@@ -28,20 +28,20 @@ module Seam
|
|
|
28
28
|
end
|
|
29
29
|
|
|
30
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.
|
|
31
|
+
# @param acs_encoder_id [String] ID of the encoder that you want to get.
|
|
32
32
|
# @return [Seam::Resources::AcsEncoder] OK
|
|
33
33
|
def get(acs_encoder_id:)
|
|
34
|
-
res = @client.
|
|
34
|
+
res = @client.get("/acs/encoders/get", {acs_encoder_id: acs_encoder_id}.compact)
|
|
35
35
|
|
|
36
36
|
Seam::Resources::AcsEncoder.load_from_response(res.body["acs_encoder"])
|
|
37
37
|
end
|
|
38
38
|
|
|
39
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`.
|
|
40
|
+
# @param acs_system_id [String, nil] ID of the access system for which you want to retrieve all encoders.
|
|
41
|
+
# @param acs_system_ids [Array<String>, nil] IDs of the access systems for which you want to retrieve all encoders.
|
|
42
|
+
# @param acs_encoder_ids [Array<String>, nil] IDs of the encoders that you want to retrieve.
|
|
43
|
+
# @param limit [Float, nil] Number of encoders to return.
|
|
44
|
+
# @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
45
45
|
# @return [Seam::Resources::AcsEncoder] OK
|
|
46
46
|
def list(acs_system_id: nil, acs_system_ids: nil, acs_encoder_ids: nil, limit: nil, page_cursor: nil)
|
|
47
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)
|
|
@@ -50,8 +50,8 @@ module Seam
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
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.
|
|
53
|
+
# @param acs_encoder_id [String] ID of the encoder to use for the scan.
|
|
54
|
+
# @param salto_ks_metadata [Hash, nil] Salto KS-specific metadata for the scan action.
|
|
55
55
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
56
56
|
def scan_credential(acs_encoder_id:, salto_ks_metadata: nil, wait_for_action_attempt: nil)
|
|
57
57
|
res = @client.post("/acs/encoders/scan_credential", {acs_encoder_id: acs_encoder_id, salto_ks_metadata: salto_ks_metadata}.compact)
|
|
@@ -62,10 +62,10 @@ module Seam
|
|
|
62
62
|
end
|
|
63
63
|
|
|
64
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.
|
|
65
|
+
# @param acs_encoder_id [String] ID of the `acs_encoder` to use to scan the credential.
|
|
66
|
+
# @param acs_user_id [String, nil] ID of the `acs_user` to assign the scanned credential to.
|
|
67
|
+
# @param salto_ks_metadata [Hash, nil] Salto KS-specific metadata for the scan action.
|
|
68
|
+
# @param user_identity_id [String, nil] 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
69
|
# @return [Seam::Resources::ActionAttempt] OK
|
|
70
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)
|
|
71
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)
|
|
@@ -9,9 +9,9 @@ module Seam
|
|
|
9
9
|
end
|
|
10
10
|
|
|
11
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.
|
|
12
|
+
# @param acs_encoder_id [String] ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`.
|
|
13
|
+
# @param error_code [String, nil] Code of the error to simulate.
|
|
14
|
+
# @param acs_credential_id [String, nil] ID of the `acs_credential` that will fail to be encoded onto a card in the next request.
|
|
15
15
|
# @return [nil] OK
|
|
16
16
|
def next_credential_encode_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id: nil)
|
|
17
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)
|
|
@@ -20,8 +20,8 @@ module Seam
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
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.
|
|
23
|
+
# @param acs_encoder_id [String] ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`.
|
|
24
|
+
# @param scenario [String, nil] Scenario to simulate.
|
|
25
25
|
# @return [nil] OK
|
|
26
26
|
def next_credential_encode_will_succeed(acs_encoder_id:, scenario: nil)
|
|
27
27
|
@client.post("/acs/encoders/simulate/next_credential_encode_will_succeed", {acs_encoder_id: acs_encoder_id, scenario: scenario}.compact)
|
|
@@ -30,9 +30,9 @@ module Seam
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
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
|
|
33
|
+
# @param acs_encoder_id [String] ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request.
|
|
34
|
+
# @param error_code [String, nil]
|
|
35
|
+
# @param acs_credential_id_on_seam [String, nil]
|
|
36
36
|
# @return [nil] OK
|
|
37
37
|
def next_credential_scan_will_fail(acs_encoder_id:, error_code: nil, acs_credential_id_on_seam: nil)
|
|
38
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)
|
|
@@ -41,9 +41,9 @@ module Seam
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
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.
|
|
44
|
+
# @param acs_encoder_id [String] 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 [String, nil] ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation.
|
|
46
|
+
# @param scenario [String, nil] Scenario to simulate.
|
|
47
47
|
# @return [nil] OK
|
|
48
48
|
def next_credential_scan_will_succeed(acs_encoder_id:, acs_credential_id_on_seam: nil, scenario: nil)
|
|
49
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)
|