seam 2.134.0 → 2.135.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/base_resource.rb +45 -1
- data/lib/seam/deep_hash_accessor.rb +8 -4
- data/lib/seam/request.rb +0 -1
- data/lib/seam/resources/access_code.rb +109 -7
- data/lib/seam/resources/access_grant.rb +90 -7
- data/lib/seam/resources/access_method.rb +49 -5
- data/lib/seam/resources/acs_access_group.rb +69 -7
- data/lib/seam/resources/acs_credential.rb +54 -7
- data/lib/seam/resources/acs_encoder.rb +10 -2
- data/lib/seam/resources/acs_entrance.rb +166 -25
- data/lib/seam/resources/acs_system.rb +40 -7
- data/lib/seam/resources/acs_user.rb +93 -11
- data/lib/seam/resources/action_attempt.rb +304 -5
- data/lib/seam/resources/connected_account.rb +70 -6
- data/lib/seam/resources/device.rb +1126 -11
- data/lib/seam/resources/event.rb +133 -49
- data/lib/seam/resources/index.rb +0 -4
- data/lib/seam/resources/instant_key.rb +10 -2
- data/lib/seam/resources/phone.rb +44 -5
- data/lib/seam/resources/space.rb +20 -4
- data/lib/seam/resources/thermostat_daily_program.rb +8 -2
- data/lib/seam/resources/thermostat_schedule.rb +10 -2
- data/lib/seam/resources/unmanaged_access_code.rb +74 -5
- data/lib/seam/resources/unmanaged_access_grant.rb +90 -7
- data/lib/seam/resources/unmanaged_access_method.rb +49 -5
- data/lib/seam/resources/unmanaged_device.rb +99 -7
- data/lib/seam/resources/unmanaged_user_identity.rb +24 -3
- data/lib/seam/resources/user_identity.rb +24 -3
- data/lib/seam/resources/workspace.rb +14 -1
- data/lib/seam/version.rb +1 -1
- metadata +2 -6
- data/lib/seam/resources/resource_error.rb +0 -11
- data/lib/seam/resources/resource_errors_support.rb +0 -11
- data/lib/seam/resources/resource_warning.rb +0 -11
- data/lib/seam/resources/resource_warnings_support.rb +0 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63f28be81d1f91aac1e7e4a985619c5373c3c8f2cd5c9cb2c912353d5d11d784
|
|
4
|
+
data.tar.gz: 4b7a897a7b5baee78d66aa0041b5acbedb8dcf58360ffba672ec4f3d2ef16d41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64a11203850219014f1547cef7ddef4c6e5c0bd031e30f5bb5cd395307d9a62124adbf683adb85031e363289e12255c34b10afa68fb326bee673a614daf4f410
|
|
7
|
+
data.tar.gz: '09abde1c8cdcbd5dc21c0b823e704d940de7a3ef2fc80c9bb2ecf7cc0c59ae8c4d4adec11557b82735533a6ce335f504b1267f26a403ad8680c5cca49e6bd7b6'
|
data/Gemfile.lock
CHANGED
data/lib/seam/base_resource.rb
CHANGED
|
@@ -20,6 +20,8 @@ module Seam
|
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def self.load_from_response(data, client = nil)
|
|
23
|
+
return nil if data.nil?
|
|
24
|
+
|
|
23
25
|
if data.is_a?(Array)
|
|
24
26
|
data.map { |d| new(d, client) }
|
|
25
27
|
else
|
|
@@ -36,6 +38,38 @@ module Seam
|
|
|
36
38
|
.join("\n") + ">"
|
|
37
39
|
end
|
|
38
40
|
|
|
41
|
+
def [](key)
|
|
42
|
+
name = key.to_s
|
|
43
|
+
return nil unless respond_to?(name)
|
|
44
|
+
|
|
45
|
+
public_send(name)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def self.resource_accessor(attr, resource_class)
|
|
49
|
+
resource_accessors[attr.to_s] = resource_class
|
|
50
|
+
attr_accessor attr
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def self.resource_list_accessor(attr, resource_class)
|
|
54
|
+
resource_list_accessors[attr.to_s] = resource_class
|
|
55
|
+
attr_writer attr
|
|
56
|
+
|
|
57
|
+
# A list the response omits, sends as null, or sends as some other type
|
|
58
|
+
# reads as empty rather than nil, so callers can always iterate.
|
|
59
|
+
define_method(attr) do
|
|
60
|
+
value = instance_variable_get(:"@#{attr}")
|
|
61
|
+
value.is_a?(Array) ? value : []
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def self.resource_accessors
|
|
66
|
+
@resource_accessors ||= {}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def self.resource_list_accessors
|
|
70
|
+
@resource_list_accessors ||= {}
|
|
71
|
+
end
|
|
72
|
+
|
|
39
73
|
def self.date_accessor(*attrs)
|
|
40
74
|
attrs.each do |attr|
|
|
41
75
|
define_method(attr) do
|
|
@@ -54,7 +88,17 @@ module Seam
|
|
|
54
88
|
|
|
55
89
|
def process_data_attributes(data)
|
|
56
90
|
data.each do |key, value|
|
|
57
|
-
|
|
91
|
+
next unless key.to_s.match?(/\A[a-zA-Z_][a-zA-Z0-9_]*\z/)
|
|
92
|
+
|
|
93
|
+
resource_class = self.class.resource_accessors[key.to_s]
|
|
94
|
+
resource_list_class = self.class.resource_list_accessors[key.to_s]
|
|
95
|
+
value = if resource_class && value.is_a?(Hash)
|
|
96
|
+
resource_class.load_from_response(value, client)
|
|
97
|
+
elsif resource_list_class && value.is_a?(Array)
|
|
98
|
+
resource_list_class.load_from_response(value, client)
|
|
99
|
+
else
|
|
100
|
+
process_hash_value(value)
|
|
101
|
+
end
|
|
58
102
|
instance_variable_set(:"@#{key}", value)
|
|
59
103
|
end
|
|
60
104
|
end
|
|
@@ -10,7 +10,12 @@ module Seam
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def [](key)
|
|
13
|
-
|
|
13
|
+
# Subscript access is Hash-like and returns nil for unknown keys, while
|
|
14
|
+
# method access continues to raise NoMethodError.
|
|
15
|
+
name = key.to_s
|
|
16
|
+
return nil unless respond_to?(name)
|
|
17
|
+
|
|
18
|
+
public_send(name)
|
|
14
19
|
end
|
|
15
20
|
|
|
16
21
|
def to_h
|
|
@@ -21,9 +26,8 @@ module Seam
|
|
|
21
26
|
|
|
22
27
|
def create_accessor_methods
|
|
23
28
|
@data.each do |key, value|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
end
|
|
29
|
+
processed = process_value(value)
|
|
30
|
+
define_singleton_method(key) { processed }
|
|
27
31
|
end
|
|
28
32
|
end
|
|
29
33
|
|
data/lib/seam/request.rb
CHANGED
|
@@ -12,6 +12,115 @@ module Seam
|
|
|
12
12
|
#
|
|
13
13
|
# For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.
|
|
14
14
|
class AccessCode < BaseResource
|
|
15
|
+
class DormakabaOracodeMetadata < BaseResource
|
|
16
|
+
# Indicates whether the stay can be cancelled via the Dormakaba Oracode API.
|
|
17
|
+
attr_accessor :is_cancellable
|
|
18
|
+
# Indicates whether early check-in is available for this stay.
|
|
19
|
+
attr_accessor :is_early_checkin_able
|
|
20
|
+
# Indicates whether the stay can be extended via the Dormakaba Oracode API.
|
|
21
|
+
attr_accessor :is_extendable
|
|
22
|
+
# Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached.
|
|
23
|
+
attr_accessor :is_overridable
|
|
24
|
+
# Dormakaba Oracode site name associated with this access code.
|
|
25
|
+
attr_accessor :site_name
|
|
26
|
+
# Dormakaba Oracode stay ID associated with this access code.
|
|
27
|
+
attr_accessor :stay_id
|
|
28
|
+
# Dormakaba Oracode user level ID associated with this access code.
|
|
29
|
+
attr_accessor :user_level_id
|
|
30
|
+
# Dormakaba Oracode user level name associated with this access code.
|
|
31
|
+
attr_accessor :user_level_name
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
class Errors < BaseResource
|
|
35
|
+
class ModifiedFields < BaseResource
|
|
36
|
+
# The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
|
|
37
|
+
attr_accessor :field
|
|
38
|
+
# The previous value of the field.
|
|
39
|
+
attr_accessor :from
|
|
40
|
+
# The new value of the field.
|
|
41
|
+
attr_accessor :to
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
resource_list_accessor :modified_fields, ModifiedFields
|
|
45
|
+
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device.
|
|
46
|
+
attr_accessor :change_type
|
|
47
|
+
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
48
|
+
attr_accessor :error_code
|
|
49
|
+
# Indicates that this is an access code error.
|
|
50
|
+
attr_accessor :is_access_code_error
|
|
51
|
+
# Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
|
|
52
|
+
attr_accessor :is_bridge_error
|
|
53
|
+
attr_accessor :is_connected_account_error
|
|
54
|
+
attr_accessor :is_device_error
|
|
55
|
+
# ID of the managed access code that conflicts with this managed access code, when Seam can identify it.
|
|
56
|
+
attr_accessor :managed_access_code_id
|
|
57
|
+
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
58
|
+
attr_accessor :message
|
|
59
|
+
# ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it.
|
|
60
|
+
attr_accessor :unmanaged_access_code_id
|
|
61
|
+
# Date and time at which Seam created the error.
|
|
62
|
+
date_accessor :created_at
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class PendingMutations < BaseResource
|
|
66
|
+
class From < BaseResource
|
|
67
|
+
# Previous PIN code.
|
|
68
|
+
attr_accessor :code
|
|
69
|
+
# Previous access code name.
|
|
70
|
+
attr_accessor :name
|
|
71
|
+
# Previous end time for the access code.
|
|
72
|
+
date_accessor :ends_at
|
|
73
|
+
# Previous start time for the access code.
|
|
74
|
+
date_accessor :starts_at
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
class To < BaseResource
|
|
78
|
+
# New PIN code.
|
|
79
|
+
attr_accessor :code
|
|
80
|
+
# New access code name.
|
|
81
|
+
attr_accessor :name
|
|
82
|
+
# New end time for the access code.
|
|
83
|
+
date_accessor :ends_at
|
|
84
|
+
# New start time for the access code.
|
|
85
|
+
date_accessor :starts_at
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
resource_accessor :from, From
|
|
89
|
+
resource_accessor :to, To
|
|
90
|
+
# Detailed description of the mutation.
|
|
91
|
+
attr_accessor :message
|
|
92
|
+
attr_accessor :mutation_code
|
|
93
|
+
# Date and time at which the mutation was created.
|
|
94
|
+
date_accessor :created_at
|
|
95
|
+
# Date and time at which Seam will attempt to program this access code on the device.
|
|
96
|
+
date_accessor :scheduled_at
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
class Warnings < BaseResource
|
|
100
|
+
class ModifiedFields < BaseResource
|
|
101
|
+
# The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
|
|
102
|
+
attr_accessor :field
|
|
103
|
+
# The previous value of the field.
|
|
104
|
+
attr_accessor :from
|
|
105
|
+
# The new value of the field.
|
|
106
|
+
attr_accessor :to
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
resource_list_accessor :modified_fields, ModifiedFields
|
|
110
|
+
# Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device.
|
|
111
|
+
attr_accessor :change_type
|
|
112
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
113
|
+
attr_accessor :message
|
|
114
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
115
|
+
attr_accessor :warning_code
|
|
116
|
+
# Date and time at which Seam created the warning.
|
|
117
|
+
date_accessor :created_at
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
resource_accessor :dormakaba_oracode_metadata, DormakabaOracodeMetadata
|
|
121
|
+
resource_list_accessor :errors, Errors
|
|
122
|
+
resource_list_accessor :pending_mutations, PendingMutations
|
|
123
|
+
resource_list_accessor :warnings, Warnings
|
|
15
124
|
# Unique identifier for the access code.
|
|
16
125
|
attr_accessor :access_code_id
|
|
17
126
|
# Code used for access. Typically, a numeric or alphanumeric string.
|
|
@@ -20,8 +129,6 @@ module Seam
|
|
|
20
129
|
attr_accessor :common_code_key
|
|
21
130
|
# Unique identifier for the device associated with the access code.
|
|
22
131
|
attr_accessor :device_id
|
|
23
|
-
# Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices.
|
|
24
|
-
attr_accessor :dormakaba_oracode_metadata
|
|
25
132
|
# Indicates whether the access code is a backup code.
|
|
26
133
|
attr_accessor :is_backup
|
|
27
134
|
# Indicates whether a backup access code is available for use if the primary access code is lost or compromised.
|
|
@@ -40,8 +147,6 @@ module Seam
|
|
|
40
147
|
attr_accessor :is_waiting_for_code_assignment
|
|
41
148
|
# Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components).
|
|
42
149
|
attr_accessor :name
|
|
43
|
-
# Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device.
|
|
44
|
-
attr_accessor :pending_mutations
|
|
45
150
|
# Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code.
|
|
46
151
|
attr_accessor :pulled_backup_access_code_id
|
|
47
152
|
# Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes).
|
|
@@ -59,9 +164,6 @@ module Seam
|
|
|
59
164
|
|
|
60
165
|
# Date and time at which the time-bound access code becomes active.
|
|
61
166
|
date_accessor :starts_at
|
|
62
|
-
|
|
63
|
-
include Seam::Resources::ResourceErrorsSupport
|
|
64
|
-
include Seam::Resources::ResourceWarningsSupport
|
|
65
167
|
end
|
|
66
168
|
end
|
|
67
169
|
end
|
|
@@ -4,6 +4,96 @@ module Seam
|
|
|
4
4
|
module Resources
|
|
5
5
|
# Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant.
|
|
6
6
|
class AccessGrant < BaseResource
|
|
7
|
+
class Errors < BaseResource
|
|
8
|
+
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
9
|
+
attr_accessor :error_code
|
|
10
|
+
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
11
|
+
attr_accessor :message
|
|
12
|
+
# IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
|
|
13
|
+
attr_accessor :missing_device_ids
|
|
14
|
+
# Date and time at which Seam created the error.
|
|
15
|
+
date_accessor :created_at
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class PendingMutations < BaseResource
|
|
19
|
+
class From < BaseResource
|
|
20
|
+
# Previous device IDs where access codes existed.
|
|
21
|
+
attr_accessor :device_ids
|
|
22
|
+
# Previous end time for access.
|
|
23
|
+
date_accessor :ends_at
|
|
24
|
+
# Previous start time for access.
|
|
25
|
+
date_accessor :starts_at
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class To < BaseResource
|
|
29
|
+
# Common code key to ensure PIN code reuse across devices.
|
|
30
|
+
attr_accessor :common_code_key
|
|
31
|
+
# New device IDs where access codes should be created.
|
|
32
|
+
attr_accessor :device_ids
|
|
33
|
+
# New end time for access.
|
|
34
|
+
date_accessor :ends_at
|
|
35
|
+
# New start time for access.
|
|
36
|
+
date_accessor :starts_at
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
resource_accessor :from, From
|
|
40
|
+
resource_accessor :to, To
|
|
41
|
+
# IDs of the access methods being updated.
|
|
42
|
+
attr_accessor :access_method_ids
|
|
43
|
+
# Detailed description of the mutation.
|
|
44
|
+
attr_accessor :message
|
|
45
|
+
attr_accessor :mutation_code
|
|
46
|
+
# Date and time at which the mutation was created.
|
|
47
|
+
date_accessor :created_at
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
class RequestedAccessMethods < BaseResource
|
|
51
|
+
# Specific PIN code to use for this access method. Only applicable when mode is 'code'.
|
|
52
|
+
attr_accessor :code
|
|
53
|
+
# IDs of the access methods created for the requested access method.
|
|
54
|
+
attr_accessor :created_access_method_ids
|
|
55
|
+
# Display name of the access method.
|
|
56
|
+
attr_accessor :display_name
|
|
57
|
+
# Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified.
|
|
58
|
+
attr_accessor :instant_key_max_use_count
|
|
59
|
+
# Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
|
|
60
|
+
attr_accessor :mode
|
|
61
|
+
# Date and time at which the requested access method was added to the Access Grant.
|
|
62
|
+
date_accessor :created_at
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
class Warnings < BaseResource
|
|
66
|
+
class FailedDevices < BaseResource
|
|
67
|
+
# Device whose access code could not be revoked.
|
|
68
|
+
attr_accessor :device_id
|
|
69
|
+
# Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`).
|
|
70
|
+
attr_accessor :error_code
|
|
71
|
+
# Human-readable description of why revocation failed.
|
|
72
|
+
attr_accessor :message
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
resource_list_accessor :failed_devices, FailedDevices
|
|
76
|
+
# IDs of the access methods being updated.
|
|
77
|
+
attr_accessor :access_method_ids
|
|
78
|
+
attr_accessor :device_id
|
|
79
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
80
|
+
attr_accessor :message
|
|
81
|
+
# The new PIN code that was assigned instead.
|
|
82
|
+
attr_accessor :new_code
|
|
83
|
+
# The originally requested PIN code that was unavailable.
|
|
84
|
+
attr_accessor :original_code
|
|
85
|
+
# Specific reason why the grant's times are not programmable on the device.
|
|
86
|
+
attr_accessor :reason
|
|
87
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
88
|
+
attr_accessor :warning_code
|
|
89
|
+
# Date and time at which Seam created the warning.
|
|
90
|
+
date_accessor :created_at
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
resource_list_accessor :errors, Errors
|
|
94
|
+
resource_list_accessor :pending_mutations, PendingMutations
|
|
95
|
+
resource_list_accessor :requested_access_methods, RequestedAccessMethods
|
|
96
|
+
resource_list_accessor :warnings, Warnings
|
|
7
97
|
# ID of the Access Grant.
|
|
8
98
|
attr_accessor :access_grant_id
|
|
9
99
|
# Unique key for the access grant within the workspace.
|
|
@@ -22,10 +112,6 @@ module Seam
|
|
|
22
112
|
attr_accessor :location_ids
|
|
23
113
|
# Name of the Access Grant. If not provided, the display name will be computed.
|
|
24
114
|
attr_accessor :name
|
|
25
|
-
# List of pending mutations for the access grant. This shows updates that are in progress.
|
|
26
|
-
attr_accessor :pending_mutations
|
|
27
|
-
# Access methods that the user requested for the Access Grant.
|
|
28
|
-
attr_accessor :requested_access_methods
|
|
29
115
|
# Reservation key for the access grant.
|
|
30
116
|
attr_accessor :reservation_key
|
|
31
117
|
# IDs of the spaces to which the Access Grant gives access.
|
|
@@ -43,9 +129,6 @@ module Seam
|
|
|
43
129
|
|
|
44
130
|
# Date and time at which the Access Grant starts.
|
|
45
131
|
date_accessor :starts_at
|
|
46
|
-
|
|
47
|
-
include Seam::Resources::ResourceErrorsSupport
|
|
48
|
-
include Seam::Resources::ResourceWarningsSupport
|
|
49
132
|
end
|
|
50
133
|
end
|
|
51
134
|
end
|
|
@@ -4,6 +4,55 @@ module Seam
|
|
|
4
4
|
module Resources
|
|
5
5
|
# Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key.
|
|
6
6
|
class AccessMethod < BaseResource
|
|
7
|
+
class Errors < BaseResource
|
|
8
|
+
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
9
|
+
attr_accessor :error_code
|
|
10
|
+
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
11
|
+
attr_accessor :message
|
|
12
|
+
# Date and time at which Seam created the error.
|
|
13
|
+
date_accessor :created_at
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class PendingMutations < BaseResource
|
|
17
|
+
class From < BaseResource
|
|
18
|
+
attr_accessor :device_ids
|
|
19
|
+
# Previous end time for access.
|
|
20
|
+
date_accessor :ends_at
|
|
21
|
+
# Previous start time for access.
|
|
22
|
+
date_accessor :starts_at
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
class To < BaseResource
|
|
26
|
+
attr_accessor :device_ids
|
|
27
|
+
# New end time for access.
|
|
28
|
+
date_accessor :ends_at
|
|
29
|
+
# New start time for access.
|
|
30
|
+
date_accessor :starts_at
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
resource_accessor :from, From
|
|
34
|
+
resource_accessor :to, To
|
|
35
|
+
# Detailed description of the mutation.
|
|
36
|
+
attr_accessor :message
|
|
37
|
+
attr_accessor :mutation_code
|
|
38
|
+
# Date and time at which the mutation was created.
|
|
39
|
+
date_accessor :created_at
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
class Warnings < BaseResource
|
|
43
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
44
|
+
attr_accessor :message
|
|
45
|
+
# ID of the original access method from which this backup access method was split, if applicable.
|
|
46
|
+
attr_accessor :original_access_method_id
|
|
47
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
48
|
+
attr_accessor :warning_code
|
|
49
|
+
# Date and time at which Seam created the warning.
|
|
50
|
+
date_accessor :created_at
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
resource_list_accessor :errors, Errors
|
|
54
|
+
resource_list_accessor :pending_mutations, PendingMutations
|
|
55
|
+
resource_list_accessor :warnings, Warnings
|
|
7
56
|
# ID of the access method.
|
|
8
57
|
attr_accessor :access_method_id
|
|
9
58
|
# Token of the client session associated with the access method.
|
|
@@ -28,8 +77,6 @@ module Seam
|
|
|
28
77
|
attr_accessor :is_ready_for_encoding
|
|
29
78
|
# Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
|
|
30
79
|
attr_accessor :mode
|
|
31
|
-
# Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress.
|
|
32
|
-
attr_accessor :pending_mutations
|
|
33
80
|
# ID of the Seam workspace associated with the access method.
|
|
34
81
|
attr_accessor :workspace_id
|
|
35
82
|
|
|
@@ -38,9 +85,6 @@ module Seam
|
|
|
38
85
|
|
|
39
86
|
# Date and time at which the access method was issued.
|
|
40
87
|
date_accessor :issued_at
|
|
41
|
-
|
|
42
|
-
include Seam::Resources::ResourceErrorsSupport
|
|
43
|
-
include Seam::Resources::ResourceWarningsSupport
|
|
44
88
|
end
|
|
45
89
|
end
|
|
46
90
|
end
|
|
@@ -8,12 +8,79 @@ module Seam
|
|
|
8
8
|
#
|
|
9
9
|
# To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems).
|
|
10
10
|
class AcsAccessGroup < BaseResource
|
|
11
|
+
class AccessSchedule < BaseResource
|
|
12
|
+
# Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
13
|
+
date_accessor :ends_at
|
|
14
|
+
# Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
|
|
15
|
+
date_accessor :starts_at
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
class Errors < BaseResource
|
|
19
|
+
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
20
|
+
attr_accessor :error_code
|
|
21
|
+
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
22
|
+
attr_accessor :message
|
|
23
|
+
# Date and time at which Seam created the error.
|
|
24
|
+
date_accessor :created_at
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
class PendingMutations < BaseResource
|
|
28
|
+
class From < BaseResource
|
|
29
|
+
# Old entrance ID.
|
|
30
|
+
attr_accessor :acs_entrance_id
|
|
31
|
+
# Old user ID.
|
|
32
|
+
attr_accessor :acs_user_id
|
|
33
|
+
# Name of the access group.
|
|
34
|
+
attr_accessor :name
|
|
35
|
+
# Ending time for the access schedule.
|
|
36
|
+
date_accessor :ends_at
|
|
37
|
+
# Starting time for the access schedule.
|
|
38
|
+
date_accessor :starts_at
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
class To < BaseResource
|
|
42
|
+
# New entrance ID.
|
|
43
|
+
attr_accessor :acs_entrance_id
|
|
44
|
+
# New user ID.
|
|
45
|
+
attr_accessor :acs_user_id
|
|
46
|
+
# Name of the access group.
|
|
47
|
+
attr_accessor :name
|
|
48
|
+
# Ending time for the access schedule.
|
|
49
|
+
date_accessor :ends_at
|
|
50
|
+
# Starting time for the access schedule.
|
|
51
|
+
date_accessor :starts_at
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
resource_accessor :from, From
|
|
55
|
+
resource_accessor :to, To
|
|
56
|
+
# ID of the user involved in the scheduled change.
|
|
57
|
+
attr_accessor :acs_user_id
|
|
58
|
+
# Detailed description of the mutation.
|
|
59
|
+
attr_accessor :message
|
|
60
|
+
attr_accessor :mutation_code
|
|
61
|
+
# Whether the user is scheduled to be added to or removed from this access group.
|
|
62
|
+
attr_accessor :variant
|
|
63
|
+
# Date and time at which the mutation was created.
|
|
64
|
+
date_accessor :created_at
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
class Warnings < BaseResource
|
|
68
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
69
|
+
attr_accessor :message
|
|
70
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
71
|
+
attr_accessor :warning_code
|
|
72
|
+
# Date and time at which Seam created the warning.
|
|
73
|
+
date_accessor :created_at
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
resource_accessor :access_schedule, AccessSchedule
|
|
77
|
+
resource_list_accessor :errors, Errors
|
|
78
|
+
resource_list_accessor :pending_mutations, PendingMutations
|
|
79
|
+
resource_list_accessor :warnings, Warnings
|
|
11
80
|
# @deprecated Use `external_type`.
|
|
12
81
|
attr_accessor :access_group_type
|
|
13
82
|
# @deprecated Use `external_type_display_name`.
|
|
14
83
|
attr_accessor :access_group_type_display_name
|
|
15
|
-
# `starts_at` and `ends_at` timestamps for the access group's access.
|
|
16
|
-
attr_accessor :access_schedule
|
|
17
84
|
# ID of the access group.
|
|
18
85
|
attr_accessor :acs_access_group_id
|
|
19
86
|
# ID of the access control system that contains the access group.
|
|
@@ -30,16 +97,11 @@ module Seam
|
|
|
30
97
|
attr_accessor :is_managed
|
|
31
98
|
# Name of the access group.
|
|
32
99
|
attr_accessor :name
|
|
33
|
-
# Collection of pending mutations for the access group. Represents operations that have been requested but not yet completed on the integrated access system.
|
|
34
|
-
attr_accessor :pending_mutations
|
|
35
100
|
# ID of the workspace that contains the access group.
|
|
36
101
|
attr_accessor :workspace_id
|
|
37
102
|
|
|
38
103
|
# Date and time at which the access group was created.
|
|
39
104
|
date_accessor :created_at
|
|
40
|
-
|
|
41
|
-
include Seam::Resources::ResourceErrorsSupport
|
|
42
|
-
include Seam::Resources::ResourceWarningsSupport
|
|
43
105
|
end
|
|
44
106
|
end
|
|
45
107
|
end
|
|
@@ -10,6 +10,60 @@ module Seam
|
|
|
10
10
|
#
|
|
11
11
|
# For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials.
|
|
12
12
|
class AcsCredential < BaseResource
|
|
13
|
+
class AssaAbloyVostioMetadata < BaseResource
|
|
14
|
+
# Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors.
|
|
15
|
+
attr_accessor :auto_join
|
|
16
|
+
# Names of the doors to which to grant access in the Vostio access system.
|
|
17
|
+
attr_accessor :door_names
|
|
18
|
+
# Endpoint ID in the Vostio access system.
|
|
19
|
+
attr_accessor :endpoint_id
|
|
20
|
+
# Key ID in the Vostio access system.
|
|
21
|
+
attr_accessor :key_id
|
|
22
|
+
# Key issuing request ID in the Vostio access system.
|
|
23
|
+
attr_accessor :key_issuing_request_id
|
|
24
|
+
# IDs of the guest entrances to override in the Vostio access system.
|
|
25
|
+
attr_accessor :override_guest_acs_entrance_ids
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
class Errors < BaseResource
|
|
29
|
+
attr_accessor :error_code
|
|
30
|
+
attr_accessor :message
|
|
31
|
+
# Date and time at which Seam created the error.
|
|
32
|
+
date_accessor :created_at
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
class VisionlineMetadata < BaseResource
|
|
36
|
+
# Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors.
|
|
37
|
+
attr_accessor :auto_join
|
|
38
|
+
# Card function type in the Visionline access system.
|
|
39
|
+
attr_accessor :card_function_type
|
|
40
|
+
# ID of the card in the Visionline access system.
|
|
41
|
+
attr_accessor :card_id
|
|
42
|
+
# Common entrance IDs in the Visionline access system.
|
|
43
|
+
attr_accessor :common_acs_entrance_ids
|
|
44
|
+
# ID of the credential in the Visionline access system.
|
|
45
|
+
attr_accessor :credential_id
|
|
46
|
+
# Guest entrance IDs in the Visionline access system.
|
|
47
|
+
attr_accessor :guest_acs_entrance_ids
|
|
48
|
+
# Indicates whether the credential is valid.
|
|
49
|
+
attr_accessor :is_valid
|
|
50
|
+
# IDs of the credentials to which you want to join.
|
|
51
|
+
attr_accessor :joiner_acs_credential_ids
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
class Warnings < BaseResource
|
|
55
|
+
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
56
|
+
attr_accessor :message
|
|
57
|
+
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
58
|
+
attr_accessor :warning_code
|
|
59
|
+
# Date and time at which Seam created the warning.
|
|
60
|
+
date_accessor :created_at
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
resource_accessor :assa_abloy_vostio_metadata, AssaAbloyVostioMetadata
|
|
64
|
+
resource_accessor :visionline_metadata, VisionlineMetadata
|
|
65
|
+
resource_list_accessor :errors, Errors
|
|
66
|
+
resource_list_accessor :warnings, Warnings
|
|
13
67
|
# Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
|
|
14
68
|
attr_accessor :access_method
|
|
15
69
|
# ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
@@ -20,8 +74,6 @@ module Seam
|
|
|
20
74
|
attr_accessor :acs_system_id
|
|
21
75
|
# ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
|
|
22
76
|
attr_accessor :acs_user_id
|
|
23
|
-
# Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
24
|
-
attr_accessor :assa_abloy_vostio_metadata
|
|
25
77
|
# Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
26
78
|
attr_accessor :card_number
|
|
27
79
|
# Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
@@ -52,8 +104,6 @@ module Seam
|
|
|
52
104
|
attr_accessor :starts_at
|
|
53
105
|
# ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
|
|
54
106
|
attr_accessor :user_identity_id
|
|
55
|
-
# Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
56
|
-
attr_accessor :visionline_metadata
|
|
57
107
|
# ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
|
|
58
108
|
attr_accessor :workspace_id
|
|
59
109
|
|
|
@@ -65,9 +115,6 @@ module Seam
|
|
|
65
115
|
|
|
66
116
|
# Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider.
|
|
67
117
|
date_accessor :latest_desired_state_synced_with_provider_at
|
|
68
|
-
|
|
69
|
-
include Seam::Resources::ResourceErrorsSupport
|
|
70
|
-
include Seam::Resources::ResourceWarningsSupport
|
|
71
118
|
end
|
|
72
119
|
end
|
|
73
120
|
end
|
|
@@ -17,6 +17,16 @@ module Seam
|
|
|
17
17
|
#
|
|
18
18
|
# To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems).
|
|
19
19
|
class AcsEncoder < BaseResource
|
|
20
|
+
class Errors < BaseResource
|
|
21
|
+
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
22
|
+
attr_accessor :error_code
|
|
23
|
+
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
24
|
+
attr_accessor :message
|
|
25
|
+
# Date and time at which Seam created the error.
|
|
26
|
+
date_accessor :created_at
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
resource_list_accessor :errors, Errors
|
|
20
30
|
# ID of the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
|
|
21
31
|
attr_accessor :acs_encoder_id
|
|
22
32
|
# ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
|
|
@@ -30,8 +40,6 @@ module Seam
|
|
|
30
40
|
|
|
31
41
|
# Date and time at which the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created.
|
|
32
42
|
date_accessor :created_at
|
|
33
|
-
|
|
34
|
-
include Seam::Resources::ResourceErrorsSupport
|
|
35
43
|
end
|
|
36
44
|
end
|
|
37
45
|
end
|