Module: Automation::API::Requests::Categories
Overview
Automation::API::Requests::Categories
Instance Method Summary collapse
- #categories(department_id:) ⇒ Object
- #category(department_id:, id:) ⇒ Object
- #create_category(department_id:, category:) ⇒ Object
- #delete_category(department_id:, id:) ⇒ Object
- #update_category(department_id:, id:, category:) ⇒ Object
Instance Method Details
#categories(department_id:) ⇒ Object
12 13 14 |
# File 'lib/automation/api/requests/categories.rb', line 12 def categories(department_id:) get("#{@base_uri}/departments/#{department_id}/categories") end |
#category(department_id:, id:) ⇒ Object
16 17 18 |
# File 'lib/automation/api/requests/categories.rb', line 16 def category(department_id:, id:) get("#{@base_uri}/departments/#{department_id}/categories/#{id}") end |
#create_category(department_id:, category:) ⇒ Object
20 21 22 |
# File 'lib/automation/api/requests/categories.rb', line 20 def create_category(department_id:, category:) post("#{@base_uri}/departments/#{department_id}/categories", params: category) end |
#delete_category(department_id:, id:) ⇒ Object
28 29 30 |
# File 'lib/automation/api/requests/categories.rb', line 28 def delete_category(department_id:, id:) delete("#{@base_uri}/departments/#{department_id}/categories/#{id}") end |
#update_category(department_id:, id:, category:) ⇒ Object
24 25 26 |
# File 'lib/automation/api/requests/categories.rb', line 24 def update_category(department_id:, id:, category:) patch("#{@base_uri}/departments/#{department_id}/categories/#{id}", params: category) end |