2010-11-08 07:21:31 -05:00
|
|
|
module Fog
|
2011-06-16 19:28:54 -04:00
|
|
|
module Compute
|
|
|
|
class Brightbox
|
2010-11-08 07:21:31 -05:00
|
|
|
class Real
|
2012-11-15 08:48:32 -05:00
|
|
|
# Get full details of the account.
|
2012-11-02 06:31:27 -04:00
|
|
|
#
|
2012-11-15 08:48:32 -05:00
|
|
|
# @overload get_account(identifier)
|
|
|
|
# @param [String] identifier Unique reference to identify the resource
|
2012-11-02 06:31:27 -04:00
|
|
|
#
|
2012-11-15 08:48:32 -05:00
|
|
|
# @overload get_account()
|
|
|
|
# @deprecated Use {Fog::Compute::Brightbox::Real#get_scoped_account} instead
|
2012-11-02 06:31:27 -04:00
|
|
|
#
|
2013-05-14 07:02:24 -04:00
|
|
|
# @return [Hash] if successful Hash version of JSON object
|
2012-11-02 06:31:27 -04:00
|
|
|
#
|
2012-11-15 08:48:32 -05:00
|
|
|
# @see https://api.gb1.brightbox.com/1.0/#account_get_account
|
2012-11-02 06:31:27 -04:00
|
|
|
#
|
2012-10-02 09:17:04 -04:00
|
|
|
def get_account(identifier = nil)
|
|
|
|
if identifier.nil? || identifier.empty?
|
2012-11-02 06:31:27 -04:00
|
|
|
Fog::Logger.deprecation("get_account() without a parameter is deprecated, use get_scoped_account instead [light_black](#{caller.first})[/]")
|
|
|
|
get_scoped_account
|
2012-10-02 09:17:04 -04:00
|
|
|
else
|
2012-12-18 10:00:26 -05:00
|
|
|
wrapped_request("get", "/1.0/accounts/#{identifier}", [200])
|
2012-10-02 09:17:04 -04:00
|
|
|
end
|
2010-11-08 07:21:31 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2012-10-02 09:17:04 -04:00
|
|
|
end
|