Class: TrackerApi::Resources::Webhook
- Includes:
- Shared::Base
- Defined in:
- lib/tracker_api/resources/webhook.rb
Defined Under Namespace
Classes: UpdateRepresenter
Instance Method Summary collapse
- #delete ⇒ Object
-
#save ⇒ Object
Save changes to an existing Webhook.
Methods included from Shared::Base
Instance Method Details
#delete ⇒ Object
23 24 25 26 27 |
# File 'lib/tracker_api/resources/webhook.rb', line 23 def delete raise ArgumentError, 'Can not delete a webhook with an unknown project_id.' if project_id.nil? Endpoints::Webhook.new(client).delete(self) end |
#save ⇒ Object
Save changes to an existing Webhook.
30 31 32 33 34 |
# File 'lib/tracker_api/resources/webhook.rb', line 30 def save raise ArgumentError, 'Can not update a webhook with an unknown project_id.' if project_id.nil? Endpoints::Webhook.new(client).update(self, UpdateRepresenter.new(Webhook.new(self.dirty_attributes))) end |