Class: SFRest::Site_update_priority
- Inherits:
-
Object
- Object
- SFRest::Site_update_priority
- Defined in:
- lib/sfrest/site_update_priority.rb
Overview
We need to keep this naming due to the way connection.rb autoloads things. rubocop: disable Naming/ClassAndModuleCamelCase Manage the site update priority feature.
Instance Method Summary collapse
-
#change_update_priority(priority) ⇒ Array
Set the site update priority list.
-
#current_update_priority ⇒ Array
Get current site update priority.
-
#initialize(conn) ⇒ Site_update_priority
constructor
A new instance of Site_update_priority.
-
#reset_update_priority ⇒ Array
Reset the site update priority to the default.
Constructor Details
#initialize(conn) ⇒ Site_update_priority
Returns a new instance of Site_update_priority.
11 12 13 |
# File 'lib/sfrest/site_update_priority.rb', line 11 def initialize(conn) @conn = conn end |
Instance Method Details
#change_update_priority(priority) ⇒ Array
Set the site update priority list.
26 27 28 29 30 31 |
# File 'lib/sfrest/site_update_priority.rb', line 26 def change_update_priority(priority) payload = { 'priority' => priority }.to_json @conn.put('/api/v1/site-update-priority', payload) end |
#current_update_priority ⇒ Array
Get current site update priority.
18 19 20 |
# File 'lib/sfrest/site_update_priority.rb', line 18 def current_update_priority @conn.get('/api/v1/site-update-priority') end |
#reset_update_priority ⇒ Array
Reset the site update priority to the default.
36 37 38 |
# File 'lib/sfrest/site_update_priority.rb', line 36 def reset_update_priority @conn.delete('/api/v1/site-update-priority') end |