Skip to content

Instantly share code, notes, and snippets.

@jerzyn
Created March 21, 2014 11:14
Show Gist options
  • Save jerzyn/9684027 to your computer and use it in GitHub Desktop.
Save jerzyn/9684027 to your computer and use it in GitHub Desktop.
Example Filter Applications
def filter_applications(domain, provider_key, plan_name, num_of_days)
res = api_call_applications_list(domain, provider_key)
res.each do |item|
res.delete(item) if item["plan_name"] != plan_name
res.delete(item) if item["created_at"] > (DateTime.now - num_of_days)
end
return res
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment