Skip to content

Substitutions allow non-strings for values #232

@tylerreinhart

Description

@tylerreinhart

Issue Summary

API only allows strings for substitution values. This library will allow substitutions of non-strings and will fail on send attempt.

Steps to Reproduce

  1. message = Mail()
  2. personalization = Personalization()
  3. personalization.add_to(Email('test@email.com'))
  4. personalization.add_substitution(Substitution('-test-, 1))
  5. message.add_personalization(personalization)
  6. sg.client.mail.send.post(request_body=message.get()) 400 returned because of int in substitution json

Should an error be thrown when attempting to create a non-string substitution?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions