Class: SendGrid4r::CLI::Suppressions::GroupUnsubscribe
Overview
SendGrid Web API v3 Suppressions GroupUnsubscribe
Instance Method Summary
collapse
#initialize
Instance Method Details
#add ⇒ Object
10
11
12
13
14
|
# File 'lib/sendgrid4r/cli/suppressions/group_unsubscribe.rb', line 10
def add
puts @client.post_suppressed_emails(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#list ⇒ Object
18
19
20
21
22
|
# File 'lib/sendgrid4r/cli/suppressions/group_unsubscribe.rb', line 18
def list
puts @client.get_suppressed_emails(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|
#remove ⇒ Object
27
28
29
30
31
|
# File 'lib/sendgrid4r/cli/suppressions/group_unsubscribe.rb', line 27
def remove
@client.delete_suppressed_email(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
puts e.inspect
end
|