class Iterable::Templates

Interact with /templates API endpoints

@example Creating templates endpoint object

# With default config
templates = Iterable::Templates.new
templates.all

# With custom config
conf = Iterable::Config.new(token: 'new-token')
templates = Iterable::Templates.new(config)

Constants

TYPES

Template types

Public Instance Methods

all(params = {}) click to toggle source

Get all templates

@return [Iterable::Response] A response object

# File lib/iterable/templates.rb, line 28
def all(params = {})
  Iterable.request(conf, '/templates', params).get
end
for_client_template_id(client_template_id) click to toggle source
# File lib/iterable/templates.rb, line 32
def for_client_template_id(client_template_id)
  params = { clientTemplateId: client_template_id }
  Iterable.request(conf, '/templates/getByClientTemplateId', params).get
end