Class: Seam::Clients::UnmanagedDevices

Inherits:
BaseClient
  • Object
show all
Defined in:
lib/seam/clients/unmanaged_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



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

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

#list(body = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/seam/clients/unmanaged_devices.rb', line 19

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

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



29
30
31
32
33
34
35
36
37
38
# File 'lib/seam/clients/unmanaged_devices.rb', line 29

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