Last active
May 27, 2020 03:23
-
-
Save pedroveras/846c3cb4f4dd6e8e9e7544d195ebe9ff 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
@AllArgsConstructor | |
public class SegmentRule implements Rule { | |
private Rule nextRule; | |
@Override | |
public boolean validate(Client client) { | |
if (client.getSegment().equals(CashbackParams.SEGMENT)) { | |
return nextRule.validate(client); | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment