Class: SendGrid4r::CLI::CancelSchedules::CancelSchedule

Inherits:
SgThor
  • Object
show all
Defined in:
lib/sendgrid4r/cli/cancel_schedules/cancel_schedule.rb

Overview

SendGrid Web API v3 CancelSchedules CancelSchedule

Instance Method Summary collapse

Methods inherited from SgThor

#initialize

Constructor Details

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

Instance Method Details

#addObject



10
11
12
13
14
# File 'lib/sendgrid4r/cli/cancel_schedules/cancel_schedule.rb', line 10

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

#deleteObject



42
43
44
45
46
# File 'lib/sendgrid4r/cli/cancel_schedules/cancel_schedule.rb', line 42

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

#getObject



25
26
27
28
29
# File 'lib/sendgrid4r/cli/cancel_schedules/cancel_schedule.rb', line 25

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

#listObject



17
18
19
20
21
# File 'lib/sendgrid4r/cli/cancel_schedules/cancel_schedule.rb', line 17

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

#updateObject



34
35
36
37
38
# File 'lib/sendgrid4r/cli/cancel_schedules/cancel_schedule.rb', line 34

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