seam 2.139.0 → 2.141.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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +69 -66
  3. data/README.md +86 -0
  4. data/lib/seam/http_without_workspace.rb +4 -4
  5. data/lib/seam/null.rb +23 -0
  6. data/lib/seam/paginator.rb +4 -1
  7. data/lib/seam/request.rb +49 -1
  8. data/lib/seam/resources/access_code.rb +74 -0
  9. data/lib/seam/resources/access_grant.rb +60 -0
  10. data/lib/seam/resources/access_method.rb +39 -0
  11. data/lib/seam/resources/acs_access_group.rb +45 -0
  12. data/lib/seam/resources/acs_credential.rb +67 -0
  13. data/lib/seam/resources/acs_encoder.rb +11 -0
  14. data/lib/seam/resources/acs_entrance.rb +95 -0
  15. data/lib/seam/resources/acs_system.rb +36 -0
  16. data/lib/seam/resources/acs_user.rb +66 -0
  17. data/lib/seam/resources/action_attempt.rb +192 -0
  18. data/lib/seam/resources/batch.rb +24 -0
  19. data/lib/seam/resources/client_session.rb +12 -0
  20. data/lib/seam/resources/connect_webview.rb +19 -0
  21. data/lib/seam/resources/connected_account.rb +50 -0
  22. data/lib/seam/resources/customer_portal.rb +5 -0
  23. data/lib/seam/resources/device.rb +622 -4
  24. data/lib/seam/resources/device_provider.rb +24 -0
  25. data/lib/seam/resources/event.rb +142 -3
  26. data/lib/seam/resources/instant_key.rb +13 -0
  27. data/lib/seam/resources/noise_threshold.rb +7 -0
  28. data/lib/seam/resources/pagination.rb +3 -0
  29. data/lib/seam/resources/phone.rb +29 -0
  30. data/lib/seam/resources/space.rb +19 -0
  31. data/lib/seam/resources/thermostat_daily_program.rb +9 -0
  32. data/lib/seam/resources/thermostat_schedule.rb +15 -0
  33. data/lib/seam/resources/unmanaged_access_code.rb +51 -0
  34. data/lib/seam/resources/unmanaged_access_grant.rb +56 -0
  35. data/lib/seam/resources/unmanaged_access_method.rb +36 -0
  36. data/lib/seam/resources/unmanaged_device.rb +80 -0
  37. data/lib/seam/resources/unmanaged_user_identity.rb +20 -0
  38. data/lib/seam/resources/user_identity.rb +21 -0
  39. data/lib/seam/resources/webhook.rb +4 -0
  40. data/lib/seam/resources/workspace.rb +15 -0
  41. data/lib/seam/routes/access_codes.rb +79 -79
  42. data/lib/seam/routes/access_codes_simulate.rb +3 -3
  43. data/lib/seam/routes/access_codes_unmanaged.rb +27 -23
  44. data/lib/seam/routes/access_grants.rb +57 -45
  45. data/lib/seam/routes/access_grants_unmanaged.rb +13 -13
  46. data/lib/seam/routes/access_methods.rb +32 -24
  47. data/lib/seam/routes/access_methods_unmanaged.rb +7 -7
  48. data/lib/seam/routes/acs_access_groups.rb +21 -21
  49. data/lib/seam/routes/acs_credentials.rb +40 -40
  50. data/lib/seam/routes/acs_encoders.rb +16 -16
  51. data/lib/seam/routes/acs_encoders_simulate.rb +11 -11
  52. data/lib/seam/routes/acs_entrances.rb +20 -20
  53. data/lib/seam/routes/acs_systems.rb +11 -11
  54. data/lib/seam/routes/acs_users.rb +83 -55
  55. data/lib/seam/routes/action_attempts.rb +6 -6
  56. data/lib/seam/routes/client_sessions.rb +38 -34
  57. data/lib/seam/routes/connect_webviews.rb +20 -20
  58. data/lib/seam/routes/connected_accounts.rb +24 -20
  59. data/lib/seam/routes/connected_accounts_simulate.rb +1 -1
  60. data/lib/seam/routes/customers.rb +50 -50
  61. data/lib/seam/routes/devices.rb +33 -29
  62. data/lib/seam/routes/devices_simulate.rb +7 -7
  63. data/lib/seam/routes/devices_unmanaged.rb +25 -26
  64. data/lib/seam/routes/events.rb +40 -32
  65. data/lib/seam/routes/instant_keys.rb +11 -7
  66. data/lib/seam/routes/locks.rb +20 -27
  67. data/lib/seam/routes/locks_simulate.rb +3 -3
  68. data/lib/seam/routes/noise_sensors.rb +8 -19
  69. data/lib/seam/routes/noise_sensors_noise_thresholds.rb +21 -21
  70. data/lib/seam/routes/noise_sensors_simulate.rb +1 -1
  71. data/lib/seam/routes/phones.rb +7 -7
  72. data/lib/seam/routes/phones_simulate.rb +4 -4
  73. data/lib/seam/routes/spaces.rb +53 -45
  74. data/lib/seam/routes/thermostats.rb +75 -86
  75. data/lib/seam/routes/thermostats_daily_programs.rb +9 -9
  76. data/lib/seam/routes/thermostats_schedules.rb +22 -22
  77. data/lib/seam/routes/thermostats_simulate.rb +9 -9
  78. data/lib/seam/routes/user_identities.rb +50 -46
  79. data/lib/seam/routes/user_identities_unmanaged.rb +11 -11
  80. data/lib/seam/routes/webhooks.rb +10 -10
  81. data/lib/seam/routes/workspaces.rb +19 -19
  82. data/lib/seam/strict_url_search_params_serializer.rb +17 -0
  83. data/lib/seam/url_search_params.rb +102 -0
  84. data/lib/seam/url_search_params_serializer.rb +217 -0
  85. data/lib/seam/version.rb +1 -1
  86. data/lib/seam.rb +3 -0
  87. metadata +12 -11
@@ -9,43 +9,43 @@ module Seam
9
9
  end
10
10
 
11
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.
12
+ # @param acs_entrance_ids [Array<String>] IDs of the entrances that you want to add to the space.
13
+ # @param space_id [String] ID of the space to which you want to add entrances.
14
14
  # @return [nil] OK
15
15
  def add_acs_entrances(acs_entrance_ids:, space_id:)
16
- @client.post("/spaces/add_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
16
+ @client.put("/spaces/add_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
17
17
 
18
18
  nil
19
19
  end
20
20
 
21
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.
22
+ # @param connected_account_id [String] ID of the connected account that you want to add to the space.
23
+ # @param space_id [String] ID of the space to which you want to add the connected account.
24
24
  # @return [nil] OK
25
25
  def add_connected_account(connected_account_id:, space_id:)
26
- @client.post("/spaces/add_connected_account", {connected_account_id: connected_account_id, space_id: space_id}.compact)
26
+ @client.put("/spaces/add_connected_account", {connected_account_id: connected_account_id, space_id: space_id}.compact)
27
27
 
28
28
  nil
29
29
  end
30
30
 
31
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.
32
+ # @param device_ids [Array<String>] IDs of the devices that you want to add to the space.
33
+ # @param space_id [String] ID of the space to which you want to add devices.
34
34
  # @return [nil] OK
35
35
  def add_devices(device_ids:, space_id:)
36
- @client.post("/spaces/add_devices", {device_ids: device_ids, space_id: space_id}.compact)
36
+ @client.put("/spaces/add_devices", {device_ids: device_ids, space_id: space_id}.compact)
37
37
 
38
38
  nil
39
39
  end
40
40
 
41
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.
42
+ # @param name [String] Name of the space that you want to create.
43
+ # @param acs_entrance_ids [Array<String>, nil] IDs of the entrances that you want to add to the new space.
44
+ # @param connected_account_ids [Array<String>, nil] 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 [Hash, nil] Reservation/stay-related defaults for the space.
46
+ # @param customer_key [String, nil] Customer key for which you want to create the space.
47
+ # @param device_ids [Array<String>, nil] IDs of the devices that you want to add to the new space.
48
+ # @param space_key [String, nil] Unique key for the space within the workspace.
49
49
  # @return [Seam::Resources::Space] OK
50
50
  def create(name:, acs_entrance_ids: nil, connected_account_ids: nil, customer_data: nil, customer_key: nil, device_ids: nil, space_key: nil)
51
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)
@@ -54,52 +54,60 @@ module Seam
54
54
  end
55
55
 
56
56
  # Deletes a space.
57
- # @param space_id ID of the space that you want to delete.
57
+ # @param space_id [String] ID of the space that you want to delete.
58
58
  # @return [nil] OK
59
59
  def delete(space_id:)
60
- @client.post("/spaces/delete", {space_id: space_id}.compact)
60
+ @client.delete("/spaces/delete", {space_id: space_id}.compact)
61
61
 
62
62
  nil
63
63
  end
64
64
 
65
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.
66
+ # @param space_id [String, nil] ID of the space that you want to get.
67
+ # @param space_key [String, nil] Unique key of the space that you want to get.
68
68
  # @return [Seam::Resources::Space] OK
69
69
  def get(space_id: nil, space_key: nil)
70
- res = @client.post("/spaces/get", {space_id: space_id, space_key: space_key}.compact)
70
+ if space_id.nil? && space_key.nil?
71
+ raise TypeError, "At least one parameter is required for /spaces/get"
72
+ end
73
+
74
+ res = @client.get("/spaces/get", {space_id: space_id, space_key: space_key}.compact)
71
75
 
72
76
  Seam::Resources::Space.load_from_response(res.body["space"])
73
77
  end
74
78
 
75
79
  # 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
+ # @param exclude [Array<String>, nil]
81
+ # @param include [Array<String>, nil]
82
+ # @param space_ids [Array<String>, nil] IDs of the spaces that you want to get along with their related resources.
83
+ # @param space_keys [Array<String>, nil] Keys of the spaces that you want to get along with their related resources.
80
84
  # @return [Seam::Resources::Batch] OK
81
85
  def get_related(exclude: nil, include: nil, space_ids: nil, space_keys: nil)
86
+ if exclude.nil? && include.nil? && space_ids.nil? && space_keys.nil?
87
+ raise TypeError, "At least one parameter is required for /spaces/get_related"
88
+ end
89
+
82
90
  res = @client.post("/spaces/get_related", {exclude: exclude, include: include, space_ids: space_ids, space_keys: space_keys}.compact)
83
91
 
84
92
  Seam::Resources::Batch.load_from_response(res.body["batch"])
85
93
  end
86
94
 
87
95
  # 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.
96
+ # @param customer_key [String, nil] Customer key for which you want to list spaces.
97
+ # @param limit [Float, nil] Maximum number of records to return per page.
98
+ # @param page_cursor [String, Seam::Null, nil] Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
99
+ # @param search [String, nil] String for which to search. Filters returned spaces to include all records that satisfy a partial match using `name`, `space_key`, or `customer_key`.
100
+ # @param space_key [String, nil] Filter spaces by space_key.
93
101
  # @return [Seam::Resources::Space] OK
94
102
  def list(customer_key: nil, limit: nil, page_cursor: nil, search: nil, space_key: nil)
95
- res = @client.post("/spaces/list", {customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, space_key: space_key}.compact)
103
+ res = @client.get("/spaces/list", {customer_key: customer_key, limit: limit, page_cursor: page_cursor, search: search, space_key: space_key}.compact)
96
104
 
97
105
  Seam::Resources::Space.load_from_response(res.body["spaces"])
98
106
  end
99
107
 
100
108
  # 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.
109
+ # @param acs_entrance_ids [Array<String>] IDs of the entrances that you want to remove from the space.
110
+ # @param space_id [String] ID of the space from which you want to remove entrances.
103
111
  # @return [nil] OK
104
112
  def remove_acs_entrances(acs_entrance_ids:, space_id:)
105
113
  @client.post("/spaces/remove_acs_entrances", {acs_entrance_ids: acs_entrance_ids, space_id: space_id}.compact)
@@ -108,18 +116,18 @@ module Seam
108
116
  end
109
117
 
110
118
  # 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.
119
+ # @param connected_account_id [String] ID of the connected account that you want to remove from the space.
120
+ # @param space_id [String] ID of the space from which you want to remove the connected account.
113
121
  # @return [nil] OK
114
122
  def remove_connected_account(connected_account_id:, space_id:)
115
- @client.post("/spaces/remove_connected_account", {connected_account_id: connected_account_id, space_id: space_id}.compact)
123
+ @client.delete("/spaces/remove_connected_account", {connected_account_id: connected_account_id, space_id: space_id}.compact)
116
124
 
117
125
  nil
118
126
  end
119
127
 
120
128
  # 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.
129
+ # @param device_ids [Array<String>] IDs of the devices that you want to remove from the space.
130
+ # @param space_id [String] ID of the space from which you want to remove devices.
123
131
  # @return [nil] OK
124
132
  def remove_devices(device_ids:, space_id:)
125
133
  @client.post("/spaces/remove_devices", {device_ids: device_ids, space_id: space_id}.compact)
@@ -128,15 +136,15 @@ module Seam
128
136
  end
129
137
 
130
138
  # 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.
139
+ # @param acs_entrance_ids [Array<String>, nil] IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances.
140
+ # @param customer_data [Hash, nil] 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.
141
+ # @param device_ids [Array<String>, nil] IDs of the devices that you want to set for the space. If specified, this will replace all existing devices.
142
+ # @param name [String, nil] Name of the space.
143
+ # @param space_id [String, nil] ID of the space that you want to update.
144
+ # @param space_key [String, nil] Unique key of the space that you want to update.
137
145
  # @return [Seam::Resources::Space] OK
138
146
  def update(acs_entrance_ids: nil, customer_data: nil, device_ids: nil, name: nil, space_id: nil, space_key: nil)
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)
147
+ res = @client.patch("/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)
140
148
 
141
149
  Seam::Resources::Space.load_from_response(res.body["space"])
142
150
  end
@@ -23,8 +23,8 @@ module Seam
23
23
  end
24
24
 
25
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.
26
+ # @param climate_preset_key [String] Climate preset key of the climate preset that you want to activate.
27
+ # @param device_id [String] ID of the thermostat device for which you want to activate a climate preset.
28
28
  # @return [Seam::Resources::ActionAttempt] OK
29
29
  def activate_climate_preset(climate_preset_key:, device_id:, wait_for_action_attempt: nil)
30
30
  res = @client.post("/thermostats/activate_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
@@ -35,9 +35,9 @@ module Seam
35
35
  end
36
36
 
37
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.
38
+ # @param device_id [String] ID of the thermostat device that you want to set to cool mode.
39
+ # @param cooling_set_point_celsius [Float, nil] [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 [Float, nil] [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
41
  # @return [Seam::Resources::ActionAttempt] OK
42
42
  def cool(device_id:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
43
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)
@@ -48,19 +48,19 @@ module Seam
48
48
  end
49
49
 
50
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.
51
+ # @param climate_preset_key [String] Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets).
52
+ # @param device_id [String] ID of the thermostat device for which you want create a climate preset.
53
+ # @param climate_preset_mode [String, nil] The climate preset mode for the thermostat, based on the available climate preset modes reported by the device.
54
+ # @param cooling_set_point_celsius [Float, nil] 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 [Float, nil] 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 [Hash, nil] Metadata specific to the Ecobee climate, if applicable.
57
+ # @param fan_mode_setting [String, nil] 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 [Float, nil] 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 [Float, nil] 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 [String, nil] 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 [Boolean, nil] Indicates whether a person at the thermostat or using the API can change the thermostat's settings.
62
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).
63
+ # @param name [String, Seam::Null, nil] User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets).
64
64
  # @return [nil] OK
65
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)
66
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)
@@ -69,19 +69,19 @@ module Seam
69
69
  end
70
70
 
71
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.
72
+ # @param climate_preset_key [String] Climate preset key of the climate preset that you want to delete.
73
+ # @param device_id [String] ID of the thermostat device for which you want to delete a climate preset.
74
74
  # @return [nil] OK
75
75
  def delete_climate_preset(climate_preset_key:, device_id:)
76
- @client.post("/thermostats/delete_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
76
+ @client.delete("/thermostats/delete_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
77
77
 
78
78
  nil
79
79
  end
80
80
 
81
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.
82
+ # @param device_id [String] ID of the thermostat device that you want to set to heat mode.
83
+ # @param heating_set_point_celsius [Float, nil] [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 [Float, nil] [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
85
  # @return [Seam::Resources::ActionAttempt] OK
86
86
  def heat(device_id:, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, wait_for_action_attempt: nil)
87
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)
@@ -92,11 +92,11 @@ module Seam
92
92
  end
93
93
 
94
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.
95
+ # @param device_id [String] ID of the thermostat device that you want to set to heat-cool mode.
96
+ # @param cooling_set_point_celsius [Float, nil] [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 [Float, nil] [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 [Float, nil] [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 [Float, nil] [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
100
  # @return [Seam::Resources::ActionAttempt] OK
101
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)
102
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)
@@ -107,32 +107,21 @@ module Seam
107
107
  end
108
108
 
109
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.
110
+ # @param connect_webview_id [String, nil] ID of the Connect Webview for which you want to list devices.
111
+ # @param connected_account_id [String, nil] ID of the connected account for which you want to list devices.
112
+ # @param customer_key [String, nil] Customer key for which you want to list devices.
113
+ # @param device_type [String, nil] Device type by which you want to filter thermostat devices.
114
+ # @param device_types [Array<String>, nil] Array of device types by which you want to filter thermostat devices.
115
+ # @param manufacturer [String, nil] Manufacturer by which you want to filter thermostat devices.
127
116
  # @return [Seam::Resources::Device] OK
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)
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)
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)
130
119
 
131
120
  Seam::Resources::Device.load_from_response(res.body["devices"])
132
121
  end
133
122
 
134
123
  # 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.
124
+ # @param device_id [String] ID of the thermostat device that you want to set to off mode.
136
125
  # @return [Seam::Resources::ActionAttempt] OK
137
126
  def off(device_id:, wait_for_action_attempt: nil)
138
127
  res = @client.post("/thermostats/off", {device_id: device_id}.compact)
@@ -143,8 +132,8 @@ module Seam
143
132
  end
144
133
 
145
134
  # 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.
135
+ # @param climate_preset_key [String] Climate preset key of the climate preset that you want to set as the fallback climate preset.
136
+ # @param device_id [String] ID of the thermostat device for which you want to set the fallback climate preset.
148
137
  # @return [nil] OK
149
138
  def set_fallback_climate_preset(climate_preset_key:, device_id:)
150
139
  @client.post("/thermostats/set_fallback_climate_preset", {climate_preset_key: climate_preset_key, device_id: device_id}.compact)
@@ -153,10 +142,10 @@ module Seam
153
142
  end
154
143
 
155
144
  # 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`.
145
+ # @param device_id [String] ID of the thermostat device for which you want to set the fan mode.
146
+ # @param fan_mode [String, nil] Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`.
158
147
  # @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.
148
+ # @param fan_mode_setting [String, nil] [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
149
  # @return [Seam::Resources::ActionAttempt] OK
161
150
  def set_fan_mode(device_id:, fan_mode: nil, fan_mode_setting: nil, wait_for_action_attempt: nil)
162
151
  res = @client.post("/thermostats/set_fan_mode", {device_id: device_id, fan_mode: fan_mode, fan_mode_setting: fan_mode_setting}.compact)
@@ -167,12 +156,12 @@ module Seam
167
156
  end
168
157
 
169
158
  # 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.
159
+ # @param device_id [String] ID of the thermostat device for which you want to set the HVAC mode.
160
+ # @param hvac_mode_setting [String]
161
+ # @param cooling_set_point_celsius [Float, nil] [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.
162
+ # @param cooling_set_point_fahrenheit [Float, nil] [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.
163
+ # @param heating_set_point_celsius [Float, nil] [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.
164
+ # @param heating_set_point_fahrenheit [Float, nil] [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
165
  # @return [Seam::Resources::ActionAttempt] OK
177
166
  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)
178
167
  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)
@@ -183,48 +172,48 @@ module Seam
183
172
  end
184
173
 
185
174
  # 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.
175
+ # @param device_id [String] ID of the thermostat device for which you want to set a temperature threshold.
176
+ # @param lower_limit_celsius [Float, Seam::Null, nil] 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.
177
+ # @param lower_limit_fahrenheit [Float, Seam::Null, nil] 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.
178
+ # @param upper_limit_celsius [Float, Seam::Null, nil] 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.
179
+ # @param upper_limit_fahrenheit [Float, Seam::Null, nil] 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
180
  # @return [nil] OK
