seam 2.143.0 → 2.145.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 (47) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +11 -7
  4. data/lib/seam/base_resource.rb +24 -3
  5. data/lib/seam/resources/access_code.rb +682 -43
  6. data/lib/seam/resources/access_grant.rb +189 -25
  7. data/lib/seam/resources/access_method.rb +105 -3
  8. data/lib/seam/resources/acs_access_group.rb +52 -0
  9. data/lib/seam/resources/acs_credential.rb +153 -6
  10. data/lib/seam/resources/acs_encoder.rb +2 -0
  11. data/lib/seam/resources/acs_entrance.rb +105 -0
  12. data/lib/seam/resources/acs_system.rb +278 -6
  13. data/lib/seam/resources/acs_user.rb +201 -0
  14. data/lib/seam/resources/action_attempt.rb +1457 -279
  15. data/lib/seam/resources/connect_webview.rb +14 -0
  16. data/lib/seam/resources/connected_account.rb +284 -40
  17. data/lib/seam/resources/device.rb +928 -13
  18. data/lib/seam/resources/device_provider.rb +74 -0
  19. data/lib/seam/resources/event.rb +5205 -316
  20. data/lib/seam/resources/phone.rb +3 -0
  21. data/lib/seam/resources/unmanaged_access_code.rb +677 -43
  22. data/lib/seam/resources/unmanaged_access_grant.rb +189 -25
  23. data/lib/seam/resources/unmanaged_access_method.rb +105 -3
  24. data/lib/seam/resources/unmanaged_device.rb +826 -13
  25. data/lib/seam/resources/unmanaged_user_identity.rb +67 -0
  26. data/lib/seam/resources/user_identity.rb +67 -0
  27. data/lib/seam/resources/workspace.rb +3 -0
  28. data/lib/seam/routes/access_codes.rb +1 -1
  29. data/lib/seam/routes/access_grants.rb +2 -2
  30. data/lib/seam/routes/access_methods.rb +1 -1
  31. data/lib/seam/routes/acs_encoders.rb +1 -1
  32. data/lib/seam/routes/acs_entrances.rb +2 -2
  33. data/lib/seam/routes/action_attempts.rb +1 -1
  34. data/lib/seam/routes/connect_webviews.rb +1 -1
  35. data/lib/seam/routes/connected_accounts.rb +1 -1
  36. data/lib/seam/routes/customers.rb +1 -1
  37. data/lib/seam/routes/devices.rb +1 -1
  38. data/lib/seam/routes/devices_unmanaged.rb +1 -1
  39. data/lib/seam/routes/events.rb +1 -1
  40. data/lib/seam/routes/locks.rb +1 -1
  41. data/lib/seam/routes/noise_sensors.rb +1 -1
  42. data/lib/seam/routes/spaces.rb +3 -3
  43. data/lib/seam/routes/thermostats.rb +1 -1
  44. data/lib/seam/routes/user_identities.rb +1 -1
  45. data/lib/seam/version.rb +1 -1
  46. data/lib/seam/webhook.rb +5 -2
  47. metadata +1 -1
@@ -41,80 +41,708 @@ module Seam
41
41
  attr_accessor :user_level_name
42
42
  end
43
43
 
44
+ # Known `error_code` values load as subclasses; unknown values remain Errors instances for forward compatibility.
44
45
  class Errors < BaseResource
45
- class ModifiedFields < BaseResource
46
- # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
46
+ # Indicates a provider-specific issue that prevents the access code from being set or managed. Check the error message for details.
47
+ class ProviderIssue < Errors
48
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
47
49
  # @return [String]
48
- attr_accessor :field
49
- # The previous value of the field.
50
+ # Known values:
51
+ # - `provider_issue`
52
+ attr_accessor :error_code
53
+ # Indicates that this is an access code error.
54
+ # @return [TrueClass]
55
+ attr_accessor :is_access_code_error
56
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
57
+ # @return [String]
58
+ attr_accessor :message
59
+ # Date and time at which Seam created the error.
60
+ # @return [Time, nil]
61
+ date_accessor :created_at
62
+ end
63
+
64
+ # Failed to set code on device.
65
+ class FailedToSetOnDevice < Errors
66
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
67
+ # @return [String]
68
+ # Known values:
69
+ # - `failed_to_set_on_device`
70
+ attr_accessor :error_code
71
+ # Indicates that this is an access code error.
72
+ # @return [TrueClass]
73
+ attr_accessor :is_access_code_error
74
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
75
+ # @return [String]
76
+ attr_accessor :message
77
+ # Date and time at which Seam created the error.
78
+ # @return [Time, nil]
79
+ date_accessor :created_at
80
+ end
81
+
82
+ # Failed to remove code from device.
83
+ class FailedToRemoveFromDevice < Errors
84
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
85
+ # @return [String]
86
+ # Known values:
87
+ # - `failed_to_remove_from_device`
88
+ attr_accessor :error_code
89
+ # Indicates that this is an access code error.
90
+ # @return [TrueClass]
91
+ attr_accessor :is_access_code_error
92
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
93
+ # @return [String]
94
+ attr_accessor :message
95
+ # Date and time at which Seam created the error.
96
+ # @return [Time, nil]
97
+ date_accessor :created_at
98
+ end
99
+
100
+ # Duplicate access code detected on device.
101
+ class DuplicateCodeOnDevice < Errors
102
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
103
+ # @return [String]
104
+ # Known values:
105
+ # - `duplicate_code_on_device`
106
+ attr_accessor :error_code
107
+ # Indicates that this is an access code error.
108
+ # @return [TrueClass]
109
+ attr_accessor :is_access_code_error
110
+ # ID of the managed access code that conflicts with this managed access code, when Seam can identify it.
50
111
  # @return [String, nil]
51
- attr_accessor :from
52
- # The new value of the field.
112
+ attr_accessor :managed_access_code_id
113
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
114
+ # @return [String]
115
+ attr_accessor :message
116
+ # ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it.
53
117
  # @return [String, nil]
54
- attr_accessor :to
118
+ attr_accessor :unmanaged_access_code_id
119
+ # Date and time at which Seam created the error.
120
+ # @return [Time, nil]
121
+ date_accessor :created_at
122
+ end
123
+
124
+ # No space for access code on device.
125
+ class NoSpaceForAccessCodeOnDevice < Errors
126
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
127
+ # @return [String]
128
+ # Known values:
129
+ # - `no_space_for_access_code_on_device`
130
+ attr_accessor :error_code
131
+ # Indicates that this is an access code error.
132
+ # @return [TrueClass]
133
+ attr_accessor :is_access_code_error
134
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
135
+ # @return [String]
136
+ attr_accessor :message
137
+ # Date and time at which Seam created the error.
138
+ # @return [Time, nil]
139
+ date_accessor :created_at
140
+ end
141
+
142
+ # Code was modified or removed externally after Seam successfully set it on the device. The external change conflicts with the state that Seam is trying to apply, so Seam will attempt to set the code on the device again.
143
+ class ConflictingExternalModification < Errors
144
+ class ModifiedFields < BaseResource
145
+ # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
146
+ # @return [String]
147
+ attr_accessor :field
148
+ # The previous value of the field.
149
+ # @return [String, nil]
150
+ attr_accessor :from
151
+ # The new value of the field.
152
+ # @return [String, nil]
153
+ attr_accessor :to
154
+ end
155
+
156
+ # List of fields that were changed externally, with their previous and new values.
157
+ # @return [Array<ModifiedFields>]
158
+ resource_list_accessor :modified_fields, ModifiedFields
159
+ # 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.
160
+ # @return [String, nil]
161
+ # Known values:
162
+ # - `modified`
163
+ # - `removed`
164
+ attr_accessor :change_type
165
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
166
+ # @return [String]
167
+ # Known values:
168
+ # - `conflicting_external_modification`
169
+ attr_accessor :error_code
170
+ # Indicates that this is an access code error.
171
+ # @return [TrueClass]
172
+ attr_accessor :is_access_code_error
173
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
174
+ # @return [String]
175
+ attr_accessor :message
176
+ # Date and time at which Seam created the error.
177
+ # @return [Time, nil]
178
+ date_accessor :created_at
179
+ end
180
+
181
+ # Indicates that the access code is disabled or inactive on the device. The code exists but will not grant access until re-enabled.
182
+ class AccessCodeInactive < Errors
183
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
184
+ # @return [String]
185
+ # Known values:
186
+ # - `access_code_inactive`
187
+ attr_accessor :error_code
188
+ # Indicates that this is an access code error.
189
+ # @return [TrueClass]
190
+ attr_accessor :is_access_code_error
191
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
192
+ # @return [String]
193
+ attr_accessor :message
194
+ # Date and time at which Seam created the error.
195
+ # @return [Time, nil]
196
+ date_accessor :created_at
197
+ end
198
+
199
+ # Indicates that the account is disconnected.
200
+ class AccountDisconnected < Errors
201
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
202
+ # @return [String]
203
+ # Known values:
204
+ # - `account_disconnected`
205
+ attr_accessor :error_code
206
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
207
+ # @return [TrueClass]
208
+ attr_accessor :is_connected_account_error
209
+ # Indicates that the error is not a device error.
210
+ # @return [FalseClass]
211
+ attr_accessor :is_device_error
212
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
213
+ # @return [String]
214
+ attr_accessor :message
215
+ # Date and time at which Seam created the error.
216
+ # @return [Time]
217
+ date_accessor :created_at
218
+ end
219
+
220
+ # Indicates that the Salto site user limit has been reached.
221
+ class SaltoKsSubscriptionLimitExceeded < Errors
222
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
223
+ # @return [String]
224
+ # Known values:
225
+ # - `salto_ks_subscription_limit_exceeded`
226
+ attr_accessor :error_code
227
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
228
+ # @return [TrueClass]
229
+ attr_accessor :is_connected_account_error
230
+ # Indicates that the error is not a device error.
231
+ # @return [FalseClass]
232
+ attr_accessor :is_device_error
233
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
234
+ # @return [String]
235
+ attr_accessor :message
236
+ # Date and time at which Seam created the error.
237
+ # @return [Time]
238
+ date_accessor :created_at
239
+ end
240
+
241
+ # Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
242
+ class InsufficientPermissions < Errors
243
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
244
+ # @return [String]
245
+ # Known values:
246
+ # - `insufficient_permissions`
247
+ attr_accessor :error_code
248
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
249
+ # @return [TrueClass]
250
+ attr_accessor :is_connected_account_error
251
+ # Indicates that the error is not a device error.
252
+ # @return [FalseClass]
253
+ attr_accessor :is_device_error
254
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
255
+ # @return [String]
256
+ attr_accessor :message
257
+ # Date and time at which Seam created the error.
258
+ # @return [Time]
259
+ date_accessor :created_at
260
+ end
261
+
262
+ # Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support.
263
+ class DormakabaSitesDisconnected < Errors
264
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
265
+ # @return [String]
266
+ # Known values:
267
+ # - `dormakaba_sites_disconnected`
268
+ attr_accessor :error_code
269
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
270
+ # @return [TrueClass]
271
+ attr_accessor :is_connected_account_error
272
+ # Indicates that the error is not a device error.
273
+ # @return [FalseClass]
274
+ attr_accessor :is_device_error
275
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
276
+ # @return [String]
277
+ attr_accessor :message
278
+ # Date and time at which Seam created the error.
279
+ # @return [Time]
280
+ date_accessor :created_at
281
+ end
282
+
283
+ # Indicates that the device is offline.
284
+ class DeviceOffline < Errors
285
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
286
+ # @return [String]
287
+ # Known values:
288
+ # - `device_offline`
289
+ attr_accessor :error_code
290
+ # Indicates that the error is a device error.
291
+ # @return [TrueClass]
292
+ attr_accessor :is_device_error
293
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
294
+ # @return [String]
295
+ attr_accessor :message
296
+ # Date and time at which Seam created the error.
297
+ # @return [Time]
298
+ date_accessor :created_at
299
+ end
300
+
301
+ # Indicates that the device has been removed.
302
+ class DeviceRemoved < Errors
303
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
304
+ # @return [String]
305
+ # Known values:
306
+ # - `device_removed`
307
+ attr_accessor :error_code
308
+ # Indicates that the error is a device error.
309
+ # @return [TrueClass]
310
+ attr_accessor :is_device_error
311
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
312
+ # @return [String]
313
+ attr_accessor :message
314
+ # Date and time at which Seam created the error.
315
+ # @return [Time]
316
+ date_accessor :created_at
317
+ end
318
+
319
+ # Indicates that the hub is disconnected.
320
+ class HubDisconnected < Errors
321
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
322
+ # @return [String]
323
+ # Known values:
324
+ # - `hub_disconnected`
325
+ attr_accessor :error_code
326
+ # Indicates that the error is a device error.
327
+ # @return [TrueClass]
328
+ attr_accessor :is_device_error
329
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
330
+ # @return [String]
331
+ attr_accessor :message
332
+ # Date and time at which Seam created the error.
333
+ # @return [Time]
334
+ date_accessor :created_at
335
+ end
336
+
337
+ # Indicates that the device is disconnected.
338
+ class DeviceDisconnected < Errors
339
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
340
+ # @return [String]
341
+ # Known values:
342
+ # - `device_disconnected`
343
+ attr_accessor :error_code
344
+ # Indicates that the error is a device error.
345
+ # @return [TrueClass]
346
+ attr_accessor :is_device_error
347
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
348
+ # @return [String]
349
+ attr_accessor :message
350
+ # Date and time at which Seam created the error.
351
+ # @return [Time]
352
+ date_accessor :created_at
353
+ end
354
+
355
+ # Indicates that the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty.
356
+ class EmptyBackupAccessCodePool < Errors
357
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
358
+ # @return [String]
359
+ # Known values:
360
+ # - `empty_backup_access_code_pool`
361
+ attr_accessor :error_code
362
+ # Indicates that the error is a device error.
363
+ # @return [TrueClass]
364
+ attr_accessor :is_device_error
365
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
366
+ # @return [String]
367
+ attr_accessor :message
368
+ # Date and time at which Seam created the error.
369
+ # @return [Time]
370
+ date_accessor :created_at
371
+ end
372
+
373
+ # Indicates that the user is not authorized to use the August lock.
374
+ class AugustLockNotAuthorized < Errors
375
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
376
+ # @return [String]
377
+ # Known values:
378
+ # - `august_lock_not_authorized`
379
+ attr_accessor :error_code
380
+ # Indicates that the error is a device error.
381
+ # @return [TrueClass]
382
+ attr_accessor :is_device_error
383
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
384
+ # @return [String]
385
+ attr_accessor :message
386
+ # Date and time at which Seam created the error.
387
+ # @return [Time]
388
+ date_accessor :created_at
389
+ end
390
+
391
+ # Indicates that device credentials are missing.
392
+ class MissingDeviceCredentials < Errors
393
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
394
+ # @return [String]
395
+ # Known values:
396
+ # - `missing_device_credentials`
397
+ attr_accessor :error_code
398
+ # Indicates that the error is a device error.
399
+ # @return [TrueClass]
400
+ attr_accessor :is_device_error
401
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
402
+ # @return [String]
403
+ attr_accessor :message
404
+ # Date and time at which Seam created the error.
405
+ # @return [Time]
406
+ date_accessor :created_at
407
+ end
408
+
409
+ # Indicates that the auxiliary heat is running.
410
+ class AuxiliaryHeatRunning < Errors
411
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
412
+ # @return [String]
413
+ # Known values:
414
+ # - `auxiliary_heat_running`
415
+ attr_accessor :error_code
416
+ # Indicates that the error is a device error.
417
+ # @return [TrueClass]
418
+ attr_accessor :is_device_error
419
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
420
+ # @return [String]
421
+ attr_accessor :message
422
+ # Date and time at which Seam created the error.
423
+ # @return [Time]
424
+ date_accessor :created_at
425
+ end
426
+
427
+ # Indicates that a subscription is required to connect.
428
+ class SubscriptionRequired < Errors
429
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
430
+ # @return [String]
431
+ # Known values:
432
+ # - `subscription_required`
433
+ attr_accessor :error_code
434
+ # Indicates that the error is a device error.
435
+ # @return [TrueClass]
436
+ attr_accessor :is_device_error
437
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
438
+ # @return [String]
439
+ attr_accessor :message
440
+ # Date and time at which Seam created the error.
441
+ # @return [Time]
442
+ date_accessor :created_at
443
+ end
444
+
445
+ # Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected).
446
+ class BridgeDisconnected < Errors
447
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
448
+ # @return [String]
449
+ # Known values:
450
+ # - `bridge_disconnected`
451
+ attr_accessor :error_code
452
+ # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
453
+ # @return [Boolean, nil]
454
+ attr_accessor :is_bridge_error
455
+ # Indicates whether the error is related specifically to the connected account.
456
+ # @return [Boolean, nil]
457
+ attr_accessor :is_connected_account_error
458
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
459
+ # @return [String]
460
+ attr_accessor :message
461
+ # Date and time at which Seam created the error.
462
+ # @return [Time]
463
+ date_accessor :created_at
55
464
  end
