seam 2.134.0 → 2.136.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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +17 -7
  4. data/lib/seam/auth.rb +1 -1
  5. data/lib/seam/base_resource.rb +45 -1
  6. data/lib/seam/deep_hash_accessor.rb +8 -4
  7. data/lib/seam/{http_multi_workspace.rb → http_without_workspace.rb} +4 -3
  8. data/lib/seam/request.rb +0 -1
  9. data/lib/seam/resources/access_code.rb +109 -7
  10. data/lib/seam/resources/access_grant.rb +90 -7
  11. data/lib/seam/resources/access_method.rb +49 -5
  12. data/lib/seam/resources/acs_access_group.rb +69 -7
  13. data/lib/seam/resources/acs_credential.rb +54 -7
  14. data/lib/seam/resources/acs_encoder.rb +10 -2
  15. data/lib/seam/resources/acs_entrance.rb +166 -25
  16. data/lib/seam/resources/acs_system.rb +40 -7
  17. data/lib/seam/resources/acs_user.rb +93 -11
  18. data/lib/seam/resources/action_attempt.rb +304 -5
  19. data/lib/seam/resources/connected_account.rb +70 -6
  20. data/lib/seam/resources/device.rb +1126 -11
  21. data/lib/seam/resources/event.rb +133 -49
  22. data/lib/seam/resources/index.rb +0 -4
  23. data/lib/seam/resources/instant_key.rb +10 -2
  24. data/lib/seam/resources/phone.rb +44 -5
  25. data/lib/seam/resources/space.rb +20 -4
  26. data/lib/seam/resources/thermostat_daily_program.rb +8 -2
  27. data/lib/seam/resources/thermostat_schedule.rb +10 -2
  28. data/lib/seam/resources/unmanaged_access_code.rb +74 -5
  29. data/lib/seam/resources/unmanaged_access_grant.rb +90 -7
  30. data/lib/seam/resources/unmanaged_access_method.rb +49 -5
  31. data/lib/seam/resources/unmanaged_device.rb +99 -7
  32. data/lib/seam/resources/unmanaged_user_identity.rb +24 -3
  33. data/lib/seam/resources/user_identity.rb +24 -3
  34. data/lib/seam/resources/workspace.rb +14 -1
  35. data/lib/seam/version.rb +1 -1
  36. data/lib/seam.rb +1 -1
  37. metadata +3 -7
  38. data/lib/seam/resources/resource_error.rb +0 -11
  39. data/lib/seam/resources/resource_errors_support.rb +0 -11
  40. data/lib/seam/resources/resource_warning.rb +0 -11
  41. data/lib/seam/resources/resource_warnings_support.rb +0 -11
@@ -3,14 +3,141 @@
3
3
  module Seam
4
4
  module Resources
5
5
  class SeamEvent < BaseResource
6
- # Errors associated with the access code.
7
- attr_accessor :access_code_errors
8
- # ID of the affected access code.
6
+ class AccessCodeErrors < BaseResource
7
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
8
+ attr_accessor :error_code
9
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
10
+ attr_accessor :message
11
+ # Date and time at which Seam created the error.
12
+ date_accessor :created_at
13
+ end
14
+
15
+ class AccessCodeWarnings < BaseResource
16
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
17
+ attr_accessor :message
18
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
19
+ attr_accessor :warning_code
20
+ # Date and time at which Seam created the warning.
21
+ date_accessor :created_at
22
+ end
23
+
24
+ class AcsSystemErrors < BaseResource
25
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
26
+ attr_accessor :error_code
27
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
28
+ attr_accessor :message
29
+ # Date and time at which Seam created the error.
30
+ date_accessor :created_at
31
+ end
32
+
33
+ class AcsSystemWarnings < BaseResource
34
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
35
+ attr_accessor :message
36
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
37
+ attr_accessor :warning_code
38
+ # Date and time at which Seam created the warning.
39
+ date_accessor :created_at
40
+ end
41
+
42
+ class ChangedProperties < BaseResource
43
+ # Previous value of the property, or null if not set.
44
+ attr_accessor :from
45
+ # Name of the property that changed (e.g. `code`).
46
+ attr_accessor :property
47
+ # New value of the property, or null if cleared.
48
+ attr_accessor :to
49
+ end
50
+
51
+ class ConnectedAccountErrors < BaseResource
52
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
53
+ attr_accessor :error_code
54
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
55
+ attr_accessor :message
56
+ # Date and time at which Seam created the error.
57
+ date_accessor :created_at
58
+ end
59
+
60
+ class ConnectedAccountWarnings < BaseResource
61
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
62
+ attr_accessor :message
63
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
64
+ attr_accessor :warning_code
65
+ # Date and time at which Seam created the warning.
66
+ date_accessor :created_at
67
+ end
68
+
69
+ class DeviceErrors < BaseResource
70
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
71
+ attr_accessor :error_code
72
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
73
+ attr_accessor :message
74
+ # Date and time at which Seam created the error.
75
+ date_accessor :created_at
76
+ end
77
+
78
+ class DeviceWarnings < BaseResource
79
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
80
+ attr_accessor :message
81
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
82
+ attr_accessor :warning_code
83
+ # Date and time at which Seam created the warning.
84
+ date_accessor :created_at
85
+ end
86
+
87
+ class From < BaseResource
88
+ # Previous pin code.
89
+ attr_accessor :code
90
+ # Previous end time.
91
+ attr_accessor :ends_at
92
+ # Previous name of the access code.
93
+ attr_accessor :name
94
+ # Previous start time.
95
+ attr_accessor :starts_at
96
+ end
97
+
98
+ class Reason < BaseResource
99
+ # Human-readable explanation of why access was denied.
100
+ attr_accessor :message
101
+ # Normalized reason a lock denied access. Provider-agnostic; not all providers report every value.
102
+ attr_accessor :reason_code
103
+ end
104
+
105
+ class RequestedMutations < BaseResource
106
+ # Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`.
107
+ attr_accessor :from
108
+ # Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`.
109
+ attr_accessor :mutation_code
110
+ # New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`.
111
+ attr_accessor :to
112
+ end
113
+
114
+ class To < BaseResource
115
+ # New pin code.
116
+ attr_accessor :code
117
+ # New end time.
118
+ attr_accessor :ends_at
119
+ # New name of the access code.
120
+ attr_accessor :name
121
+ # New start time.
122
+ attr_accessor :starts_at
123
+ end
124
+
125
+ resource_accessor :from, From
126
+ resource_accessor :reason, Reason
127
+ resource_accessor :to, To
128
+ resource_list_accessor :access_code_errors, AccessCodeErrors
129
+ resource_list_accessor :access_code_warnings, AccessCodeWarnings
130
+ resource_list_accessor :acs_system_errors, AcsSystemErrors
131
+ resource_list_accessor :acs_system_warnings, AcsSystemWarnings
132
+ resource_list_accessor :changed_properties, ChangedProperties
133
+ resource_list_accessor :connected_account_errors, ConnectedAccountErrors
134
+ resource_list_accessor :connected_account_warnings, ConnectedAccountWarnings
135
+ resource_list_accessor :device_errors, DeviceErrors
136
+ resource_list_accessor :device_warnings, DeviceWarnings
137
+ resource_list_accessor :requested_mutations, RequestedMutations
9
138
  attr_accessor :access_code_id
10
139
  # Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set.
11
140
  attr_accessor :access_code_is_managed
12
- # Warnings associated with the access code.
13
- attr_accessor :access_code_warnings
14
141
  # ID of the affected Access Grant.
15
142
  attr_accessor :access_grant_id
16
143
  # IDs of the access grants associated with this access method.
@@ -27,19 +154,10 @@ module Seam
27
154
  attr_accessor :acs_credential_id
28
155
  # ID of the affected encoder.
29
156
  attr_accessor :acs_encoder_id
30
- # ID of the affected [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
31
157
  attr_accessor :acs_entrance_id
32
- # IDs of all ACS entrances currently attached to the space.
33
158
  attr_accessor :acs_entrance_ids
34
- # Errors associated with the access control system.
35
- attr_accessor :acs_system_errors
36
- # ID of the access system.
37
159
  attr_accessor :acs_system_id
38
- # Warnings associated with the access control system.
39
- attr_accessor :acs_system_warnings
40
- # ID of the affected access system user.
41
160
  attr_accessor :acs_user_id
42
- # ID of the affected action attempt.
43
161
  attr_accessor :action_attempt_id
44
162
  # Type of the action.
45
163
  attr_accessor :action_type
@@ -53,31 +171,20 @@ module Seam
53
171
  attr_accessor :battery_status
54
172
  # Human-readable reason for the change (e.g. `ongoing code auto-renewed`).
55
173
  attr_accessor :change_reason
56
- # List of properties that changed on the access code.
57
- attr_accessor :changed_properties
58
174
  # ID of the affected client session.
59
175
  attr_accessor :client_session_id
60
176
  # Key of the climate preset that was activated.
61
177
  attr_accessor :climate_preset_key
62
- # Code for the affected access code.
63
178
  attr_accessor :code
64
- # ID of the Connect Webview associated with the event.
65
179
  attr_accessor :connect_webview_id
66
- # Custom metadata of the connected account, present when connected_account_id is provided.
67
180
  attr_accessor :connected_account_custom_metadata
68
- # Errors associated with the connected account.
69
- attr_accessor :connected_account_errors
70
- # ID of the connected account associated with the affected access code.
71
181
  attr_accessor :connected_account_id
72
182
  # undocumented: Unreleased.
73
183
  attr_accessor :connected_account_type
74
- # Warnings associated with the connected account.
75
- attr_accessor :connected_account_warnings
76
184
  # Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
77
185
  attr_accessor :cooling_set_point_celsius
78
186
  # Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
79
187
  attr_accessor :cooling_set_point_fahrenheit
80
- # The customer key associated with this connected account, if any.
81
188
  attr_accessor :customer_key
82
189
  # Human-readable description of the change and its source.
83
190
  attr_accessor :description
@@ -85,18 +192,10 @@ module Seam
85
192
  attr_accessor :desired_temperature_celsius
86
193
  # Desired temperature, in °F, defined by the affected thermostat's cooling or heating set point.
87
194
  attr_accessor :desired_temperature_fahrenheit
88
- # Custom metadata of the device, present when device_id is provided.
89
195
  attr_accessor :device_custom_metadata
90
- # Errors associated with the device.
91
- attr_accessor :device_errors
92
- # ID of the device associated with the affected access code.
93
196
  attr_accessor :device_id
94
- # IDs of all devices currently attached to the space.
95
197
  attr_accessor :device_ids
96
- # Name of the deleted device, captured at deletion time. The device record no longer exists when this event fires, so the name is preserved here. Null when the device had no resolvable name.
97
198
  attr_accessor :device_name
98
- # Warnings associated with the device.
99
- attr_accessor :device_warnings
100
199
  # The new end time for the access grant.
101
200
  attr_accessor :ends_at
102
201
  # Error code associated with the disconnection event, if any.
@@ -107,32 +206,27 @@ module Seam
107
206
  attr_accessor :event_description
108
207
  # ID of the event.
109
208
  attr_accessor :event_id
209
+ # Type of the event.
110
210
  attr_accessor :event_type
111
211
  # Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`.
112
212
  attr_accessor :fan_mode_setting
113
- # Previous access code name configuration.
114
- attr_accessor :from
115
213
  # Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
116
214
  attr_accessor :heating_set_point_celsius
117
215
  # Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
118
216
  attr_accessor :heating_set_point_fahrenheit
119
217
  # Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`.
120
218
  attr_accessor :hvac_mode_setting
121
- # URL to a thumbnail image captured at the time of activation.
122
219
  attr_accessor :image_url
123
220
  # Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used).
124
221
  attr_accessor :is_backup_code
125
222
  # Indicates whether the climate preset that was activated is the fallback climate preset for the thermostat.
126
223
  attr_accessor :is_fallback_climate_preset
127
- # Whether the lock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action.
128
224
  attr_accessor :is_via_bluetooth
129
- # Whether the lock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action.
130
225
  attr_accessor :is_via_nfc
131
226
  # Lower temperature limit, in °C, defined by the set threshold.
132
227
  attr_accessor :lower_limit_celsius
133
228
  # Lower temperature limit, in °F, defined by the set threshold.
134
229
  attr_accessor :lower_limit_fahrenheit
135
- # Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined.
136
230
  attr_accessor :method
137
231
  # Metadata from Minut.
138
232
  attr_accessor :minut_metadata
@@ -150,10 +244,6 @@ module Seam
150
244
  attr_accessor :noise_threshold_name
151
245
  # Metadata from Noiseaware.
152
246
  attr_accessor :noiseaware_metadata
153
- # Why access was denied, when the provider reports a determinable cause. Omitted when unknown.
154
- attr_accessor :reason
155
- # Array of mutations requested on the access code, each containing the mutation type and from/to values.
156
- attr_accessor :requested_mutations
157
247
  # ID of the affected space.
158
248
  attr_accessor :space_id
159
249
  # Unique key for the space within the workspace.
@@ -168,17 +258,11 @@ module Seam
168
258
  attr_accessor :temperature_fahrenheit
169
259
  # ID of the thermostat schedule that prompted the affected climate preset to be activated.
170
260
  attr_accessor :thermostat_schedule_id
171
- # New access code name configuration.
172
- attr_accessor :to
173
261
  # Upper temperature limit, in °C, defined by the set threshold.
174
262
  attr_accessor :upper_limit_celsius
175
263
  # Upper temperature limit, in °F, defined by the set threshold.
176
264
  attr_accessor :upper_limit_fahrenheit
177
- # undocumented: Unreleased.
178
- # ---
179
- # ID of the user identity associated with the lock event.
180
265
  attr_accessor :user_identity_id
181
- # URL to a short video clip captured at the time of activation.
182
266
  attr_accessor :video_url
183
267
  # ID of the workspace associated with the event.
184
268
  attr_accessor :workspace_id
@@ -1,10 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "seam/base_resource"
4
- require_relative "resource_error"
5
- require_relative "resource_warning"
6
- require_relative "resource_errors_support"
7
- require_relative "resource_warnings_support"
8
4
  require_relative "access_code"
9
5
  require_relative "access_grant"
10
6
  require_relative "access_method"
@@ -6,10 +6,18 @@ module Seam
6
6
  #
7
7
  # There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work.
8
8
  class InstantKey < BaseResource
9
+ class Customization < BaseResource
10
+ # URL of the logo displayed on the Instant Key.
11
+ attr_accessor :logo_url
12
+ # Primary color used in the Instant Key UI.
13
+ attr_accessor :primary_color
14
+ # Secondary color used in the Instant Key UI.
15
+ attr_accessor :secondary_color
16
+ end
17
+
18
+ resource_accessor :customization, Customization
9
19
  # ID of the client session associated with the Instant Key.
10
20
  attr_accessor :client_session_id
11
- # Customization applied to the Instant Key UI.
12
- attr_accessor :customization
13
21
  # ID of the customization profile associated with the Instant Key.
14
22
  attr_accessor :customization_profile_id
15
23
  # ID of the Instant Key.
@@ -4,6 +4,50 @@ module Seam
4
4
  module Resources
5
5
  # Represents an app user's mobile phone.
6
6
  class Phone < BaseResource
7
+ class Errors < BaseResource
8
+ # Unique identifier of the type of error.
9
+ attr_accessor :error_code
10
+ # Detailed description of the error.
11
+ attr_accessor :message
12
+ # Date and time at which Seam created the error.
13
+ date_accessor :created_at
14
+ end
15
+
16
+ class Properties < BaseResource
17
+ class AssaAbloyCredentialServiceMetadata < BaseResource
18
+ class Endpoints < BaseResource
19
+ # ID of the associated endpoint.
20
+ attr_accessor :endpoint_id
21
+ # Indicated whether the endpoint is active.
22
+ attr_accessor :is_active
23
+ end
24
+
25
+ resource_list_accessor :endpoints, Endpoints
26
+ # Indicates whether the credential service has active endpoints associated with the phone.
27
+ attr_accessor :has_active_endpoint
28
+ end
29
+
30
+ class SaltoSpaceCredentialServiceMetadata < BaseResource
31
+ # Indicates whether the credential service has an active associated phone.
32
+ attr_accessor :has_active_phone
33
+ end
34
+
35
+ resource_accessor :assa_abloy_credential_service_metadata, AssaAbloyCredentialServiceMetadata
36
+ resource_accessor :salto_space_credential_service_metadata, SaltoSpaceCredentialServiceMetadata
37
+ end
38
+
39
+ class Warnings < BaseResource
40
+ # Detailed description of the warning.
41
+ attr_accessor :message
42
+ # Unique identifier of the type of warning.
43
+ attr_accessor :warning_code
44
+ # Date and time at which Seam created the warning.
45
+ date_accessor :created_at
46
+ end
47
+
48
+ resource_accessor :properties, Properties
49
+ resource_list_accessor :errors, Errors
50
+ resource_list_accessor :warnings, Warnings
7
51
  # Optional [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone.
8
52
  attr_accessor :custom_metadata
9
53
  # ID of the phone.
@@ -14,16 +58,11 @@ module Seam
14
58
  attr_accessor :display_name
15
59
  # Optional nickname to describe the phone, settable through Seam.
16
60
  attr_accessor :nickname
17
- # Properties of the phone.
18
- attr_accessor :properties
19
61
  # ID of the workspace that contains the phone.
20
62
  attr_accessor :workspace_id
21
63
 
22
64
  # Date and time at which the phone was created.
23
65
  date_accessor :created_at
24
-
25
- include Seam::Resources::ResourceErrorsSupport
26
- include Seam::Resources::ResourceWarningsSupport
27
66
  end
28
67
  end
29
68
  end
@@ -4,18 +4,34 @@ module Seam
4
4
  module Resources
5
5
  # Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient.
6
6
  class Space < BaseResource
7
+ class CustomerData < BaseResource
8
+ # Postal address for the space.
9
+ attr_accessor :address
10
+ # Default check-in time for reservations at the space, as HH:mm or HH:mm:ss.
11
+ attr_accessor :default_checkin_time
12
+ # Default check-out time for reservations at the space, as HH:mm or HH:mm:ss.
13
+ attr_accessor :default_checkout_time
14
+ # IANA time zone for the space, e.g. America/Los_Angeles.
15
+ attr_accessor :time_zone
16
+ end
17
+
18
+ class Geolocation < BaseResource
19
+ # Latitude of the space, in decimal degrees.
20
+ attr_accessor :latitude
21
+ # Longitude of the space, in decimal degrees.
22
+ attr_accessor :longitude
23
+ end
24
+
25
+ resource_accessor :customer_data, CustomerData
26
+ resource_accessor :geolocation, Geolocation
7
27
  # Number of entrances in the space.
8
28
  attr_accessor :acs_entrance_count
9
- # Reservation/stay-related defaults for the space. Also carries the provider/PMS-supplied name under a `<connector_type>_name` key (e.g. `guesty_name`), which Seam preserves when you rename the space (read-only — managed by Seam).
10
- attr_accessor :customer_data
11
29
  # Customer key associated with the space.
12
30
  attr_accessor :customer_key
13
31
  # Number of devices in the space.
14
32
  attr_accessor :device_count
15
33
  # Display name for the space.
16
34
  attr_accessor :display_name
17
- # Geographic coordinates (latitude and longitude) of the space.
18
- attr_accessor :geolocation
19
35
  # Name of the space.
20
36
  attr_accessor :name
21
37
  # ID of the space.
@@ -4,12 +4,18 @@ module Seam
4
4
  module Resources
5
5
  # Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time.
6
6
  class ThermostatDailyProgram < BaseResource
7
+ class Periods < BaseResource
8
+ # Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`.
9
+ attr_accessor :climate_preset_key
10
+ # Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
11
+ attr_accessor :starts_at_time
12
+ end
13
+
14
+ resource_list_accessor :periods, Periods
7
15
  # ID of the thermostat device on which the thermostat daily program is configured.
8
16
  attr_accessor :device_id
9
17
  # User-friendly name to identify the thermostat daily program.
10
18
  attr_accessor :name
11
- # Array of thermostat daily program periods.
12
- attr_accessor :periods
13
19
  # ID of the thermostat daily program.
14
20
  attr_accessor :thermostat_daily_program_id
15
21
  # ID of the workspace that contains the thermostat daily program.
@@ -4,6 +4,16 @@ module Seam
4
4
  module Resources
5
5
  # Represents a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://docs.seam.co/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time.
6
6
  class ThermostatSchedule < 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
+ resource_list_accessor :errors, Errors
7
17
  # Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules).
8
18
  attr_accessor :climate_preset_key
9
19
  # ID of the desired [thermostat](https://docs.seam.co/capability-guides/thermostats) device.
@@ -27,8 +37,6 @@ module Seam
27
37
 
28
38
  # Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
29
39
  date_accessor :starts_at
30
-
31
- include Seam::Resources::ResourceErrorsSupport
32
40
  end
33
41
  end
34
42
  end
@@ -14,6 +14,80 @@ module Seam
14
14
  #
15
15
  # - [Kwikset](https://docs.seam.co/device-and-system-integration-guides/kwikset-locks)
16
16
  class UnmanagedAccessCode < BaseResource
17
+ class DormakabaOracodeMetadata < BaseResource
18
+ # Indicates whether the stay can be cancelled via the Dormakaba Oracode API.
19
+ attr_accessor :is_cancellable
20
+ # Indicates whether early check-in is available for this stay.
21
+ attr_accessor :is_early_checkin_able
22
+ # Indicates whether the stay can be extended via the Dormakaba Oracode API.
23
+ attr_accessor :is_extendable
24
+ # Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached.
25
+ attr_accessor :is_overridable
26
+ # Dormakaba Oracode site name associated with this access code.
27
+ attr_accessor :site_name
28
+ # Dormakaba Oracode stay ID associated with this access code.
29
+ attr_accessor :stay_id
30
+ # Dormakaba Oracode user level ID associated with this access code.
31
+ attr_accessor :user_level_id
32
+ # Dormakaba Oracode user level name associated with this access code.
33
+ attr_accessor :user_level_name
34
+ end
35
+
36
+ class Errors < BaseResource
37
+ class ModifiedFields < BaseResource
38
+ # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
39
+ attr_accessor :field
40
+ # The previous value of the field.
41
+ attr_accessor :from
42
+ # The new value of the field.
43
+ attr_accessor :to
44
+ end
45
+
46
+ resource_list_accessor :modified_fields, ModifiedFields
47
+ # 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.
48
+ attr_accessor :change_type
49
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
50
+ attr_accessor :error_code
51
+ # Indicates that this is an access code error.
52
+ attr_accessor :is_access_code_error
53
+ # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
54
+ attr_accessor :is_bridge_error
55
+ attr_accessor :is_connected_account_error
56
+ attr_accessor :is_device_error
57
+ # ID of the managed access code that conflicts with this managed access code, when Seam can identify it.
58
+ attr_accessor :managed_access_code_id
59
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
60
+ attr_accessor :message
61
+ # ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it.
62
+ attr_accessor :unmanaged_access_code_id
63
+ # Date and time at which Seam created the error.
64
+ date_accessor :created_at
65
+ end
66
+
67
+ class Warnings < BaseResource
68
+ class ModifiedFields < BaseResource
69
+ # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
70
+ attr_accessor :field
71
+ # The previous value of the field.
72
+ attr_accessor :from
73
+ # The new value of the field.
74
+ attr_accessor :to
75
+ end
76
+
77
+ resource_list_accessor :modified_fields, ModifiedFields
78
+ # 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.
79
+ attr_accessor :change_type
80
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
81
+ attr_accessor :message
82
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
83
+ attr_accessor :warning_code
84
+ # Date and time at which Seam created the warning.
85
+ date_accessor :created_at
86
+ end
87
+
88
+ resource_accessor :dormakaba_oracode_metadata, DormakabaOracodeMetadata
89
+ resource_list_accessor :errors, Errors
90
+ resource_list_accessor :warnings, Warnings
17
91
  # Unique identifier for the access code.
18
92
  attr_accessor :access_code_id
19
93
  # Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations.
@@ -24,8 +98,6 @@ module Seam
24
98
  attr_accessor :code
25
99
  # Unique identifier for the device associated with the access code.
26
100
  attr_accessor :device_id
27
- # Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices.
28
- attr_accessor :dormakaba_oracode_metadata
29
101
  # Indicates that Seam does not manage the access code.
30
102
  attr_accessor :is_managed
31
103
  # 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).
@@ -45,9 +117,6 @@ module Seam
45
117
 
46
118
  # Date and time at which the time-bound access code becomes active.
47
119
  date_accessor :starts_at
48
-
49
- include Seam::Resources::ResourceErrorsSupport
50
- include Seam::Resources::ResourceWarningsSupport
51
120
  end
52
121
  end
53
122
  end