Black Thursday is a system that is able to load, parse, search, and execute business intelligence queries against the data from a typical e-commerece business in Ruby.
0
stars
0
forks
source link
Business Intelligence - Find out whether or not a given invoice is paid in full #64
Our marketing team is asking for better data about of our customer base to launch a new project and have the following requirements:
Find out whether or not a given invoice is paid in full:
invoice.transactions.map(&:result) #=> ["failed", "success"]
invoice.is_paid_in_full? #=> true
invoice.transactions.map(&:result) #=> ["failed", "failed"]
invoice.is_paid_in_full? #=> false
Note: Returns true if at least one of the associated transactions' result is "success".
https://github.com/turingschool/curriculum/blob/master/source/projects/black_thursday/iteration_5.markdown