56
465
 
57
- # List of fields that were changed externally, with their previous and new values.
58
- # @return [Array<ModifiedFields>]
59
- resource_list_accessor :modified_fields, ModifiedFields
60
- # 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.
61
- # @return [String, nil]
62
- attr_accessor :change_type
63
466
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
64
467
  # @return [String]
468
+ # Known values:
469
+ # - `provider_issue`
470
+ # - `failed_to_set_on_device`
471
+ # - `failed_to_remove_from_device`
472
+ # - `duplicate_code_on_device`
473
+ # - `no_space_for_access_code_on_device`
474
+ # - `conflicting_external_modification`
475
+ # - `access_code_inactive`
476
+ # - `account_disconnected`
477
+ # - `salto_ks_subscription_limit_exceeded`
478
+ # - `insufficient_permissions`
479
+ # - `dormakaba_sites_disconnected`
480
+ # - `device_offline`
481
+ # - `device_removed`
482
+ # - `hub_disconnected`
483
+ # - `device_disconnected`
484
+ # - `empty_backup_access_code_pool`
485
+ # - `august_lock_not_authorized`
486
+ # - `missing_device_credentials`
487
+ # - `auxiliary_heat_running`
488
+ # - `subscription_required`
489
+ # - `bridge_disconnected`
65
490
  attr_accessor :error_code
66
- # Indicates that this is an access code error.
67
- # @return [TrueClass]
68
- attr_accessor :is_access_code_error
69
- # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
70
- # @return [Boolean, nil]
71
- attr_accessor :is_bridge_error
72
- # @return [Boolean, nil]
73
- attr_accessor :is_connected_account_error
74
- # @return [Boolean]
75
- attr_accessor :is_device_error
76
- # ID of the managed access code that conflicts with this managed access code, when Seam can identify it.
77
- # @return [String, nil]
78
- attr_accessor :managed_access_code_id
79
491
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
80
492
  # @return [String]
81
493
  attr_accessor :message
82
- # ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it.
83
- # @return [String, nil]
84
- attr_accessor :unmanaged_access_code_id
85
494
  # Date and time at which Seam created the error.
86
495
  # @return [Time, nil]
87
496
  date_accessor :created_at
497
+
498
+ discriminated_by :error_code, {
499
+ "provider_issue" => ProviderIssue,
500
+ "failed_to_set_on_device" => FailedToSetOnDevice,
501
+ "failed_to_remove_from_device" => FailedToRemoveFromDevice,
502
+ "duplicate_code_on_device" => DuplicateCodeOnDevice,
503
+ "no_space_for_access_code_on_device" => NoSpaceForAccessCodeOnDevice,
504
+ "conflicting_external_modification" => ConflictingExternalModification,
505
+ "access_code_inactive" => AccessCodeInactive,
506
+ "account_disconnected" => AccountDisconnected,
507
+ "salto_ks_subscription_limit_exceeded" => SaltoKsSubscriptionLimitExceeded,
508
+ "insufficient_permissions" => InsufficientPermissions,
509
+ "dormakaba_sites_disconnected" => DormakabaSitesDisconnected,
510
+ "device_offline" => DeviceOffline,
511
+ "device_removed" => DeviceRemoved,
512
+ "hub_disconnected" => HubDisconnected,
513
+ "device_disconnected" => DeviceDisconnected,
514
+ "empty_backup_access_code_pool" => EmptyBackupAccessCodePool,
515
+ "august_lock_not_authorized" => AugustLockNotAuthorized,
516
+ "missing_device_credentials" => MissingDeviceCredentials,
517
+ "auxiliary_heat_running" => AuxiliaryHeatRunning,
518
+ "subscription_required" => SubscriptionRequired,
519
+ "bridge_disconnected" => BridgeDisconnected
520
+ }.freeze
88
521
  end
89
522
 
523
+ # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
90
524
  class Warnings < BaseResource
91
- class ModifiedFields < BaseResource
92
- # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
525
+ # The access code's PIN rotates periodically when the code is renewed. Retrieve the latest code before each use.
526
+ class CodeRotatesPeriodically < Warnings
527
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
93
528
  # @return [String]
94
- attr_accessor :field
95
- # The previous value of the field.
96
- # @return [String, nil]
97
- attr_accessor :from
98
- # The new value of the field.
529
+ attr_accessor :message
530
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
531
+ # @return [String]
532
+ # Known values:
533
+ # - `code_rotates_periodically`
534
+ attr_accessor :warning_code
535
+ # Date and time at which Seam created the warning.
536
+ # @return [Time, nil]
537
+ date_accessor :created_at
538
+ end
539
+
540
+ # The device's time zone is unknown and this code's time frame crosses a daylight-saving transition in at least one plausible time zone. A 1-hour safety buffer has been applied to the side of the time frame affected by the transition (`ends_at` for spring-forward, `starts_at` for fall-back) so the code stays active through the shift — the code may be usable up to 1 hour beyond your requested window. Set the device's time zone via `/devices/report_provider_metadata` to clear the buffer and guarantee exact handling.
541
+ class TimeFrameAdjustedForUnknownTimeZone < Warnings
542
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
543
+ # @return [String]
544
+ attr_accessor :message
545
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
546
+ # @return [String]
547
+ # Known values:
548
+ # - `time_frame_adjusted_for_unknown_time_zone`
549
+ attr_accessor :warning_code
550
+ # Date and time at which Seam created the warning.
551
+ # @return [Time, nil]
552
+ date_accessor :created_at
553
+ end
554
+
555
+ # Code was modified or removed externally after Seam successfully set it on the device. External modification is allowed for this code, so the externally modified state is being honored.
556
+ class ExternalModificationInEffect < Warnings
557
+ class ModifiedFields < BaseResource
558
+ # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
559
+ # @return [String]
560
+ attr_accessor :field
561
+ # The previous value of the field.
562
+ # @return [String, nil]
563
+ attr_accessor :from
564
+ # The new value of the field.
565
+ # @return [String, nil]
566
+ attr_accessor :to
567
+ end
568
+
569
+ # List of fields that were changed externally, with their previous and new values.
570
+ # @return [Array<ModifiedFields>]
571
+ resource_list_accessor :modified_fields, ModifiedFields
572
+ # 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.
99
573
  # @return [String, nil]
