Class: Seam::Clients::Devices

Inherits:
BaseClient show all
Defined in:
lib/seam/clients/devices.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

#get(device_id = nil, name: nil) ⇒ Object



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

def get(device_id = nil, name: nil)
  request_seam_object(
    :post,
    "/devices/get",
    Seam::Device,
    "device",
    body: {device_id: device_id, name: name}.compact
  )
end

#list(body = {}) ⇒ Object



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

def list(body = {})
  request_seam_object(
    :post,
    "/devices/list",
    Seam::Device,
    "devices",
    body: body
  )
end

#list_device_providers(body = {}) ⇒ Object



39
40
41
42
43
44
45
46
47
# File 'lib/seam/clients/devices.rb', line 39

def list_device_providers(body = {})
  request_seam_object(
    :post,
    "/devices/list_device_providers",
    Seam::DeviceProvider,
    "device_providers",
    body: body
  )
end

#update(device_id: nil, is_managed: nil, name: nil, properties: nil) ⇒ Object



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

def update(device_id: nil, is_managed: nil, name: nil, properties: nil)
  request_seam(
    :post,
    "/devices/update",
    body: {
      device_id: device_id,
      is_managed: is_managed,
      name: name,
      properties: properties
    }.compact
  )
end