Class: Payloop::API::Workflows
- Defined in:
- lib/payloop/api/workflows.rb
Overview
API client for managing workflows
Instance Method Summary collapse
-
#create(name:, description: nil) ⇒ Object
Create a new workflow.
-
#destroy(uuid) ⇒ Object
Delete workflow.
-
#details(uuid) ⇒ Object
Get workflow details.
-
#invocation ⇒ Object
Get invocation manager for workflow operations.
-
#list ⇒ Object
List all workflows.
-
#update(uuid, label:) ⇒ Object
Update workflow label.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Payloop::API::Base
Instance Method Details
#create(name:, description: nil) ⇒ Object
Create a new workflow
13 14 15 |
# File 'lib/payloop/api/workflows.rb', line 13 def create(name:, description: nil) post("/workflows", { name: name, description: description }.compact) end |
#destroy(uuid) ⇒ Object
Delete workflow
29 30 31 |
# File 'lib/payloop/api/workflows.rb', line 29 def destroy(uuid) delete("/workflow/#{uuid}") end |
#details(uuid) ⇒ Object
Get workflow details
18 19 20 |
# File 'lib/payloop/api/workflows.rb', line 18 def details(uuid) get("/workflow/#{uuid}") end |
#invocation ⇒ Object
Get invocation manager for workflow operations
34 35 36 |
# File 'lib/payloop/api/workflows.rb', line 34 def invocation @invocation ||= Invocation.new(@original_api_url, @api_key, @timeout) end |
#list ⇒ Object
List all workflows
8 9 10 |
# File 'lib/payloop/api/workflows.rb', line 8 def list get("/workflows") end |
#update(uuid, label:) ⇒ Object
Update workflow label
23 24 25 26 |
# File 'lib/payloop/api/workflows.rb', line 23 def update(uuid, label:) body = { label: label } put("/workflow/#{uuid}", body) end |