seam 2.166.0 → 2.168.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 (84) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/README.md +55 -2
  4. data/lib/seam/action_attempt_resolver.rb +77 -7
  5. data/lib/seam/auth.rb +2 -1
  6. data/lib/seam/base_resource.rb +50 -3
  7. data/lib/seam/deep_hash_accessor.rb +11 -15
  8. data/lib/seam/errors.rb +6 -0
  9. data/lib/seam/http.rb +11 -7
  10. data/lib/seam/http_single_workspace.rb +15 -3
  11. data/lib/seam/http_without_workspace.rb +17 -7
  12. data/lib/seam/invalid_response_error.rb +17 -0
  13. data/lib/seam/options.rb +2 -1
  14. data/lib/seam/paginator.rb +34 -29
  15. data/lib/seam/request_parameters.rb +11 -0
  16. data/lib/seam/resources/access_code.rb +50 -5
  17. data/lib/seam/resources/access_grant.rb +38 -4
  18. data/lib/seam/resources/access_method.rb +18 -1
  19. data/lib/seam/resources/acs_access_group.rb +0 -17
  20. data/lib/seam/resources/acs_credential.rb +18 -1
  21. data/lib/seam/resources/acs_entrance.rb +1 -1
  22. data/lib/seam/resources/acs_system.rb +17 -31
  23. data/lib/seam/resources/acs_user.rb +0 -3
  24. data/lib/seam/resources/action_attempt.rb +77 -216
  25. data/lib/seam/resources/batch.rb +1 -1
  26. data/lib/seam/resources/client_session.rb +0 -4
  27. data/lib/seam/resources/connect_webview.rb +1 -0
  28. data/lib/seam/resources/connected_account.rb +1 -21
  29. data/lib/seam/resources/device.rb +362 -311
  30. data/lib/seam/resources/device_provider.rb +12 -13
  31. data/lib/seam/resources/event.rb +527 -151
  32. data/lib/seam/resources/instant_key.rb +1 -1
  33. data/lib/seam/resources/phone.rb +90 -2
  34. data/lib/seam/resources/space.rb +21 -1
  35. data/lib/seam/resources/thermostat_schedule.rb +37 -0
  36. data/lib/seam/resources/unmanaged_access_code.rb +48 -6
  37. data/lib/seam/resources/unmanaged_access_grant.rb +38 -4
  38. data/lib/seam/resources/unmanaged_access_method.rb +18 -1
  39. data/lib/seam/resources/unmanaged_device.rb +110 -38
  40. data/lib/seam/resources/workspace.rb +0 -4
  41. data/lib/seam/routes/access_codes.rb +19 -23
  42. data/lib/seam/routes/access_codes_simulate.rb +1 -1
  43. data/lib/seam/routes/access_codes_unmanaged.rb +7 -5
  44. data/lib/seam/routes/access_grants.rb +24 -24
  45. data/lib/seam/routes/access_grants_unmanaged.rb +5 -4
  46. data/lib/seam/routes/access_methods.rb +20 -14
  47. data/lib/seam/routes/access_methods_unmanaged.rb +2 -2
  48. data/lib/seam/routes/acs_access_groups.rb +4 -4
  49. data/lib/seam/routes/acs_credentials.rb +4 -4
  50. data/lib/seam/routes/acs_encoders.rb +5 -5
  51. data/lib/seam/routes/acs_entrances.rb +6 -8
  52. data/lib/seam/routes/acs_systems.rb +3 -3
  53. data/lib/seam/routes/acs_users.rb +44 -34
  54. data/lib/seam/routes/action_attempts.rb +6 -5
  55. data/lib/seam/routes/cameras_live_views.rb +5 -5
  56. data/lib/seam/routes/client_sessions.rb +20 -21
  57. data/lib/seam/routes/connect_webviews.rb +3 -3
  58. data/lib/seam/routes/connected_accounts.rb +7 -5
  59. data/lib/seam/routes/customers.rb +4 -5
  60. data/lib/seam/routes/devices.rb +12 -10
  61. data/lib/seam/routes/devices_unmanaged.rb +7 -5
  62. data/lib/seam/routes/events.rb +16 -12
  63. data/lib/seam/routes/instant_keys.rb +7 -5
  64. data/lib/seam/routes/locks.rb +10 -8
  65. data/lib/seam/routes/locks_simulate.rb +2 -2
  66. data/lib/seam/routes/media.rb +1 -1
  67. data/lib/seam/routes/noise_sensors.rb +1 -1
  68. data/lib/seam/routes/noise_sensors_noise_thresholds.rb +9 -3
  69. data/lib/seam/routes/phones.rb +2 -2
  70. data/lib/seam/routes/phones_simulate.rb +1 -1
  71. data/lib/seam/routes/spaces.rb +18 -13
  72. data/lib/seam/routes/thermostats.rb +14 -18
  73. data/lib/seam/routes/thermostats_daily_programs.rb +2 -2
  74. data/lib/seam/routes/thermostats_schedules.rb +3 -3
  75. data/lib/seam/routes/user_identities.rb +24 -18
  76. data/lib/seam/routes/user_identities_unmanaged.rb +2 -2
  77. data/lib/seam/routes/webhooks.rb +3 -3
  78. data/lib/seam/routes/workspaces.rb +6 -16
  79. data/lib/seam/url_search_params_serializer.rb +2 -1
  80. data/lib/seam/version.rb +1 -1
  81. data/lib/seam/wait_for_action_attempt.rb +3 -1
  82. data/lib/seam/webhook.rb +25 -5
  83. data/lib/seam.rb +12 -6
  84. metadata +5 -2
@@ -4,7 +4,7 @@ module Seam
4
4
  module Resources
5
5
  # Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app.
6
6
  #
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.
7
+ # There’s no account to create. Your user just taps a link and gets a lightweight, native-feeling experience. On iOS, the key opens in an App Clip, so there’s no app to install. On Android, Google has discontinued Google Play Instant, so the first time your user opens an Instant Key they must install the Seam Instant Key app from the Google Play Store. 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
9
  class Customization < BaseResource
10
10
  # URL of the logo displayed on the Instant Key.
@@ -198,6 +198,24 @@ module Seam
198
198
  date_accessor :created_at
199
199
  end
200
200
 
201
+ # Indicates that the lock has about one week, two days, or a critically low amount of battery life remaining. Replace the lock's batteries promptly to avoid losing access.
202
+ class LowBattery < Errors
203
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
204
+ # @return [String]
205
+ # Known values:
206
+ # - `low_battery`
207
+ attr_accessor :error_code
208
+ # Indicates that the error is a device error.
209
+ # @return [TrueClass]
210
+ attr_accessor :is_device_error
211
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
212
+ # @return [String]
213
+ attr_accessor :message
214
+ # Date and time at which Seam created the error.
215
+ # @return [Time]
216
+ date_accessor :created_at
217
+ end
218
+
201
219
  # Indicates that device credentials are missing.
202
220
  class MissingDeviceCredentials < Errors
203
221
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
@@ -286,6 +304,7 @@ module Seam
286
304
  # - `device_disconnected`
287
305
  # - `empty_backup_access_code_pool`
288
306
  # - `august_lock_not_authorized`
307
+ # - `low_battery`
289
308
  # - `missing_device_credentials`
290
309
  # - `auxiliary_heat_running`
291
310
  # - `subscription_required`
@@ -309,6 +328,7 @@ module Seam
309
328
  "device_disconnected" => DeviceDisconnected,
310
329
  "empty_backup_access_code_pool" => EmptyBackupAccessCodePool,
311
330
  "august_lock_not_authorized" => AugustLockNotAuthorized,
331
+ "low_battery" => LowBattery,
312
332
  "missing_device_credentials" => MissingDeviceCredentials,
313
333
  "auxiliary_heat_running" => AuxiliaryHeatRunning,
314
334
  "subscription_required" => SubscriptionRequired,
@@ -561,7 +581,7 @@ module Seam
561
581
  date_accessor :created_at
562
582
  end
563
583
 
564
- # Indicates that a change in the reported device model has been detected for this Salto KS lock, which may occur after an IQ hub reset. Access code support may be affected. See https://help.getseam.com/articles/5098842588-salto-ks-lock-loses-access-code-support for troubleshooting steps.
584
+ # Indicates that a change in the reported device model has been detected for this Salto KS lock, which may occur after an IQ hub reset. Access code support may be affected. See https://www.seam.co/help/salto-ks-lock-loses-access-code-support for troubleshooting steps.
565
585
  class SaltoKsLockAccessCodeSupportRemoved < Warnings
566
586
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
567
587
  # @return [String]
@@ -681,6 +701,21 @@ module Seam
681
701
  date_accessor :created_at
682
702
  end
683
703
 
704
+ # Indicates that a technician has put the pool controller in service mode. Schedules and remote changes will not run until it is switched back.
705
+ class ServiceMode < Warnings
706
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
707
+ # @return [String]
708
+ attr_accessor :message
709
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
710
+ # @return [String]
711
+ # Known values:
712
+ # - `service_mode`
713
+ attr_accessor :warning_code
714
+ # Date and time at which Seam created the warning.
715
+ # @return [Time]
716
+ date_accessor :created_at
717
+ end
718
+
684
719
  # Indicates a provider-specific issue that may affect device functionality.
685
720
  class ProviderIssue < Warnings
686
721
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
@@ -741,6 +776,21 @@ module Seam
741
776
  date_accessor :created_at
742
777
  end
743
778
 
779
+ # Indicates that the lock has about two weeks of battery life remaining or the provider otherwise recommends replacing the lock's batteries soon.
780
+ class BatteryReplacementRecommended < Warnings
781
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
782
+ # @return [String]
783
+ attr_accessor :message
784
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
785
+ # @return [String]
786
+ # Known values:
787
+ # - `battery_replacement_recommended`
788
+ attr_accessor :warning_code
789
+ # Date and time at which Seam created the warning.
790
+ # @return [Time]
791
+ date_accessor :created_at
792
+ end
793
+
744
794
  # Indicates that the device may optimistically be reported as online because the provider does not reliably report its online status.
745
795
  class UnreliableOnlineStatus < Warnings
746
796
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
@@ -777,6 +827,36 @@ module Seam
777
827
  date_accessor :created_at
778
828
  end
779
829
 
830
+ # Indicates that a third-party subscription is required to enable additional device capabilities.
831
+ class SubscriptionRequiredForAdditionalCapabilities < Warnings
832
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
833
+ # @return [String]
834
+ attr_accessor :message
835
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
836
+ # @return [String]
837
+ # Known values:
838
+ # - `subscription_required_for_additional_capabilities`
839
+ attr_accessor :warning_code
840
+ # Date and time at which Seam created the warning.
841
+ # @return [Time]
842
+ date_accessor :created_at
843
+ end
844
+
845
+ # Indicates that the camera's account plan does not include cloud recording, so event media such as motion clips is unavailable.
846
+ class CloudRecordingNotEnabled < Warnings
847
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
848
+ # @return [String]
849
+ attr_accessor :message
850
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
851
+ # @return [String]
852
+ # Known values:
853
+ # - `cloud_recording_not_enabled`
854
+ attr_accessor :warning_code
855
+ # Date and time at which Seam created the warning.
856
+ # @return [Time]
857
+ date_accessor :created_at
858
+ end
859
+
780
860
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
781
861
  # @return [String]
782
862
  attr_accessor :message
@@ -805,12 +885,16 @@ module Seam
805
885
  # - `time_zone_mismatch`
806
886
  # - `two_n_device_missing_timezone`
807
887
  # - `hub_required_for_additional_capabilities`
888
+ # - `service_mode`
808
889
  # - `provider_issue`
809
890
  # - `keynest_unsupported_locker`
810
891
  # - `accessory_keypad_setup_required`
811
892
  # - `accessory_keypad_low_battery`
893
+ # - `battery_replacement_recommended`
812
894
  # - `unreliable_online_status`
813
895
  # - `max_access_codes_reached`
896
+ # - `subscription_required_for_additional_capabilities`
897
+ # - `cloud_recording_not_enabled`
814
898
  attr_accessor :warning_code
815
899
  # Date and time at which Seam created the warning.
816
900
  # @return [Time]
@@ -839,12 +923,16 @@ module Seam
839
923
  "time_zone_mismatch" => TimeZoneMismatch,
840
924
  "two_n_device_missing_timezone" => TwoNDeviceMissingTimezone,
841
925
  "hub_required_for_additional_capabilities" => HubRequiredForAdditionalCapabilities,
926
+ "service_mode" => ServiceMode,
842
927
  "provider_issue" => ProviderIssue,
843
928
  "keynest_unsupported_locker" => KeynestUnsupportedLocker,
844
929
  "accessory_keypad_setup_required" => AccessoryKeypadSetupRequired,
845
930
  "accessory_keypad_low_battery" => AccessoryKeypadLowBattery,
931
+ "battery_replacement_recommended" => BatteryReplacementRecommended,
846
932
  "unreliable_online_status" => UnreliableOnlineStatus,
847
- "max_access_codes_reached" => MaxAccessCodesReached
933
+ "max_access_codes_reached" => MaxAccessCodesReached,
934
+ "subscription_required_for_additional_capabilities" => SubscriptionRequiredForAdditionalCapabilities,
935
+ "cloud_recording_not_enabled" => CloudRecordingNotEnabled
848
936
  }.freeze
849
937
  end
850
938
 
@@ -45,6 +45,24 @@ module Seam
45
45
  date_accessor :created_at
46
46
  end
47
47
 
48
+ # Indicates that Seam could not apply the noise sensor automation to one or more noise sensors in the space, for example because their settings keep changing back after Seam re-applies it, Seam does not know the sensor's time zone yet, or the sensor is shared with spaces that configure it differently.
49
+ class NoiseSensorConfigurationMismatch < Warnings
50
+ # IDs of the noise sensors in the space that Seam could not bring in line with the noise sensor automation.
51
+ # @return [Array<String>]
52
+ attr_accessor :device_ids
53
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
54
+ # @return [String]
55
+ attr_accessor :message
56
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
57
+ # @return [String]
58
+ # Known values:
59
+ # - `noise_sensor_configuration_mismatch`
60
+ attr_accessor :warning_code
61
+ # Date and time at which Seam created the warning.
62
+ # @return [Time]
63
+ date_accessor :created_at
64
+ end
65
+
48
66
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
49
67
  # @return [String]
50
68
  attr_accessor :message
@@ -52,13 +70,15 @@ module Seam
52
70
  # @return [String]
53
71
  # Known values:
54
72
  # - `being_deleted`
73
+ # - `noise_sensor_configuration_mismatch`
55
74
  attr_accessor :warning_code
56
75
  # Date and time at which Seam created the warning.
57
76
  # @return [Time]
58
77
  date_accessor :created_at
59
78
 
60
79
  discriminated_by :warning_code, {
61
- "being_deleted" => BeingDeleted
80
+ "being_deleted" => BeingDeleted,
81
+ "noise_sensor_configuration_mismatch" => NoiseSensorConfigurationMismatch
62
82
  }.freeze
63
83
  end
64
84
 
@@ -16,9 +16,46 @@ module Seam
16
16
  date_accessor :created_at
17
17
  end
18
18
 
19
+ # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
20
+ class Warnings < BaseResource
21
+ # Indicates that the [thermostat](https://www.seam.co/docs/capability-guides/thermostats) may fail to activate a climate preset when the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts or ends. The warning message explains the cause. Currently present while the thermostat is offline and the next start or end of the thermostat schedule is less than an hour away; it clears automatically once the thermostat is back online or that time passes.
22
+ class ClimatePresetActivationMayFail < Warnings
23
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
24
+ # @return [String]
25
+ attr_accessor :message
26
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
27
+ # @return [String]
28
+ # Known values:
29
+ # - `climate_preset_activation_may_fail`
30
+ attr_accessor :warning_code
31
+ # Date and time at which Seam created the warning.
32
+ # @return [Time]
33
+ date_accessor :created_at
34
+ end
35
+
36
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
37
+ # @return [String]
38
+ attr_accessor :message
39
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
40
+ # @return [String]
41
+ # Known values:
42
+ # - `climate_preset_activation_may_fail`
43
+ attr_accessor :warning_code
44
+ # Date and time at which Seam created the warning.
45
+ # @return [Time]
46
+ date_accessor :created_at
47
+
48
+ discriminated_by :warning_code, {
49
+ "climate_preset_activation_may_fail" => ClimatePresetActivationMayFail
50
+ }.freeze
51
+ end
52
+
19
53
  # Errors associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules).
20
54
  # @return [Array<Errors>]
21
55
  resource_list_accessor :errors, Errors
56
+ # Warnings associated with the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules).
57
+ # @return [Array<Warnings>]
58
+ resource_list_accessor :warnings, Warnings
22
59
  # Key of the [climate preset](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules).
23
60
  # @return [String]
24
61
  attr_accessor :climate_preset_key
@@ -156,11 +156,12 @@ module Seam
156
156
  # List of fields that were changed externally, with their previous and new values.
157
157
  # @return [Array<ModifiedFields>]
158
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.
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. `deactivated` means the code is still on the device but was disabled or suspended.
160
160
  # @return [String, nil]
161
161
  # Known values:
162
162
  # - `modified`
163
163
  # - `removed`
164
+ # - `deactivated`
164
165
  attr_accessor :change_type
165
166
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
166
167
  # @return [String]
@@ -214,7 +215,7 @@ module Seam
214
215
  date_accessor :created_at
215
216
  end
216
217
 
217
- # Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access code is eventually issued.
218
+ # Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. This error clears automatically if the access code is eventually issued.
218
219
  class FailedToIssue < Errors
219
220
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
220
221
  # @return [String]
@@ -250,7 +251,7 @@ module Seam
250
251
  date_accessor :created_at
251
252
  end
252
253
 
253
- # This access code is still active on the device even though its `ends_at` has passed, so the recipient may still be able to unlock the device after their access window ended. Seam is attempting to delete it, and this error clears automatically once the access code is no longer active.
254
+ # Seam was unable to remove this access code from the device in time after it was deleted or its `ends_at` passed, so the recipient may still be able to unlock the device. Seam keeps trying to delete it, and this error clears automatically once the access code is no longer usable on the device.
254
255
  class FailedToDelete < Errors
255
256
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
256
257
  # @return [String]
@@ -460,6 +461,24 @@ module Seam
460
461
  date_accessor :created_at
461
462
  end
462
463
 
464
+ # Indicates that the lock has about one week, two days, or a critically low amount of battery life remaining. Replace the lock's batteries promptly to avoid losing access.
465
+ class LowBattery < Errors
466
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
467
+ # @return [String]
468
+ # Known values:
469
+ # - `low_battery`
470
+ attr_accessor :error_code
471
+ # Indicates that the error is a device error.
472
+ # @return [TrueClass]
473
+ attr_accessor :is_device_error
474
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
475
+ # @return [String]
476
+ attr_accessor :message
477
+ # Date and time at which Seam created the error.
478
+ # @return [Time]
479
+ date_accessor :created_at
480
+ end
481
+
463
482
  # Indicates that device credentials are missing.
464
483
  class MissingDeviceCredentials < Errors
465
484
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
@@ -559,6 +578,7 @@ module Seam
559
578
  # - `device_disconnected`
560
579
  # - `empty_backup_access_code_pool`
561
580
  # - `august_lock_not_authorized`
581
+ # - `low_battery`
562
582
  # - `missing_device_credentials`
563
583
  # - `auxiliary_heat_running`
564
584
  # - `subscription_required`
@@ -593,6 +613,7 @@ module Seam
593
613
  "device_disconnected" => DeviceDisconnected,
594
614
  "empty_backup_access_code_pool" => EmptyBackupAccessCodePool,
595
615
  "august_lock_not_authorized" => AugustLockNotAuthorized,
616
+ "low_battery" => LowBattery,
596
617
  "missing_device_credentials" => MissingDeviceCredentials,
597
618
  "auxiliary_heat_running" => AuxiliaryHeatRunning,
598
619
  "subscription_required" => SubscriptionRequired,
