Class: SendGrid4r::CLI::Suppressions::GlobalUnsubscribe
Overview
SendGrid Web API v3 Suppressions GlobalUnsubscribe
Instance Method Summary
collapse
#initialize
Instance Method Details
#add ⇒ Object
20
21
22
23
24
|
# File 'lib/sendgrid4r/cli/suppressions/global_unsubscribe.rb', line 20
def add
puts @client.post_global_unsubscribes(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#delete ⇒ Object
28
29
30
31
32
|
# File 'lib/sendgrid4r/cli/suppressions/global_unsubscribe.rb', line 28
def delete
puts @client.delete_global_unsubscribe(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#get ⇒ Object
36
37
38
39
40
|
# File 'lib/sendgrid4r/cli/suppressions/global_unsubscribe.rb', line 36
def get
puts @client.get_global_unsubscribe(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#list ⇒ Object
12
13
14
15
16
|
# File 'lib/sendgrid4r/cli/suppressions/global_unsubscribe.rb', line 12
def list
puts @client.get_global_unsubscribes(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|