Class: Seam::Clients::NoiseSensorsNoiseThresholds

Inherits:
BaseClient
  • Object
show all
Defined in:
lib/seam/clients/noise_sensors_noise_thresholds.rb

Instance Attribute Summary

Attributes inherited from BaseClient

#client

Instance Method Summary collapse

Methods inherited from BaseClient

#initialize, #request_seam, #request_seam_object

Constructor Details

This class inherits a constructor from Seam::Clients::BaseClient

Instance Method Details

#create(device_id:, ends_daily_at:, starts_daily_at:, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil, sync: nil) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/seam/clients/noise_sensors_noise_thresholds.rb', line 6

def create(device_id:, ends_daily_at:, starts_daily_at:, name: nil, noise_threshold_decibels: nil, noise_threshold_nrs: nil, sync: nil)
  request_seam_object(
    :post,
    "/noise_sensors/noise_thresholds/create",
    Seam::NoiseThreshold,
    "noise_threshold",
    body: {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
  )
end

#delete(device_id:, noise_threshold_id:, sync: nil) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/seam/clients/noise_sensors_noise_thresholds.rb', line 16

def delete(device_id:, noise_threshold_id:, sync: nil)
  request_seam(
    :post,
    "/noise_sensors/noise_thresholds/delete",
    body: {device_id: device_id, noise_threshold_id: noise_threshold_id, sync: sync}.compact
  )

  nil
end

#get(noise_threshold_id:) ⇒ Object



26
27
28
29
30
31
32
33
34
# File 'lib/seam/clients/noise_sensors_noise_thresholds.rb', line 26

def get(noise_threshold_id:)
  request_seam_object(
    :post,
    "/noise_sensors/noise_thresholds/get",
    Seam::NoiseThreshold,
    "noise_threshold",
    body: {noise_threshold_id: noise_threshold_id}.compact
  )
end

#list(device_id:, is_programmed: nil) ⇒ Object



36
37
38
39
40
41
42
43
44
# File 'lib/seam/clients/noise_sensors_noise_thresholds.rb', line 36

def list(device_id:, is_programmed: nil)
  request_seam_object(
    :post,
    "/noise_sensors/noise_thresholds/list",
    Seam::NoiseThreshold,
    "noise_thresholds",
    body: {device_id: device_id, is_programmed: is_programmed}.compact
  )
end

#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) ⇒ Object



46
47
48
49
50
51
52
53
54
# File 'lib/seam/clients/noise_sensors_noise_thresholds.rb', line 46

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)
  request_seam(
    :post,
    "/noise_sensors/noise_thresholds/update",
    body: {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
  )

  nil
end