diff --git a/lib/seam/routes/clients/acs_encoders.rb b/lib/seam/routes/clients/acs_encoders.rb index 7465960..d32e310 100644 --- a/lib/seam/routes/clients/acs_encoders.rb +++ b/lib/seam/routes/clients/acs_encoders.rb @@ -5,6 +5,28 @@ module Seam module Clients class AcsEncoders < BaseClient + def encode_card(acs_system_id: nil, device_name: nil, device_id: nil, wait_for_action_attempt: nil) + action_attempt = request_seam_object( + :post, + "/acs/encoders/encode_card", + Seam::ActionAttempt, + "action_attempt", + body: {acs_system_id: acs_system_id, device_name: device_name, device_id: device_id}.compact + ) + + Helpers::ActionAttempt.decide_and_wait(action_attempt, @client, wait_for_action_attempt) + end + + def list(acs_system_ids: nil, device_ids: nil, limit: nil) + request_seam_object( + :post, + "/acs/encoders/list", + Seam::Device, + "devices", + body: {acs_system_ids: acs_system_ids, device_ids: device_ids, limit: limit}.compact + ) + end + def read_card(acs_system_id: nil, device_name: nil, device_id: nil, wait_for_action_attempt: nil) action_attempt = request_seam_object( :post, diff --git a/lib/seam/routes/clients/thermostats.rb b/lib/seam/routes/clients/thermostats.rb index ed5f83b..bd9ae8f 100644 --- a/lib/seam/routes/clients/thermostats.rb +++ b/lib/seam/routes/clients/thermostats.rb @@ -34,13 +34,13 @@ def cool(device_id:, cooling_set_point_celsius: nil, cooling_set_point_fahrenhei end def create_climate_preset(climate_preset_key:, device_id:, manual_override_allowed:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, fan_mode_setting: nil, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, hvac_mode_setting: nil, name: nil) - request_seam_object( + request_seam( :post, "/thermostats/create_climate_preset", - Seam::ClimatePreset, - "climate_preset", body: {climate_preset_key: climate_preset_key, device_id: device_id, manual_override_allowed: manual_override_allowed, cooling_set_point_celsius: cooling_set_point_celsius, cooling_set_point_fahrenheit: cooling_set_point_fahrenheit, 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, name: name}.compact ) + + nil end def delete_climate_preset(climate_preset_key:, device_id:) diff --git a/lib/seam/routes/resources/acs_entrance.rb b/lib/seam/routes/resources/acs_entrance.rb index 9a2e87d..b95f4d2 100644 --- a/lib/seam/routes/resources/acs_entrance.rb +++ b/lib/seam/routes/resources/acs_entrance.rb @@ -2,7 +2,7 @@ module Seam class AcsEntrance < BaseResource - attr_accessor :acs_entrance_id, :acs_system_id, :display_name, :latch_metadata, :visionline_metadata + attr_accessor :acs_entrance_id, :acs_system_id, :display_name, :latch_metadata, :salto_ks_metadata, :visionline_metadata date_accessor :created_at diff --git a/lib/seam/routes/resources/climate_preset.rb b/lib/seam/routes/resources/climate_preset.rb deleted file mode 100644 index 4678714..0000000 --- a/lib/seam/routes/resources/climate_preset.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -module Seam - class ClimatePreset < BaseResource - attr_accessor :can_delete, :can_edit, :climate_preset_key, :cooling_set_point_celsius, :cooling_set_point_fahrenheit, :display_name, :fan_mode_setting, :heating_set_point_celsius, :heating_set_point_fahrenheit, :hvac_mode_setting, :manual_override_allowed, :name - end -end diff --git a/lib/seam/routes/resources/event.rb b/lib/seam/routes/resources/event.rb index bbf7200..70c438c 100644 --- a/lib/seam/routes/resources/event.rb +++ b/lib/seam/routes/resources/event.rb @@ -2,7 +2,7 @@ module Seam class SeamEvent < BaseResource - attr_accessor :acs_credential_id, :acs_system_id, :acs_user_id, :action_attempt_id, :client_session_id, :device_id, :enrollment_automation_id, :event_description, :event_id, :event_type, :workspace_id + attr_accessor :acs_credential_id, :acs_system_id, :acs_user_id, :action_attempt_id, :client_session_id, :climate_preset_key, :cooling_set_point_celsius, :cooling_set_point_fahrenheit, :device_id, :enrollment_automation_id, :event_description, :event_id, :event_type, :fan_mode_setting, :heating_set_point_celsius, :heating_set_point_fahrenheit, :hvac_mode_setting, :is_fallback_climate_preset, :thermostat_schedule_id, :workspace_id date_accessor :created_at, :occurred_at end diff --git a/lib/seam/routes/resources/index.rb b/lib/seam/routes/resources/index.rb index 56e4399..c894805 100644 --- a/lib/seam/routes/resources/index.rb +++ b/lib/seam/routes/resources/index.rb @@ -14,7 +14,6 @@ require_relative "acs_user" require_relative "action_attempt" require_relative "client_session" -require_relative "climate_preset" require_relative "connect_webview" require_relative "connected_account" require_relative "device" diff --git a/package-lock.json b/package-lock.json index 995cbf7..e1642d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "name": "@seamapi/ruby", "devDependencies": { "@seamapi/nextlove-sdk-generator": "1.14.4", - "@seamapi/types": "1.253.0", + "@seamapi/types": "1.258.2", "del": "^7.1.0", "prettier": "^3.2.5" } @@ -437,9 +437,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.253.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.253.0.tgz", - "integrity": "sha512-p7glHUlIj0ZlA9lyocuQ/vJN2e4kb0KmP2ULRchSvfo0vcAe8JaLfGURB1ha6S2xZjzgm0rU4JUvOpiKRp1aBQ==", + "version": "1.258.2", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.258.2.tgz", + "integrity": "sha512-8V5+qRXXtMM+hXcMrgmtqxodDKtbCodAE72I7eBjDROBs3olqB+Z8TRiUVqHogVEVelU+1hO3Vm6Mzjh386tXw==", "dev": true, "engines": { "node": ">=18.12.0", diff --git a/package.json b/package.json index e8f71cd..dc160e9 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "devDependencies": { "@seamapi/nextlove-sdk-generator": "1.14.4", - "@seamapi/types": "1.253.0", + "@seamapi/types": "1.258.2", "del": "^7.1.0", "prettier": "^3.2.5" }