Class: Seam::Clients::DevicesUnmanaged

Inherits:
BaseClient
  • Object
show all
Defined in:
lib/seam/clients/devices_unmanaged.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
# File 'lib/seam/clients/devices_unmanaged.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(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, device_ids: nil, device_types: nil, exclude_if: nil, include_if: nil, limit: nil, manufacturer: nil, user_identifier_key: nil) ⇒ Object



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

def list(connect_webview_id: nil, connected_account_id: nil, connected_account_ids: nil, created_before: nil, custom_metadata_has: nil, device_ids: nil, device_types: nil, exclude_if: nil, include_if: nil, limit: nil, manufacturer: nil, user_identifier_key: nil)
  request_seam_object(
    :post,
    "/devices/unmanaged/list",
    Seam::UnmanagedDevice,
    "devices",
    body: {connect_webview_id: connect_webview_id, connected_account_id: , connected_account_ids: , created_before: created_before, custom_metadata_has: , device_ids: device_ids, device_types: device_types, exclude_if: exclude_if, include_if: include_if, limit: limit, manufacturer: manufacturer, user_identifier_key: user_identifier_key}.compact
  )
end

#update(device_id:, is_managed:) ⇒ Object



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

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

  nil
end