Skip to content
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

Merged
merged 4 commits into from
May 15, 2023

Conversation

grahamalama
Copy link
Contributor

Adds a ContactSchema.from_email method so that we can consolidate that logic (that is, generating a Contact from an Email object) in one place.

@grahamalama grahamalama requested a review from a team as a code owner May 5, 2023 18:03
@grahamalama grahamalama added the enhancement New feature or request label May 5, 2023
Copy link
Contributor

@leplatrem leplatrem left a 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 💯

return by_product


def _product_metadata(subscriptions_by_product):
Copy link
Contributor

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

Copy link
Contributor Author

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.

@grahamalama grahamalama requested a review from leplatrem May 12, 2023 18:05
Copy link
Contributor

@leplatrem leplatrem left a 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 🙏

@grahamalama grahamalama merged commit 3da16a2 into main May 15, 2023
@grahamalama grahamalama deleted the generate-contact-from-email branch May 15, 2023 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants