seam 2.132.0 → 2.133.1

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 +1 -1
  3. data/Rakefile +1 -4
  4. data/lib/seam/deep_hash_accessor.rb +4 -0
  5. data/lib/seam/helpers/action_attempt.rb +16 -7
  6. data/lib/seam/http.rb +2 -2
  7. data/lib/seam/http_single_workspace.rb +13 -8
  8. data/lib/seam/resources/access_code.rb +55 -2
  9. data/lib/seam/resources/access_grant.rb +39 -2
  10. data/lib/seam/resources/access_method.rb +34 -2
  11. data/lib/seam/resources/acs_access_group.rb +32 -1
  12. data/lib/seam/resources/acs_credential.rb +61 -2
  13. data/lib/seam/resources/acs_encoder.rb +25 -1
  14. data/lib/seam/resources/acs_entrance.rb +48 -1
  15. data/lib/seam/resources/acs_system.rb +41 -1
  16. data/lib/seam/resources/acs_user.rb +50 -1
  17. data/lib/seam/resources/action_attempt.rb +10 -1
  18. data/lib/seam/resources/batch.rb +126 -1
  19. data/lib/seam/resources/client_session.rb +35 -2
  20. data/lib/seam/resources/connect_webview.rb +50 -2
  21. data/lib/seam/resources/connected_account.rb +33 -1
  22. data/lib/seam/resources/customer_portal.rb +16 -2
  23. data/lib/seam/resources/device.rb +70 -1
  24. data/lib/seam/resources/device_provider.rb +48 -1
  25. data/lib/seam/resources/event.rb +184 -2
  26. data/lib/seam/resources/instant_key.rb +22 -2
  27. data/lib/seam/resources/noise_threshold.rb +15 -1
  28. data/lib/seam/resources/pagination.rb +7 -1
  29. data/lib/seam/resources/phone.rb +16 -1
  30. data/lib/seam/resources/space.rb +22 -1
  31. data/lib/seam/resources/thermostat_daily_program.rb +12 -1
  32. data/lib/seam/resources/thermostat_schedule.rb +23 -2
  33. data/lib/seam/resources/unmanaged_access_code.rb +41 -2
  34. data/lib/seam/resources/unmanaged_access_grant.rb +31 -2
  35. data/lib/seam/resources/unmanaged_access_method.rb +28 -2
  36. data/lib/seam/resources/unmanaged_device.rb +60 -1
  37. data/lib/seam/resources/unmanaged_user_identity.rb +16 -1
  38. data/lib/seam/resources/user_identity.rb +18 -1
  39. data/lib/seam/resources/webhook.rb +9 -1
  40. data/lib/seam/resources/workspace.rb +20 -1
  41. data/lib/seam/routes/access_codes.rb +147 -0
  42. data/lib/seam/routes/access_codes_simulate.rb +5 -0
  43. data/lib/seam/routes/access_codes_unmanaged.rb +34 -0
  44. data/lib/seam/routes/access_grants.rb +59 -0
  45. data/lib/seam/routes/access_grants_unmanaged.rb +20 -0
  46. data/lib/seam/routes/access_methods.rb +35 -0
  47. data/lib/seam/routes/access_methods_unmanaged.rb +9 -0
  48. data/lib/seam/routes/acs_access_groups.rb +28 -0
  49. data/lib/seam/routes/acs_credentials.rb +49 -0
  50. data/lib/seam/routes/acs_encoders.rb +25 -0
  51. data/lib/seam/routes/acs_encoders_simulate.rb +19 -0
  52. data/lib/seam/routes/acs_entrances.rb +30 -0
  53. data/lib/seam/routes/acs_systems.rb +20 -0
  54. data/lib/seam/routes/acs_users.rb +72 -0
  55. data/lib/seam/routes/action_attempts.rb +9 -0
  56. data/lib/seam/routes/client_sessions.rb +48 -0
  57. data/lib/seam/routes/connect_webviews.rb +36 -0
  58. data/lib/seam/routes/connected_accounts.rb +31 -0
  59. data/lib/seam/routes/connected_accounts_simulate.rb +3 -0
  60. data/lib/seam/routes/customers.rb +57 -0
  61. data/lib/seam/routes/devices.rb +45 -0
  62. data/lib/seam/routes/devices_simulate.rb +28 -0
  63. data/lib/seam/routes/devices_unmanaged.rb +36 -0
  64. data/lib/seam/routes/events.rb +35 -0
  65. data/lib/seam/routes/instant_keys.rb +10 -0
  66. data/lib/seam/routes/locks.rb +35 -0
  67. data/lib/seam/routes/locks_simulate.rb +7 -0
  68. data/lib/seam/routes/noise_sensors.rb +19 -0
  69. data/lib/seam/routes/noise_sensors_noise_thresholds.rb +27 -0
  70. data/lib/seam/routes/noise_sensors_simulate.rb +3 -0
  71. data/lib/seam/routes/phones.rb +10 -0
  72. data/lib/seam/routes/phones_simulate.rb +6 -0
  73. data/lib/seam/routes/spaces.rb +61 -0
  74. data/lib/seam/routes/thermostats.rb +112 -0
  75. data/lib/seam/routes/thermostats_daily_programs.rb +13 -0
  76. data/lib/seam/routes/thermostats_schedules.rb +28 -0
  77. data/lib/seam/routes/thermostats_simulate.rb +13 -0
  78. data/lib/seam/routes/user_identities.rb +67 -0
  79. data/lib/seam/routes/user_identities_unmanaged.rb +16 -0
  80. data/lib/seam/routes/webhooks.rb +16 -0
  81. data/lib/seam/routes/workspaces.rb +31 -0
  82. data/lib/seam/version.rb +1 -1
  83. data/lib/seam.rb +2 -2
  84. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f8a4ce290271f2b1c655d032f8a8250eba68852b90427fc858f09e7b7f0ad439
4
- data.tar.gz: 4a78364e51f15e3f3cee4a5e8960110de3c75e8e046b04726a9023cbeaac6c66
3
+ metadata.gz: 9cd822a95811c14500048401893ba903d42e4a5431bcfe6a038955beca50e22e
4
+ data.tar.gz: a4d7c7e7059b9cfb3a3a61395e9bb38d9f0768f3a8f389e3082d77ae3824e0ed
5
5
  SHA512:
6
- metadata.gz: 312ebd6671d023b18837d4df61a2f96f0014632c835d5d7f449353e99f5741f1207e19d816949e79b1f322a3529ccffc42ef4da31968929de48a60887504a579
7
- data.tar.gz: 5b62ad40c08d9b8a13d4b6b6aefac6a78baff5ea78bac7081a93524ed11556442948d849febab66960ff40465d8111a753361bcecc63c4b9e4886f389c310833
6
+ metadata.gz: 7b3078763143b252d99050c2397f6c71bd242d7971b95a514f104f3293a98a82b5369bde44e973051b4d36cd35491a542370bb8ba456813cbc418fe0a885981b
7
+ data.tar.gz: e2137dc8e0fa70965c73b9c92249ad067e5dfb0395bb8a4c7ed8346e7d6f7848dfff3ccf90e4e41268c4e634e5a643dbef6735274f9daab310736f3ff13a72b7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- seam (2.132.0)
4
+ seam (2.133.1)
5
5
  faraday (~> 2.7)
6
6
  faraday-retry (~> 2.2)
7
7
  svix (~> 1.30)
data/Rakefile CHANGED
@@ -5,10 +5,7 @@ require "rspec/core/rake_task"
5
5
  require "standard/rake"
6
6
 
7
7
  RSpec::Core::RakeTask.new(:spec) do |t|
8
- t.pattern = [
9
- "spec/**/*_spec.rb",
10
- "lib/seam/*_spec.rb"
11
- ]
8
+ t.pattern = "spec/**/*_spec.rb"
12
9
  end
13
10
 
14
11
  task default: %i[lint test]
@@ -13,6 +13,10 @@ module Seam
13
13
  instance_variable_get(:"@#{key}")
14
14
  end
15
15
 
16
+ def to_h
17
+ @data
18
+ end
19
+
16
20
  private
17
21
 
18
22
  def create_accessor_methods
@@ -6,14 +6,23 @@ module Seam
6
6
  module Helpers
7
7
  module ActionAttempt
8
8
  def self.decide_and_wait(action_attempt, client, wait_for_action_attempt)
9
- if wait_for_action_attempt == true
10
- return wait_until_finished(action_attempt, client)
11
- elsif wait_for_action_attempt.is_a?(Hash)
12
- return wait_until_finished(action_attempt, client, timeout: wait_for_action_attempt[:timeout],
13
- polling_interval: wait_for_action_attempt[:polling_interval])
14
- end
9
+ return wait_until_finished(action_attempt, client) if wait_for_action_attempt == true
15
10
 
16
- action_attempt
11
+ options = wait_options(wait_for_action_attempt)
12
+ return action_attempt if options.nil?
13
+
14
+ wait_until_finished(action_attempt, client, timeout: options[:timeout],
15
+ polling_interval: options[:polling_interval])
16
+ end
17
+
18
+ # The client wraps its defaults in a DeepHashAccessor, so the hash form of
19
+ # this option reaches here as an accessor when it comes from the client
20
+ # and as a plain Hash when it comes from the method call.
21
+ def self.wait_options(wait_for_action_attempt)
22
+ case wait_for_action_attempt
23
+ when Hash then wait_for_action_attempt
24
+ when Seam::DeepHashAccessor then wait_for_action_attempt.to_h
25
+ end
17
26
  end
18
27
 
19
28
  def self.wait_until_finished(action_attempt, client, timeout: nil, polling_interval: nil)
data/lib/seam/http.rb CHANGED
@@ -8,11 +8,11 @@ module Seam
8
8
  Http::SingleWorkspace.new(**args)
9
9
  end
10
10
 
11
- def self.from_api_key(api_key, endpoint: nil, wait_for_action_attempt: false)
11
+ def self.from_api_key(api_key, endpoint: nil, wait_for_action_attempt: true)
12
12
  Http::SingleWorkspace.from_api_key(api_key, endpoint: endpoint, wait_for_action_attempt: wait_for_action_attempt)
13
13
  end
14
14
 
15
- def self.from_personal_access_token(personal_access_token, workspace_id, endpoint: nil, wait_for_action_attempt: false)
15
+ def self.from_personal_access_token(personal_access_token, workspace_id, endpoint: nil, wait_for_action_attempt: true)
16
16
  Http::SingleWorkspace.from_personal_access_token(personal_access_token, workspace_id, endpoint: endpoint,
17
17
  wait_for_action_attempt: wait_for_action_attempt)
18
18
  end
@@ -18,13 +18,18 @@ module Seam
18
18
 
19
19
  def initialize(client: nil, api_key: nil, personal_access_token: nil, workspace_id: nil, endpoint: nil,
20
20
  wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {})
21
- options = Http::Options.parse_options(api_key: api_key, personal_access_token: personal_access_token,
22
- workspace_id: workspace_id, endpoint: endpoint)
23
- @endpoint = options[:endpoint]
24
- @auth_headers = options[:auth_headers]
25
21
  @defaults = Seam::DeepHashAccessor.new({"wait_for_action_attempt" => wait_for_action_attempt})
26
- @client = client || Http::Request.create_faraday_client(@endpoint, @auth_headers, faraday_options,
27
- faraday_retry_options)
22
+
23
+ # A client carries its own endpoint and authorization, so the auth
24
+ # options are only parsed when one has to be built.
25
+ @client = client || begin
26
+ options = Http::Options.parse_options(api_key: api_key, personal_access_token: personal_access_token,
27
+ workspace_id: workspace_id, endpoint: endpoint)
28
+ @endpoint = options[:endpoint]
29
+ @auth_headers = options[:auth_headers]
30
+
31
+ Http::Request.create_faraday_client(@endpoint, @auth_headers, faraday_options, faraday_retry_options)
32
+ end
28
33
 
29
34
  initialize_routes(client: @client, defaults: @defaults)
30
35
  end
@@ -37,12 +42,12 @@ module Seam
37
42
  Paginator.new(request, params)
38
43
  end
39
44
 
40
- def self.from_api_key(api_key, endpoint: nil, wait_for_action_attempt: false, faraday_options: {}, faraday_retry_options: {})
45
+ def self.from_api_key(api_key, endpoint: nil, wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {})
41
46
  new(api_key: api_key, endpoint: endpoint, wait_for_action_attempt: wait_for_action_attempt,
42
47
  faraday_options: faraday_options, faraday_retry_options: faraday_retry_options)
43
48
  end
44
49
 
45
- def self.from_personal_access_token(personal_access_token, workspace_id, endpoint: nil, wait_for_action_attempt: false, faraday_options: {}, faraday_retry_options: {})
50
+ def self.from_personal_access_token(personal_access_token, workspace_id, endpoint: nil, wait_for_action_attempt: true, faraday_options: {}, faraday_retry_options: {})
46
51
  new(personal_access_token: personal_access_token, workspace_id: workspace_id, endpoint: endpoint,
47
52
  wait_for_action_attempt: wait_for_action_attempt, faraday_options: faraday_options, faraday_retry_options: faraday_retry_options)
48
53
  end
@@ -2,10 +2,63 @@
2
2
 
3
3
  module Seam
4
4
  module Resources
5
+ # Represents a smart lock [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).
6
+ #
7
+ # An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate.
8
+ #
9
+ # Seam supports programming two types of access codes: [ongoing](https://docs.seam.co/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://docs.seam.co/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time.
10
+ #
11
+ # In addition, for certain devices, Seam also supports [offline access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code.
12
+ #
13
+ # For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes.
5
14
  class AccessCode < BaseResource
6
- attr_accessor :access_code_id, :code, :common_code_key, :device_id, :dormakaba_oracode_metadata, :is_backup, :is_backup_access_code_available, :is_external_modification_allowed, :is_managed, :is_offline_access_code, :is_one_time_use, :is_scheduled_on_device, :is_waiting_for_code_assignment, :name, :pending_mutations, :pulled_backup_access_code_id, :status, :type, :workspace_id
15
+ # Unique identifier for the access code.
16
+ attr_accessor :access_code_id
17
+ # Code used for access. Typically, a numeric or alphanumeric string.
18
+ attr_accessor :code
19
+ # Unique identifier for a group of access codes that share the same code.
20
+ attr_accessor :common_code_key
21
+ # Unique identifier for the device associated with the access code.
22
+ attr_accessor :device_id
23
+ # Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices.
24
+ attr_accessor :dormakaba_oracode_metadata
25
+ # Indicates whether the access code is a backup code.
26
+ attr_accessor :is_backup
27
+ # Indicates whether a backup access code is available for use if the primary access code is lost or compromised.
28
+ attr_accessor :is_backup_access_code_available
29
+ # Indicates whether changes to the access code from external sources are permitted.
30
+ attr_accessor :is_external_modification_allowed
31
+ # Indicates whether Seam manages the access code.
32
+ attr_accessor :is_managed
33
+ # Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection.
34
+ attr_accessor :is_offline_access_code
35
+ # Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use.
36
+ attr_accessor :is_one_time_use
37
+ # Indicates whether the code is set on the device according to a preconfigured schedule.
38
+ attr_accessor :is_scheduled_on_device
39
+ # Indicates whether the access code is waiting for a code assignment.
40
+ attr_accessor :is_waiting_for_code_assignment
41
+ # Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components).
42
+ attr_accessor :name
43
+ # Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device.
44
+ attr_accessor :pending_mutations
45
+ # Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code.
46
+ attr_accessor :pulled_backup_access_code_id
47
+ # Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes).
48
+ attr_accessor :status
49
+ # Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration.
50
+ attr_accessor :type
51
+ # Unique identifier for the Seam workspace associated with the access code.
52
+ attr_accessor :workspace_id
7
53
 
8
- date_accessor :created_at, :ends_at, :starts_at
54
+ # Date and time at which the access code was created.
55
+ date_accessor :created_at
56
+
57
+ # Date and time after which the time-bound access code becomes inactive.
58
+ date_accessor :ends_at
59
+
60
+ # Date and time at which the time-bound access code becomes active.
61
+ date_accessor :starts_at
9
62
 
10
63
  include Seam::Resources::ResourceErrorsSupport
11
64
  include Seam::Resources::ResourceWarningsSupport
@@ -2,10 +2,47 @@
2
2
 
3
3
  module Seam
4
4
  module Resources
5
+ # Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant.
5
6
  class AccessGrant < BaseResource
