0

In my Ruby on Rails website, whenever user signup, they are automatically added to the mailing list. There is an option where user can update his/her email address. And I am trying to use Gibbon gem to make API calls to MailChimp, but unsure how to update email address of the already subscribed user.

I found this documentation from MailChimp which states it is possible to update: https://developer.mailchimp.com/documentation/mailchimp/reference/lists/members/#edit-patch_lists_list_id_members_subscriber_hash

But the example is given in curl, can anyone guide how to use Gibbon gem in RoR to implement the same?

Appreciate any input.

  • As per the API, the closest transformed method in the gem is `gibbon.lists(list_id).members(lower_case_md5_hashed_email_address).upsert(body: {email_address: "foo@bar.com", status: "subscribed", merge_fields: {FNAME: "First Name", LNAME: "Last Name"}})` – Kedarnag Mukanahallipatna Sep 19 '18 at 04:38
  • @KedarnagMukanahallipatna: It helped, thanks. – Shyam Kirubha Sep 27 '18 at 04:51

1 Answers1

0

Can you check this video is about gem 'gibbon' connect your ruby on rails app users to your mailchimp account list step by step https://www.youtube.com/watch?v=IY8v3MQoU3g&t=3s Let me know if you have any question about it!

nourza
  • 2,215
  • 2
  • 16
  • 42