Last active
December 30, 2015 03:49
-
-
Save laspluviosillas/7772119 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ContentProviderCalculator | |
def calculate(commissionable) | |
olei = # find olei content provider | |
olec = # find olec content provider | |
content_amount = commissionable.subtotal * .2 # 20% goes to content providers | |
if commissionable.premium? | |
# create commission for olei of 66.7% of content_amount | |
# create commission for olec of 33.3% of content_amount | |
else | |
# create commission for olei for content_amount | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment