Sha256: ba52c34c32b2ead73386bf88557f8bf19fc16d901c9dae8b80d76d77b70a4a1e

Contents?: true

Size: 1.09 KB

Versions: 5

Compression:

Stored size: 1.09 KB

Contents

# frozen_string_literal: true

module Seam
  module Clients
    class Devices < BaseClient
      def list(params = {})
        request_seam_object(
          :get,
          "/devices/list",
          Seam::Device,
          "devices",
          params: params
        )
      end

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

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
seamapi-1.14.0 lib/seam/clients/devices.rb
seamapi-1.13.0 lib/seam/clients/devices.rb
seamapi-1.12.1 lib/seam/clients/devices.rb
seamapi-1.12.0 lib/seam/clients/devices.rb
seamapi-1.11.2 lib/seam/clients/devices.rb