seam 2.143.0 → 2.146.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 (48) 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 +702 -43
  6. data/lib/seam/resources/access_grant.rb +192 -25
  7. data/lib/seam/resources/access_method.rb +108 -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 +1460 -279
  15. data/lib/seam/resources/connect_webview.rb +15 -1
  16. data/lib/seam/resources/connected_account.rb +285 -41
  17. data/lib/seam/resources/device.rb +929 -14
  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 +697 -43
  22. data/lib/seam/resources/unmanaged_access_grant.rb +189 -25
  23. data/lib/seam/resources/unmanaged_access_method.rb +108 -3
  24. data/lib/seam/resources/unmanaged_device.rb +827 -14
  25. data/lib/seam/resources/unmanaged_user_identity.rb +73 -0
  26. data/lib/seam/resources/user_identity.rb +73 -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_credentials.rb +4 -4
  32. data/lib/seam/routes/acs_encoders.rb +3 -3
  33. data/lib/seam/routes/acs_entrances.rb +2 -2
  34. data/lib/seam/routes/action_attempts.rb +1 -1
  35. data/lib/seam/routes/connect_webviews.rb +3 -3
  36. data/lib/seam/routes/connected_accounts.rb +3 -3
  37. data/lib/seam/routes/customers.rb +1 -1
  38. data/lib/seam/routes/devices.rb +3 -3
  39. data/lib/seam/routes/devices_unmanaged.rb +2 -2
  40. data/lib/seam/routes/events.rb +2 -2
  41. data/lib/seam/routes/locks.rb +1 -1
  42. data/lib/seam/routes/noise_sensors.rb +1 -1
  43. data/lib/seam/routes/spaces.rb +3 -3
  44. data/lib/seam/routes/thermostats.rb +1 -1
  45. data/lib/seam/routes/user_identities.rb +23 -1
  46. data/lib/seam/version.rb +1 -1
  47. data/lib/seam/webhook.rb +5 -2
  48. metadata +1 -1
@@ -41,80 +41,728 @@ 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
+ # The code cannot be set on the device because it violates the device's code constraints (for example, its length, digits, or a too-simple value). The code will not be retried until you change it. See the device's `code_constraints` and `supported_code_lengths`.
200
+ class CodeConstraintsViolated < Errors
201
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
202
+ # @return [String]
203
+ # Known values:
204
+ # - `code_constraints_violated`
205
+ attr_accessor :error_code
206
+ # Indicates that this is an access code error.
207
+ # @return [TrueClass]
208
+ attr_accessor :is_access_code_error
209
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
210
+ # @return [String]
211
+ attr_accessor :message
212
+ # Date and time at which Seam created the error.
213
+ # @return [Time, nil]
214
+ date_accessor :created_at
215
+ end
216
+
217
+ # Indicates that the account is disconnected.
218
+ class AccountDisconnected < Errors
219
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
220
+ # @return [String]
221
+ # Known values:
222
+ # - `account_disconnected`
223
+ attr_accessor :error_code
224
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
225
+ # @return [TrueClass]
226
+ attr_accessor :is_connected_account_error
227
+ # Indicates that the error is not a device error.
228
+ # @return [FalseClass]
229
+ attr_accessor :is_device_error
230
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
231
+ # @return [String]
232
+ attr_accessor :message
233
+ # Date and time at which Seam created the error.
234
+ # @return [Time]
235
+ date_accessor :created_at
236
+ end
237
+
238
+ # Indicates that the Salto site user limit has been reached.
239
+ class SaltoKsSubscriptionLimitExceeded < Errors
240
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
241
+ # @return [String]
242
+ # Known values:
243
+ # - `salto_ks_subscription_limit_exceeded`
244
+ attr_accessor :error_code
245
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
246
+ # @return [TrueClass]
247
+ attr_accessor :is_connected_account_error
248
+ # Indicates that the error is not a device error.
249
+ # @return [FalseClass]
250
+ attr_accessor :is_device_error
251
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
252
+ # @return [String]
253
+ attr_accessor :message
254
+ # Date and time at which Seam created the error.
255
+ # @return [Time]
256
+ date_accessor :created_at
257
+ end
258
+
259
+ # 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.
260
+ class InsufficientPermissions < Errors
261
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
262
+ # @return [String]
263
+ # Known values:
264
+ # - `insufficient_permissions`
265
+ attr_accessor :error_code
266
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
267
+ # @return [TrueClass]
268
+ attr_accessor :is_connected_account_error
269
+ # Indicates that the error is not a device error.
270
+ # @return [FalseClass]
271
+ attr_accessor :is_device_error
272
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
273
+ # @return [String]
274
+ attr_accessor :message
275
+ # Date and time at which Seam created the error.
276
+ # @return [Time]
277
+ date_accessor :created_at
278
+ end
279
+
280
+ # Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support.
281
+ class DormakabaSitesDisconnected < Errors
282
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
283
+ # @return [String]
284
+ # Known values:
285
+ # - `dormakaba_sites_disconnected`
286
+ attr_accessor :error_code
287
+ # Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
288
+ # @return [TrueClass]
289
+ attr_accessor :is_connected_account_error
290
+ # Indicates that the error is not a device error.
291
+ # @return [FalseClass]
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 is offline.
302
+ class DeviceOffline < 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_offline`
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 device has been removed.
320
+ class DeviceRemoved < Errors
321
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
322
+ # @return [String]
323
+ # Known values:
324
+ # - `device_removed`
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 hub is disconnected.
338
+ class HubDisconnected < Errors
339
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
340
+ # @return [String]
341
+ # Known values:
342
+ # - `hub_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 device is disconnected.
356
+ class DeviceDisconnected < Errors
357
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
358
+ # @return [String]
359
+ # Known values:
360
+ # - `device_disconnected`
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 [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty.
374
+ class EmptyBackupAccessCodePool < Errors
375
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
376
+ # @return [String]
377
+ # Known values:
378
+ # - `empty_backup_access_code_pool`
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 the user is not authorized to use the August lock.
392
+ class AugustLockNotAuthorized < Errors
393
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
394
+ # @return [String]
395
+ # Known values:
396
+ # - `august_lock_not_authorized`
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 device credentials are missing.
410
+ class MissingDeviceCredentials < Errors
411
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
412
+ # @return [String]
413
+ # Known values:
414
+ # - `missing_device_credentials`
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 the auxiliary heat is running.
428
+ class AuxiliaryHeatRunning < Errors
429
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
430
+ # @return [String]
431
+ # Known values:
432
+ # - `auxiliary_heat_running`
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 a subscription is required to connect.
446
+ class SubscriptionRequired < Errors
447
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
448
+ # @return [String]
449
+ # Known values:
450
+ # - `subscription_required`
451
+ attr_accessor :error_code
452
+ # Indicates that the error is a device error.
453
+ # @return [TrueClass]
454
+ attr_accessor :is_device_error
455
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
456
+ # @return [String]
457
+ attr_accessor :message
458
+ # Date and time at which Seam created the error.
459
+ # @return [Time]
460
+ date_accessor :created_at
461
+ end
462
+
463
+ # 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).
464
+ class BridgeDisconnected < Errors
465
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
466
+ # @return [String]
467
+ # Known values:
468
+ # - `bridge_disconnected`
469
+ attr_accessor :error_code
470
+ # Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge).
471
+ # @return [Boolean, nil]
472
+ attr_accessor :is_bridge_error
473
+ # Indicates whether the error is related specifically to the connected account.
474
+ # @return [Boolean, nil]
475
+ attr_accessor :is_connected_account_error
476
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
477
+ # @return [String]
478
+ attr_accessor :message
479
+ # Date and time at which Seam created the error.
480
+ # @return [Time]
481
+ date_accessor :created_at
55
482
  end
56
483
 
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
484
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
64
485
  # @return [String]
486
+ # Known values:
487
+ # - `provider_issue`
488
+ # - `failed_to_set_on_device`
489
+ # - `failed_to_remove_from_device`
490
+ # - `duplicate_code_on_device`
491
+ # - `no_space_for_access_code_on_device`
492
+ # - `conflicting_external_modification`
493
+ # - `access_code_inactive`
494
+ # - `code_constraints_violated`
495
+ # - `account_disconnected`
496
+ # - `salto_ks_subscription_limit_exceeded`
497
+ # - `insufficient_permissions`
498
+ # - `dormakaba_sites_disconnected`
499
+ # - `device_offline`
500
+ # - `device_removed`
501
+ # - `hub_disconnected`
502
+ # - `device_disconnected`
503
+ # - `empty_backup_access_code_pool`
504
+ # - `august_lock_not_authorized`
505
+ # - `missing_device_credentials`
506
+ # - `auxiliary_heat_running`
507
+ # - `subscription_required`
508
+ # - `bridge_disconnected`
65
509
  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
510
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
80
511
  # @return [String]
81
512
  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
513
  # Date and time at which Seam created the error.
86
514
  # @return [Time, nil]
87
515
  date_accessor :created_at
516
+
517
+ discriminated_by :error_code, {
518
+ "provider_issue" => ProviderIssue,
519
+ "failed_to_set_on_device" => FailedToSetOnDevice,
520
+ "failed_to_remove_from_device" => FailedToRemoveFromDevice,
521
+ "duplicate_code_on_device" => DuplicateCodeOnDevice,
522
+ "no_space_for_access_code_on_device" => NoSpaceForAccessCodeOnDevice,
523
+ "conflicting_external_modification" => ConflictingExternalModification,
524
+ "access_code_inactive" => AccessCodeInactive,
525
+ "code_constraints_violated" => CodeConstraintsViolated,
526
+ "account_disconnected" => AccountDisconnected,
527
+ "salto_ks_subscription_limit_exceeded" => SaltoKsSubscriptionLimitExceeded,
528
+ "insufficient_permissions" => InsufficientPermissions,
529
+ "dormakaba_sites_disconnected" => DormakabaSitesDisconnected,
530
+ "device_offline" => DeviceOffline,
531
+ "device_removed" => DeviceRemoved,
532
+ "hub_disconnected" => HubDisconnected,
533
+ "device_disconnected" => DeviceDisconnected,
534
+ "empty_backup_access_code_pool" => EmptyBackupAccessCodePool,
535
+ "august_lock_not_authorized" => AugustLockNotAuthorized,
536
+ "missing_device_credentials" => MissingDeviceCredentials,
537
+ "auxiliary_heat_running" => AuxiliaryHeatRunning,
538
+ "subscription_required" => SubscriptionRequired,
539
+ "bridge_disconnected" => BridgeDisconnected
540
+ }.freeze
88
541
  end
89
542
 
543
+ # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
90
544
  class Warnings < BaseResource
91
- class ModifiedFields < BaseResource
92
- # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
545
+ # The access code's PIN rotates periodically when the code is renewed. Retrieve the latest code before each use.
546
+ class CodeRotatesPeriodically < Warnings
547
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
93
548
  # @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.
549
+ attr_accessor :message
550
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
551
+ # @return [String]
552
+ # Known values:
553
+ # - `code_rotates_periodically`
554
+ attr_accessor :warning_code
555
+ # Date and time at which Seam created the warning.
556
+ # @return [Time, nil]
557
+ date_accessor :created_at
558
+ end
559
+
560
+ # 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.
561
+ class TimeFrameAdjustedForUnknownTimeZone < Warnings
562
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
563
+ # @return [String]
564
+ attr_accessor :message
565
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
566
+ # @return [String]
567
+ # Known values:
568
+ # - `time_frame_adjusted_for_unknown_time_zone`
569
+ attr_accessor :warning_code
570
+ # Date and time at which Seam created the warning.
571
+ # @return [Time, nil]
572
+ date_accessor :created_at
573
+ end
574
+
575
+ # 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.
576
+ class ExternalModificationInEffect < Warnings
577
+ class ModifiedFields < BaseResource
578
+ # The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`).
579
+ # @return [String]
580
+ attr_accessor :field
581
+ # The previous value of the field.
582
+ # @return [String, nil]
583
+ attr_accessor :from
584
+ # The new value of the field.
585
+ # @return [String, nil]
586
+ attr_accessor :to
587
+ end
588
+
589
+ # List of fields that were changed externally, with their previous and new values.
590
+ # @return [Array<ModifiedFields>]
591
+ resource_list_accessor :modified_fields, ModifiedFields
592
+ # 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
593
  # @return [String, nil]
100
- attr_accessor :to
594
+ # Known values:
595
+ # - `modified`
596
+ # - `removed`
597
+ attr_accessor :change_type
598
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
599
+ # @return [String]
600
+ attr_accessor :message
601
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
602
+ # @return [String]
603
+ # Known values:
604
+ # - `external_modification_in_effect`
605
+ attr_accessor :warning_code
606
+ # Date and time at which Seam created the warning.
607
+ # @return [Time, nil]
608
+ date_accessor :created_at
609
+ end
610
+
611
+ # Delay in setting code on device.
612
+ class DelayInSettingOnDevice < Warnings
613
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
614
+ # @return [String]
615
+ attr_accessor :message
616
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
617
+ # @return [String]
618
+ # Known values:
619
+ # - `delay_in_setting_on_device`
620
+ attr_accessor :warning_code
621
+ # Date and time at which Seam created the warning.
622
+ # @return [Time, nil]
623
+ date_accessor :created_at
624
+ end
625
+
626
+ # Delay in removing code from device.
627
+ class DelayInRemovingFromDevice < Warnings
628
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
629
+ # @return [String]
630
+ attr_accessor :message
631
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
632
+ # @return [String]
633
+ # Known values:
634
+ # - `delay_in_removing_from_device`
635
+ attr_accessor :warning_code
636
+ # Date and time at which Seam created the warning.
637
+ # @return [Time, nil]
638
+ date_accessor :created_at
639
+ end
640
+
641
+ # Third-party integration detected that may cause access codes to fail.
642
+ class ThirdPartyIntegrationDetected < Warnings
643
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
644
+ # @return [String]
645
+ attr_accessor :message
646
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
647
+ # @return [String]
648
+ # Known values:
649
+ # - `third_party_integration_detected`
650
+ attr_accessor :warning_code
651
+ # Date and time at which Seam created the warning.
652
+ # @return [Time, nil]
653
+ date_accessor :created_at
654
+ end
655
+
656
+ # Algopins must be used within 24 hours.
657
+ class IglooAlgopinMustBeUsedWithinN24Hours < Warnings
658
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
659
+ # @return [String]
660
+ attr_accessor :message
661
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
662
+ # @return [String]
663
+ # Known values:
664
+ # - `igloo_algopin_must_be_used_within_24_hours`
665
+ attr_accessor :warning_code
666
+ # Date and time at which Seam created the warning.
667
+ # @return [Time, nil]
668
+ date_accessor :created_at
669
+ end
670
+
671
+ # Management was transferred to another workspace.
672
+ class ManagementTransferred < Warnings
673
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
674
+ # @return [String]
675
+ attr_accessor :message
676
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
677
+ # @return [String]
678
+ # Known values:
679
+ # - `management_transferred`
680
+ attr_accessor :warning_code
681
+ # Date and time at which Seam created the warning.
682
+ # @return [Time, nil]
683
+ date_accessor :created_at
684
+ end
685
+
686
+ # A backup access code has been pulled and is being used in place of this access code.
687
+ class UsingBackupAccessCode < Warnings
688
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
689
+ # @return [String]
690
+ attr_accessor :message
691
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
692
+ # @return [String]
693
+ # Known values:
694
+ # - `using_backup_access_code`
695
+ attr_accessor :warning_code
696
+ # Date and time at which Seam created the warning.
697
+ # @return [Time, nil]
698
+ date_accessor :created_at
699
+ end
700
+
701
+ # Access code is being deleted.
702
+ class BeingDeleted < Warnings
703
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
704
+ # @return [String]
705
+ attr_accessor :message
706
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
707
+ # @return [String]
708
+ # Known values:
709
+ # - `being_deleted`
710
+ attr_accessor :warning_code
711
+ # Date and time at which Seam created the warning.
712
+ # @return [Time, nil]
713
+ date_accessor :created_at
714
+ end
715
+
716
+ # An unknown issue occurred with the access code.
717
+ class UnknownIssueWithAccessCode < Warnings
718
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
719
+ # @return [String]
720
+ attr_accessor :message
721
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
722
+ # @return [String]
723
+ # Known values:
724
+ # - `unknown_issue_with_access_code`
725
+ attr_accessor :warning_code
726
+ # Date and time at which Seam created the warning.
727
+ # @return [Time, nil]
728
+ date_accessor :created_at
101
729
  end
102
730
 
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
731
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
110
732
  # @return [String]
111
733
  attr_accessor :message
112
734
  # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
113
735
  # @return [String]
736
+ # Known values:
737
+ # - `code_rotates_periodically`
738
+ # - `time_frame_adjusted_for_unknown_time_zone`
739
+ # - `external_modification_in_effect`
740
+ # - `delay_in_setting_on_device`
741
+ # - `delay_in_removing_from_device`
742
+ # - `third_party_integration_detected`
743
+ # - `igloo_algopin_must_be_used_within_24_hours`
744
+ # - `management_transferred`
745
+ # - `using_backup_access_code`
746
+ # - `being_deleted`
747
+ # - `unknown_issue_with_access_code`
114
748
  attr_accessor :warning_code
115
749
  # Date and time at which Seam created the warning.
116
750
  # @return [Time, nil]
117
751
  date_accessor :created_at
752
+
753
+ discriminated_by :warning_code, {
754
+ "code_rotates_periodically" => CodeRotatesPeriodically,
755
+ "time_frame_adjusted_for_unknown_time_zone" => TimeFrameAdjustedForUnknownTimeZone,
756
+ "external_modification_in_effect" => ExternalModificationInEffect,
757
+ "delay_in_setting_on_device" => DelayInSettingOnDevice,
758
+ "delay_in_removing_from_device" => DelayInRemovingFromDevice,
759
+ "third_party_integration_detected" => ThirdPartyIntegrationDetected,
760
+ "igloo_algopin_must_be_used_within_24_hours" => IglooAlgopinMustBeUsedWithinN24Hours,
761
+ "management_transferred" => ManagementTransferred,
762
+ "using_backup_access_code" => UsingBackupAccessCode,
763
+ "being_deleted" => BeingDeleted,
764
+ "unknown_issue_with_access_code" => UnknownIssueWithAccessCode
765
+ }.freeze
118
766
  end
119
767
 
120
768
  # Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices.
@@ -149,9 +797,15 @@ module Seam
149
797
  attr_accessor :name
150
798
  # 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
799
  # @return [String]
800
+ # Known values:
801
+ # - `set`
802
+ # - `unset`
152
803
  attr_accessor :status
153
804
  # Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration.
154
805
  # @return [String]
806
+ # Known values:
807
+ # - `time_bound`
808
+ # - `ongoing`
155
809
  attr_accessor :type
156
810
  # Unique identifier for the Seam workspace associated with the access code.
157
811
  # @return [String]