Api::Filters
This gem is based on Moip API experience for specific reports. This GEM convert a URI parameters em SQL Query to execute in your Database.
Installation
Add this line to your application's Gemfile:
gem 'api-filters'
And then execute:
$ bundle
Or install it yourself as:
$ gem install api-filters
Usage
Supported clauses
- In (in)
- Greater Equal Than (ge)
- Greater Than (gt)
- Lower Equal Than (le)
- Lower Than (lt)
- Between (bt)
filters=status::in(WAITING)|paymentMethod::in(CREDIT_CARD)|amount::ge(100)|amount::le(30000)
Contributing
- Fork it ( https://github.com/moip/api-filters/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request