lib/fog/cloudstack/requests/compute/update_resource_limit.rb in fog-1.23.0 vs lib/fog/cloudstack/requests/compute/update_resource_limit.rb in fog-1.24.0

- old
+ new

@@ -3,15 +3,19 @@ class Cloudstack class Real # Updates resource limits for an account or domain. # - # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.3/root_admin/updateResourceLimit.html] - def update_resource_limit(resourcetype, options={}) - options.merge!( - 'command' => 'updateResourceLimit', - 'resourcetype' => resourcetype - ) + # {CloudStack API Reference}[http://cloudstack.apache.org/docs/api/apidocs-4.4/root_admin/updateResourceLimit.html] + def update_resource_limit(*args) + options = {} + if args[0].is_a? Hash + options = args[0] + options.merge!('command' => 'updateResourceLimit') + else + options.merge!('command' => 'updateResourceLimit', + 'resourcetype' => args[0]) + end request(options) end end end