3 ms·
What about doing it like this in Ruby: collection = Braintree::Transaction.search do order_id /^a2d/ customer_website /\.com$/ billing_fi
by kjbekkelund 16y ago
What about doing it like this in Ruby:
collection = Braintree::Transaction.search do
order_id /^a2d/
customer_website /\.com$/
billing_first_name "John"
status :authorized, :settled
amount 10..20
end
collection.each do
puts id
end
It might be more difficult not having the specific methods (in, starts_with_ ends_with, and so on), but I think it's quite readable. If we don't want the regexps, we could go for a MySQL style '%.com' and 'a2d%' or something similar.
- koenigdavidmj 16y agoThey said above that they were turning the conditions into XML in the request. That's one of the reasons why C# expression trees were out.