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

  1. Fork it ( https://github.com/moip/api-filters/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request