-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add method to generate a Contact
from an Email
#663
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose/content of _product_metadata()
wasn't immediate without comment, but everything looks good 💯
ctms/schemas/contact.py
Outdated
return by_product | ||
|
||
|
||
def _product_metadata(subscriptions_by_product): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a comment may help here, at least explaining that we pick the latest product from the subscription dict values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leplatrem ended up going in a pretty different direction for these functions, so retagging you for review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! The comments definitely helped 🙏
Adds a
ContactSchema.from_email
method so that we can consolidate that logic (that is, generating aContact
from anEmail
object) in one place.