seam 2.143.0 → 2.146.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +11 -7
  4. data/lib/seam/base_resource.rb +24 -3
  5. data/lib/seam/resources/access_code.rb +702 -43
  6. data/lib/seam/resources/access_grant.rb +192 -25
  7. data/lib/seam/resources/access_method.rb +108 -3
  8. data/lib/seam/resources/acs_access_group.rb +52 -0
  9. data/lib/seam/resources/acs_credential.rb +153 -6
  10. data/lib/seam/resources/acs_encoder.rb +2 -0
  11. data/lib/seam/resources/acs_entrance.rb +105 -0
  12. data/lib/seam/resources/acs_system.rb +278 -6
  13. data/lib/seam/resources/acs_user.rb +201 -0
  14. data/lib/seam/resources/action_attempt.rb +1460 -279
  15. data/lib/seam/resources/connect_webview.rb +15 -1
  16. data/lib/seam/resources/connected_account.rb +285 -41
  17. data/lib/seam/resources/device.rb +929 -14
  18. data/lib/seam/resources/device_provider.rb +74 -0
  19. data/lib/seam/resources/event.rb +5205 -316
  20. data/lib/seam/resources/phone.rb +3 -0
  21. data/lib/seam/resources/unmanaged_access_code.rb +697 -43
  22. data/lib/seam/resources/unmanaged_access_grant.rb +189 -25
  23. data/lib/seam/resources/unmanaged_access_method.rb +108 -3
  24. data/lib/seam/resources/unmanaged_device.rb +827 -14
  25. data/lib/seam/resources/unmanaged_user_identity.rb +73 -0
  26. data/lib/seam/resources/user_identity.rb +73 -0
  27. data/lib/seam/resources/workspace.rb +3 -0
  28. data/lib/seam/routes/access_codes.rb +1 -1
  29. data/lib/seam/routes/access_grants.rb +2 -2
  30. data/lib/seam/routes/access_methods.rb +1 -1
  31. data/lib/seam/routes/acs_credentials.rb +4 -4
  32. data/lib/seam/routes/acs_encoders.rb +3 -3
  33. data/lib/seam/routes/acs_entrances.rb +2 -2
  34. data/lib/seam/routes/action_attempts.rb +1 -1
  35. data/lib/seam/routes/connect_webviews.rb +3 -3
  36. data/lib/seam/routes/connected_accounts.rb +3 -3
  37. data/lib/seam/routes/customers.rb +1 -1
  38. data/lib/seam/routes/devices.rb +3 -3
  39. data/lib/seam/routes/devices_unmanaged.rb +2 -2
  40. data/lib/seam/routes/events.rb +2 -2
  41. data/lib/seam/routes/locks.rb +1 -1
  42. data/lib/seam/routes/noise_sensors.rb +1 -1
  43. data/lib/seam/routes/spaces.rb +3 -3
  44. data/lib/seam/routes/thermostats.rb +1 -1
  45. data/lib/seam/routes/user_identities.rb +23 -1
  46. data/lib/seam/version.rb +1 -1
  47. data/lib/seam/webhook.rb +5 -2
  48. metadata +1 -1
@@ -4,7 +4,29 @@ module Seam
4
4
  module Resources
5
5
  # Represents an unmanaged user identity. Unmanaged user identities do not have keys.
6
6
  class UnmanagedUserIdentity < BaseResource
7
+ # Known `error_code` values load as subclasses; unknown values remain Errors instances for forward compatibility.
7
8
  class Errors < BaseResource
9
+ # Indicates that there is an issue with an access system user associated with this user identity.
10
+ class IssueWithAcsUser < Errors
11
+ # ID of the access system that the user identity is associated with.
12
+ # @return [String]
13
+ attr_accessor :acs_system_id
14
+ # ID of the access system user that has an issue.
15
+ # @return [String]
16
+ attr_accessor :acs_user_id
17
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
18
+ # @return [String]
19
+ # Known values:
20
+ # - `issue_with_acs_user`
21
+ attr_accessor :error_code
22
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
23
+ # @return [String]
24
+ attr_accessor :message
25
+ # Date and time at which Seam created the error.
26
+ # @return [Time]
27
+ date_accessor :created_at
28
+ end
29
+
8
30
  # ID of the access system that the user identity is associated with.
9
31
  # @return [String]
10
32
  attr_accessor :acs_system_id
@@ -13,6 +35,8 @@ module Seam
13
35
  attr_accessor :acs_user_id
14
36
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
15
37
  # @return [String]
38
+ # Known values:
39
+ # - `issue_with_acs_user`
16
40
  attr_accessor :error_code
17
41
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
18
42
  # @return [String]
@@ -20,18 +44,61 @@ module Seam
20
44
  # Date and time at which Seam created the error.
21
45
  # @return [Time]
22
46
  date_accessor :created_at
47
+
48
+ discriminated_by :error_code, {
49
+ "issue_with_acs_user" => IssueWithAcsUser
50
+ }.freeze
23
51
  end
24
52
 
53
+ # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
25
54
  class Warnings < BaseResource
55
+ # Indicates that the user identity is currently being deleted.
56
+ class BeingDeleted < Warnings
57
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
58
+ # @return [String]
59
+ attr_accessor :message
60
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
61
+ # @return [String]
62
+ # Known values:
63
+ # - `being_deleted`
64
+ attr_accessor :warning_code
65
+ # Date and time at which Seam created the warning.
66
+ # @return [Time]
67
+ date_accessor :created_at
68
+ end
69
+
70
+ # Indicates that the ACS user's profile does not match the user identity's profile
71
+ class AcsUserProfileDoesNotMatchUserIdentity < Warnings
72
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
73
+ # @return [String]
74
+ attr_accessor :message
75
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
76
+ # @return [String]
77
+ # Known values:
78
+ # - `acs_user_profile_does_not_match_user_identity`
79
+ attr_accessor :warning_code
80
+ # Date and time at which Seam created the warning.
81
+ # @return [Time]
82
+ date_accessor :created_at
83
+ end
84
+
26
85
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
27
86
  # @return [String]
28
87
  attr_accessor :message
29
88
  # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
30
89
  # @return [String]
90
+ # Known values:
91
+ # - `being_deleted`
92
+ # - `acs_user_profile_does_not_match_user_identity`
31
93
  attr_accessor :warning_code
32
94
  # Date and time at which Seam created the warning.
33
95
  # @return [Time]
34
96
  date_accessor :created_at
97
+
98
+ discriminated_by :warning_code, {
99
+ "being_deleted" => BeingDeleted,
100
+ "acs_user_profile_does_not_match_user_identity" => AcsUserProfileDoesNotMatchUserIdentity
101
+ }.freeze
35
102
  end
36
103
 
37
104
  # Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.
@@ -52,6 +119,12 @@ module Seam
52
119
  # Full name of the user associated with the user identity.
53
120
  # @return [String, nil]
54
121
  attr_accessor :full_name
122
+ # IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity.
123
+ # @return [Array<String>]
124
+ attr_accessor :merged_user_identity_ids
125
+ # Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity.
126
+ # @return [Array<String>]
127
+ attr_accessor :merged_user_identity_keys
55
128
  # Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100).
56
129
  # @return [String, nil]
57
130
  attr_accessor :phone_number
@@ -4,7 +4,29 @@ module Seam
4
4
  module Resources
5
5
  # Represents a [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account.
6
6
  class UserIdentity < BaseResource
7
+ # Known `error_code` values load as subclasses; unknown values remain Errors instances for forward compatibility.
7
8
  class Errors < BaseResource
9
+ # Indicates that there is an issue with an access system user associated with this user identity.
10
+ class IssueWithAcsUser < Errors
11
+ # ID of the access system that the user identity is associated with.
12
+ # @return [String]
13
+ attr_accessor :acs_system_id
14
+ # ID of the access system user that has an issue.
15
+ # @return [String]
16
+ attr_accessor :acs_user_id
17
+ # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
18
+ # @return [String]
19
+ # Known values:
20
+ # - `issue_with_acs_user`
21
+ attr_accessor :error_code
22
+ # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
23
+ # @return [String]
24
+ attr_accessor :message
25
+ # Date and time at which Seam created the error.
26
+ # @return [Time]
27
+ date_accessor :created_at
28
+ end
29
+
8
30
  # ID of the access system that the user identity is associated with.
9
31
  # @return [String]
10
32
  attr_accessor :acs_system_id
@@ -13,6 +35,8 @@ module Seam
13
35
  attr_accessor :acs_user_id
14
36
  # Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
15
37
  # @return [String]
38
+ # Known values:
39
+ # - `issue_with_acs_user`
16
40
  attr_accessor :error_code
17
41
  # Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
18
42
  # @return [String]
@@ -20,18 +44,61 @@ module Seam
20
44
  # Date and time at which Seam created the error.
21
45
  # @return [Time]
22
46
  date_accessor :created_at
47
+
48
+ discriminated_by :error_code, {
49
+ "issue_with_acs_user" => IssueWithAcsUser
50
+ }.freeze
23
51
  end
24
52
 
53
+ # Known `warning_code` values load as subclasses; unknown values remain Warnings instances for forward compatibility.
25
54
  class Warnings < BaseResource
55
+ # Indicates that the user identity is currently being deleted.
56
+ class BeingDeleted < Warnings
57
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
58
+ # @return [String]
59
+ attr_accessor :message
60
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
61
+ # @return [String]
62
+ # Known values:
63
+ # - `being_deleted`
64
+ attr_accessor :warning_code
65
+ # Date and time at which Seam created the warning.
66
+ # @return [Time]
67
+ date_accessor :created_at
68
+ end
69
+
70
+ # Indicates that the ACS user's profile does not match the user identity's profile
71
+ class AcsUserProfileDoesNotMatchUserIdentity < Warnings
72
+ # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
73
+ # @return [String]
74
+ attr_accessor :message
75
+ # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
76
+ # @return [String]
77
+ # Known values:
78
+ # - `acs_user_profile_does_not_match_user_identity`
79
+ attr_accessor :warning_code
80
+ # Date and time at which Seam created the warning.
81
+ # @return [Time]
82
+ date_accessor :created_at
83
+ end
84
+
26
85
  # Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
27
86
  # @return [String]
28
87
  attr_accessor :message
29
88
  # Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
30
89
  # @return [String]
90
+ # Known values:
91
+ # - `being_deleted`
92
+ # - `acs_user_profile_does_not_match_user_identity`
31
93
  attr_accessor :warning_code
32
94
  # Date and time at which Seam created the warning.
33
95
  # @return [Time]
34
96
  date_accessor :created_at
97
+
98
+ discriminated_by :warning_code, {
99
+ "being_deleted" => BeingDeleted,
100
+ "acs_user_profile_does_not_match_user_identity" => AcsUserProfileDoesNotMatchUserIdentity
101
+ }.freeze
35
102
  end
36
103
 
37
104
  # Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.
@@ -52,6 +119,12 @@ module Seam
52
119
  # Full name of the user associated with the user identity.
53
120
  # @return [String, nil]
54
121
  attr_accessor :full_name
122
+ # IDs that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity.
123
+ # @return [Array<String>]
124
+ attr_accessor :merged_user_identity_ids
125
+ # Keys that other user identities used to have before they were merged into this user identity. Looking up any of them returns this user identity.
126
+ # @return [Array<String>]
127
+ attr_accessor :merged_user_identity_keys
55
128
  # Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100).
56
129
  # @return [String, nil]
57
130
  attr_accessor :phone_number
@@ -10,6 +10,9 @@ module Seam
10
10
  attr_accessor :inviter_logo_url
11
11
  # Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in 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).
12
12
  # @return [String, nil]
13
+ # Known values:
14
+ # - `circle`
15
+ # - `square`
13
16
  attr_accessor :logo_shape
14
17
  # Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in 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).
15
18
  # @return [String, nil]
@@ -138,7 +138,7 @@ module Seam
138
138
  raise TypeError, "At least one parameter is required for /access_codes/list"
139
139
  end
140
140
 
141
- 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)
141
+ res = @client.get("/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)
142
142
 
143
143
  Seam::Resources::AccessCode.load_from_response(res.body["access_codes"])
144
144
  end
@@ -71,7 +71,7 @@ module Seam
71
71
  raise TypeError, "At least one parameter is required for /access_grants/get_related"
72
72
  end
73
73
 
74
- res = @client.post("/access_grants/get_related", {access_grant_ids: access_grant_ids, access_grant_keys: access_grant_keys, exclude: exclude, include: include}.compact)
74
+ res = @client.get("/access_grants/get_related", {access_grant_ids: access_grant_ids, access_grant_keys: access_grant_keys, exclude: exclude, include: include}.compact)
75
75
 
76
76
  Seam::Resources::Batch.load_from_response(res.body["batch"])
77
77
  end
@@ -93,7 +93,7 @@ module Seam
93
93
  # @param user_identity_id [String, nil] ID of user identity by which you want to filter the list of Access Grants.
94
94
  # @return [Seam::Resources::AccessGrant] OK
95
95
  def list(access_code_id: nil, access_grant_ids: nil, access_grant_key: nil, acs_entrance_id: nil, acs_system_id: nil, customer_key: nil, device_id: nil, limit: nil, location_id: nil, page_cursor: nil, reservation_key: nil, space_id: nil, user_identity_id: nil)
96
- res = @client.post("/access_grants/list", {access_code_id: access_code_id, access_grant_ids: access_grant_ids, access_grant_key: access_grant_key, acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, customer_key: customer_key, device_id: device_id, limit: limit, location_id: location_id, page_cursor: page_cursor, reservation_key: reservation_key, space_id: space_id, user_identity_id: user_identity_id}.compact)
96
+ res = @client.get("/access_grants/list", {access_code_id: access_code_id, access_grant_ids: access_grant_ids, access_grant_key: access_grant_key, acs_entrance_id: acs_entrance_id, acs_system_id: acs_system_id, customer_key: customer_key, device_id: device_id, limit: limit, location_id: location_id, page_cursor: page_cursor, reservation_key: reservation_key, space_id: space_id, user_identity_id: user_identity_id}.compact)
97
97
 
98
98
  Seam::Resources::AccessGrant.load_from_response(res.body["access_grants"])
99
99
  end
@@ -68,7 +68,7 @@ module Seam
68
68
  # @param include [Array<String>, nil]
69
69
  # @return [Seam::Resources::Batch] OK
70
70
  def get_related(access_method_ids:, exclude: nil, include: nil)
71
- res = @client.post("/access_methods/get_related", {access_method_ids: access_method_ids, exclude: exclude, include: include}.compact)
71
+ res = @client.get("/access_methods/get_related", {access_method_ids: access_method_ids, exclude: exclude, include: include}.compact)
72
72
 
73
73
  Seam::Resources::Batch.load_from_response(res.body["batch"])
74
74
  end
@@ -59,17 +59,17 @@ module Seam
59
59
  end
60
60
 
61
61
  # Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
62
- # @param acs_user_id [String, nil] ID of the access system user for which you want to retrieve all credentials.
63
62
  # @param acs_system_id [String, nil] ID of the access system for which you want to retrieve all credentials.
64
- # @param user_identity_id [String, nil] ID of the user identity for which you want to retrieve all credentials.
63
+ # @param acs_user_id [String, nil] ID of the access system user for which you want to retrieve all credentials.
65
64
  # @param created_before [Time, nil] Date and time, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, before which events to return were created.
66
65
  # @param is_multi_phone_sync_credential [Boolean, nil] Indicates whether you want to retrieve only multi-phone sync credentials or non-multi-phone sync credentials.
67
66
  # @param limit [Float, nil] Number of credentials to return.
68
67
  # @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
69
68
  # @param search [String, nil] String for which to search. Filters returned credentials to include all records that satisfy a partial match using `display_name`, `code`, `card_number`, `acs_user_id` or `acs_credential_id`.
69
+ # @param user_identity_id [String, nil] ID of the user identity for which you want to retrieve all credentials.
70
70
  # @return [Seam::Resources::AcsCredential] OK
71
- def list(acs_user_id: nil, acs_system_id: nil, user_identity_id: nil, created_before: nil, is_multi_phone_sync_credential: nil, limit: nil, page_cursor: nil, search: nil)
72
- res = @client.get("/acs/credentials/list", {acs_user_id: acs_user_id, acs_system_id: acs_system_id, user_identity_id: user_identity_id, created_before: created_before, is_multi_phone_sync_credential: is_multi_phone_sync_credential, limit: limit, page_cursor: page_cursor, search: search}.compact)
71
+ def list(acs_system_id: nil, acs_user_id: nil, created_before: nil, is_multi_phone_sync_credential: nil, limit: nil, page_cursor: nil, search: nil, user_identity_id: nil)
72
+ res = @client.get("/acs/credentials/list", {acs_system_id: acs_system_id, acs_user_id: acs_user_id, created_before: created_before, is_multi_phone_sync_credential: is_multi_phone_sync_credential, limit: limit, page_cursor: page_cursor, search: search, user_identity_id: user_identity_id}.compact)
73
73
 
74
74
  Seam::Resources::AcsCredential.load_from_response(res.body["acs_credentials"])
75
75
  end
@@ -37,14 +37,14 @@ module Seam
37
37
  end
38
38
 
39
39
  # Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners).
40
+ # @param acs_encoder_ids [Array<String>, nil] IDs of the encoders that you want to retrieve.
40
41
  # @param acs_system_id [String, nil] ID of the access system for which you want to retrieve all encoders.
41
42
  # @param acs_system_ids [Array<String>, nil] IDs of the access systems for which you want to retrieve all encoders.
42
- # @param acs_encoder_ids [Array<String>, nil] IDs of the encoders that you want to retrieve.
43
43
  # @param limit [Float, nil] Number of encoders to return.
44
44
  # @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
45
45
  # @return [Seam::Resources::AcsEncoder] OK
46
- def list(acs_system_id: nil, acs_system_ids: nil, acs_encoder_ids: nil, limit: nil, page_cursor: nil)
47
- res = @client.post("/acs/encoders/list", {acs_system_id: acs_system_id, acs_system_ids: acs_system_ids, acs_encoder_ids: acs_encoder_ids, limit: limit, page_cursor: page_cursor}.compact)
46
+ def list(acs_encoder_ids: nil, acs_system_id: nil, acs_system_ids: nil, limit: nil, page_cursor: nil)
47
+ res = @client.get("/acs/encoders/list", {acs_encoder_ids: acs_encoder_ids, acs_system_id: acs_system_id, acs_system_ids: acs_system_ids, limit: limit, page_cursor: page_cursor}.compact)
48
48
 
49
49
  Seam::Resources::AcsEncoder.load_from_response(res.body["acs_encoders"])
50
50
  end
@@ -45,7 +45,7 @@ module Seam
45
45
  # @param space_id [String, nil] ID of the space for which you want to list entrances.
46
46
  # @return [Seam::Resources::AcsEntrance] OK
47
47
  def list(access_method_id: nil, acs_credential_id: nil, acs_entrance_ids: nil, acs_system_id: nil, connected_account_id: nil, customer_key: nil, limit: nil, location_id: nil, page_cursor: nil, search: nil, space_id: nil)
48
- res = @client.post("/acs/entrances/list", {access_method_id: access_method_id, acs_credential_id: acs_credential_id, acs_entrance_ids: acs_entrance_ids, acs_system_id: acs_system_id, connected_account_id: connected_account_id, customer_key: customer_key, limit: limit, location_id: location_id, page_cursor: page_cursor, search: search, space_id: space_id}.compact)
48
+ res = @client.get("/acs/entrances/list", {access_method_id: access_method_id, acs_credential_id: acs_credential_id, acs_entrance_ids: acs_entrance_ids, acs_system_id: acs_system_id, connected_account_id: connected_account_id, customer_key: customer_key, limit: limit, location_id: location_id, page_cursor: page_cursor, search: search, space_id: space_id}.compact)
49
49
 
50
50
  Seam::Resources::AcsEntrance.load_from_response(res.body["acs_entrances"])
51
51
  end
@@ -55,7 +55,7 @@ module Seam
55
55
  # @param include_if [Array<String>, nil] Conditions that credentials must meet to be included in the returned list.
56
56
  # @return [Seam::Resources::AcsCredential] OK
57
57
  def list_credentials_with_access(acs_entrance_id:, include_if: nil)
58
- res = @client.post("/acs/entrances/list_credentials_with_access", {acs_entrance_id: acs_entrance_id, include_if: include_if}.compact)
58
+ res = @client.get("/acs/entrances/list_credentials_with_access", {acs_entrance_id: acs_entrance_id, include_if: include_if}.compact)
59
59
 
60
60
  Seam::Resources::AcsCredential.load_from_response(res.body["acs_credentials"])
61
61
  end
@@ -28,7 +28,7 @@ module Seam
28
28
  # @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
29
29
  # @return [Seam::Resources::ActionAttempt] OK
30
30
  def list(action_attempt_ids: nil, device_id: nil, limit: nil, page_cursor: nil)
31
- res = @client.post("/action_attempts/list", {action_attempt_ids: action_attempt_ids, device_id: device_id, limit: limit, page_cursor: page_cursor}.compact)
31
+ res = @client.get("/action_attempts/list", {action_attempt_ids: action_attempt_ids, device_id: device_id, limit: limit, page_cursor: page_cursor}.compact)
32
32
 
33
33
  Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempts"])
34
34
  end
@@ -18,7 +18,7 @@ module Seam
18
18
  # @param accepted_capabilities [Array<String>, nil] 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
19
  # @param accepted_providers [Array<String>, nil] 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
20
  # @param automatically_manage_new_devices [Boolean, nil] 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 [Hash{String => String, Boolean}, nil] 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).
21
+ # @param custom_metadata [Hash{String => String, Boolean}, nil] Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [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). Set a key to `null` or to an empty string to remove that key from the custom metadata.
22
22
  # @param custom_redirect_failure_url [String, nil] 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
23
  # @param custom_redirect_url [String, nil] URL that you want to redirect the user to after the provider login is complete.
24
24
  # @param customer_key [String, nil] 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.
@@ -55,7 +55,7 @@ module Seam
55
55
  end
56
56
 
57
57
  # Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews).
58
- # @param custom_metadata_has [Hash{String => String, Boolean}, nil] 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.
58
+ # @param custom_metadata_has [Hash{String => String, Boolean}, nil] 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. Key names cannot contain a period (.). Specify an empty string to match a key that is unset or set to an empty string.
59
59
  # @param customer_key [String, nil] Customer key for which you want to list connect webviews.
60
60
  # @param limit [Float, nil] Maximum number of records to return per page.
61
61
  # @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
@@ -63,7 +63,7 @@ module Seam
63
63
  # @param user_identifier_key [String, nil] Your user ID for the user by which you want to filter Connect Webviews.
64
64
  # @return [Seam::Resources::ConnectWebview] OK
65
65
  def list(custom_metadata_has: nil, customer_key: nil, limit: nil, page_cursor: nil, search: nil, user_identifier_key: nil)
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)
66
+ res = @client.get("/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)
67
67
 
68
68
  Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webviews"])
69
69
  end
@@ -40,7 +40,7 @@ module Seam
40
40
  end
41
41
 
42
42
  # Returns a list of all [connected accounts](https://docs.seam.co/core-concepts/connected-accounts).
43
- # @param custom_metadata_has [Hash{String => String, Boolean}, nil] 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.
43
+ # @param custom_metadata_has [Hash{String => String, Boolean}, nil] 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. Key names cannot contain a period (.). Specify an empty string to match a key that is unset or set to an empty string.
44
44
  # @param customer_key [String, nil] Customer key by which you want to filter connected accounts.
45
45
  # @param limit [Integer, nil] Maximum number of records to return per page.
46
46
  # @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
@@ -49,7 +49,7 @@ module Seam
49
49
  # @param user_identifier_key [String, nil] Your user ID for the user by which you want to filter connected accounts.
50
50
  # @return [Seam::Resources::ConnectedAccount] OK
51
51
  def list(custom_metadata_has: nil, customer_key: nil, limit: nil, page_cursor: nil, search: nil, space_id: nil, user_identifier_key: nil)
52
- 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)
52
+ res = @client.get("/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)
53
53
 
54
54
  Seam::Resources::ConnectedAccount.load_from_response(res.body["connected_accounts"])
55
55
  end
@@ -67,7 +67,7 @@ module Seam
67
67
  # @param connected_account_id [String] ID of the connected account that you want to update.
68
68
  # @param accepted_capabilities [Array<String>, nil] 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`.
69
69
  # @param automatically_manage_new_devices [Boolean, nil] Indicates whether newly-added devices should appear as [managed devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices).
70
- # @param custom_metadata [Hash{String => String, Boolean}, nil] 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).
70
+ # @param custom_metadata [Hash{String => String, Boolean}, nil] 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, with key names up to 40 characters long that cannot contain a period (.). [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). Set a key to `null` or to an empty string to remove that key from the custom metadata.
71
71
  # @param customer_key [String, nil] 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.
72
72
  # @param display_name [String, nil] Human-readable name for the connected account, shown in the dashboard. For example, `Booking from Airbnb House 1`.
73
73
  # @return [nil] OK
@@ -50,7 +50,7 @@ module Seam
50
50
  # @param user_keys [Array<String>, nil] List of user keys to delete.
51
51
  # @return [nil] OK
52
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)
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)
53
+ @client.delete("/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)
54
54
 
55
55
  nil
56
56
  end
@@ -37,7 +37,7 @@ module Seam
37
37
  # @param connected_account_id [String, nil] ID of the connected account for which you want to list devices.
38
38
  # @param connected_account_ids [Array<String>, nil] Array of IDs of the connected accounts for which you want to list devices.
39
39
  # @param created_before [Time, nil] Timestamp by which to limit returned devices. Returns devices created before this timestamp.
40
- # @param custom_metadata_has [Hash{String => String, Boolean}, nil] 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.
40
+ # @param custom_metadata_has [Hash{String => String, Boolean}, nil] 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. Key names cannot contain a period (.). Specify an empty string to match a key that is unset or set to an empty string.
41
41
  # @param customer_key [String, nil] Customer key for which you want to list devices.
42
42
  # @param device_ids [Array<String>, nil] Array of device IDs for which you want to list devices.
43
43
  # @param device_type [String, nil] Device type for which you want to list devices.
@@ -52,7 +52,7 @@ module Seam
52
52
  # @param user_identifier_key [String, nil] Your own internal user ID for the user for which you want to list devices.
53
53
  # @return [Seam::Resources::Device] OK
54
54
  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)
55
- 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)
55
+ res = @client.get("/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)
56
56
 
57
57
  Seam::Resources::Device.load_from_response(res.body["devices"])
58
58
  end
@@ -84,7 +84,7 @@ module Seam
84
84
  # 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).
85
85
  # @param device_id [String] ID of the device that you want to update.
86
86
  # @param backup_access_code_pool_enabled [Boolean, nil] 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.
87
- # @param custom_metadata [Hash{String => String, Boolean}, nil] 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).
87
+ # @param custom_metadata [Hash{String => String, Boolean}, nil] Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). [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). Set a key to `null` or to an empty string to remove that key from the custom metadata.
88
88
  # @param is_managed [Boolean, nil] Indicates whether the device is managed. To unmanage a device, set `is_managed` to `false`.
89
89
  # @param name [String, Seam::Null, nil] Name for the device.
90
90
  # @param properties [Hash, nil]
@@ -43,7 +43,7 @@ module Seam
43
43
  # @param search [String, nil] 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`.
44
44
  # @return [Seam::Resources::UnmanagedDevice] OK
45
45
  def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, customer_key: nil, device_ids: nil, device_type: nil, device_types: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil)
46
- 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, 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}.compact)
46
+ res = @client.get("/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, 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}.compact)
47
47
 
48
48
  Seam::Resources::UnmanagedDevice.load_from_response(res.body["devices"])
49
49
  end
@@ -52,7 +52,7 @@ module Seam
52
52
  #
53
53
  # 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).
54
54
  # @param device_id [String] ID of the unmanaged device that you want to update.
55
- # @param custom_metadata [Hash{String => String, Boolean}, nil] Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs.
55
+ # @param custom_metadata [Hash{String => String, Boolean}, nil] Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs, with key names up to 40 characters long that cannot contain a period (.). Set a key to `null` or to an empty string to remove that key from the custom metadata.
56
56
  # @param is_managed [TrueClass, nil] Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed.
57
57
  # @return [nil] OK
58
58
  def update(device_id:, custom_metadata: nil, is_managed: nil)
@@ -37,7 +37,7 @@ module Seam
37
37
  # @param acs_system_id [String, nil] ID of the access system for which you want to list events.
38
38
  # @param acs_system_ids [Array<String>, nil] IDs of the access systems for which you want to list events.
39
39
  # @param acs_user_id [String, nil] ID of the ACS user for which you want to list events.
40
- # @param between [Array<Time>, nil] Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`.
40
+ # @param between [Array<String>, nil] Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`.
41
41
  # @param connect_webview_id [String, nil] ID of the Connect Webview for which you want to list events.
42
42
  # @param connected_account_id [String, nil] ID of the connected account for which you want to list events.
43
43
  # @param customer_key [String, nil] Customer key for which you want to list events.
@@ -58,7 +58,7 @@ module Seam
58
58
  raise TypeError, "At least one parameter is required for /events/list"
59
59
  end
60
60
 
61
- 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)
61
+ res = @client.get("/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)
62
62
 
63
63
  Seam::Resources::SeamEvent.load_from_response(res.body["events"])
64
64
  end
@@ -51,7 +51,7 @@ module Seam
51
51
  # @param manufacturer [String, nil] Manufacturer of the locks that you want to list.
52
52
  # @return [Seam::Resources::Device] OK
53
53
  def list(connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_type: nil, device_types: nil, manufacturer: nil)
54
- res = @client.post("/locks/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_type: device_type, device_types: device_types, manufacturer: manufacturer}.compact)
54
+ res = @client.get("/locks/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_type: device_type, device_types: device_types, manufacturer: manufacturer}.compact)
55
55
 
56
56
  Seam::Resources::Device.load_from_response(res.body["devices"])
57
57
  end
@@ -25,7 +25,7 @@ module Seam
25
25
  # @param manufacturer [String, nil] Manufacturers of the noise sensors that you want to list.
26
26
  # @return [Seam::Resources::Device] OK
27
27
  def list(connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_type: nil, device_types: nil, manufacturer: nil)
28
- res = @client.post("/noise_sensors/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_type: device_type, device_types: device_types, manufacturer: manufacturer}.compact)
28
+ res = @client.get("/noise_sensors/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_type: device_type, device_types: device_types, manufacturer: manufacturer}.compact)
29
29
 
30
30
  Seam::Resources::Device.load_from_response(res.body["devices"])
31
31
  end
@@ -87,7 +87,7 @@ module Seam
87
87
  raise TypeError, "At least one parameter is required for /spaces/get_related"
88
88
  end
89
89
 
90
- res = @client.post("/spaces/get_related", {exclude: exclude, include: include, space_ids: space_ids, space_keys: space_keys}.compact)
90
+ res = @client.get("/spaces/get_related", {exclude: exclude, include: include, space_ids: space_ids, space_keys: space_keys}.compact)
91
91
 
92
92
  Seam::Resources::Batch.load_from_response(res.body["batch"])
93
93
  end
@@ -110,7 +110,7 @@ module Seam
110
110
  # @param space_id [String] ID of the space from which you want to remove entrances.
111
111
  # @return [nil] OK
112
112
  def remove_acs_entrances(acs_entrance_ids:, space_id:)
113
- @client.post("/spaces/remove_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
113
+ @client.delete("/spaces/remove_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
114
114
 
115
115
  nil
116
116
  end
@@ -130,7 +130,7 @@ module Seam
130
130
  # @param space_id [String] ID of the space from which you want to remove devices.
131
131
  # @return [nil] OK
132
132
  def remove_devices(device_ids:, space_id:)
133
- @client.post("/spaces/remove_devices", {device_ids: device_ids, space_id: space_id}.compact)
133
+ @client.delete("/spaces/remove_devices", {device_ids: device_ids, space_id: space_id}.compact)
134
134
 
135
135
  nil
136
136
  end
@@ -115,7 +115,7 @@ module Seam
115
115
  # @param manufacturer [String, nil] Manufacturer by which you want to filter thermostat devices.
116
116
  # @return [Seam::Resources::Device] OK
117
117
  def list(connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_type: nil, device_types: nil, manufacturer: nil)
118
- res = @client.post("/thermostats/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_type: device_type, device_types: device_types, manufacturer: manufacturer}.compact)
118
+ res = @client.get("/thermostats/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_type: device_type, device_types: device_types, manufacturer: manufacturer}.compact)
119
119
 
120
120
  Seam::Resources::Device.load_from_response(res.body["devices"])
121
121
  end
@@ -93,7 +93,7 @@ module Seam
93
93
  # @param user_identity_ids [Array<String>, nil] Array of user identity IDs by which to filter the list of user identities.
94
94
  # @return [Seam::Resources::UserIdentity] OK
95
95
  def list(created_before: nil, credential_manager_acs_system_id: nil, limit: nil, page_cursor: nil, search: nil, user_identity_ids: nil)
96
- 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)
96
+ res = @client.get("/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)
97
97
 
98
98
  Seam::Resources::UserIdentity.load_from_response(res.body["user_identities"])
99
99
  end
@@ -134,6 +134,28 @@ module Seam
134
134
  Seam::Resources::AcsUser.load_from_response(res.body["acs_users"])
135
135
  end
136
136
 
137
+ # Merges one or more [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) into a primary user identity, for when the same person ended up with more than one user identity.
138
+ #
139
+ # The primary user identity takes on any email address or phone number it was missing from the user identities merged into it, and the merged user identities are then deleted. Their IDs and keys keep working: looking one up returns the primary user identity, and they are listed on it as `merged_user_identity_ids` and `merged_user_identity_keys`.
140
+ #
141
+ # Access grants, access system users, client sessions and other resources belonging to the merged user identities are moved to the primary user identity.
142
+ #
143
+ # Identify the user identities either by ID or by key, but not both in the same request. Repeating a merge that has already been applied makes no further changes.
144
+ # @param merged_user_identity_ids [Array<String>, nil] IDs of the user identities to merge into the primary user identity. These user identities are deleted.
145
+ # @param user_identity_id [String, nil] ID of the primary user identity to keep.
146
+ # @param merged_user_identity_keys [Array<String>, nil] Keys of the user identities to merge into the primary user identity. These user identities are deleted.
147
+ # @param user_identity_key [String, nil] Key of the primary user identity to keep.
148
+ # @return [nil] OK
149
+ def merge(merged_user_identity_ids: nil, user_identity_id: nil, merged_user_identity_keys: nil, user_identity_key: nil)
150
+ if merged_user_identity_ids.nil? && user_identity_id.nil? && merged_user_identity_keys.nil? && user_identity_key.nil?
151
+ raise TypeError, "At least one parameter is required for /user_identities/merge"
152
+ end
153
+
154
+ @client.post("/user_identities/merge", {merged_user_identity_ids: merged_user_identity_ids, user_identity_id: user_identity_id, merged_user_identity_keys: merged_user_identity_keys, user_identity_key: user_identity_key}.compact)
155
+
156
+ nil
157
+ end
158
+
137
159
  # 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).
138
160
  # @param acs_user_id [String] ID of the access system user that you want to remove from the user identity..
139
161
  # @param user_identity_id [String] ID of the user identity from which you want to remove an access system user.
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.143.0"
4
+ VERSION = "2.146.0"
5
5
  end