Class: SendGrid4r::CLI::Templates::Template
- Inherits:
-
SgThor
- Object
- Thor
- SgThor
- SendGrid4r::CLI::Templates::Template
show all
- Defined in:
- lib/sendgrid4r/cli/templates/template.rb
Overview
SendGrid Web API v3 Templates
Instance Method Summary
collapse
Methods inherited from SgThor
#initialize
Instance Method Details
#create ⇒ Object
9
10
11
12
13
|
# File 'lib/sendgrid4r/cli/templates/template.rb', line 9
def create
puts @client.post_template(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#delete ⇒ Object
41
42
43
44
45
|
# File 'lib/sendgrid4r/cli/templates/template.rb', line 41
def delete
puts @client.delete_template(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#get ⇒ Object
24
25
26
27
28
|
# File 'lib/sendgrid4r/cli/templates/template.rb', line 24
def get
puts @client.get_template(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#list ⇒ Object
16
17
18
19
20
|
# File 'lib/sendgrid4r/cli/templates/template.rb', line 16
def list
puts @client.get_templates
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#update ⇒ Object
33
34
35
36
37
|
# File 'lib/sendgrid4r/cli/templates/template.rb', line 33
def update
puts @client.patch_template(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|