Last active
May 31, 2019 14:16
-
-
Save mchmielarz/4141bd44744707c057f1c045169750b2 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
@Value | |
@Accessors(fluent = true) | |
public class Payload { | |
private final String body; | |
} | |
@Value | |
@Accessors(fluent = true) | |
public class EmailMessage { | |
private final Email email; | |
private final Payload payload; | |
} | |
public class EmailSender { | |
public SendingResult send(EmailMessage message) { | |
return new SendingResult(doSend(message.email(), message.payload().body())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment