Class: SendGrid4r::CLI::Suppressions::GlobalUnsubscribe

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

Overview

SendGrid Web API v3 Suppressions GlobalUnsubscribe

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



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

#deleteObject



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

#getObject



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

#listObject



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