@@ -649,11 +670,12 @@ module Seam
649
670
  # List of fields that were changed externally, with their previous and new values.
650
671
  # @return [Array<ModifiedFields>]
651
672
  resource_list_accessor :modified_fields, ModifiedFields
652
- # 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.
673
+ # 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. `deactivated` means the code is still on the device but was disabled or suspended.
653
674
  # @return [String, nil]
654
675
  # Known values:
655
676
  # - `modified`
656
677
  # - `removed`
678
+ # - `deactivated`
657
679
  attr_accessor :change_type
658
680
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
659
681
  # @return [String]
@@ -773,7 +795,7 @@ module Seam
773
795
  date_accessor :created_at
774
796
  end
775
797
 
776
- # Access code is being deleted.
798
+ # Access code is being deleted, because it was deleted or passed its `ends_at`. It can no longer be updated.
777
799
  class BeingDeleted < Warnings
778
800
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
779
801
  # @return [String]
@@ -788,6 +810,24 @@ module Seam
788
810
  date_accessor :created_at
789
811
  end
790
812
 
813
+ # Seam had been unable to reach the device for an extended period when this access code was created, so the code is unlikely to be set until the device reconnects. Check the device's connection. This warning clears automatically when the device comes back online or the code is set on the device.
814
+ class DeviceUnreachableForExtendedPeriod < Warnings
815
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
816
+ # @return [String]
817
+ attr_accessor :message
818
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
819
+ # @return [String]
820
+ # Known values:
821
+ # - `device_unreachable_for_extended_period`
822
+ attr_accessor :warning_code
823
+ # Date and time at which Seam created the warning.
824
+ # @return [Time, nil]
825
+ date_accessor :created_at
826
+ # Date and time since which Seam has been unable to reach the device.
827
+ # @return [Time]
828
+ date_accessor :device_unreachable_since
829
+ end
830
+
791
831
  # An unknown issue occurred with the access code.
792
832
  class UnknownIssueWithAccessCode < Warnings
793
833
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
@@ -820,6 +860,7 @@ module Seam
820
860
  # - `management_transferred`
821
861
  # - `using_backup_access_code`
822
862
  # - `being_deleted`
863
+ # - `device_unreachable_for_extended_period`
823
864
  # - `unknown_issue_with_access_code`
824
865
  attr_accessor :warning_code
825
866
  # Date and time at which Seam created the warning.
@@ -838,6 +879,7 @@ module Seam
838
879
  "management_transferred" => ManagementTransferred,
839
880
  "using_backup_access_code" => UsingBackupAccessCode,
840
881
  "being_deleted" => BeingDeleted,
882
+ "device_unreachable_for_extended_period" => DeviceUnreachableForExtendedPeriod,
841
883
  "unknown_issue_with_access_code" => UnknownIssueWithAccessCode
842
884
  }.freeze
843
885
  end
@@ -866,7 +908,7 @@ module Seam
866
908
  # Unique identifier for the device associated with the access code.
867
909
  # @return [String]
868
910
  attr_accessor :device_id
869
- # Human-readable label for the code's state: `Active` or `Not active`, based on whether the code is set on the device. For display only. The wording is not stable and is not an enumeration — never compare against or branch on it.
911
+ # Human-readable label for the code's state: `Active` or `Not active`, based on whether the code is set on the device, or `Deleting` while the code is being removed from the device. For display only. The wording is not stable and is not an enumeration — never compare against or branch on it.
870
912
  # @return [String]
871
913
  attr_accessor :display_status
872
914
  # Indicates that Seam does not manage the access code.
@@ -283,6 +283,39 @@ module Seam
283
283
  date_accessor :created_at
284
284
  end
285
285
 