100
- attr_accessor :to
574
+ # Known values:
575
+ # - `modified`
576
+ # - `removed`
577
+ attr_accessor :change_type
578
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
579
+ # @return [String]
580
+ attr_accessor :message
581
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
582
+ # @return [String]
583
+ # Known values:
584
+ # - `external_modification_in_effect`
585
+ attr_accessor :warning_code
586
+ # Date and time at which Seam created the warning.
587
+ # @return [Time, nil]
588
+ date_accessor :created_at
589
+ end
590
+
591
+ # Delay in setting code on device.
592
+ class DelayInSettingOnDevice < Warnings
593
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
594
+ # @return [String]
595
+ attr_accessor :message
596
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
597
+ # @return [String]
598
+ # Known values:
599
+ # - `delay_in_setting_on_device`
600
+ attr_accessor :warning_code
601
+ # Date and time at which Seam created the warning.
602
+ # @return [Time, nil]
603
+ date_accessor :created_at
604
+ end
605
+
606
+ # Delay in removing code from device.
607
+ class DelayInRemovingFromDevice < Warnings
608
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
609
+ # @return [String]
610
+ attr_accessor :message
611
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
612
+ # @return [String]
613
+ # Known values:
614
+ # - `delay_in_removing_from_device`
615
+ attr_accessor :warning_code
616
+ # Date and time at which Seam created the warning.
617
+ # @return [Time, nil]
618
+ date_accessor :created_at
619
+ end
620
+
621
+ # Third-party integration detected that may cause access codes to fail.
622
+ class ThirdPartyIntegrationDetected < Warnings
623
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
624
+ # @return [String]
625
+ attr_accessor :message
626
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
627
+ # @return [String]
628
+ # Known values:
629
+ # - `third_party_integration_detected`
630
+ attr_accessor :warning_code
631
+ # Date and time at which Seam created the warning.
632
+ # @return [Time, nil]
633
+ date_accessor :created_at
634
+ end
635
+
636
+ # Algopins must be used within 24 hours.
637
+ class IglooAlgopinMustBeUsedWithinN24Hours < Warnings
638
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
639
+ # @return [String]
640
+ attr_accessor :message
641
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
642
+ # @return [String]
643
+ # Known values:
644
+ # - `igloo_algopin_must_be_used_within_24_hours`
645
+ attr_accessor :warning_code
646
+ # Date and time at which Seam created the warning.
647
+ # @return [Time, nil]
648
+ date_accessor :created_at
649
+ end
650
+
651
+ # Management was transferred to another workspace.
652
+ class ManagementTransferred < Warnings
653
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
654
+ # @return [String]
655
+ attr_accessor :message
656
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
657
+ # @return [String]
658
+ # Known values:
659
+ # - `management_transferred`
660
+ attr_accessor :warning_code
661
+ # Date and time at which Seam created the warning.
662
+ # @return [Time, nil]
663
+ date_accessor :created_at
664
+ end
665
+
666
+ # A backup access code has been pulled and is being used in place of this access code.
667
+ class UsingBackupAccessCode < Warnings
668
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
669
+ # @return [String]
670
+ attr_accessor :message
671
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
672
+ # @return [String]
673
+ # Known values:
674
+ # - `using_backup_access_code`
675
+ attr_accessor :warning_code
676
+ # Date and time at which Seam created the warning.
677
+ # @return [Time, nil]
678
+ date_accessor :created_at
679
+ end
680
+
681
+ # Access code is being deleted.
682
+ class BeingDeleted < Warnings
683
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
684
+ # @return [String]
685
+ attr_accessor :message
686
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
687
+ # @return [String]
688
+ # Known values:
689
+ # - `being_deleted`
690
+ attr_accessor :warning_code
691
+ # Date and time at which Seam created the warning.
692
+ # @return [Time, nil]
693
+ date_accessor :created_at
694
+ end
695
+
696
+ # An unknown issue occurred with the access code.
697
+ class UnknownIssueWithAccessCode < Warnings
698
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
699
+ # @return [String]
700
+ attr_accessor :message
701
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
702
+ # @return [String]
703
+ # Known values:
704
+ # - `unknown_issue_with_access_code`
705
+ attr_accessor :warning_code
706
+ # Date and time at which Seam created the warning.
707
+ # @return [Time, nil]
708
+ date_accessor :created_at
101
709
  end
