Class: SendGrid4r::CLI::Ipam::Whitelist

Inherits:
SgThor
  • Object
show all
Defined in:
lib/sendgrid4r/cli/ipam/whitelist.rb

Overview

SendGrid Web API v3 Ipam Whitelist

Instance Method Summary collapse

Methods inherited from SgThor

#initialize

Constructor Details

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

Instance Method Details

#addObject



16
17
18
19
20
# File 'lib/sendgrid4r/cli/ipam/whitelist.rb', line 16

def add
  puts @client.post_whitelisted_ips(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
  puts e.inspect
end

#deleteObject



24
25
26
27
28
# File 'lib/sendgrid4r/cli/ipam/whitelist.rb', line 24

def delete
  puts @client.delete_whitelisted_ips(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
  puts e.inspect
end

#getObject



32
33
34
35
36
# File 'lib/sendgrid4r/cli/ipam/whitelist.rb', line 32

def get
  puts @client.get_whitelisted_ip(parameterise(options))
rescue RestClient::ExceptionWithResponse => e
  puts e.inspect
end

#listObject



8
9
10
11
12
# File 'lib/sendgrid4r/cli/ipam/whitelist.rb', line 8

def list
  puts @client.get_whitelisted_ips
rescue RestClient::ExceptionWithResponse => e
  puts e.inspect
end