Class: SendGrid4r::CLI::Ips::Pool

Inherits:
SgThor
  • Object
show all
Defined in:
lib/sendgrid4r/cli/ips/pool.rb

Overview

SendGrid Web API v3 Ips Pool

Instance Method Summary collapse

Methods inherited from SgThor

#initialize

Constructor Details

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

Instance Method Details

#createObject



9
10
11
12
13
# File 'lib/sendgrid4r/cli/ips/pool.rb', line 9

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

#deleteObject



41
42
43
44
45
# File 'lib/sendgrid4r/cli/ips/pool.rb', line 41

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

#getObject



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

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

#listObject



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

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

#renameObject



33
34
35
36
37
# File 'lib/sendgrid4r/cli/ips/pool.rb', line 33

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