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