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

Push email with a template #135

Open
paulsUsername opened this issue Apr 30, 2024 · 1 comment
Open

Push email with a template #135

paulsUsername opened this issue Apr 30, 2024 · 1 comment

Comments

@paulsUsername
Copy link

I am not seeing anywhere to send a push targeting an email template. From the docs I can see it should be something like this:

"message": {
        "template": {
         "template_id": "b740afd6-36my-email-template",
         "fields": {
            "title": "Test Title",
            "description": "This a description",
            "map": "xxx",
            "recording": "xxx",
            "distance": "xxx",
            "elevation": "xxx",
            "elapsed_time": "xxx",
         }
      }
    }

In email payload I just see this:

```
 def email(bypass_opt_in_level: nil, html_body: nil, message_type: required('message_type'),
            plaintext_body: required('plaintext_body'), reply_to: required('reply_to'),
            sender_address: required('sender_address'), sender_name: required('sender_name'),
            subject: required('subject'))
    fail ArgumentError, 'Message type must not be nil' if message_type.nil?
    fail ArgumentError, 'Plaintext Body must not be nil' if plaintext_body.nil?
    fail ArgumentError, 'Reply To must not be nil' if reply_to.nil?
    fail ArgumentError, 'Sender address must not be nil' if sender_address.nil?
    fail ArgumentError, 'Sender name must not be nil' if sender_name.nil?
    fail ArgumentError, 'Subject must not be nil' if subject.nil?
    compact_helper({
        bypass_opt_in_level: bypass_opt_in_level,
        html_body: html_body,
        message_type: message_type,
        plaintext_body: plaintext_body,
        reply_to: reply_to,
        sender_address: sender_address,
        sender_name: sender_name,
        subject: subject
      })
  end
@Jahdeh
Copy link
Contributor

Jahdeh commented May 15, 2024

There are some areas of email that aren't currently supported by the Ruby library, and it's possible we haven't gotten to this yet.

We do have an email notification class which does allow you to add a template ID, though its usage as far as the docs are concerned are mainly for create and send. I personally haven't tested it for anything else, but we do have plans to upgrade multiple areas of the Ruby library which likely includes email. When we get to that point we'll make sure this use case is supported.

Thanks for reporting this!

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

2 participants