seam 2.132.0 → 2.133.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 (78) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/seam/resources/access_code.rb +55 -2
  4. data/lib/seam/resources/access_grant.rb +39 -2
  5. data/lib/seam/resources/access_method.rb +34 -2
  6. data/lib/seam/resources/acs_access_group.rb +32 -1
  7. data/lib/seam/resources/acs_credential.rb +61 -2
  8. data/lib/seam/resources/acs_encoder.rb +25 -1
  9. data/lib/seam/resources/acs_entrance.rb +48 -1
  10. data/lib/seam/resources/acs_system.rb +41 -1
  11. data/lib/seam/resources/acs_user.rb +50 -1
  12. data/lib/seam/resources/action_attempt.rb +10 -1
  13. data/lib/seam/resources/batch.rb +126 -1
  14. data/lib/seam/resources/client_session.rb +35 -2
  15. data/lib/seam/resources/connect_webview.rb +50 -2
  16. data/lib/seam/resources/connected_account.rb +33 -1
  17. data/lib/seam/resources/customer_portal.rb +16 -2
  18. data/lib/seam/resources/device.rb +70 -1
  19. data/lib/seam/resources/device_provider.rb +48 -1
  20. data/lib/seam/resources/event.rb +184 -2
  21. data/lib/seam/resources/instant_key.rb +22 -2
  22. data/lib/seam/resources/noise_threshold.rb +15 -1
  23. data/lib/seam/resources/pagination.rb +7 -1
  24. data/lib/seam/resources/phone.rb +16 -1
  25. data/lib/seam/resources/space.rb +22 -1
  26. data/lib/seam/resources/thermostat_daily_program.rb +12 -1
  27. data/lib/seam/resources/thermostat_schedule.rb +23 -2
  28. data/lib/seam/resources/unmanaged_access_code.rb +41 -2
  29. data/lib/seam/resources/unmanaged_access_grant.rb +31 -2
  30. data/lib/seam/resources/unmanaged_access_method.rb +28 -2
  31. data/lib/seam/resources/unmanaged_device.rb +60 -1
  32. data/lib/seam/resources/unmanaged_user_identity.rb +16 -1
  33. data/lib/seam/resources/user_identity.rb +18 -1
  34. data/lib/seam/resources/webhook.rb +9 -1
  35. data/lib/seam/resources/workspace.rb +20 -1
  36. data/lib/seam/routes/access_codes.rb +147 -0
  37. data/lib/seam/routes/access_codes_simulate.rb +5 -0
  38. data/lib/seam/routes/access_codes_unmanaged.rb +34 -0
  39. data/lib/seam/routes/access_grants.rb +59 -0
  40. data/lib/seam/routes/access_grants_unmanaged.rb +20 -0
  41. data/lib/seam/routes/access_methods.rb +35 -0
  42. data/lib/seam/routes/access_methods_unmanaged.rb +9 -0
  43. data/lib/seam/routes/acs_access_groups.rb +28 -0
  44. data/lib/seam/routes/acs_credentials.rb +49 -0
  45. data/lib/seam/routes/acs_encoders.rb +25 -0
  46. data/lib/seam/routes/acs_encoders_simulate.rb +19 -0
  47. data/lib/seam/routes/acs_entrances.rb +30 -0
  48. data/lib/seam/routes/acs_systems.rb +20 -0
  49. data/lib/seam/routes/acs_users.rb +72 -0
  50. data/lib/seam/routes/action_attempts.rb +9 -0
  51. data/lib/seam/routes/client_sessions.rb +48 -0
  52. data/lib/seam/routes/connect_webviews.rb +36 -0
  53. data/lib/seam/routes/connected_accounts.rb +31 -0
  54. data/lib/seam/routes/connected_accounts_simulate.rb +3 -0
  55. data/lib/seam/routes/customers.rb +57 -0
  56. data/lib/seam/routes/devices.rb +45 -0
  57. data/lib/seam/routes/devices_simulate.rb +28 -0
  58. data/lib/seam/routes/devices_unmanaged.rb +36 -0
  59. data/lib/seam/routes/events.rb +35 -0
  60. data/lib/seam/routes/instant_keys.rb +10 -0
  61. data/lib/seam/routes/locks.rb +35 -0
  62. data/lib/seam/routes/locks_simulate.rb +7 -0
  63. data/lib/seam/routes/noise_sensors.rb +19 -0
  64. data/lib/seam/routes/noise_sensors_noise_thresholds.rb +27 -0
  65. data/lib/seam/routes/noise_sensors_simulate.rb +3 -0
  66. data/lib/seam/routes/phones.rb +10 -0
  67. data/lib/seam/routes/phones_simulate.rb +6 -0
  68. data/lib/seam/routes/spaces.rb +61 -0
  69. data/lib/seam/routes/thermostats.rb +112 -0
  70. data/lib/seam/routes/thermostats_daily_programs.rb +13 -0
  71. data/lib/seam/routes/thermostats_schedules.rb +28 -0
  72. data/lib/seam/routes/thermostats_simulate.rb +13 -0
  73. data/lib/seam/routes/user_identities.rb +67 -0
  74. data/lib/seam/routes/user_identities_unmanaged.rb +16 -0
  75. data/lib/seam/routes/webhooks.rb +16 -0
  76. data/lib/seam/routes/workspaces.rb +31 -0
  77. data/lib/seam/version.rb +1 -1
  78. metadata +2 -2
@@ -8,42 +8,90 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
12
+ # @param connect_webview_ids IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) for which you want to create a client session.
13
+ # @param connected_account_ids IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) for which you want to create a client session.
14
+ # @param customer_id Customer ID that you want to associate with the new client session.
15
+ # @param customer_key Customer key that you want to associate with the new client session.
16
+ # @param expires_at Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
17
+ # @param user_identifier_key Your user ID for the user for whom you want to create a client session.
18
+ # @param user_identity_id ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session.
19
+ # @param user_identity_ids IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
20
+ # @deprecated user_identity_ids: Use `user_identity_id` instead.
21
+ # @return [Seam::Resources::ClientSession] OK
11
22
  def create(connect_webview_ids: nil, connected_account_ids: nil, customer_id: nil, customer_key: nil, expires_at: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
12
23
  res = @client.post("/client_sessions/create", {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, customer_id: customer_id, customer_key: customer_key, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, user_identity_ids: user_identity_ids}.compact)
13
24
 
14
25
  Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
15
26
  end
16
27
 
28
+ # Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
29
+ # @param client_session_id ID of the client session that you want to delete.
30
+ # @return [nil] OK
17
31
  def delete(client_session_id:)
18
32
  @client.post("/client_sessions/delete", {client_session_id: client_session_id}.compact)
19
33
 
20
34
  nil
21
35
  end
22
36
 
37
+ # Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
38
+ # @param client_session_id ID of the client session that you want to get.
39
+ # @param user_identifier_key User identifier key associated with the client session that you want to get.
40
+ # @return [Seam::Resources::ClientSession] OK
23
41
  def get(client_session_id: nil, user_identifier_key: nil)
24
42
  res = @client.post("/client_sessions/get", {client_session_id: client_session_id, user_identifier_key: user_identifier_key}.compact)
25
43
 
26
44
  Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
27
45
  end
28
46
 
47
+ # Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist.
48
+ # @param connect_webview_ids IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session).
49
+ # @param connected_account_ids IDs of the [connected accounts](https://docs.seam.co/api/connected_accounts) that you want to associate with the client session (or that are already associated with the existing client session).
50
+ # @param expires_at Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it.
51
+ # @param user_identifier_key Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session).
52
+ # @param user_identity_id ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session).
53
+ # @param user_identity_ids IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
54
+ # @deprecated user_identity_ids: Use `user_identity_id`.
55
+ # @return [Seam::Resources::ClientSession] OK
29
56
  def get_or_create(connect_webview_ids: nil, connected_account_ids: nil, expires_at: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
30
57
  res = @client.post("/client_sessions/get_or_create", {connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, expires_at: expires_at, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, user_identity_ids: user_identity_ids}.compact)
31
58
 
32
59
  Seam::Resources::ClientSession.load_from_response(res.body["client_session"])
33
60
  end
34
61
 
62
+ # Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on.
63
+ # @param client_session_id ID of the client session to which you want to grant access to resources.
64
+ # @param connect_webview_ids IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session.
65
+ # @param connected_account_ids IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that you want to associate with the client session.
66
+ # @param user_identifier_key Your user ID for the user that you want to associate with the client session.
67
+ # @param user_identity_id ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
68
+ # @param user_identity_ids IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session.
69
+ # @deprecated user_identity_ids: Use `user_identity_id`.
70
+ # @return [nil] OK
35
71
  def grant_access(client_session_id: nil, connect_webview_ids: nil, connected_account_ids: nil, user_identifier_key: nil, user_identity_id: nil, user_identity_ids: nil)
36
72
  @client.post("/client_sessions/grant_access", {client_session_id: client_session_id, connect_webview_ids: connect_webview_ids, connected_account_ids: connected_account_ids, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, user_identity_ids: user_identity_ids}.compact)
37
73
 
38
74
  nil
39
75
  end
40
76
 
77
+ # Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
78
+ # @param client_session_id ID of the client session that you want to retrieve.
79
+ # @param connect_webview_id ID of the [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) for which you want to retrieve client sessions.
80
+ # @param user_identifier_key Your user ID for the user by which you want to filter client sessions.
81
+ # @param user_identity_id ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions.
82
+ # @param without_user_identifier_key Indicates whether to retrieve only client sessions without associated user identifier keys.
83
+ # @return [Seam::Resources::ClientSession] OK
41
84
  def list(client_session_id: nil, connect_webview_id: nil, user_identifier_key: nil, user_identity_id: nil, without_user_identifier_key: nil)
42
85
  res = @client.post("/client_sessions/list", {client_session_id: client_session_id, connect_webview_id: connect_webview_id, user_identifier_key: user_identifier_key, user_identity_id: user_identity_id, without_user_identifier_key: without_user_identifier_key}.compact)
43
86
 
44
87
  Seam::Resources::ClientSession.load_from_response(res.body["client_sessions"])
45
88
  end
46
89
 
90
+ # Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens).
91
+ #
92
+ # Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action.
93
+ # @param client_session_id ID of the client session that you want to revoke.
94
+ # @return [nil] OK
47
95
  def revoke(client_session_id:)
48
96
  @client.post("/client_sessions/revoke", {client_session_id: client_session_id}.compact)
49
97
 
@@ -8,24 +8,60 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Creates a new [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews).
12
+ #
13
+ # To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview.
14
+ #
15
+ # You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users.
16
+ #
17
+ # See also: [Connect Webview Process](https://docs.seam.co/core-concepts/connect-webviews/connect-webview-process).
18
+ # @param accepted_capabilities List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers.
19
+ # @param accepted_providers Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with no filters.
20
+ # @param automatically_manage_new_devices Indicates whether newly-added devices should appear as [managed devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews).
21
+ # @param custom_metadata Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://docs.seam.co/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata).
22
+ # @param custom_redirect_failure_url Alternative URL that you want to redirect the user to on an error. If you do not set this parameter, the Connect Webview falls back to the `custom_redirect_url`.
23
+ # @param custom_redirect_url URL that you want to redirect the user to after the provider login is complete.
24
+ # @param customer_key Associate the Connect Webview, the connected account, and all resources under the connected account with a customer. If the connected account already exists, it will be associated with the customer. If the connected account already exists, but is already associated with a customer, the Connect Webview will show an error.
25
+ # @param excluded_providers List of provider keys to exclude from the Connect Webview. These providers will not be shown when the user tries to connect an account.
26
+ # @param provider_category Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with the desired `provider_category` filter.
27
+ # @param wait_for_device_creation Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews).
28
+ # @return [Seam::Resources::ConnectWebview] OK
11
29
  def create(accepted_capabilities: nil, accepted_providers: nil, automatically_manage_new_devices: nil, custom_metadata: nil, custom_redirect_failure_url: nil, custom_redirect_url: nil, customer_key: nil, excluded_providers: nil, provider_category: nil, wait_for_device_creation: nil)
12
30
  res = @client.post("/connect_webviews/create", {accepted_capabilities: accepted_capabilities, accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, custom_redirect_failure_url: custom_redirect_failure_url, custom_redirect_url: custom_redirect_url, customer_key: customer_key, excluded_providers: excluded_providers, provider_category: provider_category, wait_for_device_creation: wait_for_device_creation}.compact)
13
31
 
14
32
  Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webview"])
15
33
  end
16
34
 
35
+ # Deletes a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews).
36
+ #
37
+ # You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews.
38
+ # @param connect_webview_id ID of the Connect Webview that you want to delete.
39
+ # @return [nil] OK
17
40
  def delete(connect_webview_id:)
18
41
  @client.post("/connect_webviews/delete", {connect_webview_id: connect_webview_id}.compact)
19
42
 
20
43
  nil
21
44
  end
22
45
 
46
+ # Returns a specified [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews).
47
+ #
48
+ # Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected.
49
+ # @param connect_webview_id ID of the Connect Webview that you want to get.
50
+ # @return [Seam::Resources::ConnectWebview] OK
23
51
  def get(connect_webview_id:)
24
52
  res = @client.post("/connect_webviews/get", {connect_webview_id: connect_webview_id}.compact)
25
53
 
26
54
  Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webview"])
27
55
  end
28
56
 
57
+ # Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews).
58
+ # @param custom_metadata_has Custom metadata pairs by which you want to [filter Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs.
59
+ # @param customer_key Customer key for which you want to list connect webviews.
60
+ # @param limit Maximum number of records to return per page.
61
+ # @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
62
+ # @param search String for which to search. Filters returned Connect Webviews to include all records that satisfy a partial match using `connect_webview_id`, `accepted_providers`, `custom_metadata`, or `customer_key`.
63
+ # @param user_identifier_key Your user ID for the user by which you want to filter Connect Webviews.
64
+ # @return [Seam::Resources::ConnectWebview] OK
29
65
  def list(custom_metadata_has: nil, customer_key: nil, limit: nil, page_cursor: nil, search: nil, user_identifier_key: nil)
30
66
  res = @client.post("/connect_webviews/list", {custom_metadata_has: custom_metadata_has, customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, user_identifier_key: user_identifier_key}.compact)
31
67
 
@@ -12,30 +12,61 @@ module Seam
12
12
  @simulate ||= Seam::Clients::ConnectedAccountsSimulate.new(client: @client, defaults: @defaults)
13
13
  end
14
14
 
15
+ # Deletes a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts).
16
+ #
17
+ # Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider.
18
+ #
19
+ # For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device.
20
+ # @param connected_account_id ID of the connected account that you want to delete.
21
+ # @return [nil] OK
15
22
  def delete(connected_account_id:)
16
23
  @client.post("/connected_accounts/delete", {connected_account_id: connected_account_id}.compact)
17
24
 
18
25
  nil
19
26
  end
20
27
 
28
+ # Returns a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts).
29
+ # @param connected_account_id ID of the connected account that you want to get.
30
+ # @param email Email address associated with the connected account that you want to get.
31
+ # @return [Seam::Resources::ConnectedAccount] OK
21
32
  def get(connected_account_id: nil, email: nil)
22
33
  res = @client.post("/connected_accounts/get", {connected_account_id: connected_account_id, email: email}.compact)
23
34
 
24
35
  Seam::Resources::ConnectedAccount.load_from_response(res.body["connected_account"])
25
36
  end
26
37
 
38
+ # Returns a list of all [connected accounts](https://docs.seam.co/core-concepts/connected-accounts).
39
+ # @param custom_metadata_has Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs.
40
+ # @param customer_key Customer key by which you want to filter connected accounts.
41
+ # @param limit Maximum number of records to return per page.
42
+ # @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
43
+ # @param search String for which to search. Filters returned connected accounts to include all records that satisfy a partial match using `connected_account_id`, `account_type`, `customer_key`, `custom_metadata`, `user_identifier.username`, `user_identifier.email` or `user_identifier.phone`.
44
+ # @param space_id ID of the space by which you want to filter connected accounts.
45
+ # @param user_identifier_key Your user ID for the user by which you want to filter connected accounts.
46
+ # @return [Seam::Resources::ConnectedAccount] OK
27
47
  def list(custom_metadata_has: nil, customer_key: nil, limit: nil, page_cursor: nil, search: nil, space_id: nil, user_identifier_key: nil)
28
48
  res = @client.post("/connected_accounts/list", {custom_metadata_has: custom_metadata_has, customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, space_id: space_id, user_identifier_key: user_identifier_key}.compact)
29
49
 
30
50
  Seam::Resources::ConnectedAccount.load_from_response(res.body["connected_accounts"])
31
51
  end
32
52
 
53
+ # Request a [connected account](https://docs.seam.co/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`.
54
+ # @param connected_account_id ID of the connected account that you want to sync.
55
+ # @return [nil] OK
33
56
  def sync(connected_account_id:)
34
57
  @client.post("/connected_accounts/sync", {connected_account_id: connected_account_id}.compact)
35
58
 
36
59
  nil
37
60
  end
38
61
 
62
+ # Updates a [connected account](https://docs.seam.co/core-concepts/connected-accounts).
63
+ # @param connected_account_id ID of the connected account that you want to update.
64
+ # @param accepted_capabilities List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`.
65
+ # @param automatically_manage_new_devices Indicates whether newly-added devices should appear as [managed devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices).
66
+ # @param custom_metadata Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://docs.seam.co/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata).
67
+ # @param customer_key The customer key to associate with this connected account. If provided, the connected account and all resources under the connected account will be moved to this customer. May only be provided if the connected account is not already associated with a customer.
68
+ # @param display_name Human-readable name for the connected account, shown in the dashboard. For example, `Booking from Airbnb House 1`.
69
+ # @return [nil] OK
39
70
  def update(connected_account_id:, accepted_capabilities: nil, automatically_manage_new_devices: nil, custom_metadata: nil, customer_key: nil, display_name: nil)
40
71
  @client.post("/connected_accounts/update", {connected_account_id: connected_account_id, accepted_capabilities: accepted_capabilities, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, customer_key: customer_key, display_name: display_name}.compact)
41
72
 
@@ -8,6 +8,9 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
12
+ # @param connected_account_id ID of the connected account you want to simulate as disconnected.
13
+ # @return [nil] OK
11
14
  def disconnect(connected_account_id:)
12
15
  @client.post("/connected_accounts/simulate/disconnect", {connected_account_id: connected_account_id}.compact)
13
16
 
@@ -8,18 +8,75 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Creates a new customer portal magic link with configurable features.
12
+ # @param customer_resources_filters Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata.
13
+ # @param customization_profile_id The ID of the customization profile to use for the portal.
14
+ # @param deep_link Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource.
15
+ # @param exclude_locale_picker Whether to exclude the option to select a locale within the portal UI.
16
+ # @param features
17
+ # @param is_embedded Whether the portal is embedded in another application.
18
+ # @param landing_page Configuration for the landing page when the portal loads.
19
+ # @param locale The locale to use for the portal.
20
+ # @param navigation_mode Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links.
21
+ # @param read_only Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected.
22
+ # @param customer_data
23
+ # @return [Seam::Resources::CustomerPortal] OK
11
24
  def create_portal(customer_resources_filters: nil, customization_profile_id: nil, deep_link: nil, exclude_locale_picker: nil, features: nil, is_embedded: nil, landing_page: nil, locale: nil, navigation_mode: nil, read_only: nil, customer_data: nil)
12
25
  res = @client.post("/customers/create_portal", {customer_resources_filters: customer_resources_filters, customization_profile_id: customization_profile_id, deep_link: deep_link, exclude_locale_picker: exclude_locale_picker, features: features, is_embedded: is_embedded, landing_page: landing_page, locale: locale, navigation_mode: navigation_mode, read_only: read_only, customer_data: customer_data}.compact)
13
26
 
14
27
  Seam::Resources::CustomerPortal.load_from_response(res.body["customer_portal"])
15
28
  end
16
29
 
30
+ # Deletes customer data including resources like spaces, properties, rooms, users, etc.
31
+ # This will delete the partner resources and any related Seam resources (user identities, access grants, spaces).
32
+ # @param access_grant_keys List of access grant keys to delete.
33
+ # @param booking_keys List of booking keys to delete.
34
+ # @param building_keys List of building keys to delete.
35
+ # @param common_area_keys List of common area keys to delete.
36
+ # @param customer_keys List of customer keys to delete all data for.
37
+ # @param facility_keys List of facility keys to delete.
38
+ # @param guest_keys List of guest keys to delete.
39
+ # @param listing_keys List of listing keys to delete.
40
+ # @param property_keys List of property keys to delete.
41
+ # @param property_listing_keys List of property listing keys to delete.
42
+ # @param reservation_keys List of reservation keys to delete.
43
+ # @param resident_keys List of resident keys to delete.
44
+ # @param room_keys List of room keys to delete.
45
+ # @param space_keys List of space keys to delete.
46
+ # @param staff_member_keys List of staff member keys to delete.
47
+ # @param tenant_keys List of tenant keys to delete.
48
+ # @param unit_keys List of unit keys to delete.
49
+ # @param user_identity_keys List of user identity keys to delete.
50
+ # @param user_keys List of user keys to delete.
51
+ # @return [nil] OK
17
52
  def delete_data(access_grant_keys: nil, booking_keys: nil, building_keys: nil, common_area_keys: nil, customer_keys: nil, facility_keys: nil, guest_keys: nil, listing_keys: nil, property_keys: nil, property_listing_keys: nil, reservation_keys: nil, resident_keys: nil, room_keys: nil, space_keys: nil, staff_member_keys: nil, tenant_keys: nil, unit_keys: nil, user_identity_keys: nil, user_keys: nil)
18
53
  @client.post("/customers/delete_data", {access_grant_keys: access_grant_keys, booking_keys: booking_keys, building_keys: building_keys, common_area_keys: common_area_keys, customer_keys: customer_keys, facility_keys: facility_keys, guest_keys: guest_keys, listing_keys: listing_keys, property_keys: property_keys, property_listing_keys: property_listing_keys, reservation_keys: reservation_keys, resident_keys: resident_keys, room_keys: room_keys, space_keys: space_keys, staff_member_keys: staff_member_keys, tenant_keys: tenant_keys, unit_keys: unit_keys, user_identity_keys: user_identity_keys, user_keys: user_keys}.compact)
19
54
 
20
55
  nil
21
56
  end
22
57
 
58
+ # Pushes customer data including resources like spaces, properties, rooms, users, etc.
59
+ # @param customer_key Your unique identifier for the customer.
60
+ # @param access_grants List of access grants.
61
+ # @param bookings List of bookings.
62
+ # @param buildings List of buildings.
63
+ # @param common_areas List of shared common areas.
64
+ # @param facilities List of gym or fitness facilities.
65
+ # @param guests List of guests.
66
+ # @param listings List of property listings.
67
+ # @param properties List of short-term rental properties.
68
+ # @param property_listings List of property listings.
69
+ # @param reservations List of reservations.
70
+ # @param residents List of residents.
71
+ # @param rooms List of hotel or hospitality rooms.
72
+ # @param sites List of general sites or areas.
73
+ # @param spaces List of general spaces or areas.
74
+ # @param staff_members List of staff members.
75
+ # @param tenants List of tenants.
76
+ # @param units List of multi-family residential units.
77
+ # @param user_identities List of user identities.
78
+ # @param users List of users.
79
+ # @return [nil] OK
23
80
  def push_data(customer_key:, access_grants: nil, bookings: nil, buildings: nil, common_areas: nil, facilities: nil, guests: nil, listings: nil, properties: nil, property_listings: nil, reservations: nil, residents: nil, rooms: nil, sites: nil, spaces: nil, staff_members: nil, tenants: nil, units: nil, user_identities: nil, users: nil)
24
81
  @client.post("/customers/push_data", {customer_key: customer_key, access_grants: access_grants, bookings: bookings, buildings: buildings, common_areas: common_areas, facilities: facilities, guests: guests, listings: listings, properties: properties, property_listings: property_listings, reservations: reservations, residents: residents, rooms: rooms, sites: sites, spaces: spaces, staff_members: staff_members, tenants: tenants, units: units, user_identities: user_identities, users: users}.compact)
25
82
 
@@ -16,30 +16,75 @@ module Seam
16
16
  @unmanaged ||= Seam::Clients::DevicesUnmanaged.new(client: @client, defaults: @defaults)
17
17
  end
18
18
 
19
+ # Returns a specified [device](https://docs.seam.co/core-concepts/devices).
20
+ #
21
+ # You must specify either `device_id` or `name`.
22
+ # @param device_id ID of the device that you want to get.
23
+ # @param name Name of the device that you want to get.
24
+ # @return [Seam::Resources::Device] OK
19
25
  def get(device_id: nil, name: nil)
20
26
  res = @client.post("/devices/get", {device_id: device_id, name: name}.compact)
21
27
 
22
28
  Seam::Resources::Device.load_from_response(res.body["device"])
23
29
  end
24
30
 
31
+ # Returns a list of all [devices](https://docs.seam.co/core-concepts/devices).
32
+ # @param connect_webview_id ID of the Connect Webview for which you want to list devices.
33
+ # @param connected_account_id ID of the connected account for which you want to list devices.
34
+ # @param connected_account_ids Array of IDs of the connected accounts for which you want to list devices.
35
+ # @param created_before Timestamp by which to limit returned devices. Returns devices created before this timestamp.
36
+ # @param custom_metadata_has Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices.
37
+ # @param customer_key Customer key for which you want to list devices.
38
+ # @param device_ids Array of device IDs for which you want to list devices.
39
+ # @param device_type Device type for which you want to list devices.
40
+ # @param device_types Array of device types for which you want to list devices.
41
+ # @param limit Numerical limit on the number of devices to return.
42
+ # @param manufacturer Manufacturer for which you want to list devices.
43
+ # @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
44
+ # @param search String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
45
+ # @param space_id ID of the space for which you want to list devices.
46
+ # @param unstable_location_id
47
+ # @deprecated unstable_location_id: Use `space_id`.
48
+ # @param user_identifier_key Your own internal user ID for the user for which you want to list devices.
49
+ # @return [Seam::Resources::Device] OK
25
50
  def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil)
26
51
  res = @client.post("/devices/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, unstable_location_id: unstable_location_id, user_identifier_key: user_identifier_key}.compact)
27
52
 
28
53
  Seam::Resources::Device.load_from_response(res.body["devices"])
29
54
  end
30
55
 
56
+ # Returns a list of all device providers.
57
+ #
58
+ # The information that this endpoint returns for each provider includes a set of [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`.
59
+ #
60
+ # When you create a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews).
61
+ # @param provider_category Category for which you want to list providers.
62
+ # @return [Seam::Resources::DeviceProvider] OK
31
63
  def list_device_providers(provider_category: nil)
32
64
  res = @client.post("/devices/list_device_providers", {provider_category: provider_category}.compact)
33
65
 
34
66
  Seam::Resources::DeviceProvider.load_from_response(res.body["device_providers"])
35
67
  end
36
68
 
69
+ # Updates provider-specific metadata for devices.
70
+ # @param devices Array of devices with provider metadata to update
71
+ # @return [nil] OK
37
72
  def report_provider_metadata(devices:)
38
73
  @client.post("/devices/report_provider_metadata", {devices: devices}.compact)
39
74
 
40
75
  nil
41
76
  end
42
77
 
78
+ # Updates a specified [device](https://docs.seam.co/core-concepts/devices).
79
+ #
80
+ # You can add or change [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices).
81
+ # @param device_id ID of the device that you want to update.
82
+ # @param backup_access_code_pool_enabled Indicates whether the device's [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is enabled. Set to `false` to disable the pool: Seam stops refilling it and removes any backup codes that have not yet been pulled into active use.
83
+ # @param custom_metadata Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://docs.seam.co/core-concepts/devices/filtering-devices-by-custom-metadata).
84
+ # @param is_managed Indicates whether the device is managed. To unmanage a device, set `is_managed` to `false`.
85
+ # @param name Name for the device.
86
+ # @param properties
87
+ # @return [nil] OK
43
88
  def update(device_id:, backup_access_code_pool_enabled: nil, custom_metadata: nil, is_managed: nil, name: nil, properties: nil)
44
89
  @client.post("/devices/update", {device_id: device_id, backup_access_code_pool_enabled: backup_access_code_pool_enabled, custom_metadata: custom_metadata, is_managed: is_managed, name: name, properties: properties}.compact)
45
90
 
@@ -8,36 +8,64 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal).
12
+ # @param device_id ID of the device that you want to simulate connecting to Seam.
13
+ # @return [nil] OK
11
14
  def connect(device_id:)
12
15
  @client.post("/devices/simulate/connect", {device_id: device_id}.compact)
13
16
 
14
17
  nil
15
18
  end
16
19
 
20
+ # Simulates bringing the Wi‑Fi hub (bridge) back online for a device.
21
+ # Only applicable for sandbox workspaces and currently
22
+ # implemented for August and TTLock locks.
23
+ # This will clear the `hub_disconnected` error on the device.
24
+ # @param device_id ID of the device whose hub you want to reconnect.
25
+ # @return [nil] OK
17
26
  def connect_to_hub(device_id:)
18
27
  @client.post("/devices/simulate/connect_to_hub", {device_id: device_id}.compact)
19
28
 
20
29
  nil
21
30
  end
22
31
 
32
+ # Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal).
33
+ # @param device_id ID of the device that you want to simulate disconnecting from Seam.
34
+ # @return [nil] OK
23
35
  def disconnect(device_id:)
24
36
  @client.post("/devices/simulate/disconnect", {device_id: device_id}.compact)
25
37
 
26
38
  nil
27
39
  end
28
40
 
41
+ # Simulates taking the Wi‑Fi hub (bridge) offline for a device.
42
+ # Only applicable for sandbox workspaces and currently
43
+ # implemented for August, TTLock, and IglooHome devices.
44
+ # This will set the `hub_disconnected` error on the device, or mark the
45
+ # IglooHome bridge offline in sandbox.
46
+ # @param device_id ID of the device whose hub you want to disconnect.
47
+ # @return [nil] OK
29
48
  def disconnect_from_hub(device_id:)
30
49
  @client.post("/devices/simulate/disconnect_from_hub", {device_id: device_id}.compact)
31
50
 
32
51
  nil
33
52
  end
34
53
 
54
+ # Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only).
55
+ # Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription.
56
+ # The actual device error is created/cleared by the poller after this state change.
57
+ # @param device_id
58
+ # @param is_expired
59
+ # @return [nil] OK
35
60
  def paid_subscription(device_id:, is_expired:)
36
61
  @client.post("/devices/simulate/paid_subscription", {device_id: device_id, is_expired: is_expired}.compact)
37
62
 
38
63
  nil
39
64
  end
40
65
 
66
+ # Simulates removing a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal).
67
+ # @param device_id ID of the device that you want to simulate removing from Seam.
68
+ # @return [nil] OK
41
69
  def remove(device_id:)
42
70
  @client.post("/devices/simulate/remove", {device_id: device_id}.compact)
43
71
 
@@ -8,18 +8,54 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Returns a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices).
12
+ #
13
+ # An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).
14
+ #
15
+ # You must specify either `device_id` or `name`.
16
+ # @param device_id ID of the unmanaged device that you want to get.
17
+ # @param name Name of the unmanaged device that you want to get.
18
+ # @return [Seam::Resources::UnmanagedDevice] OK
11
19
  def get(device_id: nil, name: nil)
12
20
  res = @client.post("/devices/unmanaged/get", {device_id: device_id, name: name}.compact)
13
21
 
14
22
  Seam::Resources::UnmanagedDevice.load_from_response(res.body["device"])
15
23
  end
16
24
 
25
+ # Returns a list of all [unmanaged devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices).
26
+ #
27
+ # An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).
28
+ # @param connect_webview_id ID of the Connect Webview for which you want to list devices.
29
+ # @param connected_account_id ID of the connected account for which you want to list devices.
30
+ # @param connected_account_ids Array of IDs of the connected accounts for which you want to list devices.
31
+ # @param created_before Timestamp by which to limit returned devices. Returns devices created before this timestamp.
32
+ # @param custom_metadata_has Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices.
33
+ # @param customer_key Customer key for which you want to list devices.
34
+ # @param device_ids Array of device IDs for which you want to list devices.
35
+ # @param device_type Device type for which you want to list devices.
36
+ # @param device_types Array of device types for which you want to list devices.
37
+ # @param limit Numerical limit on the number of devices to return.
38
+ # @param manufacturer Manufacturer for which you want to list devices.
39
+ # @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
40
+ # @param search String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
41
+ # @param space_id ID of the space for which you want to list devices.
42
+ # @param unstable_location_id
43
+ # @deprecated unstable_location_id: Use `space_id`.
44
+ # @param user_identifier_key Your own internal user ID for the user for which you want to list devices.
45
+ # @return [Seam::Resources::UnmanagedDevice] OK
17
46
  def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil)
18
47
  res = @client.post("/devices/unmanaged/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, unstable_location_id: unstable_location_id, user_identifier_key: user_identifier_key}.compact)
19
48
 
20
49
  Seam::Resources::UnmanagedDevice.load_from_response(res.body["devices"])
21
50
  end
22
51
 
52
+ # Updates a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`.
53
+ #
54
+ # An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).
55
+ # @param device_id ID of the unmanaged device that you want to update.
56
+ # @param custom_metadata Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs.
57
+ # @param is_managed Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed.
58
+ # @return [nil] OK
23
59
  def update(device_id:, custom_metadata: nil, is_managed: nil)
24
60
  @client.post("/devices/unmanaged/update", {device_id: device_id, custom_metadata: custom_metadata, is_managed: is_managed}.compact)
25
61
 
@@ -8,12 +8,47 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place.
12
+ # @param event_id Unique identifier for the event that you want to get.
13
+ # @param device_id Unique identifier for the device that triggered the event that you want to get.
14
+ # @param event_type Type of the event that you want to get.
15
+ # @return [Seam::Resources::SeamEvent] OK
11
16
  def get(event_id: nil, device_id: nil, event_type: nil)
12
17
  res = @client.post("/events/get", {event_id: event_id, device_id: device_id, event_type: event_type}.compact)
13
18
 
14
19
  Seam::Resources::SeamEvent.load_from_response(res.body["event"])
15
20
  end
16
21
 
22
+ # Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place.
23
+ # @param access_code_id ID of the access code for which you want to list events.
24
+ # @param access_code_ids IDs of the access codes for which you want to list events.
25
+ # @param access_grant_id ID of the access grant for which you want to list events.
26
+ # @param access_grant_ids IDs of the access grants for which you want to list events.
27
+ # @param access_method_id ID of the access method for which you want to list events.
28
+ # @param access_method_ids IDs of the access methods for which you want to list events.
29
+ # @param acs_access_group_id ID of the ACS access group for which you want to list events.
30
+ # @param acs_credential_id ID of the ACS credential for which you want to list events.
31
+ # @param acs_encoder_id ID of the ACS encoder for which you want to list events.
32
+ # @param acs_entrance_id ID of the ACS entrance for which you want to list events.
33
+ # @param acs_system_id ID of the access system for which you want to list events.
34
+ # @param acs_system_ids IDs of the access systems for which you want to list events.
35
+ # @param acs_user_id ID of the ACS user for which you want to list events.
36
+ # @param between Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`.
37
+ # @param connect_webview_id ID of the Connect Webview for which you want to list events.
38
+ # @param connected_account_id ID of the connected account for which you want to list events.
39
+ # @param customer_key Customer key for which you want to list events.
40
+ # @param device_id ID of the device for which you want to list events.
41
+ # @param device_ids IDs of the devices for which you want to list events.
42
+ # @param event_ids IDs of the events that you want to list.
43
+ # @param event_type Type of the events that you want to list.
44
+ # @param event_types Types of the events that you want to list.
45
+ # @param limit Numerical limit on the number of events to return.
46
+ # @param since Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`.
47
+ # @param space_id ID of the space for which you want to list events.
48
+ # @param space_ids IDs of the spaces for which you want to list events.
49
+ # @param unstable_offset Offset for the events that you want to list.
50
+ # @param user_identity_id ID of the user identity for which you want to list events.
51
+ # @return [Seam::Resources::SeamEvent] OK
17
52
  def list(access_code_id: nil, access_code_ids: nil, access_grant_id: nil, access_grant_ids: nil, access_method_id: nil, access_method_ids: nil, acs_access_group_id: nil, acs_credential_id: nil, acs_encoder_id: nil, acs_entrance_id: nil, acs_system_id: nil, acs_system_ids: nil, acs_user_id: nil, between: nil, connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_id: nil, device_ids: nil, event_ids: nil, event_type: nil, event_types: nil, limit: nil, since: nil, space_id: nil, space_ids: nil, unstable_offset: nil, user_identity_id: nil)
18
53
  res = @client.post("/events/list", {access_code_id: access_code_id, access_code_ids: access_code_ids, access_grant_id: access_grant_id, access_grant_ids: access_grant_ids, access_method_id: access_method_id, access_method_ids: access_method_ids, acs_access_group_id: acs_access_group_id, acs_credential_id: acs_credential_id, acs_encoder_id: acs_encoder_id, acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, acs_system_ids: acs_system_ids, acs_user_id: acs_user_id, between: between, connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_id: device_id, device_ids: device_ids, event_ids: event_ids, event_type: event_type, event_types: event_types, limit: limit, since: since, space_id: space_id, space_ids: space_ids, unstable_offset: unstable_offset, user_identity_id: user_identity_id}.compact)
19
54
 
@@ -8,18 +8,28 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Deletes a specified [Instant Key](https://docs.seam.co/capability-guides/instant-keys).
12
+ # @param instant_key_id ID of the Instant Key that you want to delete.
13
+ # @return [nil] OK
11
14
  def delete(instant_key_id:)
12
15
  @client.post("/instant_keys/delete", {instant_key_id: instant_key_id}.compact)
13
16
 
14
17
  nil
15
18
  end
16
19
 
20
+ # Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys).
21
+ # @param instant_key_id ID of the instant key to get.
22
+ # @param instant_key_url URL of the instant key to get.
23
+ # @return [Seam::Resources::InstantKey] OK
17
24
  def get(instant_key_id: nil, instant_key_url: nil)
18
25
  res = @client.post("/instant_keys/get", {instant_key_id: instant_key_id, instant_key_url: instant_key_url}.compact)
19
26
 
20
27
  Seam::Resources::InstantKey.load_from_response(res.body["instant_key"])
21
28
  end
22
29
 
30
+ # Returns a list of all [instant keys](https://docs.seam.co/capability-guides/instant-keys).
31
+ # @param user_identity_id ID of the user identity by which you want to filter the list of Instant Keys.
32
+ # @return [Seam::Resources::InstantKey] OK
23
33
  def list(user_identity_id: nil)
24
34
  res = @client.post("/instant_keys/list", {user_identity_id: user_identity_id}.compact)
25
35