Class: Listmonk::Resources::Templates

Inherits:
Listmonk::Resource show all
Defined in:
lib/listmonk/resources/templates.rb

Instance Method Summary collapse

Methods inherited from Listmonk::Resource

#initialize

Constructor Details

This class inherits a constructor from Listmonk::Resource

Instance Method Details

#create(**attributes) ⇒ Object



7
# File 'lib/listmonk/resources/templates.rb', line 7

def create(**attributes) = post("templates", attributes)

#delete(id) ⇒ Object



10
# File 'lib/listmonk/resources/templates.rb', line 10

def delete(id) = delete_request("templates/#{segment(id)}")

#list(**params) ⇒ Object



6
# File 'lib/listmonk/resources/templates.rb', line 6

def list(**params) = get("templates", params)

#preview(**attributes) ⇒ Object



11
# File 'lib/listmonk/resources/templates.rb', line 11

def preview(**attributes) = post("templates/preview", attributes)

#preview_by_id(id) ⇒ Object



12
# File 'lib/listmonk/resources/templates.rb', line 12

def preview_by_id(id) = get("templates/#{segment(id)}/preview")

#retrieve(id) ⇒ Object



8
# File 'lib/listmonk/resources/templates.rb', line 8

def retrieve(id) = get("templates/#{segment(id)}")

#set_default(id) ⇒ Object



13
# File 'lib/listmonk/resources/templates.rb', line 13

def set_default(id) = put("templates/#{segment(id)}/default")

#update(id, **attributes) ⇒ Object



9
# File 'lib/listmonk/resources/templates.rb', line 9

def update(id, **attributes) = put("templates/#{segment(id)}", attributes)