Class: HaloMspApi::Resources::Products
- Defined in:
- lib/halo_msp_api/resources/products.rb
Overview
Resource class for Products
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create_product(data) ⇒ Object
POST /Item - Create a new Product.
-
#delete_product(id) ⇒ Object
DELETE /Item/id - Delete a Product.
-
#product(id, params = {}) ⇒ Object
GET /Item/id - Get a specific Product.
-
#products(params = {}) ⇒ Object
GET /Item - List of Products.
-
#update_product(id, data) ⇒ Object
PUT /Item/id - Update a Product.
Methods inherited from Base
Constructor Details
This class inherits a constructor from HaloMspApi::Resources::Base
Instance Method Details
#create_product(data) ⇒ Object
POST /Item - Create a new Product
18 19 20 |
# File 'lib/halo_msp_api/resources/products.rb', line 18 def create_product(data) create_resource('Item', data) end |
#delete_product(id) ⇒ Object
DELETE /Item/id - Delete a Product
28 29 30 |
# File 'lib/halo_msp_api/resources/products.rb', line 28 def delete_product(id) delete_resource('Item', id) end |
#product(id, params = {}) ⇒ Object
GET /Item/id - Get a specific Product
13 14 15 |
# File 'lib/halo_msp_api/resources/products.rb', line 13 def product(id, params = {}) get_resource('Item', id, params) end |
#products(params = {}) ⇒ Object
GET /Item - List of Products
8 9 10 |
# File 'lib/halo_msp_api/resources/products.rb', line 8 def products(params = {}) list_resource('Item', params) end |
#update_product(id, data) ⇒ Object
PUT /Item/id - Update a Product
23 24 25 |
# File 'lib/halo_msp_api/resources/products.rb', line 23 def update_product(id, data) update_resource('Item', id, data) end |