Class: LabClient::Licenses

Inherits:
Common
  • Object
show all
Defined in:
lib/labclient/license/add.rb,
lib/labclient/license/list.rb,
lib/labclient/license/delete.rb

Overview

Specifics

Constant Summary

Constants included from AccessLevel

AccessLevel::HUMAN_ACCESS_LEVELS, AccessLevel::MACHINE_ACCESS_LEVELS

Instance Attribute Summary

Attributes inherited from Common

#client

Instance Method Summary collapse

Methods inherited from Common

#api_methods, #api_methods_help, #format_id, #format_query_id, #format_query_ids, #format_time?, #group_name, #help, #initialize, #inspect, #klass, #protected_query_access_level, #query_access_level, #query_format_time

Methods included from Docs

#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title

Methods included from AccessLevel

#human_access_level, #human_protected_access_level, #machine_access_level, #machine_protected_access_level

Constructor Details

This class inherits a constructor from LabClient::Common

Instance Method Details

#add(obj) ⇒ Object

Get current license



17
18
19
# File 'lib/labclient/license/add.rb', line 17

def add(obj)
  client.request(:post, 'license', License, license: obj)
end

#currentObject

Get current license



63
64
65
# File 'lib/labclient/license/list.rb', line 63

def current
  client.request(:get, 'license', License)
end

#delete(license_id) ⇒ Object

Remove current license



13
14
15
# File 'lib/labclient/license/delete.rb', line 13

def delete(license_id)
  client.request(:delete, "license/#{license_id}")
end

#listObject



67
68
69
# File 'lib/labclient/license/list.rb', line 67

def list
  client.request(:get, 'licenses', License)
end