Class: SFRest::Task_log_settings
- Inherits:
-
Object
- Object
- SFRest::Task_log_settings
- Defined in:
- lib/sfrest/task_log_settings.rb
Overview
We need to keep this naming due to the way connection.rb autoloads things. rubocop: disable Naming/ClassAndModuleCamelCase Manage the site default ownership feature.
Instance Method Summary collapse
-
#current_task_log_settings ⇒ Array
Get current task log settings.
-
#edit_task_log_settings(wip_log_maximum_level, wip_log_level) ⇒ Array
Set the site ownership settings.
-
#initialize(conn) ⇒ Task_log_settings
constructor
A new instance of Task_log_settings.
-
#reset_task_log_settings ⇒ Array
Reset current task log settings.
Constructor Details
#initialize(conn) ⇒ Task_log_settings
Returns a new instance of Task_log_settings.
11 12 13 |
# File 'lib/sfrest/task_log_settings.rb', line 11 def initialize(conn) @conn = conn end |
Instance Method Details
#current_task_log_settings ⇒ Array
Get current task log settings.
18 19 20 |
# File 'lib/sfrest/task_log_settings.rb', line 18 def current_task_log_settings @conn.get('/api/v1/task-log-settings') end |
#edit_task_log_settings(wip_log_maximum_level, wip_log_level) ⇒ Array
Set the site ownership settings.
27 28 29 30 31 32 33 34 |
# File 'lib/sfrest/task_log_settings.rb', line 27 def edit_task_log_settings(wip_log_maximum_level, wip_log_level) payload = { 'wip_log_maximum_level' => wip_log_maximum_level, 'wip_log_level' => wip_log_level } @conn.put('/api/v1/task-log-settings', payload.to_json) end |
#reset_task_log_settings ⇒ Array
Reset current task log settings.
39 40 41 |
# File 'lib/sfrest/task_log_settings.rb', line 39 def reset_task_log_settings @conn.delete('/api/v1/task-log-settings') end |