diff --git a/lib/seam/routes/clients/access_codes.rb b/lib/seam/routes/clients/access_codes.rb index 95087550..b88e0086 100644 --- a/lib/seam/routes/clients/access_codes.rb +++ b/lib/seam/routes/clients/access_codes.rb @@ -16,8 +16,8 @@ def unmanaged @unmanaged ||= Seam::Clients::AccessCodesUnmanaged.new(client: @client, defaults: @defaults) end - def create(device_id:, allow_external_modification: nil, attempt_for_offline_device: nil, code: nil, common_code_key: nil, ends_at: nil, is_external_modification_allowed: nil, is_offline_access_code: nil, is_one_time_use: nil, max_time_rounding: nil, name: nil, prefer_native_scheduling: nil, preferred_code_length: nil, starts_at: nil, sync: nil, use_backup_access_code_pool: nil, use_offline_access_code: nil) - res = @client.post("/access_codes/create", {device_id: device_id, allow_external_modification: allow_external_modification, attempt_for_offline_device: attempt_for_offline_device, code: code, common_code_key: common_code_key, ends_at: ends_at, is_external_modification_allowed: is_external_modification_allowed, is_offline_access_code: is_offline_access_code, is_one_time_use: is_one_time_use, max_time_rounding: max_time_rounding, name: name, prefer_native_scheduling: prefer_native_scheduling, preferred_code_length: preferred_code_length, starts_at: starts_at, sync: sync, use_backup_access_code_pool: use_backup_access_code_pool, use_offline_access_code: use_offline_access_code}.compact) + def create(device_id:, allow_external_modification: nil, attempt_for_offline_device: nil, code: nil, common_code_key: nil, ends_at: nil, is_external_modification_allowed: nil, is_offline_access_code: nil, is_one_time_use: nil, max_time_rounding: nil, name: nil, prefer_native_scheduling: nil, preferred_code_length: nil, starts_at: nil, use_backup_access_code_pool: nil, use_offline_access_code: nil) + res = @client.post("/access_codes/create", {device_id: device_id, allow_external_modification: allow_external_modification, attempt_for_offline_device: attempt_for_offline_device, code: code, common_code_key: common_code_key, ends_at: ends_at, is_external_modification_allowed: is_external_modification_allowed, is_offline_access_code: is_offline_access_code, is_one_time_use: is_one_time_use, max_time_rounding: max_time_rounding, name: name, prefer_native_scheduling: prefer_native_scheduling, preferred_code_length: preferred_code_length, starts_at: starts_at, use_backup_access_code_pool: use_backup_access_code_pool, use_offline_access_code: use_offline_access_code}.compact) Seam::Resources::AccessCode.load_from_response(res.body["access_code"]) end @@ -28,8 +28,8 @@ def create_multiple(device_ids:, allow_external_modification: nil, attempt_for_o Seam::Resources::AccessCode.load_from_response(res.body["access_codes"]) end - def delete(access_code_id:, device_id: nil, sync: nil) - @client.post("/access_codes/delete", {access_code_id: access_code_id, device_id: device_id, sync: sync}.compact) + def delete(access_code_id:, device_id: nil) + @client.post("/access_codes/delete", {access_code_id: access_code_id, device_id: device_id}.compact) nil end @@ -70,8 +70,8 @@ def report_device_constraints(device_id:, max_code_length: nil, min_code_length: nil end - def update(access_code_id:, allow_external_modification: nil, attempt_for_offline_device: nil, code: nil, device_id: nil, ends_at: nil, is_external_modification_allowed: nil, is_managed: nil, is_offline_access_code: nil, is_one_time_use: nil, max_time_rounding: nil, name: nil, prefer_native_scheduling: nil, preferred_code_length: nil, starts_at: nil, sync: nil, type: nil, use_backup_access_code_pool: nil, use_offline_access_code: nil) - @client.post("/access_codes/update", {access_code_id: access_code_id, allow_external_modification: allow_external_modification, attempt_for_offline_device: attempt_for_offline_device, code: code, device_id: device_id, ends_at: ends_at, is_external_modification_allowed: is_external_modification_allowed, is_managed: is_managed, is_offline_access_code: is_offline_access_code, is_one_time_use: is_one_time_use, max_time_rounding: max_time_rounding, name: name, prefer_native_scheduling: prefer_native_scheduling, preferred_code_length: preferred_code_length, starts_at: starts_at, sync: sync, type: type, use_backup_access_code_pool: use_backup_access_code_pool, use_offline_access_code: use_offline_access_code}.compact) + def update(access_code_id:, allow_external_modification: nil, attempt_for_offline_device: nil, code: nil, device_id: nil, ends_at: nil, is_external_modification_allowed: nil, is_managed: nil, is_offline_access_code: nil, is_one_time_use: nil, max_time_rounding: nil, name: nil, prefer_native_scheduling: nil, preferred_code_length: nil, starts_at: nil, type: nil, use_backup_access_code_pool: nil, use_offline_access_code: nil) + @client.post("/access_codes/update", {access_code_id: access_code_id, allow_external_modification: allow_external_modification, attempt_for_offline_device: attempt_for_offline_device, code: code, device_id: device_id, ends_at: ends_at, is_external_modification_allowed: is_external_modification_allowed, is_managed: is_managed, is_offline_access_code: is_offline_access_code, is_one_time_use: is_one_time_use, max_time_rounding: max_time_rounding, name: name, prefer_native_scheduling: prefer_native_scheduling, preferred_code_length: preferred_code_length, starts_at: starts_at, type: type, use_backup_access_code_pool: use_backup_access_code_pool, use_offline_access_code: use_offline_access_code}.compact) nil end diff --git a/lib/seam/routes/clients/access_codes_unmanaged.rb b/lib/seam/routes/clients/access_codes_unmanaged.rb index e9d01b83..ee1fd78a 100644 --- a/lib/seam/routes/clients/access_codes_unmanaged.rb +++ b/lib/seam/routes/clients/access_codes_unmanaged.rb @@ -8,14 +8,14 @@ def initialize(client:, defaults:) @defaults = defaults end - def convert_to_managed(access_code_id:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil, sync: nil) - @client.post("/access_codes/unmanaged/convert_to_managed", {access_code_id: access_code_id, allow_external_modification: allow_external_modification, force: force, is_external_modification_allowed: is_external_modification_allowed, sync: sync}.compact) + def convert_to_managed(access_code_id:, allow_external_modification: nil, force: nil, is_external_modification_allowed: nil) + @client.post("/access_codes/unmanaged/convert_to_managed", {access_code_id: access_code_id, allow_external_modification: allow_external_modification, force: force, is_external_modification_allowed: is_external_modification_allowed}.compact) nil end - def delete(access_code_id:, sync: nil) - @client.post("/access_codes/unmanaged/delete", {access_code_id: access_code_id, sync: sync}.compact) + def delete(access_code_id:) + @client.post("/access_codes/unmanaged/delete", {access_code_id: access_code_id}.compact) nil end diff --git a/lib/seam/routes/clients/acs_credentials.rb b/lib/seam/routes/clients/acs_credentials.rb index 6820547a..3603531c 100644 --- a/lib/seam/routes/clients/acs_credentials.rb +++ b/lib/seam/routes/clients/acs_credentials.rb @@ -14,8 +14,8 @@ def assign(acs_credential_id:, acs_user_id: nil, user_identity_id: nil) nil end - def create(access_method:, acs_system_id: nil, acs_user_id: nil, allowed_acs_entrance_ids: nil, assa_abloy_vostio_metadata: nil, code: nil, credential_manager_acs_system_id: nil, ends_at: nil, hotek_metadata: nil, is_multi_phone_sync_credential: nil, salto_space_metadata: nil, starts_at: nil, user_identity_id: nil, visionline_metadata: nil) - res = @client.post("/acs/credentials/create", {access_method: access_method, acs_system_id: acs_system_id, acs_user_id: acs_user_id, allowed_acs_entrance_ids: allowed_acs_entrance_ids, assa_abloy_vostio_metadata: assa_abloy_vostio_metadata, code: code, credential_manager_acs_system_id: credential_manager_acs_system_id, ends_at: ends_at, hotek_metadata: hotek_metadata, is_multi_phone_sync_credential: is_multi_phone_sync_credential, salto_space_metadata: salto_space_metadata, starts_at: starts_at, user_identity_id: user_identity_id, visionline_metadata: visionline_metadata}.compact) + def create(access_method:, acs_system_id: nil, acs_user_id: nil, allowed_acs_entrance_ids: nil, assa_abloy_vostio_metadata: nil, code: nil, credential_manager_acs_system_id: nil, ends_at: nil, is_multi_phone_sync_credential: nil, salto_space_metadata: nil, starts_at: nil, user_identity_id: nil, visionline_metadata: nil) + res = @client.post("/acs/credentials/create", {access_method: access_method, acs_system_id: acs_system_id, acs_user_id: acs_user_id, allowed_acs_entrance_ids: allowed_acs_entrance_ids, assa_abloy_vostio_metadata: assa_abloy_vostio_metadata, code: code, credential_manager_acs_system_id: credential_manager_acs_system_id, ends_at: ends_at, is_multi_phone_sync_credential: is_multi_phone_sync_credential, salto_space_metadata: salto_space_metadata, starts_at: starts_at, user_identity_id: user_identity_id, visionline_metadata: visionline_metadata}.compact) Seam::Resources::AcsCredential.load_from_response(res.body["acs_credential"]) end diff --git a/lib/seam/routes/clients/connect_webviews.rb b/lib/seam/routes/clients/connect_webviews.rb index 58222eb2..d45813e0 100644 --- a/lib/seam/routes/clients/connect_webviews.rb +++ b/lib/seam/routes/clients/connect_webviews.rb @@ -8,8 +8,8 @@ def initialize(client:, defaults:) @defaults = defaults end - def create(accepted_capabilities: nil, accepted_providers: nil, automatically_manage_new_devices: nil, custom_metadata: nil, custom_redirect_failure_url: nil, custom_redirect_url: nil, customer_key: nil, device_selection_mode: nil, excluded_providers: nil, provider_category: nil, wait_for_device_creation: nil) - res = @client.post("/connect_webviews/create", {accepted_capabilities: accepted_capabilities, accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, custom_redirect_failure_url: custom_redirect_failure_url, custom_redirect_url: custom_redirect_url, customer_key: customer_key, device_selection_mode: device_selection_mode, excluded_providers: excluded_providers, provider_category: provider_category, wait_for_device_creation: wait_for_device_creation}.compact) + def create(accepted_capabilities: nil, accepted_providers: nil, automatically_manage_new_devices: nil, custom_metadata: nil, custom_redirect_failure_url: nil, custom_redirect_url: nil, customer_key: nil, excluded_providers: nil, provider_category: nil, wait_for_device_creation: nil) + res = @client.post("/connect_webviews/create", {accepted_capabilities: accepted_capabilities, accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_metadata: custom_metadata, custom_redirect_failure_url: custom_redirect_failure_url, custom_redirect_url: custom_redirect_url, customer_key: customer_key, excluded_providers: excluded_providers, provider_category: provider_category, wait_for_device_creation: wait_for_device_creation}.compact) Seam::Resources::ConnectWebview.load_from_response(res.body["connect_webview"]) end diff --git a/lib/seam/routes/clients/connected_accounts.rb b/lib/seam/routes/clients/connected_accounts.rb index 0a4c1b34..c64f622b 100644 --- a/lib/seam/routes/clients/connected_accounts.rb +++ b/lib/seam/routes/clients/connected_accounts.rb @@ -12,8 +12,8 @@ def simulate @simulate ||= Seam::Clients::ConnectedAccountsSimulate.new(client: @client, defaults: @defaults) end - def delete(connected_account_id:, sync: nil) - @client.post("/connected_accounts/delete", {connected_account_id: connected_account_id, sync: sync}.compact) + def delete(connected_account_id:) + @client.post("/connected_accounts/delete", {connected_account_id: connected_account_id}.compact) nil end diff --git a/lib/seam/routes/clients/devices.rb b/lib/seam/routes/clients/devices.rb index 662b7075..b9f055c9 100644 --- a/lib/seam/routes/clients/devices.rb +++ b/lib/seam/routes/clients/devices.rb @@ -22,8 +22,8 @@ def get(device_id: nil, name: nil) Seam::Resources::Device.load_from_response(res.body["device"]) end - 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, exclude_if: nil, include_if: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil) - res = @client.post("/devices/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, exclude_if: exclude_if, include_if: include_if, 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) + 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) + res = @client.post("/devices/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, limit: limit, manufacturer: manufacturer, page_cursor: page_cursor, search: search, space_id: space_id, unstable_location_id: unstable_location_id, user_identifier_key: user_identifier_key}.compact) Seam::Resources::Device.load_from_response(res.body["devices"]) end diff --git a/lib/seam/routes/clients/devices_unmanaged.rb b/lib/seam/routes/clients/devices_unmanaged.rb index 330925f8..a6cbca79 100644 --- a/lib/seam/routes/clients/devices_unmanaged.rb +++ b/lib/seam/routes/clients/devices_unmanaged.rb @@ -14,8 +14,8 @@ def get(device_id: nil, name: nil) Seam::Resources::UnmanagedDevice.load_from_response(res.body["device"]) end - 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, exclude_if: nil, include_if: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil) - res = @client.post("/devices/unmanaged/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, custom_metadata_has: custom_metadata_has, customer_key: customer_key, device_ids: device_ids, device_type: device_type, device_types: device_types, exclude_if: exclude_if, include_if: include_if, 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) + 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) + res = @client.post("/devices/unmanaged/list", {connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, connected_account_ids: connected_account_ids, created_before: created_before, 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) Seam::Resources::UnmanagedDevice.load_from_response(res.body["devices"]) end diff --git a/lib/seam/routes/clients/locks.rb b/lib/seam/routes/clients/locks.rb index e8ebef36..6125db67 100644 --- a/lib/seam/routes/clients/locks.rb +++ b/lib/seam/routes/clients/locks.rb @@ -20,22 +20,22 @@ def get(device_id: nil, name: nil) Seam::Resources::Device.load_from_response(res.body["device"]) end - 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, exclude_if: nil, include_if: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil) - 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, exclude_if: exclude_if, include_if: include_if, 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) + 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) + 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) Seam::Resources::Device.load_from_response(res.body["devices"]) end - def lock_door(device_id:, sync: nil, wait_for_action_attempt: nil) - res = @client.post("/locks/lock_door", {device_id: device_id, sync: sync}.compact) + def lock_door(device_id:, wait_for_action_attempt: nil) + res = @client.post("/locks/lock_door", {device_id: device_id}.compact) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt) end - def unlock_door(device_id:, sync: nil, wait_for_action_attempt: nil) - res = @client.post("/locks/unlock_door", {device_id: device_id, sync: sync}.compact) + def unlock_door(device_id:, wait_for_action_attempt: nil) + res = @client.post("/locks/unlock_door", {device_id: device_id}.compact) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt diff --git a/lib/seam/routes/clients/noise_sensors.rb b/lib/seam/routes/clients/noise_sensors.rb index 146d838a..57796797 100644 --- a/lib/seam/routes/clients/noise_sensors.rb +++ b/lib/seam/routes/clients/noise_sensors.rb @@ -16,8 +16,8 @@ def simulate @simulate ||= Seam::Clients::NoiseSensorsSimulate.new(client: @client, defaults: @defaults) end - 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, exclude_if: nil, include_if: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil) - 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, exclude_if: exclude_if, include_if: include_if, 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) + 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) + 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) Seam::Resources::Device.load_from_response(res.body["devices"]) end diff --git a/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb b/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb index eb4ed627..4e6df9fa 100644 --- a/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb +++ b/lib/seam/routes/clients/noise_sensors_noise_thresholds.rb @@ -8,14 +8,14 @@ def initialize(client:, defaults:) @defaults = defaults end - def create(device_id:, ends_daily_at:, starts_daily_at:, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil, sync: nil) - 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, sync: sync}.compact) + def create(device_id:, ends_daily_at:, starts_daily_at:, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil) + 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) Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_threshold"]) end - def delete(device_id:, noise_threshold_id:, sync: nil) - @client.post("/noise_sensors/noise_thresholds/delete", {device_id: device_id, noise_threshold_id: noise_threshold_id, sync: sync}.compact) + def delete(device_id:, noise_threshold_id:) + @client.post("/noise_sensors/noise_thresholds/delete", {device_id: device_id, noise_threshold_id: noise_threshold_id}.compact) nil end @@ -26,14 +26,14 @@ def get(noise_threshold_id:) Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_threshold"]) end - def list(device_id:, is_programmed: nil) - res = @client.post("/noise_sensors/noise_thresholds/list", {device_id: device_id, is_programmed: is_programmed}.compact) + def list(device_id:) + res = @client.post("/noise_sensors/noise_thresholds/list", {device_id: device_id}.compact) Seam::Resources::NoiseThreshold.load_from_response(res.body["noise_thresholds"]) end - 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, sync: nil) - @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, sync: sync}.compact) + 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) + @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) nil end diff --git a/lib/seam/routes/clients/spaces.rb b/lib/seam/routes/clients/spaces.rb index 3f0d761f..0447a6b6 100644 --- a/lib/seam/routes/clients/spaces.rb +++ b/lib/seam/routes/clients/spaces.rb @@ -44,8 +44,8 @@ def get_related(exclude: nil, include: nil, space_ids: nil, space_keys: nil) Seam::Resources::Batch.load_from_response(res.body["batch"]) end - def list(connected_account_id: nil, customer_key: nil, search: nil, space_key: nil) - res = @client.post("/spaces/list", {connected_account_id: connected_account_id, customer_key: customer_key, search: search, space_key: space_key}.compact) + def list(customer_key: nil, search: nil, space_key: nil) + res = @client.post("/spaces/list", {customer_key: customer_key, search: search, space_key: space_key}.compact) Seam::Resources::Space.load_from_response(res.body["spaces"]) end diff --git a/lib/seam/routes/clients/thermostats.rb b/lib/seam/routes/clients/thermostats.rb index 8eb92a48..b9e153d8 100644 --- a/lib/seam/routes/clients/thermostats.rb +++ b/lib/seam/routes/clients/thermostats.rb @@ -30,8 +30,8 @@ def activate_climate_preset(climate_preset_key:, device_id:, wait_for_action_att Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt) end - def cool(device_id:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, sync: nil, wait_for_action_attempt: nil) - 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, sync: sync}.compact) + def cool(device_id:, cooling_set_point_celsius: nil, cooling_set_point_fahrenheit: nil, wait_for_action_attempt: nil) + 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) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt @@ -50,30 +50,30 @@ def delete_climate_preset(climate_preset_key:, device_id:) nil end - def heat(device_id:, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, sync: nil, wait_for_action_attempt: nil) - 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, sync: sync}.compact) + def heat(device_id:, heating_set_point_celsius: nil, heating_set_point_fahrenheit: nil, wait_for_action_attempt: nil) + 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) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt) end - 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, sync: nil, wait_for_action_attempt: nil) - 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, sync: sync}.compact) + 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) + 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) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt) end - 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, exclude_if: nil, include_if: nil, limit: nil, manufacturer: nil, page_cursor: nil, search: nil, space_id: nil, unstable_location_id: nil, user_identifier_key: nil) - 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, exclude_if: exclude_if, include_if: include_if, 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) + 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) + 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) Seam::Resources::Device.load_from_response(res.body["devices"]) end - def off(device_id:, sync: nil, wait_for_action_attempt: nil) - res = @client.post("/thermostats/off", {device_id: device_id, sync: sync}.compact) + def off(device_id:, wait_for_action_attempt: nil) + res = @client.post("/thermostats/off", {device_id: device_id}.compact) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt @@ -86,8 +86,8 @@ def set_fallback_climate_preset(climate_preset_key:, device_id:) nil end - def set_fan_mode(device_id:, fan_mode: nil, fan_mode_setting: nil, sync: nil, wait_for_action_attempt: nil) - res = @client.post("/thermostats/set_fan_mode", {device_id: device_id, fan_mode: fan_mode, fan_mode_setting: fan_mode_setting, sync: sync}.compact) + def set_fan_mode(device_id:, fan_mode: nil, fan_mode_setting: nil, wait_for_action_attempt: nil) + res = @client.post("/thermostats/set_fan_mode", {device_id: device_id, fan_mode: fan_mode, fan_mode_setting: fan_mode_setting}.compact) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt diff --git a/package-lock.json b/package-lock.json index e22846f1..398070a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "name": "@seamapi/ruby", "devDependencies": { "@seamapi/fake-seam-connect": "1.86.0", - "@seamapi/nextlove-sdk-generator": "^1.19.8", + "@seamapi/nextlove-sdk-generator": "^1.19.10", "@seamapi/types": "1.732.0", "del": "^7.1.0", "markdown-toc": "^1.2.0", @@ -514,9 +514,9 @@ } }, "node_modules/@seamapi/nextlove-sdk-generator": { - "version": "1.19.8", - "resolved": "https://registry.npmjs.org/@seamapi/nextlove-sdk-generator/-/nextlove-sdk-generator-1.19.8.tgz", - "integrity": "sha512-kccnwBM2Gy4EydHBNi2Qic0GKcIc22Fa1vAIS4sxQT+Fn/hlXPad8fvvwWC2rIaLSvw+FG0MSRM7Xi1pfDUukg==", + "version": "1.19.10", + "resolved": "https://registry.npmjs.org/@seamapi/nextlove-sdk-generator/-/nextlove-sdk-generator-1.19.10.tgz", + "integrity": "sha512-1CyU2vXAyOLnv8z2pVHIQ2mqEvFZJUEP9f8vIeEznUVjeUV2g04MDzgzRX5kUyhjstrletsZGNyxk8lGgu/1Yg==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 93c49739..c3871e55 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "devDependencies": { "@seamapi/fake-seam-connect": "1.86.0", - "@seamapi/nextlove-sdk-generator": "^1.19.8", + "@seamapi/nextlove-sdk-generator": "^1.19.10", "@seamapi/types": "1.732.0", "del": "^7.1.0", "markdown-toc": "^1.2.0", diff --git a/spec/clients/connect_webviews_spec.rb b/spec/clients/connect_webviews_spec.rb index 32b6eed3..e04eff8a 100644 --- a/spec/clients/connect_webviews_spec.rb +++ b/spec/clients/connect_webviews_spec.rb @@ -42,7 +42,6 @@ let(:custom_redirect_url) { "http://localhost:3000/success" } let(:custom_redirect_failure_url) { "http://localhost:3000/failure" } let(:automatically_manage_new_devices) { false } - let(:device_selection_mode) { "multiple" } let(:connect_webview_hash) { {connect_webview_id: "123"} } before do @@ -53,8 +52,7 @@ accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_redirect_failure_url: custom_redirect_failure_url, - custom_redirect_url: custom_redirect_url, - device_selection_mode: device_selection_mode + custom_redirect_url: custom_redirect_url }.to_json end end @@ -64,8 +62,7 @@ accepted_providers: accepted_providers, automatically_manage_new_devices: automatically_manage_new_devices, custom_redirect_failure_url: custom_redirect_failure_url, - custom_redirect_url: custom_redirect_url, - device_selection_mode: device_selection_mode + custom_redirect_url: custom_redirect_url ) end