mailjet / mailjet-gem

[API v3] Mailjet official Ruby GEM
https://dev.mailjet.com
Other
130 stars 72 forks source link

:segmentation_id not working on Newsletter update #124

Closed neolyte closed 3 years ago

neolyte commented 6 years ago

When updating a newsletter campaign, the attribute :segmentation_id does not get passed (the segment stays the same)

For example:

campaign = Mailjet::Newsletter.find(id) campaign.update_attributes(segmentation_id: new_id)

does not work.

The hack is to pass "SegmentationID" as such campaign.update_attributes("SegmentationID": new_id)

Can we please add :segmentation_id to the resourceprop here https://github.com/mailjet/mailjet-gem/blob/master/lib/mailjet/resources/newsletter.rb ?

Thanks

xab3r commented 3 years ago

Fixed in v1.6.0