Forked from iulianp360/gist:c129f3d2a3e7e2a6227a
Last active
August 29, 2015 14:05
-
-
Save iulianu/1f08f90eb4e3984ad83a to your computer and use it in GitHub Desktop.
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
sealed trait ContextDescription { | |
def value: String | |
} | |
final case class EmailContext(value: String) extends ContextDescription | |
final case class MobileContext(value: String) extends ContextDescription | |
// ... | |
Seq(EmailContext(email), MobileContext(mobile)). | |
filter(_.value.nonEmpty). | |
map( context => | |
LocalPersonContext( | |
transaction.upload.identityId, | |
context, | |
line, | |
existingOrCurrentTimestamp(signupDate) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment