Let's clean up the Ruby example a bit, shall we?
collection = Braintree::Transaction.search do
order_id.begins_with? "a2d"
customer_website.ends_with? ".com"
billing_first_name == "John"
status.in? Status::Authorized, Status::Settled
amount.between? "10.00", "20.00"
end
collection.each do |transaction|
puts transaction.id
end