struct Mailjet::Contact::Managecontactlists

Overview

Manage the presence and subscription status of a contact for multiple contact lists. Select the contact lists, as well as the desired action to be performed on each one - add, remove or unsub. The contact should already be present in the global contact list.

https://dev.mailjet.com/email/reference/contacts/subscriptions#v3_post_contact_contact_ID_managecontactslists

Defined in:

mailjet/resources/contact/managecontactlists.cr

Class Method Summary

Instance methods inherited from struct Mailjet::Resource

initialize initialize

Constructor methods inherited from struct Mailjet::Resource

new new

Class Method Detail

def self.create(contact_id : ResourceId, contacts_lists : Array) #

Manage the presence and subscription status of a contact for multiple contact lists.

contact_lists = Mailjet::Contact::Managecontactlists.create(54321987, [
  {list_id: 23847, action: "addnoforce"},
  {list_id: 26484, action: "addforce"},
])
puts contact_lists.first.list_id
# => 23847

[View source]