Class: SendGrid4r::CLI::Suppressions::GroupUnsubscribe

Inherits:
SendGrid4r::CLI::SgThor show all
Defined in:
lib/sendgrid4r/cli/suppressions/group_unsubscribe.rb

Overview

SendGrid Web API v3 Suppressions GroupUnsubscribe

Instance Method Summary collapse

Methods inherited from SendGrid4r::CLI::SgThor

#initialize

Constructor Details

This class inherits a constructor from SendGrid4r::CLI::SgThor

Instance Method Details

#addObject



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

#listObject



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

#removeObject



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