Skip to content

Instantly share code, notes, and snippets.

@pedroveras
Last active May 27, 2020 03:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedroveras/846c3cb4f4dd6e8e9e7544d195ebe9ff to your computer and use it in GitHub Desktop.
Save pedroveras/846c3cb4f4dd6e8e9e7544d195ebe9ff to your computer and use it in GitHub Desktop.
@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