Class: SendGrid4r::CLI::Ipam::Whitelist
- Inherits:
-
SgThor
- Object
- Thor
- SgThor
- SendGrid4r::CLI::Ipam::Whitelist
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
Instance Method Details
#add ⇒ Object
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
|
#delete ⇒ Object
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
|
#get ⇒ Object
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
|
#list ⇒ Object
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
|