102
710
 
103
- # List of fields that were changed externally, with their previous and new values.
104
- # @return [Array<ModifiedFields>]
105
- resource_list_accessor :modified_fields, ModifiedFields
106
- # 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.
107
- # @return [String, nil]
108
- attr_accessor :change_type
109
711
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
110
712
  # @return [String]
111
713
  attr_accessor :message
112
714
  # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
113
715
  # @return [String]
716
+ # Known values:
717
+ # - `code_rotates_periodically`
718
+ # - `time_frame_adjusted_for_unknown_time_zone`
719
+ # - `external_modification_in_effect`
720
+ # - `delay_in_setting_on_device`
721
+ # - `delay_in_removing_from_device`
722
+ # - `third_party_integration_detected`
723
+ # - `igloo_algopin_must_be_used_within_24_hours`
724
+ # - `management_transferred`
725
+ # - `using_backup_access_code`
726
+ # - `being_deleted`
727
+ # - `unknown_issue_with_access_code`
114
728
  attr_accessor :warning_code
115
729
  # Date and time at which Seam created the warning.
116
730
  # @return [Time, nil]
117
731
  date_accessor :created_at
732
+
733
+ discriminated_by :warning_code, {
734
+ "code_rotates_periodically" => CodeRotatesPeriodically,
735
+ "time_frame_adjusted_for_unknown_time_zone" => TimeFrameAdjustedForUnknownTimeZone,
736
+ "external_modification_in_effect" => ExternalModificationInEffect,
737
+ "delay_in_setting_on_device" => DelayInSettingOnDevice,
738
+ "delay_in_removing_from_device" => DelayInRemovingFromDevice,
739
+ "third_party_integration_detected" => ThirdPartyIntegrationDetected,
740
+ "igloo_algopin_must_be_used_within_24_hours" => IglooAlgopinMustBeUsedWithinN24Hours,
741
+ "management_transferred" => ManagementTransferred,
742
+ "using_backup_access_code" => UsingBackupAccessCode,
743
+ "being_deleted" => BeingDeleted,
744
+ "unknown_issue_with_access_code" => UnknownIssueWithAccessCode
745
+ }.freeze
118
746
  end
119
747
 
120
748
  # Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices.
@@ -149,9 +777,15 @@ module Seam
149
777
  attr_accessor :name
150
778
  # Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device.
151
779
  # @return [String]
780
+ # Known values:
781
+ # - `set`
782
+ # - `unset`
152
783
  attr_accessor :status
153
784
  # Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration.
154
785
  # @return [String]
786
+ # Known values:
787
+ # - `time_bound`
788
+ # - `ongoing`
155
789
  attr_accessor :type
156
790
  # Unique identifier for the Seam workspace associated with the access code.
157
791
  # @return [String]