192
181
  def set_temperature_threshold(device_id:, lower_limit_celsius: nil, lower_limit_fahrenheit: nil, upper_limit_celsius: nil, upper_limit_fahrenheit: nil)
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)
182
+ @client.patch("/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)
194
183
 
195
184
  nil
196
185
  end
197
186
 
198
187
  # 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).
188
+ # @param climate_preset_key [String] Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets).
189
+ # @param device_id [String] ID of the thermostat device for which you want to update a climate preset.
190
+ # @param climate_preset_mode [String, nil] The climate preset mode for the thermostat, based on the available climate preset modes reported by the device.
191
+ # @param cooling_set_point_celsius [Float, nil] 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).
192
+ # @param cooling_set_point_fahrenheit [Float, nil] 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).
193
+ # @param ecobee_metadata [Hash, nil] Metadata specific to the Ecobee climate, if applicable.
194
+ # @param fan_mode_setting [String, nil] Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`.
195
+ # @param heating_set_point_celsius [Float, nil] 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).
196
+ # @param heating_set_point_fahrenheit [Float, nil] 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).
197
+ # @param hvac_mode_setting [String, nil] Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`.
198
+ # @param manual_override_allowed [Boolean, nil] 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
199
  # @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).
200
+ # @param name [String, Seam::Null, nil] User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets).
212
201
  # @return [nil] OK
213
202
  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)
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)
203
+ @client.patch("/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)
215
204
 
216
205
  nil
217
206
  end
218
207
 
219
208
  # 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.
209
+ # @param device_id [String] ID of the thermostat device for which you want to update the weekly program.
210
+ # @param friday_program_id [String, Seam::Null, nil] ID of the thermostat daily program to run on Fridays.
211
+ # @param monday_program_id [String, Seam::Null, nil] ID of the thermostat daily program to run on Mondays.
212
+ # @param saturday_program_id [String, Seam::Null, nil] ID of the thermostat daily program to run on Saturdays.
213
+ # @param sunday_program_id [String, Seam::Null, nil] ID of the thermostat daily program to run on Sundays.
214
+ # @param thursday_program_id [String, Seam::Null, nil] ID of the thermostat daily program to run on Thursdays.
215
+ # @param tuesday_program_id [String, Seam::Null, nil] ID of the thermostat daily program to run on Tuesdays.
216
+ # @param wednesday_program_id [String, Seam::Null, nil] ID of the thermostat daily program to run on Wednesdays.
228
217
  # @return [Seam::Resources::ActionAttempt] OK
229
218
  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)
230
219
  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)
@@ -11,9 +11,9 @@ module Seam
11
11
  end
12
12
 
13
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.
14
+ # @param device_id [String] ID of the thermostat device for which you want to create a daily program.
15
+ # @param name [String] Name of the thermostat daily program.
16
+ # @param periods [Array<Hash>] Array of thermostat daily program periods.
17
17
  # @return [Seam::Resources::ThermostatDailyProgram] OK
18
18
  def create(device_id:, name:, periods:)
19
19
  res = @client.post("/thermostats/daily_programs/create", {device_id: device_id, name: name, periods: periods}.compact)
@@ -22,21 +22,21 @@ module Seam
22
22
  end
23
23
 
24
24
  # Deletes a thermostat daily program.
25
- # @param thermostat_daily_program_id ID of the thermostat daily program that you want to delete.
25
+ # @param thermostat_daily_program_id [String] ID of the thermostat daily program that you want to delete.
26
26
  # @return [nil] OK
27
27
  def delete(thermostat_daily_program_id:)
28
- @client.post("/thermostats/daily_programs/delete", {thermostat_daily_program_id: thermostat_daily_program_id}.compact)
28
+ @client.delete("/thermostats/daily_programs/delete", {thermostat_daily_program_id: thermostat_daily_program_id}.compact)
29
29
 
30
30
  nil
31
31
  end
32
32
 
33
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.
34
+ # @param name [String] Name of the thermostat daily program that you want to update.
35
+ # @param periods [Array<Hash>] 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 [String] ID of the thermostat daily program that you want to update.
37
37
  # @return [Seam::Resources::ActionAttempt] OK
38
38
  def update(name:, periods:, thermostat_daily_program_id:, wait_for_action_attempt: nil)
39
- res = @client.post("/thermostats/daily_programs/update", {name: name, periods: periods, thermostat_daily_program_id: thermostat_daily_program_id}.compact)
39
+ res = @client.patch("/thermostats/daily_programs/update", {name: name, periods: periods, thermostat_daily_program_id: thermostat_daily_program_id}.compact)
40
40
 
41
41
  wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt
42
42