Module: ObjectActivities
- Included in:
- Helpers
- Defined in:
- lib/user/helpers/object_activities.rb
Instance Method Summary collapse
-
#create_object_activity(data) ⇒ Object
Create object activity.
-
#delete_object_activity(id) ⇒ Object
Delete object activity.
-
#get_object_activities(options = nil) ⇒ Object
Get object activities.
-
#get_object_activity(id, options = nil) ⇒ Object
Get object activity.
-
#update_object_activity(id, data) ⇒ Object
Update object activity.
Instance Method Details
#create_object_activity(data) ⇒ Object
Create object activity.
Create an object activity with data.
Parameters
- data
-
(Hash) – Data to be submitted.
Example
data = {
activity_type: 'note',
object_type: 'contacts',
object_id: 1
}
@data = @mints_user.create_object_activity(data)
54 55 56 |
# File 'lib/user/helpers/object_activities.rb', line 54 def create_object_activity(data) @client.raw('post', '/helpers/object-activities', nil, data_transform(data)) end |
#delete_object_activity(id) ⇒ Object
Delete object activity.
Delete an object activity.
Parameters
- id
-
(Integer) – Object activity id.
Example
@data = @mints_user.delete_object_activity(573)
82 83 84 |
# File 'lib/user/helpers/object_activities.rb', line 82 def delete_object_activity(id) @client.raw('delete', "/helpers/object-activities/#{id}") end |
#get_object_activities(options = nil) ⇒ Object
Get object activities.
Get a collection of object activities.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_object_activities
Second Example
= { fields: 'object_type' }
@data = @mints_user.get_object_activities()
20 21 22 |
# File 'lib/user/helpers/object_activities.rb', line 20 def get_object_activities( = nil) @client.raw('get', '/helpers/object-activities', ) end |
#get_object_activity(id, options = nil) ⇒ Object
Get object activity.
Get an object activity.
Parameters
- id
-
(Integer) – Object activity id.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_object_activity(1)
Second Example
= { fields: 'activity_type' }
@data = @mints_user.get_object_activity(1, )
37 38 39 |
# File 'lib/user/helpers/object_activities.rb', line 37 def get_object_activity(id, = nil) @client.raw('get', "/helpers/object-activities/#{id}", ) end |
#update_object_activity(id, data) ⇒ Object
Update object activity.
Update an object activity info.
Parameters
- id
-
(Integer) – Object activity id.
- data
-
(Hash) – Data to be submitted.
Example
data = {
activity_type: 'ticket'
}
@data = @mints_user.update_object_activity(573, data)
70 71 72 |
# File 'lib/user/helpers/object_activities.rb', line 70 def update_object_activity(id, data) @client.raw('put', "/helpers/object-activities/#{id}", nil, data_transform(data)) end |