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

Make Mail helper parameters truly optional #570

Merged
merged 2 commits into from
Jun 7, 2018

Conversation

onecrayon
Copy link
Contributor

Fixes #569

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • n/a I have added tests that prove my fix is effective or that my feature works
  • n/a I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Short description of what this PR does:

  • Mail helper initialization parameters are now optional (all parameters are still required for a successful API call, but they are not silently discarded if one is specified but others are not)

This is a stop-gap measure prior to the Mail helper being rewritten for a future update; the API ultimately returns errors if an element isn't specified regardless, so this makes the initialization a little more flexible (allows specifying a to_email at initialization to take advantage of automatic Personalization creation while still specifying the content later, for instance).

Closes sendgrid#569.

This is a stop-gap measure prior to the Mail helper being rewritten for a future update; the API ultimately returns errors if an element isn't specified regardless, so this makes the initialization a little more flexible (allows specifying a `to_email` at initialization to take advantage of automatic Personalization creation while still specifying the content later, for instance).
@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Apr 16, 2018
@SendGridDX
Copy link

SendGridDX commented Apr 16, 2018

CLA assistant check
All committers have signed the CLA.

@thinkingserious thinkingserious merged commit 03e0679 into sendgrid:master Jun 7, 2018
@thinkingserious
Copy link
Contributor

Hello @onecrayon,

Thanks again for the PR!

We want to show our appreciation by sending you some swag. Could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: code review request requesting a community code review or review from Twilio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mail helper docstring is wrong
3 participants