Class: Hookdeck::Resources::Destination
- Defined in:
- lib/hookdeck/resources/destination.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(params) ⇒ Object
Create a new destination.
-
#delete(id) ⇒ Object
Delete a destination.
-
#disable(id) ⇒ Object
Disable a destination.
-
#enable(id) ⇒ Object
Enable a destination.
-
#list(params = {}) ⇒ Object
List all destinations.
-
#retrieve(id) ⇒ Object
Retrieve a single destination.
-
#update(id, params) ⇒ Object
Update a destination.
-
#upsert(params) ⇒ Object
Upsert (create or update) a destination.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Hookdeck::Resources::Base
Instance Method Details
#create(params) ⇒ Object
Create a new destination
16 17 18 |
# File 'lib/hookdeck/resources/destination.rb', line 16 def create(params) post('destinations', params) end |
#delete(id) ⇒ Object
Delete a destination
44 45 46 |
# File 'lib/hookdeck/resources/destination.rb', line 44 def delete(id) delete("destinations/#{id}") end |
#disable(id) ⇒ Object
Disable a destination
32 33 34 |
# File 'lib/hookdeck/resources/destination.rb', line 32 def disable(id) put("destinations/#{id}/disable") end |
#enable(id) ⇒ Object
Enable a destination
38 39 40 |
# File 'lib/hookdeck/resources/destination.rb', line 38 def enable(id) put("destinations/#{id}/enable") end |
#list(params = {}) ⇒ Object
List all destinations
5 6 7 |
# File 'lib/hookdeck/resources/destination.rb', line 5 def list(params = {}) get('destinations', params) end |
#retrieve(id) ⇒ Object
Retrieve a single destination
11 12 13 |
# File 'lib/hookdeck/resources/destination.rb', line 11 def retrieve(id) get("destinations/#{id}") end |
#update(id, params) ⇒ Object
Update a destination
26 27 28 |
# File 'lib/hookdeck/resources/destination.rb', line 26 def update(id, params) put("destinations/#{id}", params) end |
#upsert(params) ⇒ Object
Upsert (create or update) a destination
21 22 23 |
# File 'lib/hookdeck/resources/destination.rb', line 21 def upsert(params) put('destinations', params) end |