seam 2.131.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 (152) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/lib/seam/http_multi_workspace.rb +2 -2
  4. data/lib/seam/http_single_workspace.rb +2 -2
  5. data/lib/seam/resources/access_code.rb +67 -0
  6. data/lib/seam/resources/access_grant.rb +51 -0
  7. data/lib/seam/resources/access_method.rb +46 -0
  8. data/lib/seam/resources/acs_access_group.rb +45 -0
  9. data/lib/seam/resources/acs_credential.rb +73 -0
  10. data/lib/seam/resources/acs_encoder.rb +37 -0
  11. data/lib/seam/resources/acs_entrance.rb +61 -0
  12. data/lib/seam/resources/acs_system.rb +54 -0
  13. data/lib/seam/resources/acs_user.rb +63 -0
  14. data/lib/seam/resources/action_attempt.rb +18 -0
  15. data/lib/seam/resources/batch.rb +134 -0
  16. data/lib/seam/resources/client_session.rb +44 -0
  17. data/lib/seam/resources/connect_webview.rb +59 -0
  18. data/lib/seam/resources/connected_account.rb +46 -0
  19. data/lib/seam/resources/customer_portal.rb +25 -0
  20. data/lib/seam/resources/device.rb +83 -0
  21. data/lib/seam/resources/device_provider.rb +56 -0
  22. data/lib/seam/resources/event.rb +193 -0
  23. data/lib/seam/{routes/resources → resources}/index.rb +3 -0
  24. data/lib/seam/resources/instant_key.rb +31 -0
  25. data/lib/seam/resources/noise_threshold.rb +23 -0
  26. data/lib/seam/resources/pagination.rb +15 -0
  27. data/lib/seam/resources/phone.rb +29 -0
  28. data/lib/seam/resources/space.rb +32 -0
  29. data/lib/seam/resources/thermostat_daily_program.rb +22 -0
  30. data/lib/seam/resources/thermostat_schedule.rb +34 -0
  31. data/lib/seam/resources/unmanaged_access_code.rb +53 -0
  32. data/lib/seam/resources/unmanaged_access_grant.rb +43 -0
  33. data/lib/seam/resources/unmanaged_access_method.rb +40 -0
  34. data/lib/seam/resources/unmanaged_device.rb +73 -0
  35. data/lib/seam/resources/unmanaged_user_identity.rb +29 -0
  36. data/lib/seam/resources/user_identity.rb +31 -0
  37. data/lib/seam/resources/webhook.rb +17 -0
  38. data/lib/seam/resources/workspace.rb +28 -0
  39. data/lib/seam/routes/access_codes.rb +227 -0
  40. data/lib/seam/routes/access_codes_simulate.rb +23 -0
  41. data/lib/seam/routes/access_codes_unmanaged.rb +76 -0
  42. data/lib/seam/routes/access_grants.rb +117 -0
  43. data/lib/seam/routes/access_grants_unmanaged.rb +50 -0
  44. data/lib/seam/routes/access_methods.rb +101 -0
  45. data/lib/seam/routes/access_methods_unmanaged.rb +33 -0
  46. data/lib/seam/routes/acs_access_groups.rb +82 -0
  47. data/lib/seam/routes/acs_credentials.rb +109 -0
  48. data/lib/seam/routes/{clients/acs_encoders.rb → acs_encoders.rb} +25 -0
  49. data/lib/seam/routes/acs_encoders_simulate.rb +55 -0
  50. data/lib/seam/routes/acs_entrances.rb +76 -0
  51. data/lib/seam/routes/acs_systems.rb +56 -0
  52. data/lib/seam/routes/acs_users.rb +150 -0
  53. data/lib/seam/routes/{clients/action_attempts.rb → action_attempts.rb} +9 -0
  54. data/lib/seam/routes/client_sessions.rb +102 -0
  55. data/lib/seam/routes/connect_webviews.rb +72 -0
  56. data/lib/seam/routes/connected_accounts.rb +77 -0
  57. data/lib/seam/routes/{clients/connected_accounts_simulate.rb → connected_accounts_simulate.rb} +3 -0
  58. data/lib/seam/routes/customers.rb +87 -0
  59. data/lib/seam/routes/devices.rb +95 -0
  60. data/lib/seam/routes/devices_simulate.rb +76 -0
  61. data/lib/seam/routes/devices_unmanaged.rb +66 -0
  62. data/lib/seam/routes/events.rb +59 -0
  63. data/lib/seam/routes/{clients/instant_keys.rb → instant_keys.rb} +10 -0
  64. data/lib/seam/routes/locks.rb +89 -0
  65. data/lib/seam/routes/{clients/locks_simulate.rb → locks_simulate.rb} +7 -0
  66. data/lib/seam/routes/noise_sensors.rb +45 -0
  67. data/lib/seam/routes/noise_sensors_noise_thresholds.rb +69 -0
  68. data/lib/seam/routes/noise_sensors_simulate.rb +21 -0
  69. data/lib/seam/routes/phones.rb +44 -0
  70. data/lib/seam/routes/phones_simulate.rb +24 -0
  71. data/lib/seam/routes/spaces.rb +145 -0
  72. data/lib/seam/routes/thermostats.rb +238 -0
  73. data/lib/seam/routes/{clients/thermostats_daily_programs.rb → thermostats_daily_programs.rb} +13 -0
  74. data/lib/seam/routes/thermostats_schedules.rb +70 -0
  75. data/lib/seam/routes/thermostats_simulate.rb +37 -0
  76. data/lib/seam/routes/user_identities.rb +167 -0
  77. data/lib/seam/routes/user_identities_unmanaged.rb +46 -0
  78. data/lib/seam/routes/{clients/webhooks.rb → webhooks.rb} +16 -0
  79. data/lib/seam/routes/workspaces.rb +77 -0
  80. data/lib/seam/version.rb +1 -1
  81. data/lib/seam/webhook.rb +1 -1
  82. metadata +83 -80
  83. data/lib/seam/routes/clients/access_codes.rb +0 -80
  84. data/lib/seam/routes/clients/access_codes_simulate.rb +0 -18
  85. data/lib/seam/routes/clients/access_codes_unmanaged.rb +0 -42
  86. data/lib/seam/routes/clients/access_grants.rb +0 -58
  87. data/lib/seam/routes/clients/access_grants_unmanaged.rb +0 -30
  88. data/lib/seam/routes/clients/access_methods.rb +0 -66
  89. data/lib/seam/routes/clients/access_methods_unmanaged.rb +0 -24
  90. data/lib/seam/routes/clients/acs_access_groups.rb +0 -54
  91. data/lib/seam/routes/clients/acs_credentials.rb +0 -60
  92. data/lib/seam/routes/clients/acs_encoders_simulate.rb +0 -36
  93. data/lib/seam/routes/clients/acs_entrances.rb +0 -46
  94. data/lib/seam/routes/clients/acs_systems.rb +0 -36
  95. data/lib/seam/routes/clients/acs_users.rb +0 -78
  96. data/lib/seam/routes/clients/client_sessions.rb +0 -54
  97. data/lib/seam/routes/clients/connect_webviews.rb +0 -36
  98. data/lib/seam/routes/clients/connected_accounts.rb +0 -46
  99. data/lib/seam/routes/clients/customers.rb +0 -30
  100. data/lib/seam/routes/clients/devices.rb +0 -50
  101. data/lib/seam/routes/clients/devices_simulate.rb +0 -48
  102. data/lib/seam/routes/clients/devices_unmanaged.rb +0 -30
  103. data/lib/seam/routes/clients/events.rb +0 -24
  104. data/lib/seam/routes/clients/locks.rb +0 -54
  105. data/lib/seam/routes/clients/noise_sensors.rb +0 -26
  106. data/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb +0 -42
  107. data/lib/seam/routes/clients/noise_sensors_simulate.rb +0 -18
  108. data/lib/seam/routes/clients/phones.rb +0 -34
  109. data/lib/seam/routes/clients/phones_simulate.rb +0 -18
  110. data/lib/seam/routes/clients/spaces.rb +0 -84
  111. data/lib/seam/routes/clients/thermostats.rb +0 -126
  112. data/lib/seam/routes/clients/thermostats_schedules.rb +0 -42
  113. data/lib/seam/routes/clients/thermostats_simulate.rb +0 -24
  114. data/lib/seam/routes/clients/user_identities.rb +0 -100
  115. data/lib/seam/routes/clients/user_identities_unmanaged.rb +0 -30
  116. data/lib/seam/routes/clients/workspaces.rb +0 -46
  117. data/lib/seam/routes/resources/access_code.rb +0 -14
  118. data/lib/seam/routes/resources/access_grant.rb +0 -14
  119. data/lib/seam/routes/resources/access_method.rb +0 -14
  120. data/lib/seam/routes/resources/acs_access_group.rb +0 -14
  121. data/lib/seam/routes/resources/acs_credential.rb +0 -14
  122. data/lib/seam/routes/resources/acs_encoder.rb +0 -13
  123. data/lib/seam/routes/resources/acs_entrance.rb +0 -14
  124. data/lib/seam/routes/resources/acs_system.rb +0 -14
  125. data/lib/seam/routes/resources/acs_user.rb +0 -14
  126. data/lib/seam/routes/resources/action_attempt.rb +0 -9
  127. data/lib/seam/routes/resources/batch.rb +0 -9
  128. data/lib/seam/routes/resources/client_session.rb +0 -11
  129. data/lib/seam/routes/resources/connect_webview.rb +0 -11
  130. data/lib/seam/routes/resources/connected_account.rb +0 -14
  131. data/lib/seam/routes/resources/customer_portal.rb +0 -11
  132. data/lib/seam/routes/resources/device.rb +0 -14
  133. data/lib/seam/routes/resources/device_provider.rb +0 -9
  134. data/lib/seam/routes/resources/event.rb +0 -11
  135. data/lib/seam/routes/resources/instant_key.rb +0 -11
  136. data/lib/seam/routes/resources/noise_threshold.rb +0 -9
  137. data/lib/seam/routes/resources/pagination.rb +0 -9
  138. data/lib/seam/routes/resources/phone.rb +0 -14
  139. data/lib/seam/routes/resources/space.rb +0 -11
  140. data/lib/seam/routes/resources/thermostat_daily_program.rb +0 -11
  141. data/lib/seam/routes/resources/thermostat_schedule.rb +0 -13
  142. data/lib/seam/routes/resources/unmanaged_access_code.rb +0 -14
  143. data/lib/seam/routes/resources/unmanaged_device.rb +0 -14
  144. data/lib/seam/routes/resources/user_identity.rb +0 -14
  145. data/lib/seam/routes/resources/webhook.rb +0 -9
  146. data/lib/seam/routes/resources/workspace.rb +0 -9
  147. /data/lib/seam/{routes/resources → resources}/resource_error.rb +0 -0
  148. /data/lib/seam/{routes/resources → resources}/resource_errors_support.rb +0 -0
  149. /data/lib/seam/{routes/resources → resources}/resource_warning.rb +0 -0
  150. /data/lib/seam/{routes/resources → resources}/resource_warnings_support.rb +0 -0
  151. /data/lib/seam/routes/{clients/acs.rb → acs.rb} +0 -0
  152. /data/lib/seam/routes/{clients/index.rb → index.rb} +0 -0
@@ -0,0 +1,167 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Clients
5
+ class UserIdentities
6
+ def initialize(client:, defaults:)
7
+ @client = client
8
+ @defaults = defaults
9
+ end
10
+
11
+ def unmanaged
12
+ @unmanaged ||= Seam::Clients::UserIdentitiesUnmanaged.new(client: @client, defaults: @defaults)
13
+ end
14
+
15
+ # Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
16
+ #
17
+ # You must specify either `user_identity_id` or `user_identity_key` to identify the user identity.
18
+ #
19
+ # If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user.
20
+ # @param acs_user_id ID of the access system user that you want to add to the user identity.
21
+ # @param user_identity_id ID of the user identity to which you want to add an access system user.
22
+ # @param user_identity_key Key of the user identity to which you want to add an access system user.
23
+ # @return [nil] OK
24
+ def add_acs_user(acs_user_id:, user_identity_id: nil, user_identity_key: nil)
25
+ @client.post("/user_identities/add_acs_user", {acs_user_id: acs_user_id, user_identity_id: user_identity_id, user_identity_key: user_identity_key}.compact)
26
+
27
+ nil
28
+ end
29
+
30
+ # Creates a new [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
31
+ # @param acs_system_ids List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity.
32
+ # @param email_address Unique email address for the new user identity.
33
+ # @param full_name Full name of the user associated with the new user identity.
34
+ # @param phone_number Unique phone number for the new user identity in E.164 format (for example, +15555550100).
35
+ # @param user_identity_key Unique key for the new user identity.
36
+ # @return [Seam::Resources::UserIdentity] OK
37
+ def create(acs_system_ids: nil, email_address: nil, full_name: nil, phone_number: nil, user_identity_key: nil)
38
+ res = @client.post("/user_identities/create", {acs_system_ids: acs_system_ids, email_address: email_address, full_name: full_name, phone_number: phone_number, user_identity_key: user_identity_key}.compact)
39
+
40
+ Seam::Resources::UserIdentity.load_from_response(res.body["user_identity"])
41
+ end
42
+
43
+ # Deletes a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://docs.seam.co/api/acs/credentials), [acs users](https://docs.seam.co/api/acs/users) and [client sessions](https://docs.seam.co/api/client_sessions).
44
+ # @param user_identity_id ID of the user identity that you want to delete.
45
+ # @return [nil] OK
46
+ def delete(user_identity_id:)
47
+ @client.post("/user_identities/delete", {user_identity_id: user_identity_id}.compact)
48
+
49
+ nil
50
+ end
51
+
52
+ # Generates a new [instant key](https://docs.seam.co/capability-guides/instant-keys) for a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
53
+ # @param user_identity_id ID of the user identity for which you want to generate an instant key.
54
+ # @param customization_profile_id
55
+ # @param max_use_count Maximum number of times the instant key can be used. Default: 1.
56
+ # @return [Seam::Resources::InstantKey] OK
57
+ def generate_instant_key(user_identity_id:, customization_profile_id: nil, max_use_count: nil)
58
+ res = @client.post("/user_identities/generate_instant_key", {user_identity_id: user_identity_id, customization_profile_id: customization_profile_id, max_use_count: max_use_count}.compact)
59
+
60
+ Seam::Resources::InstantKey.load_from_response(res.body["instant_key"])
61
+ end
62
+
63
+ # Returns a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
64
+ # @param user_identity_id ID of the user identity that you want to get.
65
+ # @param user_identity_key
66
+ # @return [Seam::Resources::UserIdentity] OK
67
+ def get(user_identity_id: nil, user_identity_key: nil)
68
+ res = @client.post("/user_identities/get", {user_identity_id: user_identity_id, user_identity_key: user_identity_key}.compact)
69
+
70
+ Seam::Resources::UserIdentity.load_from_response(res.body["user_identity"])
71
+ end
72
+
73
+ # Grants a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://docs.seam.co/core-concepts/devices/).
74
+ # @param device_id ID of the managed device to which you want to grant access to the user identity.
75
+ # @param user_identity_id ID of the user identity that you want to grant access to a device.
76
+ # @return [nil] OK
77
+ def grant_access_to_device(device_id:, user_identity_id:)
78
+ @client.post("/user_identities/grant_access_to_device", {device_id: device_id, user_identity_id: user_identity_id}.compact)
79
+
80
+ nil
81
+ end
82
+
83
+ # Returns a list of all [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
84
+ # @param created_before Timestamp by which to limit returned user identities. Returns user identities created before this timestamp.
85
+ # @param credential_manager_acs_system_id `acs_system_id` of the credential manager by which you want to filter the list of user identities.
86
+ # @param limit Maximum number of records to return per page.
87
+ # @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
88
+ # @param search String for which to search. Filters returned user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address` or `user_identity_id`.
89
+ # @param user_identity_ids Array of user identity IDs by which to filter the list of user identities.
90
+ # @return [Seam::Resources::UserIdentity] OK
91
+ def list(created_before: nil, credential_manager_acs_system_id: nil, limit: nil, page_cursor: nil, search: nil, user_identity_ids: nil)
92
+ res = @client.post("/user_identities/list", {created_before: created_before, credential_manager_acs_system_id: credential_manager_acs_system_id, limit: limit, page_cursor: page_cursor, search: search, user_identity_ids: user_identity_ids}.compact)
93
+
94
+ Seam::Resources::UserIdentity.load_from_response(res.body["user_identities"])
95
+ end
96
+
97
+ # Returns a list of all [devices](https://docs.seam.co/core-concepts/devices) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity.
98
+ # @param user_identity_id ID of the user identity for which you want to retrieve all accessible devices.
99
+ # @return [Seam::Resources::Device] OK
100
+ def list_accessible_devices(user_identity_id:)
101
+ res = @client.post("/user_identities/list_accessible_devices", {user_identity_id: user_identity_id}.compact)
102
+
103
+ Seam::Resources::Device.load_from_response(res.body["devices"])
104
+ end
105
+
106
+ # Returns a list of all [ACS entrances](https://docs.seam.co/api/acs/entrances) accessible to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity.
107
+ # @param user_identity_id ID of the user identity for which you want to retrieve all accessible entrances.
108
+ # @return [Seam::Resources::AcsEntrance] OK
109
+ def list_accessible_entrances(user_identity_id:)
110
+ res = @client.post("/user_identities/list_accessible_entrances", {user_identity_id: user_identity_id}.compact)
111
+
112
+ Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
113
+ end
114
+
115
+ # Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
116
+ # @param user_identity_id ID of the user identity for which you want to retrieve all access systems.
117
+ # @return [Seam::Resources::AcsSystem] OK
118
+ def list_acs_systems(user_identity_id:)
119
+ res = @client.post("/user_identities/list_acs_systems", {user_identity_id: user_identity_id}.compact)
120
+
121
+ Seam::Resources::AcsSystem.load_from_response(res.body["acs_systems"])
122
+ end
123
+
124
+ # Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
125
+ # @param user_identity_id ID of the user identity for which you want to retrieve all access system users.
126
+ # @return [Seam::Resources::AcsUser] OK
127
+ def list_acs_users(user_identity_id:)
128
+ res = @client.post("/user_identities/list_acs_users", {user_identity_id: user_identity_id}.compact)
129
+
130
+ Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
131
+ end
132
+
133
+ # Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
134
+ # @param acs_user_id ID of the access system user that you want to remove from the user identity..
135
+ # @param user_identity_id ID of the user identity from which you want to remove an access system user.
136
+ # @return [nil] OK
137
+ def remove_acs_user(acs_user_id:, user_identity_id:)
138
+ @client.post("/user_identities/remove_acs_user", {acs_user_id: acs_user_id, user_identity_id: user_identity_id}.compact)
139
+
140
+ nil
141
+ end
142
+
143
+ # Revokes access to a specified [device](https://docs.seam.co/core-concepts/devices/) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
144
+ # @param device_id ID of the managed device to which you want to revoke access from the user identity.
145
+ # @param user_identity_id ID of the user identity from which you want to revoke access to a device.
146
+ # @return [nil] OK
147
+ def revoke_access_to_device(device_id:, user_identity_id:)
148
+ @client.post("/user_identities/revoke_access_to_device", {device_id: device_id, user_identity_id: user_identity_id}.compact)
149
+
150
+ nil
151
+ end
152
+
153
+ # Updates a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).
154
+ # @param user_identity_id ID of the user identity that you want to update.
155
+ # @param email_address Unique email address for the user identity.
156
+ # @param full_name Full name of the user associated with the user identity.
157
+ # @param phone_number Unique phone number for the user identity.
158
+ # @param user_identity_key Unique key for the user identity.
159
+ # @return [nil] OK
160
+ def update(user_identity_id:, email_address: nil, full_name: nil, phone_number: nil, user_identity_key: nil)
161
+ @client.post("/user_identities/update", {user_identity_id: user_identity_id, email_address: email_address, full_name: full_name, phone_number: phone_number, user_identity_key: user_identity_key}.compact)
162
+
163
+ nil
164
+ end
165
+ end
166
+ end
167
+ end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Seam
4
+ module Clients
5
+ class UserIdentitiesUnmanaged
6
+ def initialize(client:, defaults:)
7
+ @client = client
8
+ @defaults = defaults
9
+ end
10
+
11
+ # Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false).
12
+ # @param user_identity_id ID of the unmanaged user identity that you want to get.
13
+ # @return [Seam::Resources::UnmanagedUserIdentity] OK
14
+ def get(user_identity_id:)
15
+ res = @client.post("/user_identities/unmanaged/get", {user_identity_id: user_identity_id}.compact)
16
+
17
+ Seam::Resources::UnmanagedUserIdentity.load_from_response(res.body["user_identity"])
18
+ end
19
+
20
+ # Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false).
21
+ # @param created_before Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp.
22
+ # @param limit Maximum number of records to return per page.
23
+ # @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
24
+ # @param search String for which to search. Filters returned unmanaged user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `user_identity_id` or `acs_system_id`.
25
+ # @return [Seam::Resources::UnmanagedUserIdentity] OK
26
+ def list(created_before: nil, limit: nil, page_cursor: nil, search: nil)
27
+ res = @client.post("/user_identities/unmanaged/list", {created_before: created_before, limit: limit, page_cursor: page_cursor, search: search}.compact)
28
+
29
+ Seam::Resources::UnmanagedUserIdentity.load_from_response(res.body["user_identities"])
30
+ end
31
+
32
+ # Updates an unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed.
33
+ #
34
+ # This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged.
35
+ # @param is_managed Must be set to true to convert the unmanaged user identity to managed.
36
+ # @param user_identity_id ID of the unmanaged user identity that you want to update.
37
+ # @param user_identity_key Unique key for the user identity. If not provided, the existing key will be preserved.
38
+ # @return [nil] OK
39
+ def update(is_managed:, user_identity_id:, user_identity_key: nil)
40
+ @client.post("/user_identities/unmanaged/update", {is_managed: is_managed, user_identity_id: user_identity_id, user_identity_key: user_identity_key}.compact)
41
+
42
+ nil
43
+ end
44
+ end
45
+ end
46
+ end
@@ -8,30 +8,46 @@ module Seam
8
8
  @defaults = defaults
9
9
  end
10
10
 
11
+ # Creates a new [webhook](https://docs.seam.co/developer-tools/webhooks).
12
+ # @param url URL for the new webhook.
13
+ # @param event_types Types of events that you want the new webhook to receive.
14
+ # @return [Seam::Resources::Webhook] OK
11
15
  def create(url:, event_types: nil)
12
16
  res = @client.post("/webhooks/create", {url: url, event_types: event_types}.compact)
13
17
 
14
18
  Seam::Resources::Webhook.load_from_response(res.body["webhook"])
15
19
  end
16
20
 
21
+ # Deletes a specified [webhook](https://docs.seam.co/developer-tools/webhooks).
22
+ # @param webhook_id ID of the webhook that you want to delete.
23
+ # @return [nil] OK
17
24
  def delete(webhook_id:)
18
25
  @client.post("/webhooks/delete", {webhook_id: webhook_id}.compact)
19
26
 
20
27
  nil
21
28
  end
22
29
 
30
+ # Gets a specified [webhook](https://docs.seam.co/developer-tools/webhooks).
31
+ # @param webhook_id ID of the webhook that you want to get.
32
+ # @return [Seam::Resources::Webhook] OK
23
33
  def get(webhook_id:)
24
34
  res = @client.post("/webhooks/get", {webhook_id: webhook_id}.compact)
25
35
 
26
36
  Seam::Resources::Webhook.load_from_response(res.body["webhook"])
27
37
  end
28
38
 
39
+ # Returns a list of all [webhooks](https://docs.seam.co/developer-tools/webhooks).
40
+ # @return [Seam::Resources::Webhook] OK
29
41
  def list
30
42
  res = @client.post("/webhooks/list")
31
43
 
32
44
  Seam::Resources::Webhook.load_from_response(res.body["webhooks"])
33
45
  end
34
46
 
47
+ # Updates a specified [webhook](https://docs.seam.co/developer-tools/webhooks).
48
+ # @param event_types Types of events that you want the webhook to receive.
49
+ # @param webhook_id ID of the webhook that you want to update.
50
+ # @return [nil] OK
35
51
  def update(event_types:, webhook_id:)
36
52
  @client.post("/webhooks/update", {event_types: event_types, webhook_id: webhook_id}.compact)
37
53
 
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "seam/helpers/action_attempt"
4
+
5
+ module Seam
6
+ module Clients
7
+ class Workspaces
8
+ def initialize(client:, defaults:)
9
+ @client = client
10
+ @defaults = defaults
11
+ end
12
+
13
+ # Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces).
14
+ # @param name Name of the new workspace.
15
+ # @param company_name Company name for the new workspace.
16
+ # @param connect_partner_name Connect partner name for the new workspace.
17
+ # @deprecated connect_partner_name: Use `company_name` instead.
18
+ # @param connect_webview_customization [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) customizations for the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
19
+ # @param is_sandbox Indicates whether the new workspace is a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
20
+ # @param organization_id ID of the organization to associate with the new workspace.
21
+ # @param webview_logo_shape
22
+ # @deprecated webview_logo_shape: Use `connect_webview_customization.webview_logo_shape` instead.
23
+ # @param webview_primary_button_color
24
+ # @deprecated webview_primary_button_color: Use `connect_webview_customization.webview_primary_button_color` instead.
25
+ # @param webview_primary_button_text_color
26
+ # @deprecated webview_primary_button_text_color: Use `connect_webview_customization.webview_primary_button_text_color` instead.
27
+ # @param webview_success_message
28
+ # @deprecated webview_success_message: Use `connect_webview_customization.webview_success_message` instead.
29
+ # @return [Seam::Resources::Workspace] OK
30
+ def create(name:, company_name: nil, connect_partner_name: nil, connect_webview_customization: nil, is_sandbox: nil, organization_id: nil, webview_logo_shape: nil, webview_primary_button_color: nil, webview_primary_button_text_color: nil, webview_success_message: nil)
31
+ res = @client.post("/workspaces/create", {name: name, company_name: company_name, connect_partner_name: connect_partner_name, connect_webview_customization: connect_webview_customization, is_sandbox: is_sandbox, organization_id: organization_id, webview_logo_shape: webview_logo_shape, webview_primary_button_color: webview_primary_button_color, webview_primary_button_text_color: webview_primary_button_text_color, webview_success_message: webview_success_message}.compact)
32
+
33
+ Seam::Resources::Workspace.load_from_response(res.body["workspace"])
34
+ end
35
+
36
+ # Returns the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value.
37
+ # @return [Seam::Resources::Workspace] OK
38
+ def get
39
+ res = @client.post("/workspaces/get")
40
+
41
+ Seam::Resources::Workspace.load_from_response(res.body["workspace"])
42
+ end
43
+
44
+ # Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value.
45
+ # @return [Seam::Resources::Workspace] OK
46
+ def list
47
+ res = @client.post("/workspaces/list")
48
+
49
+ Seam::Resources::Workspace.load_from_response(res.body["workspaces"])
50
+ end
51
+
52
+ # Resets the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces.
53
+ # @return [Seam::Resources::ActionAttempt] OK
54
+ def reset_sandbox(wait_for_action_attempt: nil)
55
+ res = @client.post("/workspaces/reset_sandbox")
56
+
57
+ wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
58
+
59
+ Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
60
+ end
61
+
62
+ # Updates the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value.
63
+ # @param connect_partner_name Connect partner name for the workspace.
64
+ # @param connect_webview_customization [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) customizations for the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
65
+ # @param is_publishable_key_auth_enabled Indicates whether publishable key authentication is enabled for this workspace.
66
+ # @param is_suspended Indicates whether the workspace is suspended.
67
+ # @param name Name of the workspace.
68
+ # @param organization_id ID of the organization to assign the workspace to. The authenticated user must be the owner of the workspace and an admin of the target organization.
69
+ # @return [nil] OK
70
+ def update(connect_partner_name: nil, connect_webview_customization: nil, is_publishable_key_auth_enabled: nil, is_suspended: nil, name: nil, organization_id: nil)
71
+ @client.post("/workspaces/update", {connect_partner_name: connect_partner_name, connect_webview_customization: connect_webview_customization, is_publishable_key_auth_enabled: is_publishable_key_auth_enabled, is_suspended: is_suspended, name: name, organization_id: organization_id}.compact)
72
+
73
+ nil
74
+ end
75
+ end
76
+ end
77
+ end
data/lib/seam/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Seam
4
- VERSION = "2.131.0"
4
+ VERSION = "2.133.0"
5
5
  end
data/lib/seam/webhook.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  require "svix/webhook"
4
4
  require "svix/errors"
5
5
  require_relative "base_resource"
6
- require_relative "routes/resources/event"
6
+ require_relative "resources/event"
7
7
 
8
8
  module Seam
9
9
  WebhookVerificationError = Svix::WebhookVerificationError
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seam
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.131.0
4
+ version: 2.133.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seam Labs, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-27 00:00:00.000000000 Z
11
+ date: 2026-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -203,85 +203,88 @@ files:
203
203
  - lib/seam/paginator.rb
204
204
  - lib/seam/parse_options.rb
205
205
  - lib/seam/request.rb
206
- - lib/seam/routes/clients/access_codes.rb
207
- - lib/seam/routes/clients/access_codes_simulate.rb
208
- - lib/seam/routes/clients/access_codes_unmanaged.rb
209
- - lib/seam/routes/clients/access_grants.rb
210
- - lib/seam/routes/clients/access_grants_unmanaged.rb
211
- - lib/seam/routes/clients/access_methods.rb
212
- - lib/seam/routes/clients/access_methods_unmanaged.rb
213
- - lib/seam/routes/clients/acs.rb
214
- - lib/seam/routes/clients/acs_access_groups.rb
215
- - lib/seam/routes/clients/acs_credentials.rb
216
- - lib/seam/routes/clients/acs_encoders.rb
217
- - lib/seam/routes/clients/acs_encoders_simulate.rb
218
- - lib/seam/routes/clients/acs_entrances.rb
219
- - lib/seam/routes/clients/acs_systems.rb
220
- - lib/seam/routes/clients/acs_users.rb
221
- - lib/seam/routes/clients/action_attempts.rb
222
- - lib/seam/routes/clients/client_sessions.rb
223
- - lib/seam/routes/clients/connect_webviews.rb
224
- - lib/seam/routes/clients/connected_accounts.rb
225
- - lib/seam/routes/clients/connected_accounts_simulate.rb
226
- - lib/seam/routes/clients/customers.rb
227
- - lib/seam/routes/clients/devices.rb
228
- - lib/seam/routes/clients/devices_simulate.rb
229
- - lib/seam/routes/clients/devices_unmanaged.rb
230
- - lib/seam/routes/clients/events.rb
231
- - lib/seam/routes/clients/index.rb
232
- - lib/seam/routes/clients/instant_keys.rb
233
- - lib/seam/routes/clients/locks.rb
234
- - lib/seam/routes/clients/locks_simulate.rb
235
- - lib/seam/routes/clients/noise_sensors.rb
236
- - lib/seam/routes/clients/noise_sensors_noise_thresholds.rb
237
- - lib/seam/routes/clients/noise_sensors_simulate.rb
238
- - lib/seam/routes/clients/phones.rb
239
- - lib/seam/routes/clients/phones_simulate.rb
240
- - lib/seam/routes/clients/spaces.rb
241
- - lib/seam/routes/clients/thermostats.rb
242
- - lib/seam/routes/clients/thermostats_daily_programs.rb
243
- - lib/seam/routes/clients/thermostats_schedules.rb
244
- - lib/seam/routes/clients/thermostats_simulate.rb
245
- - lib/seam/routes/clients/user_identities.rb
246
- - lib/seam/routes/clients/user_identities_unmanaged.rb
247
- - lib/seam/routes/clients/webhooks.rb
248
- - lib/seam/routes/clients/workspaces.rb
249
- - lib/seam/routes/resources/access_code.rb
250
- - lib/seam/routes/resources/access_grant.rb
251
- - lib/seam/routes/resources/access_method.rb
252
- - lib/seam/routes/resources/acs_access_group.rb
253
- - lib/seam/routes/resources/acs_credential.rb
254
- - lib/seam/routes/resources/acs_encoder.rb
255
- - lib/seam/routes/resources/acs_entrance.rb
256
- - lib/seam/routes/resources/acs_system.rb
257
- - lib/seam/routes/resources/acs_user.rb
258
- - lib/seam/routes/resources/action_attempt.rb
259
- - lib/seam/routes/resources/batch.rb
260
- - lib/seam/routes/resources/client_session.rb
261
- - lib/seam/routes/resources/connect_webview.rb
262
- - lib/seam/routes/resources/connected_account.rb
263
- - lib/seam/routes/resources/customer_portal.rb
264
- - lib/seam/routes/resources/device.rb
265
- - lib/seam/routes/resources/device_provider.rb
266
- - lib/seam/routes/resources/event.rb
267
- - lib/seam/routes/resources/index.rb
268
- - lib/seam/routes/resources/instant_key.rb
269
- - lib/seam/routes/resources/noise_threshold.rb
270
- - lib/seam/routes/resources/pagination.rb
271
- - lib/seam/routes/resources/phone.rb
272
- - lib/seam/routes/resources/resource_error.rb
273
- - lib/seam/routes/resources/resource_errors_support.rb
274
- - lib/seam/routes/resources/resource_warning.rb
275
- - lib/seam/routes/resources/resource_warnings_support.rb
276
- - lib/seam/routes/resources/space.rb
277
- - lib/seam/routes/resources/thermostat_daily_program.rb
278
- - lib/seam/routes/resources/thermostat_schedule.rb
279
- - lib/seam/routes/resources/unmanaged_access_code.rb
280
- - lib/seam/routes/resources/unmanaged_device.rb
281
- - lib/seam/routes/resources/user_identity.rb
282
- - lib/seam/routes/resources/webhook.rb
283
- - lib/seam/routes/resources/workspace.rb
206
+ - lib/seam/resources/access_code.rb
207
+ - lib/seam/resources/access_grant.rb
208
+ - lib/seam/resources/access_method.rb
209
+ - lib/seam/resources/acs_access_group.rb
210
+ - lib/seam/resources/acs_credential.rb
211
+ - lib/seam/resources/acs_encoder.rb
212
+ - lib/seam/resources/acs_entrance.rb
213
+ - lib/seam/resources/acs_system.rb
214
+ - lib/seam/resources/acs_user.rb
215
+ - lib/seam/resources/action_attempt.rb
216
+ - lib/seam/resources/batch.rb
217
+ - lib/seam/resources/client_session.rb
218
+ - lib/seam/resources/connect_webview.rb
219
+ - lib/seam/resources/connected_account.rb
220
+ - lib/seam/resources/customer_portal.rb
221
+ - lib/seam/resources/device.rb
222
+ - lib/seam/resources/device_provider.rb
223
+ - lib/seam/resources/event.rb
224
+ - lib/seam/resources/index.rb
225
+ - lib/seam/resources/instant_key.rb
226
+ - lib/seam/resources/noise_threshold.rb
227
+ - lib/seam/resources/pagination.rb
228
+ - lib/seam/resources/phone.rb
229
+ - lib/seam/resources/resource_error.rb
230
+ - lib/seam/resources/resource_errors_support.rb
231
+ - lib/seam/resources/resource_warning.rb
232
+ - lib/seam/resources/resource_warnings_support.rb
233
+ - lib/seam/resources/space.rb
234
+ - lib/seam/resources/thermostat_daily_program.rb
235
+ - lib/seam/resources/thermostat_schedule.rb
236
+ - lib/seam/resources/unmanaged_access_code.rb
237
+ - lib/seam/resources/unmanaged_access_grant.rb
238
+ - lib/seam/resources/unmanaged_access_method.rb
239
+ - lib/seam/resources/unmanaged_device.rb
240
+ - lib/seam/resources/unmanaged_user_identity.rb
241
+ - lib/seam/resources/user_identity.rb
242
+ - lib/seam/resources/webhook.rb
243
+ - lib/seam/resources/workspace.rb
244
+ - lib/seam/routes/access_codes.rb
245
+ - lib/seam/routes/access_codes_simulate.rb
246
+ - lib/seam/routes/access_codes_unmanaged.rb
247
+ - lib/seam/routes/access_grants.rb
248
+ - lib/seam/routes/access_grants_unmanaged.rb
249
+ - lib/seam/routes/access_methods.rb
250
+ - lib/seam/routes/access_methods_unmanaged.rb
251
+ - lib/seam/routes/acs.rb
252
+ - lib/seam/routes/acs_access_groups.rb
253
+ - lib/seam/routes/acs_credentials.rb
254
+ - lib/seam/routes/acs_encoders.rb
255
+ - lib/seam/routes/acs_encoders_simulate.rb
256
+ - lib/seam/routes/acs_entrances.rb
257
+ - lib/seam/routes/acs_systems.rb
258
+ - lib/seam/routes/acs_users.rb
259
+ - lib/seam/routes/action_attempts.rb
260
+ - lib/seam/routes/client_sessions.rb
261
+ - lib/seam/routes/connect_webviews.rb
262
+ - lib/seam/routes/connected_accounts.rb
263
+ - lib/seam/routes/connected_accounts_simulate.rb
264
+ - lib/seam/routes/customers.rb
265
+ - lib/seam/routes/devices.rb
266
+ - lib/seam/routes/devices_simulate.rb
267
+ - lib/seam/routes/devices_unmanaged.rb
268
+ - lib/seam/routes/events.rb
269
+ - lib/seam/routes/index.rb
270
+ - lib/seam/routes/instant_keys.rb
271
+ - lib/seam/routes/locks.rb
272
+ - lib/seam/routes/locks_simulate.rb
273
+ - lib/seam/routes/noise_sensors.rb
274
+ - lib/seam/routes/noise_sensors_noise_thresholds.rb
275
+ - lib/seam/routes/noise_sensors_simulate.rb
276
+ - lib/seam/routes/phones.rb
277
+ - lib/seam/routes/phones_simulate.rb
284
278
  - lib/seam/routes/routes.rb
279
+ - lib/seam/routes/spaces.rb
280
+ - lib/seam/routes/thermostats.rb
281
+ - lib/seam/routes/thermostats_daily_programs.rb
282
+ - lib/seam/routes/thermostats_schedules.rb
283
+ - lib/seam/routes/thermostats_simulate.rb
284
+ - lib/seam/routes/user_identities.rb
285
+ - lib/seam/routes/user_identities_unmanaged.rb
286
+ - lib/seam/routes/webhooks.rb
287
+ - lib/seam/routes/workspaces.rb
285
288
  - lib/seam/token.rb
286
289
  - lib/seam/version.rb
287
290
  - lib/seam/wait_for_action_attempt.rb
@@ -1,80 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Seam
4
- module Clients
5
- class AccessCodes
6
- def initialize(client:, defaults:)
7
- @client = client
8
- @defaults = defaults
9
- end
10
-
11
- def simulate
12
- @simulate ||= Seam::Clients::AccessCodesSimulate.new(client: @client, defaults: @defaults)
13
- end
14
-
15
- def unmanaged
16
- @unmanaged ||= Seam::Clients::AccessCodesUnmanaged.new(client: @client, defaults: @defaults)
17
- end
18
-
19
- def create(device_id:, allow_external_modification: nil, attempt_for_offline_device: nil, code: nil, common_code_key: nil, ends_at: nil, is_external_modification_allowed: nil, is_offline_access_code: nil, is_one_time_use: nil, max_time_rounding: nil, name: nil, prefer_native_scheduling: nil, preferred_code_length: nil, starts_at: nil, use_backup_access_code_pool: nil, use_offline_access_code: nil)
20
- res = @client.post("/access_codes/create", {device_id: device_id, allow_external_modification: allow_external_modification, attempt_for_offline_device: attempt_for_offline_device, code: code, common_code_key: common_code_key, ends_at: ends_at, is_external_modification_allowed: is_external_modification_allowed, is_offline_access_code: is_offline_access_code, is_one_time_use: is_one_time_use, max_time_rounding: max_time_rounding, name: name, prefer_native_scheduling: prefer_native_scheduling, preferred_code_length: preferred_code_length, starts_at: starts_at, use_backup_access_code_pool: use_backup_access_code_pool, use_offline_access_code: use_offline_access_code}.compact)
21
-
22
- Seam::Resources::AccessCode.load_from_response(res.body["access_code"])
23
- end
24
-
25
- def create_multiple(device_ids:, allow_external_modification: nil, attempt_for_offline_device: nil, behavior_when_code_cannot_be_shared: nil, code: nil, ends_at: nil, is_external_modification_allowed: nil, name: nil, prefer_native_scheduling: nil, preferred_code_length: nil, starts_at: nil, use_backup_access_code_pool: nil)
26
- res = @client.post("/access_codes/create_multiple", {device_ids: device_ids, allow_external_modification: allow_external_modification, attempt_for_offline_device: attempt_for_offline_device, behavior_when_code_cannot_be_shared: behavior_when_code_cannot_be_shared, code: code, ends_at: ends_at, is_external_modification_allowed: is_external_modification_allowed, name: name, prefer_native_scheduling: prefer_native_scheduling, preferred_code_length: preferred_code_length, starts_at: starts_at, use_backup_access_code_pool: use_backup_access_code_pool}.compact)
27
-
28
- Seam::Resources::AccessCode.load_from_response(res.body["access_codes"])
29
- end
30
-
31
- def delete(access_code_id:, device_id: nil)
32
- @client.post("/access_codes/delete", {access_code_id: access_code_id, device_id: device_id}.compact)
33
-
34
- nil
35
- end
36
-
37
- def generate_code(device_id:)
38
- res = @client.post("/access_codes/generate_code", {device_id: device_id}.compact)
39
-
40
- Seam::Resources::AccessCode.load_from_response(res.body["generated_code"])
41
- end
42
-
43
- def get(access_code_id: nil, code: nil, device_id: nil)
44
- res = @client.post("/access_codes/get", {access_code_id: access_code_id, code: code, device_id: device_id}.compact)
45
-
46
- Seam::Resources::AccessCode.load_from_response(res.body["access_code"])
47
- end
48
-
49
- def list(access_code_ids: nil, access_grant_id: nil, access_grant_key: nil, access_method_id: nil, customer_key: nil, device_id: nil, limit: nil, page_cursor: nil, search: nil, user_identifier_key: nil)
50
- res = @client.post("/access_codes/list", {access_code_ids: access_code_ids, access_grant_id: access_grant_id, access_grant_key: access_grant_key, access_method_id: access_method_id, customer_key: customer_key, device_id: device_id, limit: limit, page_cursor: page_cursor, search: search, user_identifier_key: user_identifier_key}.compact)
51
-
52
- Seam::Resources::AccessCode.load_from_response(res.body["access_codes"])
53
- end
54
-
55
- def pull_backup_access_code(access_code_id:)
56
- res = @client.post("/access_codes/pull_backup_access_code", {access_code_id: access_code_id}.compact)
57
-
58
- Seam::Resources::AccessCode.load_from_response(res.body["access_code"])
59
- end
60
-
61
- def report_device_constraints(device_id:, max_code_length: nil, min_code_length: nil, supported_code_lengths: nil)
62
- @client.post("/access_codes/report_device_constraints", {device_id: device_id, max_code_length: max_code_length, min_code_length: min_code_length, supported_code_lengths: supported_code_lengths}.compact)
63
-
64
- nil
65
- end
66
-
67
- def update(access_code_id:, allow_external_modification: nil, attempt_for_offline_device: nil, code: nil, device_id: nil, ends_at: nil, is_external_modification_allowed: nil, is_managed: nil, is_offline_access_code: nil, is_one_time_use: nil, max_time_rounding: nil, name: nil, prefer_native_scheduling: nil, preferred_code_length: nil, starts_at: nil, type: nil, use_backup_access_code_pool: nil, use_offline_access_code: nil)
68
- @client.post("/access_codes/update", {access_code_id: access_code_id, allow_external_modification: allow_external_modification, attempt_for_offline_device: attempt_for_offline_device, code: code, device_id: device_id, ends_at: ends_at, is_external_modification_allowed: is_external_modification_allowed, is_managed: is_managed, is_offline_access_code: is_offline_access_code, is_one_time_use: is_one_time_use, max_time_rounding: max_time_rounding, name: name, prefer_native_scheduling: prefer_native_scheduling, preferred_code_length: preferred_code_length, starts_at: starts_at, type: type, use_backup_access_code_pool: use_backup_access_code_pool, use_offline_access_code: use_offline_access_code}.compact)
69
-
70
- nil
71
- end
72
-
73
- def update_multiple(common_code_key:, ends_at: nil, name: nil, starts_at: nil)
74
- @client.post("/access_codes/update_multiple", {common_code_key: common_code_key, ends_at: ends_at, name: name, starts_at: starts_at}.compact)
75
-
76
- nil
77
- end
78
- end
79
- end
80
- end