seam 2.139.0 → 2.140.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/lib/seam/http_without_workspace.rb +4 -4
- data/lib/seam/paginator.rb +4 -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/version.rb +1 -1
- metadata +8 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 564fdfd341da5fc43c859ba3a1bb7d013b40845ffbab7e0e05f917493b974821
|
|
4
|
+
data.tar.gz: a9ce5bded784a3153d98b85d6fcaaa1625837f84e9078c94a6c372e9a4a2eb24
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cbe2df337d9004d747493a81330ccceda4caa1476e38d0907670b9f47d16bd4e5036a2745c958ca203ff0154e773ef91339769881da525a30ef2839f4d93761
|
|
7
|
+
data.tar.gz: 0d69f48f2499b5f2275e44ddce95be1ffa50a417e8430374197f6a976fef7691facf1fdf80f247a8dfe0f166f2a32a966b79e74c7c851252e3df5fb502e46332
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
seam (2.
|
|
4
|
+
seam (2.140.0)
|
|
5
5
|
faraday (~> 2.7)
|
|
6
6
|
faraday-retry (~> 2.2)
|
|
7
7
|
svix (~> 1.30)
|
|
@@ -9,106 +9,109 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
addressable (2.
|
|
13
|
-
public_suffix (>= 2.0.2, <
|
|
14
|
-
ansi (1.
|
|
15
|
-
ast (2.4.
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
addressable (2.9.0)
|
|
13
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
14
|
+
ansi (1.6.0)
|
|
15
|
+
ast (2.4.3)
|
|
16
|
+
base64 (0.3.0)
|
|
17
|
+
bigdecimal (4.1.2)
|
|
18
|
+
crack (1.0.1)
|
|
18
19
|
bigdecimal
|
|
19
20
|
rexml
|
|
20
|
-
diff-lcs (1.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
faraday-net_http (>= 2.0, < 3.4)
|
|
21
|
+
diff-lcs (1.6.2)
|
|
22
|
+
faraday (2.14.3)
|
|
23
|
+
faraday-net_http (>= 2.0, < 3.5)
|
|
24
24
|
json
|
|
25
25
|
logger
|
|
26
|
-
faraday-net_http (3.
|
|
27
|
-
net-http
|
|
28
|
-
faraday-retry (2.
|
|
26
|
+
faraday-net_http (3.4.4)
|
|
27
|
+
net-http (~> 0.5)
|
|
28
|
+
faraday-retry (2.4.0)
|
|
29
29
|
faraday (~> 2.0)
|
|
30
|
-
gem-release (2.2.
|
|
31
|
-
hashdiff (1.1
|
|
32
|
-
json (2.
|
|
33
|
-
language_server-protocol (3.17.0.
|
|
30
|
+
gem-release (2.2.4)
|
|
31
|
+
hashdiff (1.2.1)
|
|
32
|
+
json (2.21.2)
|
|
33
|
+
language_server-protocol (3.17.0.6)
|
|
34
34
|
lint_roller (1.1.0)
|
|
35
|
-
logger (1.
|
|
36
|
-
multi_json (1.
|
|
37
|
-
net-http (0.
|
|
38
|
-
uri
|
|
39
|
-
parallel (1.
|
|
35
|
+
logger (1.7.0)
|
|
36
|
+
multi_json (1.21.1)
|
|
37
|
+
net-http (0.9.1)
|
|
38
|
+
uri (>= 0.11.1)
|
|
39
|
+
parallel (2.1.0)
|
|
40
40
|
parse_gemspec (1.0.0)
|
|
41
41
|
parse_gemspec-cli (1.0.0)
|
|
42
42
|
multi_json
|
|
43
43
|
parse_gemspec
|
|
44
44
|
thor
|
|
45
|
-
parser (3.3.
|
|
45
|
+
parser (3.3.12.0)
|
|
46
46
|
ast (~> 2.4.1)
|
|
47
47
|
racc
|
|
48
|
-
|
|
48
|
+
prism (1.9.0)
|
|
49
|
+
public_suffix (7.0.5)
|
|
49
50
|
racc (1.8.1)
|
|
50
51
|
rainbow (3.1.1)
|
|
51
|
-
rake (13.2
|
|
52
|
-
regexp_parser (2.
|
|
53
|
-
rexml (3.
|
|
54
|
-
rspec (3.13.
|
|
52
|
+
rake (13.4.2)
|
|
53
|
+
regexp_parser (2.12.0)
|
|
54
|
+
rexml (3.4.4)
|
|
55
|
+
rspec (3.13.2)
|
|
55
56
|
rspec-core (~> 3.13.0)
|
|
56
57
|
rspec-expectations (~> 3.13.0)
|
|
57
58
|
rspec-mocks (~> 3.13.0)
|
|
58
|
-
rspec-core (3.13.
|
|
59
|
+
rspec-core (3.13.6)
|
|
59
60
|
rspec-support (~> 3.13.0)
|
|
60
|
-
rspec-expectations (3.13.
|
|
61
|
+
rspec-expectations (3.13.5)
|
|
61
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
62
63
|
rspec-support (~> 3.13.0)
|
|
63
|
-
rspec-mocks (3.13.
|
|
64
|
+
rspec-mocks (3.13.8)
|
|
64
65
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
65
66
|
rspec-support (~> 3.13.0)
|
|
66
|
-
rspec-support (3.13.
|
|
67
|
-
rubocop (1.
|
|
67
|
+
rspec-support (3.13.7)
|
|
68
|
+
rubocop (1.88.2)
|
|
68
69
|
json (~> 2.3)
|
|
69
|
-
language_server-protocol (
|
|
70
|
-
|
|
70
|
+
language_server-protocol (~> 3.17.0.2)
|
|
71
|
+
lint_roller (~> 1.1.0)
|
|
72
|
+
parallel (>= 1.10)
|
|
71
73
|
parser (>= 3.3.0.2)
|
|
72
74
|
rainbow (>= 2.2.2, < 4.0)
|
|
73
|
-
regexp_parser (>= 2.
|
|
74
|
-
rubocop-ast (>= 1.
|
|
75
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
76
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
75
77
|
ruby-progressbar (~> 1.7)
|
|
76
|
-
unicode-display_width (>= 2.4.0, <
|
|
77
|
-
rubocop-ast (1.
|
|
78
|
-
parser (>= 3.3.
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
79
|
+
rubocop-ast (1.50.0)
|
|
80
|
+
parser (>= 3.3.7.2)
|
|
81
|
+
prism (~> 1.7)
|
|
82
|
+
rubocop-performance (1.26.1)
|
|
83
|
+
lint_roller (~> 1.1)
|
|
84
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
85
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
82
86
|
ruby-progressbar (1.13.0)
|
|
83
|
-
simplecov (
|
|
84
|
-
|
|
85
|
-
simplecov-html (~> 0.11)
|
|
86
|
-
simplecov_json_formatter (~> 0.1)
|
|
87
|
-
simplecov-console (0.9.2)
|
|
87
|
+
simplecov (1.1.1)
|
|
88
|
+
simplecov-console (0.9.5)
|
|
88
89
|
ansi
|
|
89
90
|
simplecov
|
|
90
91
|
terminal-table
|
|
91
|
-
|
|
92
|
-
simplecov_json_formatter (0.1.4)
|
|
93
|
-
standard (1.41.1)
|
|
92
|
+
standard (1.56.0)
|
|
94
93
|
language_server-protocol (~> 3.17.0.2)
|
|
95
94
|
lint_roller (~> 1.0)
|
|
96
|
-
rubocop (~> 1.
|
|
95
|
+
rubocop (~> 1.88.0)
|
|
97
96
|
standard-custom (~> 1.0.0)
|
|
98
|
-
standard-performance (~> 1.
|
|
97
|
+
standard-performance (~> 1.8)
|
|
99
98
|
standard-custom (1.0.2)
|
|
100
99
|
lint_roller (~> 1.0)
|
|
101
100
|
rubocop (~> 1.50)
|
|
102
|
-
standard-performance (1.
|
|
101
|
+
standard-performance (1.9.0)
|
|
103
102
|
lint_roller (~> 1.1)
|
|
104
|
-
rubocop-performance (~> 1.
|
|
105
|
-
svix (1.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
rubocop-performance (~> 1.26.0)
|
|
104
|
+
svix (1.99.1)
|
|
105
|
+
base64 (~> 0.3.0)
|
|
106
|
+
logger (~> 1.0)
|
|
107
|
+
terminal-table (4.0.0)
|
|
108
|
+
unicode-display_width (>= 1.1.1, < 4)
|
|
109
|
+
thor (1.5.0)
|
|
110
|
+
unicode-display_width (3.2.0)
|
|
111
|
+
unicode-emoji (~> 4.1)
|
|
112
|
+
unicode-emoji (4.2.0)
|
|
113
|
+
uri (1.1.1)
|
|
114
|
+
webmock (3.26.2)
|
|
112
115
|
addressable (>= 2.8.0)
|
|
113
116
|
crack (>= 0.3.2)
|
|
114
117
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
@@ -124,10 +127,10 @@ DEPENDENCIES
|
|
|
124
127
|
rake (~> 13.0)
|
|
125
128
|
rspec (~> 3.0)
|
|
126
129
|
seam!
|
|
127
|
-
simplecov (~>
|
|
130
|
+
simplecov (~> 1.1)
|
|
128
131
|
simplecov-console (~> 0.9)
|
|
129
132
|
standard (~> 1.3)
|
|
130
|
-
webmock (~> 3.
|
|
133
|
+
webmock (~> 3.26.2)
|
|
131
134
|
|
|
132
135
|
BUNDLED WITH
|
|
133
|
-
2.5.
|
|
136
|
+
2.5.22
|
|
@@ -78,12 +78,12 @@ module Seam
|
|
|
78
78
|
@workspaces = workspaces
|
|
79
79
|
end
|
|
80
80
|
|
|
81
|
-
def list(**
|
|
82
|
-
@workspaces.list(**
|
|
81
|
+
def list(**)
|
|
82
|
+
@workspaces.list(**)
|
|
83
83
|
end
|
|
84
84
|
|
|
85
|
-
def create(**
|
|
86
|
-
@workspaces.create(**
|
|
85
|
+
def create(**)
|
|
86
|
+
@workspaces.create(**)
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
data/lib/seam/paginator.rb
CHANGED
|
@@ -11,6 +11,9 @@ module Seam
|
|
|
11
11
|
def initialize(request, params = {})
|
|
12
12
|
raise ArgumentError, "request must be a Method" unless request.is_a?(Method)
|
|
13
13
|
raise ArgumentError, "params must be a Hash" unless params.is_a?(Hash)
|
|
14
|
+
unless request.parameters.any? { |_, name| name == :page_cursor }
|
|
15
|
+
raise ArgumentError, "request does not support pagination"
|
|
16
|
+
end
|
|
14
17
|
|
|
15
18
|
@request = request
|
|
16
19
|
@params = params.transform_keys(&:to_sym)
|
|
@@ -71,7 +74,7 @@ module Seam
|
|
|
71
74
|
end
|
|
72
75
|
end
|
|
73
76
|
|
|
74
|
-
Pagination = Struct.new(:has_next_page, :next_page_cursor, :next_page_url
|
|
77
|
+
Pagination = Struct.new(:has_next_page, :next_page_cursor, :next_page_url) do
|
|
75
78
|
def self.from_hash(hash)
|
|
76
79
|
return nil unless hash.is_a?(Hash) && !hash.empty?
|
|
77
80
|
|
|
@@ -14,155 +14,229 @@ module Seam
|
|
|
14
14
|
class AccessCode < BaseResource
|
|
15
15
|
class DormakabaOracodeMetadata < BaseResource
|
|
16
16
|
# Indicates whether the stay can be cancelled via the Dormakaba Oracode API.
|
|
17
|
+
# @return [Boolean, nil]
|
|
17
18
|
attr_accessor :is_cancellable
|
|
18
19
|
# Indicates whether early check-in is available for this stay.
|
|
20
|
+
# @return [Boolean, nil]
|
|
19
21
|
attr_accessor :is_early_checkin_able
|
|
20
22
|
# Indicates whether the stay can be extended via the Dormakaba Oracode API.
|
|
23
|
+
# @return [Boolean, nil]
|
|
21
24
|
attr_accessor :is_extendable
|
|
22
25
|
# Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached.
|
|
26
|
+
# @return [Boolean, nil]
|
|
23
27
|
attr_accessor :is_overridable
|
|
24
28
|
# Dormakaba Oracode site name associated with this access code.
|
|
29
|
+
# @return [String, nil]
|
|
25
30
|
attr_accessor :site_name
|
|
26
31
|
# Dormakaba Oracode stay ID associated with this access code.
|
|
32
|
+
# @return [Float, nil]
|
|
27
33
|
attr_accessor :stay_id
|
|
28
34
|
# Dormakaba Oracode user level ID associated with this access code.
|
|
35
|
+
# @return [String, nil]
|
|
29
36
|
attr_accessor :user_level_id
|
|
30
37
|
# Dormakaba Oracode user level name associated with this access code.
|
|
38
|
+
# @return [String, nil]
|
|
31
39
|
attr_accessor :user_level_name
|
|
32
40
|
end
|
|
33
41
|
|
|
34
42
|
class Errors < BaseResource
|
|
35
43
|
class ModifiedFields < BaseResource
|
|
36
44
|
# The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
|
|
45
|
+
# @return [String]
|
|
37
46
|
attr_accessor :field
|
|
38
47
|
# The previous value of the field.
|
|
48
|
+
# @return [String, nil]
|
|
39
49
|
attr_accessor :from
|
|
40
50
|
# The new value of the field.
|
|
51
|
+
# @return [String, nil]
|
|
41
52
|
attr_accessor :to
|
|
42
53
|
end
|
|
43
54
|
|
|
55
|
+
# List of fields that were changed externally, with their previous and new values.
|
|
56
|
+
# @return [Array<ModifiedFields>]
|
|
44
57
|
resource_list_accessor :modified_fields, ModifiedFields
|
|
45
58
|
# 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.
|
|
59
|
+
# @return [String, nil]
|
|
46
60
|
attr_accessor :change_type
|
|
47
61
|
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
62
|
+
# @return [String]
|
|
48
63
|
attr_accessor :error_code
|
|
49
64
|
# Indicates that this is an access code error.
|
|
65
|
+
# @return [Boolean]
|
|
50
66
|
attr_accessor :is_access_code_error
|
|
51
67
|
# Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
|
|
68
|
+
# @return [Boolean, nil]
|
|
52
69
|
attr_accessor :is_bridge_error
|
|
70
|
+
# @return [Boolean, nil]
|
|
53
71
|
attr_accessor :is_connected_account_error
|
|
72
|
+
# @return [Boolean]
|
|
54
73
|
attr_accessor :is_device_error
|
|
55
74
|
# ID of the managed access code that conflicts with this managed access code, when Seam can identify it.
|
|
75
|
+
# @return [String, nil]
|
|
56
76
|
attr_accessor :managed_access_code_id
|
|
57
77
|
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
78
|
+
# @return [String]
|
|
58
79
|
attr_accessor :message
|
|
59
80
|
# ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it.
|
|
81
|
+
# @return [String, nil]
|
|
60
82
|
attr_accessor :unmanaged_access_code_id
|
|
61
83
|
# Date and time at which Seam created the error.
|
|
84
|
+
# @return [Time, nil]
|
|
62
85
|
date_accessor :created_at
|
|
63
86
|
end
|
|
64
87
|
|
|
65
88
|
class PendingMutations < BaseResource
|
|
66
89
|
class From < BaseResource
|
|
67
90
|
# Previous PIN code.
|
|
91
|
+
# @return [String, nil]
|
|
68
92
|
attr_accessor :code
|
|
69
93
|
# Previous access code name.
|
|
94
|
+
# @return [String, nil]
|
|
70
95
|
attr_accessor :name
|
|
71
96
|
# Previous end time for the access code.
|
|
97
|
+
# @return [Time, nil]
|
|
72
98
|
date_accessor :ends_at
|
|
73
99
|
# Previous start time for the access code.
|
|
100
|
+
# @return [Time, nil]
|
|
74
101
|
date_accessor :starts_at
|
|
75
102
|
end
|
|
76
103
|
|
|
77
104
|
class To < BaseResource
|
|
78
105
|
# New PIN code.
|
|
106
|
+
# @return [String, nil]
|
|
79
107
|
attr_accessor :code
|
|
80
108
|
# New access code name.
|
|
109
|
+
# @return [String, nil]
|
|
81
110
|
attr_accessor :name
|
|
82
111
|
# New end time for the access code.
|
|
112
|
+
# @return [Time, nil]
|
|
83
113
|
date_accessor :ends_at
|
|
84
114
|
# New start time for the access code.
|
|
115
|
+
# @return [Time, nil]
|
|
85
116
|
date_accessor :starts_at
|
|
86
117
|
end
|
|
87
118
|
|
|
119
|
+
# @return [From]
|
|
88
120
|
resource_accessor :from, From
|
|
121
|
+
# @return [To]
|
|
89
122
|
resource_accessor :to, To
|
|
90
123
|
# Detailed description of the mutation.
|
|
124
|
+
# @return [String]
|
|
91
125
|
attr_accessor :message
|
|
126
|
+
# @return [String]
|
|
92
127
|
attr_accessor :mutation_code
|
|
93
128
|
# Date and time at which the mutation was created.
|
|
129
|
+
# @return [Time]
|
|
94
130
|
date_accessor :created_at
|
|
95
131
|
# Date and time at which Seam will attempt to program this access code on the device.
|
|
132
|
+
# @return [Time]
|
|
96
133
|
date_accessor :scheduled_at
|
|
97
134
|
end
|
|
98
135
|
|
|
99
136
|
class Warnings < BaseResource
|
|
100
137
|
class ModifiedFields < BaseResource
|
|
101
138
|
# The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
|
|
139
|
+
# @return [String]
|
|
102
140
|
attr_accessor :field
|
|
103
141
|
# The previous value of the field.
|
|
142
|
+
# @return [String, nil]
|
|
104
143
|
attr_accessor :from
|
|
105
144
|
# The new value of the field.
|
|
145
|
+
# @return [String, nil]
|
|
106
146
|
attr_accessor :to
|
|
107
147
|
end
|
|
108
148
|
|
|
149
|
+
# List of fields that were changed externally, with their previous and new values.
|
|
150
|
+
# @return [Array<ModifiedFields>]
|
|
109
151
|
resource_list_accessor :modified_fields, ModifiedFields
|
|
110
152
|
# 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.
|
|
153
|
+
# @return [String, nil]
|
|
111
154
|
attr_accessor :change_type
|
|
112
155
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
156
|
+
# @return [String]
|
|
113
157
|
attr_accessor :message
|
|
114
158
|
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
159
|
+
# @return [String]
|
|
115
160
|
attr_accessor :warning_code
|
|
116
161
|
# Date and time at which Seam created the warning.
|
|
162
|
+
# @return [Time, nil]
|
|
117
163
|
date_accessor :created_at
|
|
118
164
|
end
|
|
119
165
|
|
|
166
|
+
# Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices.
|
|
167
|
+
# @return [DormakabaOracodeMetadata, nil]
|
|
120
168
|
resource_accessor :dormakaba_oracode_metadata, DormakabaOracodeMetadata
|
|
169
|
+
# Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).
|
|
170
|
+
# @return [Array<Errors>]
|
|
121
171
|
resource_list_accessor :errors, Errors
|
|
172
|
+
# Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device.
|
|
173
|
+
# @return [Array<PendingMutations>]
|
|
122
174
|
resource_list_accessor :pending_mutations, PendingMutations
|
|
175
|
+
# Warnings associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).
|
|
176
|
+
# @return [Array<Warnings>]
|
|
123
177
|
resource_list_accessor :warnings, Warnings
|
|
124
178
|
# Unique identifier for the access code.
|
|
179
|
+
# @return [String]
|
|
125
180
|
attr_accessor :access_code_id
|
|
126
181
|
# Code used for access. Typically, a numeric or alphanumeric string.
|
|
182
|
+
# @return [String, nil]
|
|
127
183
|
attr_accessor :code
|
|
128
184
|
# Unique identifier for a group of access codes that share the same code.
|
|
185
|
+
# @return [String, nil]
|
|
129
186
|
attr_accessor :common_code_key
|
|
130
187
|
# Unique identifier for the device associated with the access code.
|
|
188
|
+
# @return [String]
|
|
131
189
|
attr_accessor :device_id
|
|
132
190
|
# Indicates whether the access code is a backup code.
|
|
191
|
+
# @return [Boolean, nil]
|
|
133
192
|
attr_accessor :is_backup
|
|
134
193
|
# Indicates whether a backup access code is available for use if the primary access code is lost or compromised.
|
|
194
|
+
# @return [Boolean]
|
|
135
195
|
attr_accessor :is_backup_access_code_available
|
|
136
196
|
# Indicates whether changes to the access code from external sources are permitted.
|
|
197
|
+
# @return [Boolean]
|
|
137
198
|
attr_accessor :is_external_modification_allowed
|
|
138
199
|
# Indicates whether Seam manages the access code.
|
|
200
|
+
# @return [Boolean]
|
|
139
201
|
attr_accessor :is_managed
|
|
140
202
|
# Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection.
|
|
203
|
+
# @return [Boolean]
|
|
141
204
|
attr_accessor :is_offline_access_code
|
|
142
205
|
# Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use.
|
|
206
|
+
# @return [Boolean]
|
|
143
207
|
attr_accessor :is_one_time_use
|
|
144
208
|
# Indicates whether the code is set on the device according to a preconfigured schedule.
|
|
209
|
+
# @return [Boolean, nil]
|
|
145
210
|
attr_accessor :is_scheduled_on_device
|
|
146
211
|
# Indicates whether the access code is waiting for a code assignment.
|
|
212
|
+
# @return [Boolean, nil]
|
|
147
213
|
attr_accessor :is_waiting_for_code_assignment
|
|
148
214
|
# 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).
|
|
215
|
+
# @return [String, nil]
|
|
149
216
|
attr_accessor :name
|
|
150
217
|
# Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code.
|
|
218
|
+
# @return [String, nil]
|
|
151
219
|
attr_accessor :pulled_backup_access_code_id
|
|
152
220
|
# 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).
|
|
221
|
+
# @return [String]
|
|
153
222
|
attr_accessor :status
|
|
154
223
|
# Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration.
|
|
224
|
+
# @return [String]
|
|
155
225
|
attr_accessor :type
|
|
156
226
|
# Unique identifier for the Seam workspace associated with the access code.
|
|
227
|
+
# @return [String]
|
|
157
228
|
attr_accessor :workspace_id
|
|
158
229
|
|
|
159
230
|
# Date and time at which the access code was created.
|
|
231
|
+
# @return [Time]
|
|
160
232
|
date_accessor :created_at
|
|
161
233
|
|
|
162
234
|
# Date and time after which the time-bound access code becomes inactive.
|
|
235
|
+
# @return [Time, nil]
|
|
163
236
|
date_accessor :ends_at
|
|
164
237
|
|
|
165
238
|
# Date and time at which the time-bound access code becomes active.
|
|
239
|
+
# @return [Time, nil]
|
|
166
240
|
date_accessor :starts_at
|
|
167
241
|
end
|
|
168
242
|
end
|
|
@@ -6,128 +6,188 @@ module Seam
|
|
|
6
6
|
class AccessGrant < BaseResource
|
|
7
7
|
class Errors < BaseResource
|
|
8
8
|
# Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
|
|
9
|
+
# @return [String]
|
|
9
10
|
attr_accessor :error_code
|
|
10
11
|
# Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
|
|
12
|
+
# @return [String]
|
|
11
13
|
attr_accessor :message
|
|
12
14
|
# 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.
|
|
15
|
+
# @return [Array<String>]
|
|
13
16
|
attr_accessor :missing_device_ids
|
|
14
17
|
# Date and time at which Seam created the error.
|
|
18
|
+
# @return [Time]
|
|
15
19
|
date_accessor :created_at
|
|
16
20
|
end
|
|
17
21
|
|
|
18
22
|
class PendingMutations < BaseResource
|
|
19
23
|
class From < BaseResource
|
|
20
24
|
# Previous device IDs where access codes existed.
|
|
25
|
+
# @return [Array<String>]
|
|
21
26
|
attr_accessor :device_ids
|
|
22
27
|
# Previous end time for access.
|
|
28
|
+
# @return [Time, nil]
|
|
23
29
|
date_accessor :ends_at
|
|
24
30
|
# Previous start time for access.
|
|
31
|
+
# @return [Time, nil]
|
|
25
32
|
date_accessor :starts_at
|
|
26
33
|
end
|
|
27
34
|
|
|
28
35
|
class To < BaseResource
|
|
29
36
|
# Common code key to ensure PIN code reuse across devices.
|
|
37
|
+
# @return [String, nil]
|
|
30
38
|
attr_accessor :common_code_key
|
|
31
39
|
# New device IDs where access codes should be created.
|
|
40
|
+
# @return [Array<String>]
|
|
32
41
|
attr_accessor :device_ids
|
|
33
42
|
# New end time for access.
|
|
43
|
+
# @return [Time, nil]
|
|
34
44
|
date_accessor :ends_at
|
|
35
45
|
# New start time for access.
|
|
46
|
+
# @return [Time, nil]
|
|
36
47
|
date_accessor :starts_at
|
|
37
48
|
end
|
|
38
49
|
|
|
50
|
+
# @return [From]
|
|
39
51
|
resource_accessor :from, From
|
|
52
|
+
# @return [To]
|
|
40
53
|
resource_accessor :to, To
|
|
41
54
|
# IDs of the access methods being updated.
|
|
55
|
+
# @return [Array<String>]
|
|
42
56
|
attr_accessor :access_method_ids
|
|
43
57
|
# Detailed description of the mutation.
|
|
58
|
+
# @return [String]
|
|
44
59
|
attr_accessor :message
|
|
60
|
+
# @return [String]
|
|
45
61
|
attr_accessor :mutation_code
|
|
46
62
|
# Date and time at which the mutation was created.
|
|
63
|
+
# @return [Time]
|
|
47
64
|
date_accessor :created_at
|
|
48
65
|
end
|
|
49
66
|
|
|
50
67
|
class RequestedAccessMethods < BaseResource
|
|
51
68
|
# Specific PIN code to use for this access method. Only applicable when mode is 'code'.
|
|
69
|
+
# @return [String, nil]
|
|
52
70
|
attr_accessor :code
|
|
53
71
|
# IDs of the access methods created for the requested access method.
|
|
72
|
+
# @return [Array<String>]
|
|
54
73
|
attr_accessor :created_access_method_ids
|
|
55
74
|
# Display name of the access method.
|
|
75
|
+
# @return [String]
|
|
56
76
|
attr_accessor :display_name
|
|
57
77
|
# Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified.
|
|
78
|
+
# @return [Integer, nil]
|
|
58
79
|
attr_accessor :instant_key_max_use_count
|
|
59
80
|
# Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
|
|
81
|
+
# @return [String]
|
|
60
82
|
attr_accessor :mode
|
|
61
83
|
# Date and time at which the requested access method was added to the Access Grant.
|
|
84
|
+
# @return [Time]
|
|
62
85
|
date_accessor :created_at
|
|
63
86
|
end
|
|
64
87
|
|
|
65
88
|
class Warnings < BaseResource
|
|
66
89
|
class FailedDevices < BaseResource
|
|
67
90
|
# Device whose access code could not be revoked.
|
|
91
|
+
# @return [String]
|
|
68
92
|
attr_accessor :device_id
|
|
69
93
|
# Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`).
|
|
94
|
+
# @return [String]
|
|
70
95
|
attr_accessor :error_code
|
|
71
96
|
# Human-readable description of why revocation failed.
|
|
97
|
+
# @return [String]
|
|
72
98
|
attr_accessor :message
|
|
73
99
|
end
|
|
74
100
|
|
|
101
|
+
# Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget).
|
|
102
|
+
# @return [Array<FailedDevices>]
|
|
75
103
|
resource_list_accessor :failed_devices, FailedDevices
|
|
76
104
|
# IDs of the access methods being updated.
|
|
105
|
+
# @return [Array<String>]
|
|
77
106
|
attr_accessor :access_method_ids
|
|
107
|
+
# @return [String]
|
|
78
108
|
attr_accessor :device_id
|
|
79
109
|
# Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
|
|
110
|
+
# @return [String]
|
|
80
111
|
attr_accessor :message
|
|
81
112
|
# The new PIN code that was assigned instead.
|
|
113
|
+
# @return [String]
|
|
82
114
|
attr_accessor :new_code
|
|
83
115
|
# The originally requested PIN code that was unavailable.
|
|
116
|
+
# @return [String]
|
|
84
117
|
attr_accessor :original_code
|
|
85
118
|
# Specific reason why the grant's times are not programmable on the device.
|
|
119
|
+
# @return [String]
|
|
86
120
|
attr_accessor :reason
|
|
87
121
|
# Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
|
|
122
|
+
# @return [String]
|
|
88
123
|
attr_accessor :warning_code
|
|
89
124
|
# Date and time at which Seam created the warning.
|
|
125
|
+
# @return [Time]
|
|
90
126
|
date_accessor :created_at
|
|
91
127
|
end
|
|
92
128
|
|
|
129
|
+
# Errors associated with the [access grant](https://docs.seam.co/use-cases/granting-access).
|
|
130
|
+
# @return [Array<Errors>]
|
|
93
131
|
resource_list_accessor :errors, Errors
|
|
132
|
+
# List of pending mutations for the access grant. This shows updates that are in progress.
|
|
133
|
+
# @return [Array<PendingMutations>]
|
|
94
134
|
resource_list_accessor :pending_mutations, PendingMutations
|
|
135
|
+
# Access methods that the user requested for the Access Grant.
|
|
136
|
+
# @return [Array<RequestedAccessMethods>]
|
|
95
137
|
resource_list_accessor :requested_access_methods, RequestedAccessMethods
|
|
138
|
+
# Warnings associated with the [access grant](https://docs.seam.co/use-cases/granting-access).
|
|
139
|
+
# @return [Array<Warnings>]
|
|
96
140
|
resource_list_accessor :warnings, Warnings
|
|
97
141
|
# ID of the Access Grant.
|
|
142
|
+
# @return [String]
|
|
98
143
|
attr_accessor :access_grant_id
|
|
99
144
|
# Unique key for the access grant within the workspace.
|
|
145
|
+
# @return [String, nil]
|
|
100
146
|
attr_accessor :access_grant_key
|
|
101
147
|
# IDs of the access methods created for the Access Grant.
|
|
148
|
+
# @return [Array<String>]
|
|
102
149
|
attr_accessor :access_method_ids
|
|
103
150
|
# Client Session Token. Only returned if the Access Grant has a mobile_key access method.
|
|
151
|
+
# @return [String, nil]
|
|
104
152
|
attr_accessor :client_session_token
|
|
105
153
|
# ID of the customization profile associated with the Access Grant.
|
|
154
|
+
# @return [String, nil]
|
|
106
155
|
attr_accessor :customization_profile_id
|
|
107
156
|
# Display name of the Access Grant.
|
|
157
|
+
# @return [String]
|
|
108
158
|
attr_accessor :display_name
|
|
109
159
|
# Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method.
|
|
160
|
+
# @return [String, nil]
|
|
110
161
|
attr_accessor :instant_key_url
|
|
162
|
+
# @return [Array<String>]
|
|
111
163
|
# @deprecated Use `space_ids`.
|
|
112
164
|
attr_accessor :location_ids
|
|
113
165
|
# Name of the Access Grant. If not provided, the display name will be computed.
|
|
166
|
+
# @return [String, nil]
|
|
114
167
|
attr_accessor :name
|
|
115
168
|
# Reservation key for the access grant.
|
|
169
|
+
# @return [String, nil]
|
|
116
170
|
attr_accessor :reservation_key
|
|
117
171
|
# IDs of the spaces to which the Access Grant gives access.
|
|
172
|
+
# @return [Array<String>]
|
|
118
173
|
attr_accessor :space_ids
|
|
119
174
|
# ID of user identity to which the Access Grant gives access.
|
|
175
|
+
# @return [String]
|
|
120
176
|
attr_accessor :user_identity_id
|
|
121
177
|
# ID of the Seam workspace associated with the Access Grant.
|
|
178
|
+
# @return [String]
|
|
122
179
|
attr_accessor :workspace_id
|
|
123
180
|
|
|
124
181
|
# Date and time at which the Access Grant was created.
|
|
182
|
+
# @return [Time]
|
|
125
183
|
date_accessor :created_at
|
|
126
184
|
|
|
127
185
|
# Date and time at which the Access Grant ends.
|
|
186
|
+
# @return [Time, nil]
|
|
128
187
|
date_accessor :ends_at
|
|
129
188
|
|
|
130
189
|
# Date and time at which the Access Grant starts.
|
|
190
|
+
# @return [Time]
|
|
131
191
|
date_accessor :starts_at
|
|
132
192
|
end
|
|
133
193
|
end
|