class Morpheus::LicenseInterface
Public Instance Methods
get()
click to toggle source
# File lib/morpheus/api/license_interface.rb, line 5 def get() url = "#{@base_url}/api/license" headers = { params: {}, authorization: "Bearer #{@access_token}" } execute(method: :get, url: url, headers: headers) end
install(key)
click to toggle source
# File lib/morpheus/api/license_interface.rb, line 11 def install(key) url = "#{@base_url}/api/license" headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } payload = {license: key} execute(method: :post, url: url, headers: headers, payload: payload.to_json) end
test(key)
click to toggle source
# File lib/morpheus/api/license_interface.rb, line 18 def test(key) # use /test instead, since 4.1.1 url = "#{@base_url}/api/license/decode" headers = { :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } payload = {license: key} execute(method: :post, url: url, headers: headers, payload: payload.to_json) end
uninstall(params={})
click to toggle source
# File lib/morpheus/api/license_interface.rb, line 26 def uninstall(params={}) url = "#{@base_url}/api/license" headers = { :params => params, :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' } execute(method: :delete, url: url, headers: headers) end