6
- attr_accessor :access_grant_id, :access_grant_key, :access_method_ids, :client_session_token, :customization_profile_id, :display_name, :instant_key_url, :location_ids, :name, :pending_mutations, :requested_access_methods, :reservation_key, :space_ids, :user_identity_id, :workspace_id
7
+ # ID of the Access Grant.
8
+ attr_accessor :access_grant_id
9
+ # Unique key for the access grant within the workspace.
10
+ attr_accessor :access_grant_key
11
+ # IDs of the access methods created for the Access Grant.
12
+ attr_accessor :access_method_ids
13
+ # Client Session Token. Only returned if the Access Grant has a mobile_key access method.
14
+ attr_accessor :client_session_token
15
+ # ID of the customization profile associated with the Access Grant.
16
+ attr_accessor :customization_profile_id
17
+ # Display name of the Access Grant.
18
+ attr_accessor :display_name
19
+ # Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method.
20
+ attr_accessor :instant_key_url
21
+ # @deprecated Use `space_ids`.
22
+ attr_accessor :location_ids
23
+ # Name of the Access Grant. If not provided, the display name will be computed.
24
+ attr_accessor :name
25
+ # List of pending mutations for the access grant. This shows updates that are in progress.
26
+ attr_accessor :pending_mutations
27
+ # Access methods that the user requested for the Access Grant.
28
+ attr_accessor :requested_access_methods
29
+ # Reservation key for the access grant.
30
+ attr_accessor :reservation_key
31
+ # IDs of the spaces to which the Access Grant gives access.
32
+ attr_accessor :space_ids
33
+ # ID of user identity to which the Access Grant gives access.
34
+ attr_accessor :user_identity_id
35
+ # ID of the Seam workspace associated with the Access Grant.
36
+ attr_accessor :workspace_id
7
37
 
8
- date_accessor :created_at, :ends_at, :starts_at
38
+ # Date and time at which the Access Grant was created.
39
+ date_accessor :created_at
40
+
41
+ # Date and time at which the Access Grant ends.
42
+ date_accessor :ends_at
43
+
44
+ # Date and time at which the Access Grant starts.
45
+ date_accessor :starts_at
9
46
 
10
47
  include Seam::Resources::ResourceErrorsSupport
11
48
  include Seam::Resources::ResourceWarningsSupport
@@ -2,10 +2,42 @@
2
2
 
3
3
  module Seam
4
4
  module Resources
5
+ # Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key.
5
6
  class AccessMethod < BaseResource
6
- attr_accessor :access_method_id, :client_session_token, :code, :customization_profile_id, :display_name, :instant_key_url, :is_assignment_required, :is_encoding_required, :is_issued, :is_ready_for_assignment, :is_ready_for_encoding, :mode, :pending_mutations, :workspace_id
7
+ # ID of the access method.
8
+ attr_accessor :access_method_id
9
+ # Token of the client session associated with the access method.
10
+ attr_accessor :client_session_token
11
+ # The actual PIN code for code access methods.
12
+ attr_accessor :code
13
+ # ID of the customization profile associated with the access method.
14
+ attr_accessor :customization_profile_id
15
+ # Display name of the access method.
16
+ attr_accessor :display_name
17
+ # URL of the Instant Key for mobile key access methods.
18
+ attr_accessor :instant_key_url
19
+ # Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment.
20
+ attr_accessor :is_assignment_required
21
+ # Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method.
22
+ attr_accessor :is_encoding_required
23
+ # Indicates whether the access method has been issued.
24
+ attr_accessor :is_issued
25
+ # Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment.
26
+ attr_accessor :is_ready_for_assignment
27
+ # Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued.
28
+ attr_accessor :is_ready_for_encoding
29
+ # Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
30
+ attr_accessor :mode
31
+ # Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress.
32
+ attr_accessor :pending_mutations
33
+ # ID of the Seam workspace associated with the access method.
34
+ attr_accessor :workspace_id
7
35
 
8
- date_accessor :created_at, :issued_at
36
+ # Date and time at which the access method was created.
37
+ date_accessor :created_at
38
+
39
+ # Date and time at which the access method was issued.
40
+ date_accessor :issued_at
9
41
 
10
42
  include Seam::Resources::ResourceErrorsSupport
11
43
  include Seam::Resources::ResourceWarningsSupport
@@ -2,9 +2,40 @@
2
2
 
3
3
  module Seam
4
4
  module Resources
5
+ # Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users.
6
+ #
7
+ # Some access control systems use [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes.
8
+ #
9
+ # To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems).
5
10
  class AcsAccessGroup < BaseResource
6
- attr_accessor :access_group_type, :access_group_type_display_name, :access_schedule, :acs_access_group_id, :acs_system_id, :connected_account_id, :display_name, :external_type, :external_type_display_name, :is_managed, :name, :pending_mutations, :workspace_id
11
+ # @deprecated Use `external_type`.
12
+ attr_accessor :access_group_type
13
+ # @deprecated Use `external_type_display_name`.
14
+ attr_accessor :access_group_type_display_name
15
+ # `starts_at` and `ends_at` timestamps for the access group's access.
16
+ attr_accessor :access_schedule
17
+ # ID of the access group.
18
+ attr_accessor :acs_access_group_id
19
+ # ID of the access control system that contains the access group.
20
+ attr_accessor :acs_system_id
21
+ # ID of the connected account that contains the access group.
22
+ attr_accessor :connected_account_id
23
+ # Display name for the access group.
24
+ attr_accessor :display_name
25
+ # Brand-specific terminology for the access group type.
26
+ attr_accessor :external_type
27
+ # Display name that corresponds to the brand-specific terminology for the access group type.
28
+ attr_accessor :external_type_display_name
29
+ # Indicates whether Seam manages the access group.
30
+ attr_accessor :is_managed
31
+ # Name of the access group.
32
+ attr_accessor :name
33
+ # Collection of pending mutations for the access group. Represents operations that have been requested but not yet completed on the integrated access system.
34
+ attr_accessor :pending_mutations
35
+ # ID of the workspace that contains the access group.
36
+ attr_accessor :workspace_id
7
37
 
38
+ # Date and time at which the access group was created.
8
39
  date_accessor :created_at
9
40
 
10
41
  include Seam::Resources::ResourceErrorsSupport
@@ -2,10 +2,69 @@
2
2
 
3
3
  module Seam
4
4
  module Resources
5
+ # Means by which an [access control system user](https://docs.seam.co/low-level-apis/access-systems/user-management) gains access at an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://docs.seam.co/low-level-apis/access-systems).
6
+ #
7
+ # An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs.
8
+ #
9
+ # For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type.
10
+ #
11
+ # For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials.
5
12
  class AcsCredential < BaseResource
6
- attr_accessor :access_method, :acs_credential_id, :acs_credential_pool_id, :acs_system_id, :acs_user_id, :assa_abloy_vostio_metadata, :card_number, :code, :connected_account_id, :display_name, :ends_at, :external_type, :external_type_display_name, :is_issued, :is_latest_desired_state_synced_with_provider, :is_managed, :is_multi_phone_sync_credential, :is_one_time_use, :parent_acs_credential_id, :starts_at, :user_identity_id, :visionline_metadata, :workspace_id
13
+ # Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
14
+ attr_accessor :access_method
15
+ # ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
16
+ attr_accessor :acs_credential_id
17
+ # ID of the credential pool to which the credential belongs.
18
+ attr_accessor :acs_credential_pool_id
19
+ # ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
20
+ attr_accessor :acs_system_id
21
+ # ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
22
+ attr_accessor :acs_user_id
23
+ # Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
24
+ attr_accessor :assa_abloy_vostio_metadata
25
+ # Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
26
+ attr_accessor :card_number
27
+ # Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
28
+ attr_accessor :code
29
+ # ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
30
+ attr_accessor :connected_account_id
31
+ # Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
32
+ attr_accessor :display_name
33
+ # Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`.
34
+ attr_accessor :ends_at
35
+ # Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`.
36
+ attr_accessor :external_type
37
+ # Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
38
+ attr_accessor :external_type_display_name
39
+ # Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card.
40
+ attr_accessor :is_issued
41
+ # Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider.
42
+ attr_accessor :is_latest_desired_state_synced_with_provider
43
+ # Indicates whether Seam manages the credential.
44
+ attr_accessor :is_managed
45
+ # Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials).
46
+ attr_accessor :is_multi_phone_sync_credential
47
+ # Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use.
48
+ attr_accessor :is_one_time_use
49
+ # ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
50
+ attr_accessor :parent_acs_credential_id
51
+ # Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
52
+ attr_accessor :starts_at
53
+ # ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
54
+ attr_accessor :user_identity_id
55
+ # Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
56
+ attr_accessor :visionline_metadata
57
+ # ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
58
+ attr_accessor :workspace_id
7
59
 
8
- date_accessor :created_at, :issued_at, :latest_desired_state_synced_with_provider_at
60
+ # Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created.
61
+ date_accessor :created_at
62
+
63
+ # Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card.
64
+ date_accessor :issued_at
65
+
66
+ # Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider.
67
+ date_accessor :latest_desired_state_synced_with_provider_at
9
68
 
10
69
  include Seam::Resources::ResourceErrorsSupport
11
70
  include Seam::Resources::ResourceWarningsSupport
@@ -2,9 +2,33 @@
2
2
 
3
3
  module Seam
4
4
  module Resources
5
+ # Represents a hardware device that encodes [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://docs.seam.co/low-level-apis/access-systems).
6
+ #
7
+ # Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps:
8
+ #
9
+ # 1. Credential creation
10
+ # Configure the access parameters for the credential.
11
+ # 2. Card encoding
12
+ # Write the credential data onto the card using a compatible card encoder.
13
+ #
14
+ # Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed.
15
+ #
16
+ # See [Working with Card Encoders and Scanners](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
17
+ #
18
+ # To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems).
5
19
  class AcsEncoder < BaseResource
6
- attr_accessor :acs_encoder_id, :acs_system_id, :connected_account_id, :display_name, :workspace_id
20
+ # ID of the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
21
+ attr_accessor :acs_encoder_id
22
+ # ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
23
+ attr_accessor :acs_system_id
24
+ # ID of the connected account that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
25
+ attr_accessor :connected_account_id
26
+ # Display name for the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
27
+ attr_accessor :display_name
28
+ # ID of the workspace that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
29
+ attr_accessor :workspace_id
7
30
 
31
+ # Date and time at which the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created.
8
32
  date_accessor :created_at
9
33
 
10
34
  include Seam::Resources::ResourceErrorsSupport
@@ -2,9 +2,56 @@
2
2
 
3
3
  module Seam
4
4
  module Resources
5
+ # Represents an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://docs.seam.co/low-level-apis/access-systems).
6
+ #
7
+ # In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance.
5
8
  class AcsEntrance < BaseResource
6
- attr_accessor :acs_entrance_id, :acs_system_id, :akiles_metadata, :assa_abloy_vostio_metadata, :avigilon_alta_metadata, :brivo_metadata, :can_belong_to_reservation, :can_unlock_with_card, :can_unlock_with_cloud_key, :can_unlock_with_code, :can_unlock_with_mobile_key, :connected_account_id, :display_name, :dormakaba_ambiance_metadata, :dormakaba_community_metadata, :hotek_metadata, :is_locked, :latch_metadata, :salto_ks_metadata, :salto_space_metadata, :space_ids, :visionline_metadata
9
+ # ID of the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
10
+ attr_accessor :acs_entrance_id
11
+ # ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
12
+ attr_accessor :acs_system_id
13
+ # Akiles-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
14
+ attr_accessor :akiles_metadata
15
+ # ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
16
+ attr_accessor :assa_abloy_vostio_metadata
17
+ # Avigilon Alta-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
18
+ attr_accessor :avigilon_alta_metadata
19
+ # Brivo-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
20
+ attr_accessor :brivo_metadata
21
+ # Indicates whether the ACS entrance can belong to a reservation via an access_grant.reservation_key.
22
+ attr_accessor :can_belong_to_reservation
23
+ # Indicates whether the ACS entrance can be unlocked with card credentials.
24
+ attr_accessor :can_unlock_with_card
25
+ # Indicates whether the ACS entrance can be unlocked with cloud key credentials.
26
+ attr_accessor :can_unlock_with_cloud_key
27
+ # Indicates whether the ACS entrance can be unlocked with pin codes.
28
+ attr_accessor :can_unlock_with_code
29
+ # Indicates whether the ACS entrance can be unlocked with mobile key credentials.
30
+ attr_accessor :can_unlock_with_mobile_key
31
+ # ID of the [connected account](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
32
+ attr_accessor :connected_account_id
33
+ # Display name for the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
34
+ attr_accessor :display_name
35
+ # dormakaba Ambiance-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
36
+ attr_accessor :dormakaba_ambiance_metadata
37
+ # dormakaba Community-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
38
+ attr_accessor :dormakaba_community_metadata
39
+ # Hotek-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
40
+ attr_accessor :hotek_metadata
41
+ # Indicates whether the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) is currently locked.
42
+ attr_accessor :is_locked
43
+ # Latch-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
44
+ attr_accessor :latch_metadata
45
+ # Salto KS-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
46
+ attr_accessor :salto_ks_metadata
47
+ # Salto Space-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
48
+ attr_accessor :salto_space_metadata
49
+ # IDs of the spaces that the entrance is in.
50
+ attr_accessor :space_ids
51
+ # Visionline-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details).
52
+ attr_accessor :visionline_metadata
7
53
 
54
+ # Date and time at which the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was created.
8
55
  date_accessor :created_at
9
56
 
10
57
  include Seam::Resources::ResourceErrorsSupport
@@ -2,9 +2,49 @@
2
2
 
3
3
  module Seam
4
4
  module Resources
5
+ # Represents an [access control system](https://docs.seam.co/low-level-apis/access-systems).
6
+ #
7
+ # Within an `acs_system`, create [`acs_user`s](https://docs.seam.co/api/acs/users/object) and [`acs_credential`s](https://docs.seam.co/api/acs/credentials/object) to grant access to the `acs_user`s.
8
+ #
9
+ # For details about the resources associated with an access control system, see the [access control systems namespace](https://docs.seam.co/api/acs).
5
10
  class AcsSystem < BaseResource
6
- attr_accessor :acs_access_group_count, :acs_system_id, :acs_user_count, :connected_account_id, :connected_account_ids, :default_credential_manager_acs_system_id, :external_type, :external_type_display_name, :image_alt_text, :image_url, :is_credential_manager, :location, :name, :system_type, :system_type_display_name, :visionline_metadata, :workspace_id
11
+ # Number of access groups in the [access control system](https://docs.seam.co/low-level-apis/access-systems).
12
+ attr_accessor :acs_access_group_count
13
+ # ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems).
14
+ attr_accessor :acs_system_id
15
+ # Number of users in the [access control system](https://docs.seam.co/low-level-apis/access-systems).
16
+ attr_accessor :acs_user_count
17
+ # ID of the connected account associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems).
18
+ attr_accessor :connected_account_id
19
+ # IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems).
20
+ # @deprecated Use `connected_account_id`.
21
+ attr_accessor :connected_account_ids
22
+ # ID of the default credential manager `acs_system` for this [access control system](https://docs.seam.co/low-level-apis/access-systems).
23
+ attr_accessor :default_credential_manager_acs_system_id
24
+ # Brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type.
25
+ attr_accessor :external_type
26
+ # Display name that corresponds to the brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type.
27
+ attr_accessor :external_type_display_name
28
+ # Alternative text for the [access control system](https://docs.seam.co/low-level-apis/access-systems) image.
29
+ attr_accessor :image_alt_text
30
+ # URL for the image that represents the [access control system](https://docs.seam.co/low-level-apis/access-systems).
31
+ attr_accessor :image_url
32
+ # Indicates whether the `acs_system` is a credential manager.
33
+ attr_accessor :is_credential_manager
34
+ # Location information for the [access control system](https://docs.seam.co/low-level-apis/access-systems).
35
+ attr_accessor :location
36
+ # Name of the [access control system](https://docs.seam.co/low-level-apis/access-systems).
37
+ attr_accessor :name
38
+ # @deprecated Use `external_type`.
39
+ attr_accessor :system_type
40
+ # @deprecated Use `external_type_display_name`.
41
+ attr_accessor :system_type_display_name
42
+ # Visionline-specific metadata for the [access control system](https://docs.seam.co/low-level-apis/access-systems).
43
+ attr_accessor :visionline_metadata
44
+ # ID of the workspace that contains the [access control system](https://docs.seam.co/low-level-apis/access-systems).
45
+ attr_accessor :workspace_id
7
46
 
47
+ # Date and time at which the [access control system](https://docs.seam.co/low-level-apis/access-systems) was created.
8
48
  date_accessor :created_at
9
49
 
10
50
  include Seam::Resources::ResourceErrorsSupport