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