Module: WorkflowStepObjects
- Included in:
- CRM
- Defined in:
- lib/user/crm/workflow_step_objects.rb
Instance Method Summary collapse
-
#create_step_object(data) ⇒ Object
Create workflow step object.
-
#get_step_object(id, options = nil) ⇒ Object
Get workflow step object.
-
#get_step_object_by_object_type(object_type, object_id, options = nil) ⇒ Object
Get workflow step object by object type.
-
#get_step_objects(options = nil) ⇒ Object
Get workflow step objects.
-
#update_step_object(id, data) ⇒ Object
Update workflow step object.
Instance Method Details
permalink #create_step_object(data) ⇒ Object
Create workflow step object.
Create a workflow step object with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
objectType: 'deals',
stepId: 9,
objectId: 1
}
@data = @mints_user.create_step_object(data)
54 55 56 |
# File 'lib/user/crm/workflow_step_objects.rb', line 54 def create_step_object(data) @client.raw('post', '/crm/step-objects/', nil, data_transform(data)) end |
permalink #get_step_object(id, options = nil) ⇒ Object
Get workflow step object.
Get a workflow step object info.
Parameters
- id
-
(Integer) – Workflow step object id.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_step_object(1)
Second Example
= { fields: 'id, step_id' }
@data = @mints_user.get_step_object(1, )
37 38 39 |
# File 'lib/user/crm/workflow_step_objects.rb', line 37 def get_step_object(id, = nil) @client.raw('get', "/crm/step-objects/#{id}", ) end |
permalink #get_step_object_by_object_type(object_type, object_id, options = nil) ⇒ Object
Get workflow step object by object type.
Get a workflow step object info by an object type.
Parameters
- object_type
-
(String) – Object type.
- object_id
-
(Integer) – Workflow step object id.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_step_object_by_object_type("deals", 1)
Second Example
= { fields: 'id, object_id' }
@data = @mints_user.get_step_object_by_object_type('deals', 1, )
88 89 90 |
# File 'lib/user/crm/workflow_step_objects.rb', line 88 def get_step_object_by_object_type(object_type, object_id, = nil) @client.raw('get', "/crm/step-objects/#{object_type}/#{object_id}", ) end |
permalink #get_step_objects(options = nil) ⇒ Object
Get workflow step objects.
Get a collection of workflow step objects.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_step_objects
Second Example
= { fields: 'id' }
@data = @mints_user.get_step_objects()
20 21 22 |
# File 'lib/user/crm/workflow_step_objects.rb', line 20 def get_step_objects( = nil) @client.raw('get', '/crm/step-objects', ) end |
permalink #update_step_object(id, data) ⇒ Object
Update workflow step object.
Update a workflow step object info.
Parameters
- id
-
(Integer) – Workflow step object id.
- data
-
(Hash) – Data to be submitted.
Example
data = {
stepId: 10
}
@data = @mints_user.update_step_object(128, data.to_json)
70 71 72 |
# File 'lib/user/crm/workflow_step_objects.rb', line 70 def update_step_object(id, data) @client.raw('put', "/crm/step-objects/#{id}", nil, data) end |