Class: Wunderlist::Webhook
- Inherits:
-
Object
- Object
- Wunderlist::Webhook
- Includes:
- Helper
- Defined in:
- lib/wunderlist/webhook.rb
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#created_by_id ⇒ Object
Returns the value of attribute created_by_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#list_id ⇒ Object
Returns the value of attribute list_id.
-
#processor_type ⇒ Object
Returns the value of attribute processor_type.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #destroy ⇒ Object
-
#initialize(attrs = {}) ⇒ Webhook
constructor
A new instance of Webhook.
Methods included from Helper
#create, #model_name, #path, #plural_model_name, #resource_path, #save, #to_hash, #update
Constructor Details
#initialize(attrs = {}) ⇒ Webhook
Returns a new instance of Webhook.
8 9 10 11 12 13 14 15 16 |
# File 'lib/wunderlist/webhook.rb', line 8 def initialize(attrs = {}) @id = attrs['id'] @list_id = attrs['list_id'] @created_by_id = attrs['created_by_id'] @processor_type = attrs['processor_type'] @url = attrs['url'] @created_at = attrs['created_at'] @configuration = attrs['configuration'] end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
6 7 8 |
# File 'lib/wunderlist/webhook.rb', line 6 def api @api end |
#configuration ⇒ Object
Returns the value of attribute configuration.
6 7 8 |
# File 'lib/wunderlist/webhook.rb', line 6 def configuration @configuration end |
#created_at ⇒ Object
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/wunderlist/webhook.rb', line 6 def created_at @created_at end |
#created_by_id ⇒ Object
Returns the value of attribute created_by_id.
6 7 8 |
# File 'lib/wunderlist/webhook.rb', line 6 def created_by_id @created_by_id end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/wunderlist/webhook.rb', line 6 def id @id end |
#list_id ⇒ Object
Returns the value of attribute list_id.
6 7 8 |
# File 'lib/wunderlist/webhook.rb', line 6 def list_id @list_id end |
#processor_type ⇒ Object
Returns the value of attribute processor_type.
6 7 8 |
# File 'lib/wunderlist/webhook.rb', line 6 def processor_type @processor_type end |
#url ⇒ Object
Returns the value of attribute url.
6 7 8 |
# File 'lib/wunderlist/webhook.rb', line 6 def url @url end |
Instance Method Details
#destroy ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/wunderlist/webhook.rb', line 18 def destroy # Seems no revision id is needed, contrary to documentation self.api.request :delete, resource_path self.id = nil self end |