Module: Closeio::Client::EmailTemplate

Included in:
Closeio::Client
Defined in:
lib/closeio/resources/email_template.rb

Instance Method Summary collapse

Instance Method Details

#create_email_template(_id, options = {}) ⇒ Object



24
25
26
# File 'lib/closeio/resources/email_template.rb', line 24

def create_email_template(_id, options = {})
  post(email_template_path, options)
end

#delete_email_template(id) ⇒ Object



32
33
34
# File 'lib/closeio/resources/email_template.rb', line 32

def delete_email_template(id)
  delete("#{email_template_path}#{id}/")
end

#find_email_template(id) ⇒ Object



12
13
14
# File 'lib/closeio/resources/email_template.rb', line 12

def find_email_template(id)
  get("#{email_template_path}#{id}/")
end

#list_email_templates(params = {}, paginate = false) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/closeio/resources/email_template.rb', line 4

def list_email_templates(params = {}, paginate = false)
  if paginate
    paginate(email_template_path, params)
  else
    get(email_template_path, params)
  end
end

#render_email_templates(id, params = {}, paginate = false) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/closeio/resources/email_template.rb', line 16

def render_email_templates(id, params = {}, paginate = false)
  if paginate
    paginate("email_template/#{id}/", params)
  else
    get("email_template/#{id}/render/", params)
  end
end

#update_email_template(id, options = {}) ⇒ Object



28
29
30
# File 'lib/closeio/resources/email_template.rb', line 28

def update_email_template(id, options = {})
  put("#{email_template_path}#{id}/", options)
end