Class: SendGrid4r::CLI::Ips::Warmup

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

Overview

SendGrid Web API v3 Ips Warmup

Instance Method Summary collapse

Methods inherited from SgThor

#initialize

Constructor Details

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

Instance Method Details

#getObject



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

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

#listObject



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

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

#startObject



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

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

#stopObject



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

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