class Morpheus::ProvisionTypesInterface

Public Instance Methods

get(options=nil) click to toggle source
# File lib/morpheus/api/provision_types_interface.rb, line 11
def get(options=nil)
  url = "#{@base_url}/api/provision-types"
  headers = { params: {}, authorization: "Bearer #{@access_token}" }

  if options.is_a?(Hash)
    headers[:params].merge!(options)
  elsif options.is_a?(Numeric)
    url = "#{@base_url}/api/provision-types/#{options}"
  elsif options.is_a?(String)
    headers[:params]['name'] = options
  end
  execute(method: :get, url: url, headers: headers)
end
list(params={}) click to toggle source
# File lib/morpheus/api/provision_types_interface.rb, line 5
def list(params={})
  url = "#{@base_url}/api/provision-types"
  headers = { params: params, authorization: "Bearer #{@access_token}" }
  execute(method: :get, url: url, headers: headers)
end