Class: Hookdeck::Resources::Transformation
- Defined in:
- lib/hookdeck/resources/transformation.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(params) ⇒ Object
Create a new transformation.
-
#delete(id) ⇒ Object
Delete a transformation.
-
#list(params = {}) ⇒ Object
List all transformations.
-
#list_executions(id, params = {}) ⇒ Object
List executions for a transformation.
-
#retrieve(id) ⇒ Object
Retrieve a single transformation.
-
#retrieve_execution(id, execution_id) ⇒ Object
Get a specific execution.
-
#run(params) ⇒ Object
Run a transformation.
-
#update(id, params) ⇒ Object
Update a transformation.
-
#upsert(params) ⇒ Object
Upsert (create or update) a transformation.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Hookdeck::Resources::Base
Instance Method Details
#create(params) ⇒ Object
Create a new transformation
16 17 18 |
# File 'lib/hookdeck/resources/transformation.rb', line 16 def create(params) post('transformations', params) end |
#delete(id) ⇒ Object
Delete a transformation
49 50 51 |
# File 'lib/hookdeck/resources/transformation.rb', line 49 def delete(id) delete("transformations/#{id}") end |
#list(params = {}) ⇒ Object
List all transformations
5 6 7 |
# File 'lib/hookdeck/resources/transformation.rb', line 5 def list(params = {}) get('transformations', params) end |
#list_executions(id, params = {}) ⇒ Object
List executions for a transformation
36 37 38 |
# File 'lib/hookdeck/resources/transformation.rb', line 36 def list_executions(id, params = {}) get("transformations/#{id}/executions", params) end |
#retrieve(id) ⇒ Object
Retrieve a single transformation
11 12 13 |
# File 'lib/hookdeck/resources/transformation.rb', line 11 def retrieve(id) get("transformations/#{id}") end |
#retrieve_execution(id, execution_id) ⇒ Object
Get a specific execution
43 44 45 |
# File 'lib/hookdeck/resources/transformation.rb', line 43 def retrieve_execution(id, execution_id) get("transformations/#{id}/executions/#{execution_id}") end |
#run(params) ⇒ Object
Run a transformation
31 32 33 |
# File 'lib/hookdeck/resources/transformation.rb', line 31 def run(params) put('transformations/run', params) end |
#update(id, params) ⇒ Object
Update a transformation
21 22 23 |
# File 'lib/hookdeck/resources/transformation.rb', line 21 def update(id, params) put("transformations/#{id}", params) end |
#upsert(params) ⇒ Object
Upsert (create or update) a transformation
26 27 28 |
# File 'lib/hookdeck/resources/transformation.rb', line 26 def upsert(params) put('transformations', params) end |