lib/fog/cloudstack/requests/compute/update_account.rb in fog-1.23.0 vs lib/fog/cloudstack/requests/compute/update_account.rb in fog-1.24.0
- old
+ new
@@ -3,15 +3,19 @@
class Cloudstack
class Real
# Updates account information for the authenticated user
#
- # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/updateAccount.html]
- def update_account(newname, options={})
- options.merge!(
- 'command' => 'updateAccount',
- 'newname' => newname
- )
+ # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateAccount.html]
+ def update_account(*args)
+ options = {}
+ if args[0].is_a? Hash
+ options = args[0]
+ options.merge!('command' => 'updateAccount')
+ else
+ options.merge!('command' => 'updateAccount',
+ 'newname' => args[0])
+ end
request(options)
end
end
end