Sha256: 1d6a6c83da5cc97fe555e024bfc33dc1261c9a6711cf66cfdfd18d764829c071

Contents?: true

Size: 638 Bytes

Versions: 34

Compression:

Stored size: 638 Bytes

Contents

require 'netbox_client_ruby/entity'
require 'netbox_client_ruby/api/dcim/manufacturer'

module NetboxClientRuby
  module DCIM
    class InterfaceOrdering
      attr_reader :value, :label

      def initialize(raw_data)
        @value = raw_data['value']
        @label = raw_data['label']
      end
    end

    class DeviceType
      include Entity

      id id: :id
      deletable true
      path 'dcim/device-types/:id.json'
      creation_path 'dcim/device-types/'
      object_fields(
        manufacturer: proc { |raw_data| Manufacturer.new raw_data['id'] },
        interface_ordering: InterfaceOrdering
      )
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
netbox-client-ruby-0.4.2 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.4.1 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.4.0 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.3.1 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.3.0 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.2.3 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.2.2 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.2.1 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.2.0 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.1.4 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.1.3 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.1.2 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.1.1 lib/netbox_client_ruby/api/dcim/device_type.rb
netbox-client-ruby-0.1.0 lib/netbox_client_ruby/api/dcim/device_type.rb