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

Bounce Class Constants #156

Open
deelawn opened this issue Jul 15, 2020 · 0 comments
Open

Bounce Class Constants #156

deelawn opened this issue Jul 15, 2020 · 0 comments

Comments

@deelawn
Copy link
Contributor

deelawn commented Jul 15, 2020

The goal of the below description is to define the date from the following package inside the events directory, perhaps in a file named bounce_class.go. It should contain the information defined here: https://www.sparkpost.com/docs/deliverability/bounce-classification-codes/?_ga=2.267685964.391106097.1594834092-1755179861.1592932304

It would be nice to have the bounce class codes defined as constants such as UndeterminedBounceClass="1", InvalidRecipientBounceClass="10", etc. It'd also be nice to have a type called BounceClassAttributes that is a struct with two fields, Description and Category. Category would be a newly defined type, BounceCategory. Then a map could be defined that has a key of the bounce class code and a value of type BounceClassAttributres.

I'm not sure if it would be wise to make BounceClass its own type, since users are currently using this as a string type and modifying this would break any existing code someone has written where they (for whatever reason) assign a string value to BounceClass where that string value is not a valid bounce class code.

This would be helpful to me, so I can implement it if this is something that would be accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant