seam 2.132.0 → 2.133.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/seam/resources/access_code.rb +55 -2
- data/lib/seam/resources/access_grant.rb +39 -2
- data/lib/seam/resources/access_method.rb +34 -2
- data/lib/seam/resources/acs_access_group.rb +32 -1
- data/lib/seam/resources/acs_credential.rb +61 -2
- data/lib/seam/resources/acs_encoder.rb +25 -1
- data/lib/seam/resources/acs_entrance.rb +48 -1
- data/lib/seam/resources/acs_system.rb +41 -1
- data/lib/seam/resources/acs_user.rb +50 -1
- data/lib/seam/resources/action_attempt.rb +10 -1
- data/lib/seam/resources/batch.rb +126 -1
- data/lib/seam/resources/client_session.rb +35 -2
- data/lib/seam/resources/connect_webview.rb +50 -2
- data/lib/seam/resources/connected_account.rb +33 -1
- data/lib/seam/resources/customer_portal.rb +16 -2
- data/lib/seam/resources/device.rb +70 -1
- data/lib/seam/resources/device_provider.rb +48 -1
- data/lib/seam/resources/event.rb +184 -2
- data/lib/seam/resources/instant_key.rb +22 -2
- data/lib/seam/resources/noise_threshold.rb +15 -1
- data/lib/seam/resources/pagination.rb +7 -1
- data/lib/seam/resources/phone.rb +16 -1
- data/lib/seam/resources/space.rb +22 -1
- data/lib/seam/resources/thermostat_daily_program.rb +12 -1
- data/lib/seam/resources/thermostat_schedule.rb +23 -2
- data/lib/seam/resources/unmanaged_access_code.rb +41 -2
- data/lib/seam/resources/unmanaged_access_grant.rb +31 -2
- data/lib/seam/resources/unmanaged_access_method.rb +28 -2
- data/lib/seam/resources/unmanaged_device.rb +60 -1
- data/lib/seam/resources/unmanaged_user_identity.rb +16 -1
- data/lib/seam/resources/user_identity.rb +18 -1
- data/lib/seam/resources/webhook.rb +9 -1
- data/lib/seam/resources/workspace.rb +20 -1
- data/lib/seam/routes/access_codes.rb +147 -0
- data/lib/seam/routes/access_codes_simulate.rb +5 -0
- data/lib/seam/routes/access_codes_unmanaged.rb +34 -0
- data/lib/seam/routes/access_grants.rb +59 -0
- data/lib/seam/routes/access_grants_unmanaged.rb +20 -0
- data/lib/seam/routes/access_methods.rb +35 -0
- data/lib/seam/routes/access_methods_unmanaged.rb +9 -0
- data/lib/seam/routes/acs_access_groups.rb +28 -0
- data/lib/seam/routes/acs_credentials.rb +49 -0
- data/lib/seam/routes/acs_encoders.rb +25 -0
- data/lib/seam/routes/acs_encoders_simulate.rb +19 -0
- data/lib/seam/routes/acs_entrances.rb +30 -0
- data/lib/seam/routes/acs_systems.rb +20 -0
- data/lib/seam/routes/acs_users.rb +72 -0
- data/lib/seam/routes/action_attempts.rb +9 -0
- data/lib/seam/routes/client_sessions.rb +48 -0
- data/lib/seam/routes/connect_webviews.rb +36 -0
- data/lib/seam/routes/connected_accounts.rb +31 -0
- data/lib/seam/routes/connected_accounts_simulate.rb +3 -0
- data/lib/seam/routes/customers.rb +57 -0
- data/lib/seam/routes/devices.rb +45 -0
- data/lib/seam/routes/devices_simulate.rb +28 -0
- data/lib/seam/routes/devices_unmanaged.rb +36 -0
- data/lib/seam/routes/events.rb +35 -0
- data/lib/seam/routes/instant_keys.rb +10 -0
- data/lib/seam/routes/locks.rb +35 -0
- data/lib/seam/routes/locks_simulate.rb +7 -0
- data/lib/seam/routes/noise_sensors.rb +19 -0
- data/lib/seam/routes/noise_sensors_noise_thresholds.rb +27 -0
- data/lib/seam/routes/noise_sensors_simulate.rb +3 -0
- data/lib/seam/routes/phones.rb +10 -0
- data/lib/seam/routes/phones_simulate.rb +6 -0
- data/lib/seam/routes/spaces.rb +61 -0
- data/lib/seam/routes/thermostats.rb +112 -0
- data/lib/seam/routes/thermostats_daily_programs.rb +13 -0
- data/lib/seam/routes/thermostats_schedules.rb +28 -0
- data/lib/seam/routes/thermostats_simulate.rb +13 -0
- data/lib/seam/routes/user_identities.rb +67 -0
- data/lib/seam/routes/user_identities_unmanaged.rb +16 -0
- data/lib/seam/routes/webhooks.rb +16 -0
- data/lib/seam/routes/workspaces.rb +31 -0
- data/lib/seam/version.rb +1 -1
- metadata +2 -2
data/lib/seam/routes/locks.rb
CHANGED
|
@@ -14,6 +14,11 @@ module Seam
|
|
|
14
14
|
@simulate ||= Seam::Clients::LocksSimulate.new(client: @client, defaults: @defaults)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
# Configures the auto-lock setting for a specified [lock](https://docs.seam.co/low-level-apis/smart-locks).
|
|
18
|
+
# @param auto_lock_enabled Whether to enable or disable auto-lock.
|
|
19
|
+
# @param device_id ID of the lock for which you want to configure the auto-lock.
|
|
20
|
+
# @param auto_lock_delay_seconds Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60.
|
|
21
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
17
22
|
def configure_auto_lock(auto_lock_enabled:, device_id:, auto_lock_delay_seconds: nil, wait_for_action_attempt: nil)
|
|
18
23
|
res = @client.post("/locks/configure_auto_lock", {auto_lock_enabled: auto_lock_enabled, device_id: device_id, auto_lock_delay_seconds: auto_lock_delay_seconds}.compact)
|
|
19
24
|
|
|
@@ -22,18 +27,45 @@ module Seam
|
|
|
22
27
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
23
28
|
end
|
|
24
29
|
|
|
30
|
+
# Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks).
|
|
31
|
+
# @param device_id ID of the lock that you want to get.
|
|
32
|
+
# @param name Name of the lock that you want to get.
|
|
33
|
+
# @return [Seam::Resources::Device] OK
|
|
34
|
+
# @deprecated Use `/devices/get` instead.
|
|
25
35
|
def get(device_id: nil, name: nil)
|
|
26
36
|
res = @client.post("/locks/get", {device_id: device_id, name: name}.compact)
|
|
27
37
|
|
|
28
38
|
Seam::Resources::Device.load_from_response(res.body["device"])
|
|
29
39
|
end
|
|
30
40
|
|
|
41
|
+
# Returns a list of all [locks](https://docs.seam.co/low-level-apis/smart-locks).
|
|
42
|
+
# @param connect_webview_id ID of the Connect Webview for which you want to list devices.
|
|
43
|
+
# @param connected_account_id ID of the connected account for which you want to list devices.
|
|
44
|
+
# @param connected_account_ids Array of IDs of the connected accounts for which you want to list devices.
|
|
45
|
+
# @param created_before Timestamp by which to limit returned devices. Returns devices created before this timestamp.
|
|
46
|
+
# @param custom_metadata_has Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices.
|
|
47
|
+
# @param customer_key Customer key for which you want to list devices.
|
|
48
|
+
# @param device_ids Array of device IDs for which you want to list devices.
|
|
49
|
+
# @param device_type Device type of the locks that you want to list.
|
|
50
|
+
# @param device_types Device types of the locks that you want to list.
|
|
51
|
+
# @param limit Numerical limit on the number of devices to return.
|
|
52
|
+
# @param manufacturer Manufacturer of the locks that you want to list.
|
|
53
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
54
|
+
# @param search String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
|
|
55
|
+
# @param space_id ID of the space for which you want to list devices.
|
|
56
|
+
# @param unstable_location_id
|
|
57
|
+
# @deprecated unstable_location_id: Use `space_id`.
|
|
58
|
+
# @param user_identifier_key Your own internal user ID for the user for which you want to list devices.
|
|
59
|
+
# @return [Seam::Resources::Device] OK
|
|
31
60
|
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)
|
|
32
61
|
res = @client.post("/locks/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)
|
|
33
62
|
|
|
34
63
|
Seam::Resources::Device.load_from_response(res.body["devices"])
|
|
35
64
|
end
|
|
36
65
|
|
|
66
|
+
# Locks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock).
|
|
67
|
+
# @param device_id ID of the lock that you want to lock.
|
|
68
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
37
69
|
def lock_door(device_id:, wait_for_action_attempt: nil)
|
|
38
70
|
res = @client.post("/locks/lock_door", {device_id: device_id}.compact)
|
|
39
71
|
|
|
@@ -42,6 +74,9 @@ module Seam
|
|
|
42
74
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
43
75
|
end
|
|
44
76
|
|
|
77
|
+
# Unlocks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock).
|
|
78
|
+
# @param device_id ID of the lock that you want to unlock.
|
|
79
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
45
80
|
def unlock_door(device_id:, wait_for_action_attempt: nil)
|
|
46
81
|
res = @client.post("/locks/unlock_door", {device_id: device_id}.compact)
|
|
47
82
|
|
|
@@ -10,6 +10,10 @@ module Seam
|
|
|
10
10
|
@defaults = defaults
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# Simulates the entry of a code on a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
14
|
+
# @param code Code that you want to simulate entering on a keypad.
|
|
15
|
+
# @param device_id ID of the device for which you want to simulate a keypad code entry.
|
|
16
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
13
17
|
def keypad_code_entry(code:, device_id:, wait_for_action_attempt: nil)
|
|
14
18
|
res = @client.post("/locks/simulate/keypad_code_entry", {code: code, device_id: device_id}.compact)
|
|
15
19
|
|
|
@@ -18,6 +22,9 @@ module Seam
|
|
|
18
22
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
19
23
|
end
|
|
20
24
|
|
|
25
|
+
# Simulates a manual lock action using a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
26
|
+
# @param device_id ID of the device for which you want to simulate a manual lock action using a keypad.
|
|
27
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
21
28
|
def manual_lock_via_keypad(device_id:, wait_for_action_attempt: nil)
|
|
22
29
|
res = @client.post("/locks/simulate/manual_lock_via_keypad", {device_id: device_id}.compact)
|
|
23
30
|
|
|
@@ -16,6 +16,25 @@ module Seam
|
|
|
16
16
|
@simulate ||= Seam::Clients::NoiseSensorsSimulate.new(client: @client, defaults: @defaults)
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
# Returns a list of all [noise sensors](https://docs.seam.co/capability-guides/noise-sensors).
|
|
20
|
+
# @param connect_webview_id ID of the Connect Webview for which you want to list devices.
|
|
21
|
+
# @param connected_account_id ID of the connected account for which you want to list devices.
|
|
22
|
+
# @param connected_account_ids Array of IDs of the connected accounts for which you want to list devices.
|
|
23
|
+
# @param created_before Timestamp by which to limit returned devices. Returns devices created before this timestamp.
|
|
24
|
+
# @param custom_metadata_has Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices.
|
|
25
|
+
# @param customer_key Customer key for which you want to list devices.
|
|
26
|
+
# @param device_ids Array of device IDs for which you want to list devices.
|
|
27
|
+
# @param device_type Device type of the noise sensors that you want to list.
|
|
28
|
+
# @param device_types Device types of the noise sensors that you want to list.
|
|
29
|
+
# @param limit Numerical limit on the number of devices to return.
|
|
30
|
+
# @param manufacturer Manufacturers of the noise sensors that you want to list.
|
|
31
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
32
|
+
# @param search String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
|
|
33
|
+
# @param space_id ID of the space for which you want to list devices.
|
|
34
|
+
# @param unstable_location_id
|
|
35
|
+
# @deprecated unstable_location_id: Use `space_id`.
|
|
36
|
+
# @param user_identifier_key Your own internal user ID for the user for which you want to list devices.
|
|
37
|
+
# @return [Seam::Resources::Device] OK
|
|
19
38
|
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)
|
|
20
39
|
res = @client.post("/noise_sensors/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)
|
|
21
40
|
|
|
@@ -8,30 +8,57 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Creates a new [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them.
|
|
12
|
+
# @param device_id ID of the device for which you want to create a noise threshold.
|
|
13
|
+
# @param ends_daily_at Time at which the new noise threshold should become inactive daily.
|
|
14
|
+
# @param starts_daily_at Time at which the new noise threshold should become active daily.
|
|
15
|
+
# @param name Name of the new noise threshold.
|
|
16
|
+
# @param noise_threshold_decibels Noise level in decibels for the new noise threshold.
|
|
17
|
+
# @param noise_threshold_nrs Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors).
|
|
18
|
+
# @return [Seam::Resources::NoiseThreshold] OK
|
|
11
19
|
def create(device_id:, ends_daily_at:, starts_daily_at:, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil)
|
|
12
20
|
res = @client.post("/noise_sensors/noise_thresholds/create", {device_id: device_id, ends_daily_at: ends_daily_at, starts_daily_at: starts_daily_at, name: name, noise_threshold_decibels: noise_threshold_decibels, noise_threshold_nrs: noise_threshold_nrs}.compact)
|
|
13
21
|
|
|
14
22
|
Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_threshold"])
|
|
15
23
|
end
|
|
16
24
|
|
|
25
|
+
# Deletes a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors).
|
|
26
|
+
# @param device_id ID of the device that contains the noise threshold that you want to delete.
|
|
27
|
+
# @param noise_threshold_id ID of the noise threshold that you want to delete.
|
|
28
|
+
# @return [nil] OK
|
|
17
29
|
def delete(device_id:, noise_threshold_id:)
|
|
18
30
|
@client.post("/noise_sensors/noise_thresholds/delete", {device_id: device_id, noise_threshold_id: noise_threshold_id}.compact)
|
|
19
31
|
|
|
20
32
|
nil
|
|
21
33
|
end
|
|
22
34
|
|
|
35
|
+
# Returns a specified [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors).
|
|
36
|
+
# @param noise_threshold_id ID of the noise threshold that you want to get.
|
|
37
|
+
# @return [Seam::Resources::NoiseThreshold] OK
|
|
23
38
|
def get(noise_threshold_id:)
|
|
24
39
|
res = @client.post("/noise_sensors/noise_thresholds/get", {noise_threshold_id: noise_threshold_id}.compact)
|
|
25
40
|
|
|
26
41
|
Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_threshold"])
|
|
27
42
|
end
|
|
28
43
|
|
|
44
|
+
# Returns a list of all [noise thresholds](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors).
|
|
45
|
+
# @param device_id ID of the device for which you want to list noise thresholds.
|
|
46
|
+
# @return [Seam::Resources::NoiseThreshold] OK
|
|
29
47
|
def list(device_id:)
|
|
30
48
|
res = @client.post("/noise_sensors/noise_thresholds/list", {device_id: device_id}.compact)
|
|
31
49
|
|
|
32
50
|
Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_thresholds"])
|
|
33
51
|
end
|
|
34
52
|
|
|
53
|
+
# Updates a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors).
|
|
54
|
+
# @param device_id ID of the device that contains the noise threshold that you want to update.
|
|
55
|
+
# @param noise_threshold_id ID of the noise threshold that you want to update.
|
|
56
|
+
# @param ends_daily_at Time at which the noise threshold should become inactive daily.
|
|
57
|
+
# @param name Name of the noise threshold that you want to update.
|
|
58
|
+
# @param noise_threshold_decibels Noise level in decibels for the noise threshold.
|
|
59
|
+
# @param noise_threshold_nrs Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors).
|
|
60
|
+
# @param starts_daily_at Time at which the noise threshold should become active daily.
|
|
61
|
+
# @return [nil] OK
|
|
35
62
|
def update(device_id:, noise_threshold_id:, ends_daily_at: nil, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil, starts_daily_at: nil)
|
|
36
63
|
@client.post("/noise_sensors/noise_thresholds/update", {device_id: device_id, noise_threshold_id: noise_threshold_id, ends_daily_at: ends_daily_at, name: name, noise_threshold_decibels: noise_threshold_decibels, noise_threshold_nrs: noise_threshold_nrs, starts_daily_at: starts_daily_at}.compact)
|
|
37
64
|
|
|
@@ -8,6 +8,9 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Simulates the triggering of a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
|
|
12
|
+
# @param device_id ID of the device for which you want to simulate the triggering of a noise threshold.
|
|
13
|
+
# @return [nil] OK
|
|
11
14
|
def trigger_noise_threshold(device_id:)
|
|
12
15
|
@client.post("/noise_sensors/simulate/trigger_noise_threshold", {device_id: device_id}.compact)
|
|
13
16
|
|
data/lib/seam/routes/phones.rb
CHANGED
|
@@ -12,18 +12,28 @@ module Seam
|
|
|
12
12
|
@simulate ||= Seam::Clients::PhonesSimulate.new(client: @client, defaults: @defaults)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
+
# Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process).
|
|
16
|
+
# @param device_id Device ID of the phone that you want to deactivate.
|
|
17
|
+
# @return [nil] OK
|
|
15
18
|
def deactivate(device_id:)
|
|
16
19
|
@client.post("/phones/deactivate", {device_id: device_id}.compact)
|
|
17
20
|
|
|
18
21
|
nil
|
|
19
22
|
end
|
|
20
23
|
|
|
24
|
+
# Returns a specified [phone](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity).
|
|
25
|
+
# @param device_id Device ID of the phone that you want to get.
|
|
26
|
+
# @return [Seam::Resources::Phone] OK
|
|
21
27
|
def get(device_id:)
|
|
22
28
|
res = @client.post("/phones/get", {device_id: device_id}.compact)
|
|
23
29
|
|
|
24
30
|
Seam::Resources::Phone.load_from_response(res.body["phone"])
|
|
25
31
|
end
|
|
26
32
|
|
|
33
|
+
# Returns a list of all [phones](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body.
|
|
34
|
+
# @param acs_credential_id ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones.
|
|
35
|
+
# @param owner_user_identity_id ID of the user identity that represents the owner by which you want to filter the list of returned phones.
|
|
36
|
+
# @return [Seam::Resources::Phone] OK
|
|
27
37
|
def list(acs_credential_id: nil, owner_user_identity_id: nil)
|
|
28
38
|
res = @client.post("/phones/list", {acs_credential_id: acs_credential_id, owner_user_identity_id: owner_user_identity_id}.compact)
|
|
29
39
|
|
|
@@ -8,6 +8,12 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Creates a new simulated phone in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://docs.seam.co/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity).
|
|
12
|
+
# @param user_identity_id ID of the user identity that you want to associate with the simulated phone.
|
|
13
|
+
# @param assa_abloy_metadata ASSA ABLOY metadata that you want to associate with the simulated phone.
|
|
14
|
+
# @param custom_sdk_installation_id ID of the custom SDK installation that you want to use for the simulated phone.
|
|
15
|
+
# @param phone_metadata Metadata that you want to associate with the simulated phone.
|
|
16
|
+
# @return [Seam::Resources::Phone] OK
|
|
11
17
|
def create_sandbox_phone(user_identity_id:, assa_abloy_metadata: nil, custom_sdk_installation_id: nil, phone_metadata: nil)
|
|
12
18
|
res = @client.post("/phones/simulate/create_sandbox_phone", {user_identity_id: user_identity_id, assa_abloy_metadata: assa_abloy_metadata, custom_sdk_installation_id: custom_sdk_installation_id, phone_metadata: phone_metadata}.compact)
|
|
13
19
|
|
data/lib/seam/routes/spaces.rb
CHANGED
|
@@ -8,72 +8,133 @@ module Seam
|
|
|
8
8
|
@defaults = defaults
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
+
# Adds [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) to a specific space.
|
|
12
|
+
# @param acs_entrance_ids IDs of the entrances that you want to add to the space.
|
|
13
|
+
# @param space_id ID of the space to which you want to add entrances.
|
|
14
|
+
# @return [nil] OK
|
|
11
15
|
def add_acs_entrances(acs_entrance_ids:, space_id:)
|
|
12
16
|
@client.post("/spaces/add_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
|
|
13
17
|
|
|
14
18
|
nil
|
|
15
19
|
end
|
|
16
20
|
|
|
21
|
+
# Adds a [connected account](https://docs.seam.co/core-concepts/connected-accounts) to a specific space.
|
|
22
|
+
# @param connected_account_id ID of the connected account that you want to add to the space.
|
|
23
|
+
# @param space_id ID of the space to which you want to add the connected account.
|
|
24
|
+
# @return [nil] OK
|
|
17
25
|
def add_connected_account(connected_account_id:, space_id:)
|
|
18
26
|
@client.post("/spaces/add_connected_account", {connected_account_id: connected_account_id, space_id: space_id}.compact)
|
|
19
27
|
|
|
20
28
|
nil
|
|
21
29
|
end
|
|
22
30
|
|
|
31
|
+
# Adds devices to a specific space.
|
|
32
|
+
# @param device_ids IDs of the devices that you want to add to the space.
|
|
33
|
+
# @param space_id ID of the space to which you want to add devices.
|
|
34
|
+
# @return [nil] OK
|
|
23
35
|
def add_devices(device_ids:, space_id:)
|
|
24
36
|
@client.post("/spaces/add_devices", {device_ids: device_ids, space_id: space_id}.compact)
|
|
25
37
|
|
|
26
38
|
nil
|
|
27
39
|
end
|
|
28
40
|
|
|
41
|
+
# Creates a new space.
|
|
42
|
+
# @param name Name of the space that you want to create.
|
|
43
|
+
# @param acs_entrance_ids IDs of the entrances that you want to add to the new space.
|
|
44
|
+
# @param connected_account_ids IDs of connected accounts to associate with the new space. Persisted on seam.location_third_party_account so the UI can show which provider account(s) a space came from.
|
|
45
|
+
# @param customer_data Reservation/stay-related defaults for the space.
|
|
46
|
+
# @param customer_key Customer key for which you want to create the space.
|
|
47
|
+
# @param device_ids IDs of the devices that you want to add to the new space.
|
|
48
|
+
# @param space_key Unique key for the space within the workspace.
|
|
49
|
+
# @return [Seam::Resources::Space] OK
|
|
29
50
|
def create(name:, acs_entrance_ids: nil, connected_account_ids: nil, customer_data: nil, customer_key: nil, device_ids: nil, space_key: nil)
|
|
30
51
|
res = @client.post("/spaces/create", {name: name, acs_entrance_ids: acs_entrance_ids, connected_account_ids: connected_account_ids, customer_data: customer_data, customer_key: customer_key, device_ids: device_ids, space_key: space_key}.compact)
|
|
31
52
|
|
|
32
53
|
Seam::Resources::Space.load_from_response(res.body["space"])
|
|
33
54
|
end
|
|
34
55
|
|
|
56
|
+
# Deletes a space.
|
|
57
|
+
# @param space_id ID of the space that you want to delete.
|
|
58
|
+
# @return [nil] OK
|
|
35
59
|
def delete(space_id:)
|
|
36
60
|
@client.post("/spaces/delete", {space_id: space_id}.compact)
|
|
37
61
|
|
|
38
62
|
nil
|
|
39
63
|
end
|
|
40
64
|
|
|
65
|
+
# Gets a space.
|
|
66
|
+
# @param space_id ID of the space that you want to get.
|
|
67
|
+
# @param space_key Unique key of the space that you want to get.
|
|
68
|
+
# @return [Seam::Resources::Space] OK
|
|
41
69
|
def get(space_id: nil, space_key: nil)
|
|
42
70
|
res = @client.post("/spaces/get", {space_id: space_id, space_key: space_key}.compact)
|
|
43
71
|
|
|
44
72
|
Seam::Resources::Space.load_from_response(res.body["space"])
|
|
45
73
|
end
|
|
46
74
|
|
|
75
|
+
# Gets all related resources for one or more Spaces.
|
|
76
|
+
# @param exclude
|
|
77
|
+
# @param include
|
|
78
|
+
# @param space_ids IDs of the spaces that you want to get along with their related resources.
|
|
79
|
+
# @param space_keys Keys of the spaces that you want to get along with their related resources.
|
|
80
|
+
# @return [Seam::Resources::Batch] OK
|
|
47
81
|
def get_related(exclude: nil, include: nil, space_ids: nil, space_keys: nil)
|
|
48
82
|
res = @client.post("/spaces/get_related", {exclude: exclude, include: include, space_ids: space_ids, space_keys: space_keys}.compact)
|
|
49
83
|
|
|
50
84
|
Seam::Resources::Batch.load_from_response(res.body["batch"])
|
|
51
85
|
end
|
|
52
86
|
|
|
87
|
+
# Returns a list of all spaces.
|
|
88
|
+
# @param customer_key Customer key for which you want to list spaces.
|
|
89
|
+
# @param limit Maximum number of records to return per page.
|
|
90
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
91
|
+
# @param search String for which to search. Filters returned spaces to include all records that satisfy a partial match using `name`, `space_key`, or `customer_key`.
|
|
92
|
+
# @param space_key Filter spaces by space_key.
|
|
93
|
+
# @return [Seam::Resources::Space] OK
|
|
53
94
|
def list(customer_key: nil, limit: nil, page_cursor: nil, search: nil, space_key: nil)
|
|
54
95
|
res = @client.post("/spaces/list", {customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, space_key: space_key}.compact)
|
|
55
96
|
|
|
56
97
|
Seam::Resources::Space.load_from_response(res.body["spaces"])
|
|
57
98
|
end
|
|
58
99
|
|
|
100
|
+
# Removes [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) from a specific space.
|
|
101
|
+
# @param acs_entrance_ids IDs of the entrances that you want to remove from the space.
|
|
102
|
+
# @param space_id ID of the space from which you want to remove entrances.
|
|
103
|
+
# @return [nil] OK
|
|
59
104
|
def remove_acs_entrances(acs_entrance_ids:, space_id:)
|
|
60
105
|
@client.post("/spaces/remove_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
|
|
61
106
|
|
|
62
107
|
nil
|
|
63
108
|
end
|
|
64
109
|
|
|
110
|
+
# Removes a [connected account](https://docs.seam.co/core-concepts/connected-accounts) from a specific space.
|
|
111
|
+
# @param connected_account_id ID of the connected account that you want to remove from the space.
|
|
112
|
+
# @param space_id ID of the space from which you want to remove the connected account.
|
|
113
|
+
# @return [nil] OK
|
|
65
114
|
def remove_connected_account(connected_account_id:, space_id:)
|
|
66
115
|
@client.post("/spaces/remove_connected_account", {connected_account_id: connected_account_id, space_id: space_id}.compact)
|
|
67
116
|
|
|
68
117
|
nil
|
|
69
118
|
end
|
|
70
119
|
|
|
120
|
+
# Removes devices from a specific space.
|
|
121
|
+
# @param device_ids IDs of the devices that you want to remove from the space.
|
|
122
|
+
# @param space_id ID of the space from which you want to remove devices.
|
|
123
|
+
# @return [nil] OK
|
|
71
124
|
def remove_devices(device_ids:, space_id:)
|
|
72
125
|
@client.post("/spaces/remove_devices", {device_ids: device_ids, space_id: space_id}.compact)
|
|
73
126
|
|
|
74
127
|
nil
|
|
75
128
|
end
|
|
76
129
|
|
|
130
|
+
# Updates an existing space.
|
|
131
|
+
# @param acs_entrance_ids IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances.
|
|
132
|
+
# @param customer_data Reservation/stay-related defaults for the space. Only the keys you provide are updated; omit a key to leave it unchanged. Pass null on a key to clear it.
|
|
133
|
+
# @param device_ids IDs of the devices that you want to set for the space. If specified, this will replace all existing devices.
|
|
134
|
+
# @param name Name of the space.
|
|
135
|
+
# @param space_id ID of the space that you want to update.
|
|
136
|
+
# @param space_key Unique key of the space that you want to update.
|
|
137
|
+
# @return [Seam::Resources::Space] OK
|
|
77
138
|
def update(acs_entrance_ids: nil, customer_data: nil, device_ids: nil, name: nil, space_id: nil, space_key: nil)
|
|
78
139
|
res = @client.post("/spaces/update", {acs_entrance_ids: acs_entrance_ids, customer_data: customer_data, device_ids: device_ids, name: name, space_id: space_id, space_key: space_key}.compact)
|
|
79
140
|
|
|
@@ -22,6 +22,10 @@ module Seam
|
|
|
22
22
|
@simulate ||= Seam::Clients::ThermostatsSimulate.new(client: @client, defaults: @defaults)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
# Activates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats).
|
|
26
|
+
# @param climate_preset_key Climate preset key of the climate preset that you want to activate.
|
|
27
|
+
# @param device_id ID of the thermostat device for which you want to activate a climate preset.
|
|
28
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
25
29
|
def activate_climate_preset(climate_preset_key:, device_id:, wait_for_action_attempt: nil)
|
|
26
30
|
res = @client.post("/thermostats/activate_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
|
|
27
31
|
|
|
@@ -30,6 +34,11 @@ module Seam
|
|
|
30
34
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
31
35
|
end
|
|
32
36
|
|
|
37
|
+
# Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [cool mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings).
|
|
38
|
+
# @param device_id ID of the thermostat device that you want to set to cool mode.
|
|
39
|
+
# @param cooling_set_point_celsius [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters.
|
|
40
|
+
# @param cooling_set_point_fahrenheit [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters.
|
|
41
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
33
42
|
def cool(device_id:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
|
|
34
43
|
res = @client.post("/thermostats/cool", {device_id: device_id, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit}.compact)
|
|
35
44
|
|
|
@@ -38,18 +47,42 @@ module Seam
|
|
|
38
47
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
39
48
|
end
|
|
40
49
|
|
|
50
|
+
# Creates a [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats).
|
|
51
|
+
# @param climate_preset_key Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets).
|
|
52
|
+
# @param device_id ID of the thermostat device for which you want create a climate preset.
|
|
53
|
+
# @param climate_preset_mode The climate preset mode for the thermostat, based on the available climate preset modes reported by the device.
|
|
54
|
+
# @param cooling_set_point_celsius Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
|
|
55
|
+
# @param cooling_set_point_fahrenheit Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
|
|
56
|
+
# @param ecobee_metadata Metadata specific to the Ecobee climate, if applicable.
|
|
57
|
+
# @param fan_mode_setting Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`.
|
|
58
|
+
# @param heating_set_point_celsius Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
|
|
59
|
+
# @param heating_set_point_fahrenheit Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
|
|
60
|
+
# @param hvac_mode_setting Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`.
|
|
61
|
+
# @param manual_override_allowed Indicates whether a person at the thermostat or using the API can change the thermostat's settings.
|
|
62
|
+
# @deprecated manual_override_allowed: Use 'thermostat_schedule.is_override_allowed'
|
|
63
|
+
# @param name User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets).
|
|
64
|
+
# @return [nil] OK
|
|
41
65
|
def create_climate_preset(climate_preset_key:, device_id:, climate_preset_mode: nil, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, ecobee_metadata: nil, fan_mode_setting: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, hvac_mode_setting: nil, manual_override_allowed: nil, name: nil)
|
|
42
66
|
@client.post("/thermostats/create_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id, climate_preset_mode: climate_preset_mode, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, ecobee_metadata: ecobee_metadata, fan_mode_setting: fan_mode_setting, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit, hvac_mode_setting: hvac_mode_setting, manual_override_allowed: manual_override_allowed, name: name}.compact)
|
|
43
67
|
|
|
44
68
|
nil
|
|
45
69
|
end
|
|
46
70
|
|
|
71
|
+
# Deletes a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats).
|
|
72
|
+
# @param climate_preset_key Climate preset key of the climate preset that you want to delete.
|
|
73
|
+
# @param device_id ID of the thermostat device for which you want to delete a climate preset.
|
|
74
|
+
# @return [nil] OK
|
|
47
75
|
def delete_climate_preset(climate_preset_key:, device_id:)
|
|
48
76
|
@client.post("/thermostats/delete_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
|
|
49
77
|
|
|
50
78
|
nil
|
|
51
79
|
end
|
|
52
80
|
|
|
81
|
+
# Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings).
|
|
82
|
+
# @param device_id ID of the thermostat device that you want to set to heat mode.
|
|
83
|
+
# @param heating_set_point_celsius [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters.
|
|
84
|
+
# @param heating_set_point_fahrenheit [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters.
|
|
85
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
53
86
|
def heat(device_id:, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
|
|
54
87
|
res = @client.post("/thermostats/heat", {device_id: device_id, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit}.compact)
|
|
55
88
|
|
|
@@ -58,6 +91,13 @@ module Seam
|
|
|
58
91
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
59
92
|
end
|
|
60
93
|
|
|
94
|
+
# Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat-cool ("auto") mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings).
|
|
95
|
+
# @param device_id ID of the thermostat device that you want to set to heat-cool mode.
|
|
96
|
+
# @param cooling_set_point_celsius [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters.
|
|
97
|
+
# @param cooling_set_point_fahrenheit [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters.
|
|
98
|
+
# @param heating_set_point_celsius [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters.
|
|
99
|
+
# @param heating_set_point_fahrenheit [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters.
|
|
100
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
61
101
|
def heat_cool(device_id:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
|
|
62
102
|
res = @client.post("/thermostats/heat_cool", {device_id: device_id, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit}.compact)
|
|
63
103
|
|
|
@@ -66,12 +106,34 @@ module Seam
|
|
|
66
106
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
67
107
|
end
|
|
68
108
|
|
|
109
|
+
# Returns a list of all [thermostats](https://docs.seam.co/capability-guides/thermostats).
|
|
110
|
+
# @param connect_webview_id ID of the Connect Webview for which you want to list devices.
|
|
111
|
+
# @param connected_account_id ID of the connected account for which you want to list devices.
|
|
112
|
+
# @param connected_account_ids Array of IDs of the connected accounts for which you want to list devices.
|
|
113
|
+
# @param created_before Timestamp by which to limit returned devices. Returns devices created before this timestamp.
|
|
114
|
+
# @param custom_metadata_has Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices.
|
|
115
|
+
# @param customer_key Customer key for which you want to list devices.
|
|
116
|
+
# @param device_ids Array of device IDs for which you want to list devices.
|
|
117
|
+
# @param device_type Device type by which you want to filter thermostat devices.
|
|
118
|
+
# @param device_types Array of device types by which you want to filter thermostat devices.
|
|
119
|
+
# @param limit Numerical limit on the number of devices to return.
|
|
120
|
+
# @param manufacturer Manufacturer by which you want to filter thermostat devices.
|
|
121
|
+
# @param page_cursor Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
122
|
+
# @param search String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
|
|
123
|
+
# @param space_id ID of the space for which you want to list devices.
|
|
124
|
+
# @param unstable_location_id
|
|
125
|
+
# @deprecated unstable_location_id: Use `space_id`.
|
|
126
|
+
# @param user_identifier_key Your own internal user ID for the user for which you want to list devices.
|
|
127
|
+
# @return [Seam::Resources::Device] OK
|
|
69
128
|
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)
|
|
70
129
|
res = @client.post("/thermostats/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)
|
|
71
130
|
|
|
72
131
|
Seam::Resources::Device.load_from_response(res.body["devices"])
|
|
73
132
|
end
|
|
74
133
|
|
|
134
|
+
# Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to ["off" mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings).
|
|
135
|
+
# @param device_id ID of the thermostat device that you want to set to off mode.
|
|
136
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
75
137
|
def off(device_id:, wait_for_action_attempt: nil)
|
|
76
138
|
res = @client.post("/thermostats/off", {device_id: device_id}.compact)
|
|
77
139
|
|
|
@@ -80,12 +142,22 @@ module Seam
|
|
|
80
142
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
81
143
|
end
|
|
82
144
|
|
|
145
|
+
# Sets a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats).
|
|
146
|
+
# @param climate_preset_key Climate preset key of the climate preset that you want to set as the fallback climate preset.
|
|
147
|
+
# @param device_id ID of the thermostat device for which you want to set the fallback climate preset.
|
|
148
|
+
# @return [nil] OK
|
|
83
149
|
def set_fallback_climate_preset(climate_preset_key:, device_id:)
|
|
84
150
|
@client.post("/thermostats/set_fallback_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
|
|
85
151
|
|
|
86
152
|
nil
|
|
87
153
|
end
|
|
88
154
|
|
|
155
|
+
# Sets the [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats).
|
|
156
|
+
# @param device_id ID of the thermostat device for which you want to set the fan mode.
|
|
157
|
+
# @param fan_mode Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`.
|
|
158
|
+
# @deprecated fan_mode: Use `fan_mode_setting` instead.
|
|
159
|
+
# @param fan_mode_setting [Fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat.
|
|
160
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
89
161
|
def set_fan_mode(device_id:, fan_mode: nil, fan_mode_setting: nil, wait_for_action_attempt: nil)
|
|
90
162
|
res = @client.post("/thermostats/set_fan_mode", {device_id: device_id, fan_mode: fan_mode, fan_mode_setting: fan_mode_setting}.compact)
|
|
91
163
|
|
|
@@ -94,6 +166,14 @@ module Seam
|
|
|
94
166
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
95
167
|
end
|
|
96
168
|
|
|
169
|
+
# Sets the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats).
|
|
170
|
+
# @param device_id ID of the thermostat device for which you want to set the HVAC mode.
|
|
171
|
+
# @param hvac_mode_setting
|
|
172
|
+
# @param cooling_set_point_celsius [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters.
|
|
173
|
+
# @param cooling_set_point_fahrenheit [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters.
|
|
174
|
+
# @param heating_set_point_celsius [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters.
|
|
175
|
+
# @param heating_set_point_fahrenheit [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters.
|
|
176
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
97
177
|
def set_hvac_mode(device_id:, hvac_mode_setting:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
|
|
98
178
|
res = @client.post("/thermostats/set_hvac_mode", {device_id: device_id, hvac_mode_setting: hvac_mode_setting, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit}.compact)
|
|
99
179
|
|
|
@@ -102,18 +182,50 @@ module Seam
|
|
|
102
182
|
Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt)
|
|
103
183
|
end
|
|
104
184
|
|
|
185
|
+
# Sets a [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range.
|
|
186
|
+
# @param device_id ID of the thermostat device for which you want to set a temperature threshold.
|
|
187
|
+
# @param lower_limit_celsius Lower temperature limit in in °C. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both.
|
|
188
|
+
# @param lower_limit_fahrenheit Lower temperature limit in in °F. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both.
|
|
189
|
+
# @param upper_limit_celsius Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both.
|
|
190
|
+
# @param upper_limit_fahrenheit Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both.
|
|
191
|
+
# @return [nil] OK
|
|
105
192
|
def set_temperature_threshold(device_id:, lower_limit_celsius: nil, lower_limit_fahrenheit: nil, upper_limit_celsius: nil, upper_limit_fahrenheit: nil)
|
|
106
193
|
@client.post("/thermostats/set_temperature_threshold", {device_id: device_id, lower_limit_celsius: lower_limit_celsius, lower_limit_fahrenheit: lower_limit_fahrenheit, upper_limit_celsius: upper_limit_celsius, upper_limit_fahrenheit: upper_limit_fahrenheit}.compact)
|
|
107
194
|
|
|
108
195
|
nil
|
|
109
196
|
end
|
|
110
197
|
|
|
198
|
+
# Updates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats).
|
|
199
|
+
# @param climate_preset_key Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets).
|
|
200
|
+
# @param device_id ID of the thermostat device for which you want to update a climate preset.
|
|
201
|
+
# @param climate_preset_mode The climate preset mode for the thermostat, based on the available climate preset modes reported by the device.
|
|
202
|
+
# @param cooling_set_point_celsius Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
|
|
203
|
+
# @param cooling_set_point_fahrenheit Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
|
|
204
|
+
# @param ecobee_metadata Metadata specific to the Ecobee climate, if applicable.
|
|
205
|
+
# @param fan_mode_setting Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`.
|
|
206
|
+
# @param heating_set_point_celsius Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
|
|
207
|
+
# @param heating_set_point_fahrenheit Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points).
|
|
208
|
+
# @param hvac_mode_setting Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`.
|
|
209
|
+
# @param manual_override_allowed Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions).
|
|
210
|
+
# @deprecated manual_override_allowed: Use 'thermostat_schedule.is_override_allowed'
|
|
211
|
+
# @param name User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets).
|
|
212
|
+
# @return [nil] OK
|
|
111
213
|
def update_climate_preset(climate_preset_key:, device_id:, climate_preset_mode: nil, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, ecobee_metadata: nil, fan_mode_setting: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, hvac_mode_setting: nil, manual_override_allowed: nil, name: nil)
|
|
112
214
|
@client.post("/thermostats/update_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id, climate_preset_mode: climate_preset_mode, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, ecobee_metadata: ecobee_metadata, fan_mode_setting: fan_mode_setting, heating_set_point_celsius: heating_set_point_celsius, heating_set_point_fahrenheit: heating_set_point_fahrenheit, hvac_mode_setting: hvac_mode_setting, manual_override_allowed: manual_override_allowed, name: name}.compact)
|
|
113
215
|
|
|
114
216
|
nil
|
|
115
217
|
end
|
|
116
218
|
|
|
219
|
+
# Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat.
|
|
220
|
+
# @param device_id ID of the thermostat device for which you want to update the weekly program.
|
|
221
|
+
# @param friday_program_id ID of the thermostat daily program to run on Fridays.
|
|
222
|
+
# @param monday_program_id ID of the thermostat daily program to run on Mondays.
|
|
223
|
+
# @param saturday_program_id ID of the thermostat daily program to run on Saturdays.
|
|
224
|
+
# @param sunday_program_id ID of the thermostat daily program to run on Sundays.
|
|
225
|
+
# @param thursday_program_id ID of the thermostat daily program to run on Thursdays.
|
|
226
|
+
# @param tuesday_program_id ID of the thermostat daily program to run on Tuesdays.
|
|
227
|
+
# @param wednesday_program_id ID of the thermostat daily program to run on Wednesdays.
|
|
228
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
117
229
|
def update_weekly_program(device_id:, friday_program_id: nil, monday_program_id: nil, saturday_program_id: nil, sunday_program_id: nil, thursday_program_id: nil, tuesday_program_id: nil, wednesday_program_id: nil, wait_for_action_attempt: nil)
|
|
118
230
|
res = @client.post("/thermostats/update_weekly_program", {device_id: device_id, friday_program_id: friday_program_id, monday_program_id: monday_program_id, saturday_program_id: saturday_program_id, sunday_program_id: sunday_program_id, thursday_program_id: thursday_program_id, tuesday_program_id: tuesday_program_id, wednesday_program_id: wednesday_program_id}.compact)
|
|
119
231
|
|
|
@@ -10,18 +10,31 @@ module Seam
|
|
|
10
10
|
@defaults = defaults
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
+
# Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program.
|
|
14
|
+
# @param device_id ID of the thermostat device for which you want to create a daily program.
|
|
15
|
+
# @param name Name of the thermostat daily program.
|
|
16
|
+
# @param periods Array of thermostat daily program periods.
|
|
17
|
+
# @return [Seam::Resources::ThermostatDailyProgram] OK
|
|
13
18
|
def create(device_id:, name:, periods:)
|
|
14
19
|
res = @client.post("/thermostats/daily_programs/create", {device_id: device_id, name: name, periods: periods}.compact)
|
|
15
20
|
|
|
16
21
|
Seam::Resources::ThermostatDailyProgram.load_from_response(res.body["thermostat_daily_program"])
|
|
17
22
|
end
|
|
18
23
|
|
|
24
|
+
# Deletes a thermostat daily program.
|
|
25
|
+
# @param thermostat_daily_program_id ID of the thermostat daily program that you want to delete.
|
|
26
|
+
# @return [nil] OK
|
|
19
27
|
def delete(thermostat_daily_program_id:)
|
|
20
28
|
@client.post("/thermostats/daily_programs/delete", {thermostat_daily_program_id: thermostat_daily_program_id}.compact)
|
|
21
29
|
|
|
22
30
|
nil
|
|
23
31
|
end
|
|
24
32
|
|
|
33
|
+
# Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program.
|
|
34
|
+
# @param name Name of the thermostat daily program that you want to update.
|
|
35
|
+
# @param periods Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program.
|
|
36
|
+
# @param thermostat_daily_program_id ID of the thermostat daily program that you want to update.
|
|
37
|
+
# @return [Seam::Resources::ActionAttempt] OK
|
|
25
38
|
def update(name:, periods:, thermostat_daily_program_id:, wait_for_action_attempt: nil)
|
|
26
39
|
res = @client.post("/thermostats/daily_programs/update", {name: name, periods: periods, thermostat_daily_program_id: thermostat_daily_program_id}.compact)
|
|
27
40
|
|