Module: UserFolders
- Included in:
- Helpers
- Defined in:
- lib/user/helpers/user_folders.rb
Instance Method Summary collapse
-
#create_user_folder(data) ⇒ Object
Create user folder.
-
#delete_user_folder(id) ⇒ Object
Delete user folder.
-
#get_user_folder(id, options = nil) ⇒ Object
Get user folder.
-
#get_user_folders(options = nil) ⇒ Object
Get user folders.
-
#update_user_folder(id, data) ⇒ Object
Update user folder.
Instance Method Details
#create_user_folder(data) ⇒ Object
Create user folder.
Create an user folder with data.
Parameters
- data
-
(Hash) – Data to be submited.
Example
data = {
"folder": "new-user-folder",
"object_type": "contacts"
}
@data = @mints_user.create_user_folder(data)
51 52 53 |
# File 'lib/user/helpers/user_folders.rb', line 51 def create_user_folder(data) return @client.raw("post", "/helpers/folders", nil, data_transform(data)) end |
#delete_user_folder(id) ⇒ Object
Delete user folder.
Delete an user folder.
Parameters
- id
-
(Integer) – User folder id.
Example
@data = @mints_user.delete_user_folder(289)
80 81 82 |
# File 'lib/user/helpers/user_folders.rb', line 80 def delete_user_folder(id) return @client.raw("delete", "/helpers/folders/#{id}") end |
#get_user_folder(id, options = nil) ⇒ Object
Get user folder.
Get an user folder info.
Parameters
- id
-
(Integer) – User folder id.
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_user_folder(1)
Second Example
= { "fields": "user_id, folder" }
@data = @mints_user.get_user_folder(1, )
35 36 37 |
# File 'lib/user/helpers/user_folders.rb', line 35 def get_user_folder(id, = nil) return @client.raw("get", "/helpers/folders/#{id}", ) end |
#get_user_folders(options = nil) ⇒ Object
Get user folders.
Get a collection of user folders.
Parameters
- options
-
(Hash) – List of Resource Collection Options shown above can be used as parameter.
First Example
@data = @mints_user.get_user_folders
Second Example
= { "fields": "folder" }
@data = @mints_user.get_user_folders()
18 19 20 |
# File 'lib/user/helpers/user_folders.rb', line 18 def get_user_folders( = nil) return @client.raw("get", "/helpers/folders", ) end |
#update_user_folder(id, data) ⇒ Object
Update user folder.
Update an user folder info.
Parameters
- id
-
(Integer) – User folder id.
- data
-
(Hash) – Data to be submited.
Example
data = {
"folder": "new-user-folder-modified",
"object_type": "contacts"
}
@data = @mints_user.update_user_folder(289, data)
68 69 70 |
# File 'lib/user/helpers/user_folders.rb', line 68 def update_user_folder(id, data) return @client.raw("put", "/helpers/folders/#{id}", nil, data_transform(data)) end |