Class: Hookdeck::Resources::Connection
- Defined in:
- lib/hookdeck/resources/connection.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(params) ⇒ Object
Create a new connection.
-
#delete(id) ⇒ Object
Delete a connection.
-
#disable(id) ⇒ Object
Disable a connection.
-
#enable(id) ⇒ Object
Enable a connection.
-
#list(params = {}) ⇒ Object
List all connections.
-
#pause(id) ⇒ Object
Pause a connection.
-
#retrieve(id) ⇒ Object
Retrieve a single connection.
-
#unpause(id) ⇒ Object
Unpause a connection.
-
#update(id, params) ⇒ Object
Update a connection.
-
#upsert(params) ⇒ Object
Upsert (create or update) a connection.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Hookdeck::Resources::Base
Instance Method Details
#create(params) ⇒ Object
Create a new connection
17 18 19 |
# File 'lib/hookdeck/resources/connection.rb', line 17 def create(params) post('connections', params) end |
#delete(id) ⇒ Object
Delete a connection
57 58 59 |
# File 'lib/hookdeck/resources/connection.rb', line 57 def delete(id) delete("connections/#{id}") end |
#disable(id) ⇒ Object
Disable a connection
33 34 35 |
# File 'lib/hookdeck/resources/connection.rb', line 33 def disable(id) put("connections/#{id}/disable") end |
#enable(id) ⇒ Object
Enable a connection
39 40 41 |
# File 'lib/hookdeck/resources/connection.rb', line 39 def enable(id) put("connections/#{id}/enable") end |
#list(params = {}) ⇒ Object
List all connections
6 7 8 |
# File 'lib/hookdeck/resources/connection.rb', line 6 def list(params = {}) get('connections', params) end |
#pause(id) ⇒ Object
Pause a connection
45 46 47 |
# File 'lib/hookdeck/resources/connection.rb', line 45 def pause(id) put("connections/#{id}/pause") end |
#retrieve(id) ⇒ Object
Retrieve a single connection
12 13 14 |
# File 'lib/hookdeck/resources/connection.rb', line 12 def retrieve(id) get("connections/#{id}") end |
#unpause(id) ⇒ Object
Unpause a connection
51 52 53 |
# File 'lib/hookdeck/resources/connection.rb', line 51 def unpause(id) put("connections/#{id}/unpause") end |
#update(id, params) ⇒ Object
Update a connection
27 28 29 |
# File 'lib/hookdeck/resources/connection.rb', line 27 def update(id, params) put("connections/#{id}", params) end |
#upsert(params) ⇒ Object
Upsert (create or update) a connection
22 23 24 |
# File 'lib/hookdeck/resources/connection.rb', line 22 def upsert(params) put('connections', params) end |