Skip to content

Commit fbe2e38

Browse files
authored
Pass extra params with #find (#262)
Pass extra params with #find
1 parent 83cef17 commit fbe2e38

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/intercom/api_operations/find.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ def find(params)
55
raise BadRequestError, "#{self}#find takes a hash as its parameter but you supplied #{params.inspect}" unless params.is_a? Hash
66
collection_name = Utils.resource_class_to_collection_name(collection_class)
77
if params[:id]
8-
response = @client.get("/#{collection_name}/#{params[:id]}", {})
8+
id = params.delete(:id)
9+
response = @client.get("/#{collection_name}/#{id}", params)
910
else
1011
response = @client.get("/#{collection_name}", params)
1112
end

0 commit comments

Comments
 (0)