286
+ # Indicates that one of this access grant's access methods no longer grants access because of a change outside Seam, for example its card was encoded again for another credential. Seam does not replace the access method; issue a new one if the user still needs it.
287
+ class AccessRevoked < Warnings
288
+ # ID of the access method whose access was revoked.
289
+ # @return [String]
290
+ attr_accessor :access_method_id
291
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
292
+ # @return [String]
293
+ attr_accessor :message
294
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
295
+ # @return [String]
296
+ # Known values:
297
+ # - `access_revoked`
298
+ attr_accessor :warning_code
299
+ # Date and time at which Seam created the warning.
300
+ # @return [Time]
301
+ date_accessor :created_at
302
+ end
303
+
304
+ # Indicates that Seam did not issue the mobile key requested for this access grant, because the user's email address or phone number belongs to other user identities and Seam cannot tell which person's app should receive it. The other requested access methods were issued.
305
+ class MobileKeyWithheld < Warnings
306
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
307
+ # @return [String]
308
+ attr_accessor :message
309
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
310
+ # @return [String]
311
+ # Known values:
312
+ # - `mobile_key_withheld`
313
+ attr_accessor :warning_code
314
+ # Date and time at which Seam created the warning.
315
+ # @return [Time]
316
+ date_accessor :created_at
317
+ end
318
+
286
319
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
287
320
  # @return [String]
288
321
  attr_accessor :message
@@ -296,6 +329,8 @@ module Seam
296
329
  # - `requested_code_unavailable`
297
330
  # - `device_does_not_support_access_codes`
298
331
  # - `device_time_constraints_violated`
332
+ # - `access_revoked`
333
+ # - `mobile_key_withheld`
299
334
  attr_accessor :warning_code
300
335
  # Date and time at which Seam created the warning.
301
336
  # @return [Time]
@@ -308,7 +343,9 @@ module Seam
308
343
  "updating_access_times" => UpdatingAccessTimes,
309
344
  "requested_code_unavailable" => RequestedCodeUnavailable,
310
345
  "device_does_not_support_access_codes" => DeviceDoesNotSupportAccessCodes,
311
- "device_time_constraints_violated" => DeviceTimeConstraintsViolated
346
+ "device_time_constraints_violated" => DeviceTimeConstraintsViolated,
347
+ "access_revoked" => AccessRevoked,
348
+ "mobile_key_withheld" => MobileKeyWithheld
312
349
  }.freeze
313
350
  end
314
351
 
@@ -333,9 +370,6 @@ module Seam
333
370
  # Display name of the Access Grant.
334
371
  # @return [String]
335
372
  attr_accessor :display_name
336
- # @return [Array<String>]
337
- # @deprecated Use `space_ids`.
338
- attr_accessor :location_ids
339
373
  # Name of the Access Grant. If not provided, the display name will be computed.
340
374
  # @return [String, nil]
341
375
  attr_accessor :name
@@ -210,6 +210,21 @@ module Seam
210
210
  date_accessor :created_at
211
211
  end
212
212
 
213
+ # Indicates that the access system can only end card access on fixed time marks, so access was extended past `ends_at` to the next mark. The message states when access actually ends.
214
+ class ScheduleRoundedUp < Warnings
215
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
216
+ # @return [String]
217
+ attr_accessor :message
218
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
219
+ # @return [String]
220
+ # Known values:
221
+ # - `schedule_rounded_up`
222
+ attr_accessor :warning_code
223
+ # Date and time at which Seam created the warning.
224
+ # @return [Time]
225
+ date_accessor :created_at
226
+ end
227
+
213
228
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
214
229
  # @return [String]
215
230
  attr_accessor :message
@@ -223,6 +238,7 @@ module Seam
223
238
  # - `user_identity_missing_email_address`
224
239
  # - `user_identity_missing_phone_number`
225
240
  # - `requested_code_unavailable`
241
+ # - `schedule_rounded_up`
226
242
  attr_accessor :warning_code
227
243
  # Date and time at which Seam created the warning.
228
244
  # @return [Time]
@@ -235,7 +251,8 @@ module Seam
235
251
  "delay_in_issuing" => DelayInIssuing,
236
252
  "user_identity_missing_email_address" => UserIdentityMissingEmailAddress,
237
253
  "user_identity_missing_phone_number" => UserIdentityMissingPhoneNumber,
238
- "requested_code_unavailable" => RequestedCodeUnavailable
254
+ "requested_code_unavailable" => RequestedCodeUnavailable,
255
+ "schedule_rounded_up" => ScheduleRoundedUp
239
256
  }.freeze
240
257
  end
241
258