customerio / customerio-ruby

A ruby client for the Customer.io event API.
https://customer.io/docs/api/
MIT License
65 stars 75 forks source link

Not possible to set headers on a SendEmailRequest #98

Open Mange opened 1 year ago

Mange commented 1 year ago

The SendEmailRequest class accepts a headers: option, but the value provided will always be overwritten with an empty hash. See line 10 below:

https://github.com/customerio/customerio-ruby/blob/5f310b8a57b33c8dc1dfdb37b14a8c618980f573/lib/customerio/requests/send_email_request.rb#L7-L11

Is this a typo for ||=?

For now I'll work around it by modifying the returned object directly.