struct Mailjet::Contactlist

Overview

Contact List objects help you organize your contacts into lists. Every time you send a campaign you must select a recipient contact list. Segmentation can help you target a portion of that list.

https://dev.mailjet.com/email/reference/contacts/contact-list/

Defined in:

mailjet/resources/contactlist.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.all(query : Hash | NamedTuple = Hash(String, String).new, params : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new) #

Find all contact lists

response = Mailjet::Contactlist.all
contactlists = response.data

[View source]
def self.create(payload : Hash | NamedTuple, params : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new) #

Create a contactlist

contactlist = Mailjet::Contactlist.create({
  name: "New name",
})

[View source]
def self.delete(id : ResourceId, client : Client = Client.new) #

Delete a contactlist

Mailjet::Contactlist.delete(123456789)

[View source]
def self.find(params : Hash | NamedTuple = Hash(String, String).new, query : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new) #

Find a contactlist

contactlist = Mailjet::Contactlist.find(123456789)

[View source]
def self.find(id : ResourceId, query : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new) #

Find a contactlist

contactlist = Mailjet::Contactlist.find(123456789)

[View source]
def self.update(params : Hash | NamedTuple = Hash(String, String).new, payload : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new) #

Update a contactlist

contactlist = Mailjet::Contactlist.update(123456789, {
  name: "New name",
})

[View source]
def self.update(id : ResourceId, payload : Hash | NamedTuple = Hash(String, String).new, client : Client = Client.new) #

Update a contactlist

contactlist = Mailjet::Contactlist.update(123456789, {
  name: "New name",
})

[View source]