Module: WorkflowSteps
- Included in:
- CustomerData
- Defined in:
- lib/user/customer-data/workflow_steps.rb
Instance Method Summary collapse
-
#attach_workflow_step(id, data, options = nil) ⇒ Object
Attach workflow_steps.
-
#create_workflow_step(data, options = nil) ⇒ Object
Create workflow_steps.
-
#delete_workflow_steps(data) ⇒ Object
Delete workflow_steps.
-
#detach_workflow_step(id, data, options = nil) ⇒ Object
Detach workflow_steps.
-
#get_workflow_step(id, options = nil) ⇒ Object
Get workflow_steps.
-
#get_workflow_steps(options = nil, use_post = true) ⇒ Object
Get workflows_steps.
-
#update_workflow_step(id, data, options = nil) ⇒ Object
Update workflow_steps.
Instance Method Details
#attach_workflow_step(id, data, options = nil) ⇒ Object
Attach workflow_steps.
Attach a workflow_steps.
Parameters
- id
-
(Integer) – Workflow id.
- data
-
(Hash) – Data to be submitted.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
Example
data = {
example_field: 'example_value'
}
@data = @cxf_user.attach_workflow_step(21, data)
74 75 76 |
# File 'lib/user/customer-data/workflow_steps.rb', line 74 def attach_workflow_step(id, data, = nil) @client.raw('put', "/customer-data/workflows-steps/#{id}/attach-item", , data_transform(data)) end |
#create_workflow_step(data, options = nil) ⇒ Object
Create workflow_steps.
Create a workflow_steps with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
example_field: 'example_value'
}
@data = @cxf_user.create_workflow_steps(data)
57 58 59 |
# File 'lib/user/customer-data/workflow_steps.rb', line 57 def create_workflow_step(data, = nil) @client.raw('post', '/customer-data/workflows-steps/', , data_transform(data)) end |
#delete_workflow_steps(data) ⇒ Object
Delete workflow_steps.
Delete a group of workflows.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = { ids: %w[21 22] }
@data = @cxf_user.delete_workflow_steps(data)
124 125 126 |
# File 'lib/user/customer-data/workflow_steps.rb', line 124 def delete_workflow_steps(data) @client.raw('delete', '/customer-data/workflows-steps/delete', nil, data_transform(data)) end |
#detach_workflow_step(id, data, options = nil) ⇒ Object
Detach workflow_steps.
Detach a workflow_steps.
Parameters
- id
-
(Integer) – Workflow id.
- data
-
(Hash) – Data to be submitted.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
Example
data = {
example_field: 'example_value'
}
@data = @cxf_user.detach_workflow_step(21, data)
91 92 93 |
# File 'lib/user/customer-data/workflow_steps.rb', line 91 def detach_workflow_step(id, data, = nil) @client.raw('put', "/customer-data/workflows-steps/#{id}/detach-item", , data_transform(data)) end |
#get_workflow_step(id, options = nil) ⇒ Object
Get workflow_steps.
Get a workflow_steps info.
Parameters
- id
-
(Integer) – Workflow id.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @cxf_user.get_workflow_steps(21)
Second Example
= { fields: 'id, title' }
@data = @cxf_user.get_workflow_steps(21, )
42 43 44 |
# File 'lib/user/customer-data/workflow_steps.rb', line 42 def get_workflow_step(id, = nil) @client.raw('get', "/customer-data/workflows-steps/#{id}", ) end |
#get_workflow_steps(options = nil, use_post = true) ⇒ Object
Get workflows_steps.
Get a collection of workflows_steps.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
- use_post
-
(Boolean) – Variable to determine if the request is by ‘post’ or ‘get’ functions.
First Example
@data = @cxf_user.get_workflows_steps
Second Example
= { fields: 'id, title', sort: '-id' }
@data = @cxf_user.get_workflows_steps()
Third Example
= { fields: 'id, title', sort: '-id' }
@data = @cxf_user.get_workflows_steps(, false)
25 26 27 |
# File 'lib/user/customer-data/workflow_steps.rb', line 25 def get_workflow_steps( = nil, use_post = true) get_query_results('/customer-data/workflows-steps', , use_post) end |
#update_workflow_step(id, data, options = nil) ⇒ Object
Update workflow_steps.
Update a workflow_steps info.
Parameters
- id
-
(Integer) – Workflow id.
- data
-
(Hash) – Data to be submitted.
Example
data = {
example_field: 'example_value_modified'
}
@data = @cxf_user.update_workflow_steps(23, data)
107 108 109 |
# File 'lib/user/customer-data/workflow_steps.rb', line 107 def update_workflow_step(id, data, = nil) @client.raw('put', "/customer-data/workflows-steps/#{id}", , data_transform(data)) end |