Skip to content

Instantly share code, notes, and snippets.

@mjallday
Forked from rserna2010/gist:2ebe2fa4f8afc7b113bb
Last active August 29, 2015 14:04
Show Gist options
  • Save mjallday/ea0bbba8642364ee11e1 to your computer and use it in GitHub Desktop.
Save mjallday/ea0bbba8642364ee11e1 to your computer and use it in GitHub Desktop.
Balanced - Filter by meta fields (Ruby)
Find By Email
Balanced::Customer.where(:email => 'jim@gmail.com').all
Find By Meta
Balanced::Debit.where('meta.orderid' => '12345').all
Combo
Balanced::Debit.where('meta.order' => '12345', "status"=>"succeeded").all
Find By Date
Balanced::Debit.where('created_at[>=]'=> '2014-03-10 00:00:00').all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment