Class: SendGrid4r::CLI::Suppressions::Group
Overview
SendGrid Web API v3 Suppressions Group
Instance Method Summary
collapse
#initialize
Instance Method Details
#create ⇒ Object
11
12
13
14
15
|
# File 'lib/sendgrid4r/cli/suppressions/group.rb', line 11
def create
puts @client.post_group(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#delete ⇒ Object
49
50
51
52
53
|
# File 'lib/sendgrid4r/cli/suppressions/group.rb', line 49
def delete
puts @client.delete_group(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#get ⇒ Object
26
27
28
29
30
|
# File 'lib/sendgrid4r/cli/suppressions/group.rb', line 26
def get
puts @client.get_group(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#list ⇒ Object
18
19
20
21
22
|
# File 'lib/sendgrid4r/cli/suppressions/group.rb', line 18
def list
puts @client.get_groups
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#update ⇒ Object
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/sendgrid4r/cli/suppressions/group.rb', line 36
def update
group = parameterise(options)
group.delete(:group_id)
puts @client.patch_group(
group_id: options[:group_id],
group: group
)
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|