Class: Sendgrid::Newsletter::Schedule
- Inherits:
-
Base
- Object
- Base
- Sendgrid::Newsletter::Schedule
show all
- Defined in:
- lib/sendgrid-newsletter/schedule.rb
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#add(options = {}) ⇒ Object
6
7
8
9
10
11
|
# File 'lib/sendgrid-newsletter/schedule.rb', line 6
def add(options={})
check_required_params options, [:name]
response = self.class.post '/schedule/add.json', body: options
raise APIError.new(response['error']) if response['error']
response
end
|
#delete(options = {}) ⇒ Object
13
14
15
16
17
18
|
# File 'lib/sendgrid-newsletter/schedule.rb', line 13
def delete(options={})
check_required_params options, [:name]
response = self.class.post '/schedule/delete.json', body: options
raise APIError.new(response['error']) if response['error']
response
end
|