Created
March 15, 2015 13:33
-
-
Save JefClaes/2ec6d6168353f099102f to your computer and use it in GitHub Desktop.
Scaling promotion codes I
This file contains hidden or 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
public bool TryRedeem(UserId userId) | |
{ | |
if (HasAlreadyBeenRedeemedByUser(userId)) return false; | |
if (NoLongerActive()) return false; | |
if (Depleted()) return false; | |
Apply(new PromotionCodeRedeemed(userId.Value)); | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment