Class: Payloop::API::Workflow
Overview
API client for managing a specific workflow
Instance Method Summary collapse
-
#destroy ⇒ Object
Delete workflow.
-
#details ⇒ Object
Get workflow details.
-
#initialize(uuid, api_url, api_key, timeout) ⇒ Workflow
constructor
A new instance of Workflow.
-
#invocation ⇒ Object
Get invocation client for this workflow.
-
#update(label:) ⇒ Object
Update workflow label.
Constructor Details
#initialize(uuid, api_url, api_key, timeout) ⇒ Workflow
Returns a new instance of Workflow.
7 8 9 10 |
# File 'lib/payloop/api/workflow.rb', line 7 def initialize(uuid, api_url, api_key, timeout) super(api_url, api_key, timeout) @uuid = uuid end |
Instance Method Details
#destroy ⇒ Object
Delete workflow
24 25 26 |
# File 'lib/payloop/api/workflow.rb', line 24 def destroy delete("/workflow/#{@uuid}") end |
#details ⇒ Object
Get workflow details
13 14 15 |
# File 'lib/payloop/api/workflow.rb', line 13 def details get("/workflow/#{@uuid}") end |
#invocation ⇒ Object
Get invocation client for this workflow
29 30 31 |
# File 'lib/payloop/api/workflow.rb', line 29 def invocation Invocation.new(@uuid, @original_api_url, @api_key, @timeout) end |
#update(label:) ⇒ Object
Update workflow label
18 19 20 21 |
# File 'lib/payloop/api/workflow.rb', line 18 def update(label:) body = { label: label } put("/workflow/#{@uuid}", body) end |