Skip to content

Instantly share code, notes, and snippets.

@skihero
Created October 3, 2012 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skihero/3829298 to your computer and use it in GitHub Desktop.
Save skihero/3829298 to your computer and use it in GitHub Desktop.
Get costs of hardware using softlayer api
get '/costs' do
begin
account_service = SoftLayer::Service.new("SoftLayer_Account")
costs= account_service.object_mask({"hardware" => ["id", "hostname","notes", "cost"]}).getHardware
rescue
@error = "Error fetching cost details !! "
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment