Skip to content

Instantly share code, notes, and snippets.

@pedroveras
Created May 27, 2020 03:25
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/588a8422eea3f0ed76c18f2bf0398886 to your computer and use it in GitHub Desktop.
Save pedroveras/588a8422eea3f0ed76c18f2bf0398886 to your computer and use it in GitHub Desktop.
@AllArgsConstructor
public class TimeAsClientRule implements Rule {
@Override
public boolean validate(Client client) {
return client.getClientSince().plusYears(CashbackParams.TIME_AS_CLIENT)
.isBefore(LocalDateTime.now());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment