Class: Mondo::WebHook

Inherits:
Resource show all
Defined in:
lib/api/mondo/web_hook.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#client, #raw_data

Instance Method Summary collapse

Methods inherited from Resource

boolean_accessor, boolean_reader, date_accessor, date_writer, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Mondo::Resource

Instance Attribute Details

#account_idObject

Returns the value of attribute account_id.



4
5
6
# File 'lib/api/mondo/web_hook.rb', line 4

def 
  @account_id
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/api/mondo/web_hook.rb', line 4

def id
  @id
end

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/api/mondo/web_hook.rb', line 4

def url
  @url
end

Instance Method Details

#deleteObject



10
11
12
13
# File 'lib/api/mondo/web_hook.rb', line 10

def delete
  self.client.api_delete("webhooks/#{self.id}")
  true
end

#saveObject



6
7
8
# File 'lib/api/mondo/web_hook.rb', line 6

def save
	self.client.api_post("webhooks", account_id: , url: url)
end