lib/3scale/api/client.rb in 3scale-api-0.5.0 vs lib/3scale/api/client.rb in 3scale-api-0.6.0
- old
+ new
@@ -51,11 +51,16 @@
# @api public
# @return [Hash]
# @param [Fixnum] id Application ID
# @param [String] user_key Application User Key
# @param [String] application_id Application app_id
- def find_application(id: nil, user_key: nil, application_id: nil)
- params = { application_id: id, user_key: user_key, app_id: application_id }.reject { |_, value| value.nil? }
+ def find_application(id: nil, user_key: nil, application_id: nil, service_id: nil)
+ params = {
+ application_id: id,
+ user_key: user_key,
+ app_id: application_id,
+ service_id: service_id,
+ }.compact
response = http_client.get('/admin/api/applications/find', params: params)
extract(entity: 'application', from: response)
end
# @api public