Module: Spree::API::Client::StockItems
- Included in:
- Spree::API::Client
- Defined in:
- lib/spree-api-client/stock_items.rb
Instance Method Summary collapse
- #batch_update_stock_items(location = 1, options = {}) ⇒ Object
- #create_stock_item(location, options = {}) ⇒ Object
- #delete_stock_item(stock_item, location = 1, options = {}) ⇒ Object
- #new_stock_item(options = {}) ⇒ Object
- #stock_item(stock_item, location = 1, options = {}) ⇒ Object
- #stock_items(location = 1, options = {}) ⇒ Object
- #update_stock_item(stock_item, location = 1, options = {}) ⇒ Object
Instance Method Details
#batch_update_stock_items(location = 1, options = {}) ⇒ Object
25 26 27 |
# File 'lib/spree-api-client/stock_items.rb', line 25 def batch_update_stock_items(location=1, ={}) put("stock_locations/#{location}/stock_items/batch_update", ) end |
#create_stock_item(location, options = {}) ⇒ Object
17 18 19 |
# File 'lib/spree-api-client/stock_items.rb', line 17 def create_stock_item(location, ={}) post("stock_locations/#{location}/stock_items", ) end |
#delete_stock_item(stock_item, location = 1, options = {}) ⇒ Object
29 30 31 |
# File 'lib/spree-api-client/stock_items.rb', line 29 def delete_stock_item(stock_item, location=1, ={}) delete("stock_locations/#{location}/stock_items/#{stock_item}", ) end |
#new_stock_item(options = {}) ⇒ Object
13 14 15 |
# File 'lib/spree-api-client/stock_items.rb', line 13 def new_stock_item(={}) get("stock_items/#{permalink_or_id}/new", ) end |
#stock_item(stock_item, location = 1, options = {}) ⇒ Object
9 10 11 |
# File 'lib/spree-api-client/stock_items.rb', line 9 def stock_item(stock_item, location=1, ={}) get("stock_locations/#{location}/stock_items/#{stock_item}", ) end |
#stock_items(location = 1, options = {}) ⇒ Object
5 6 7 |
# File 'lib/spree-api-client/stock_items.rb', line 5 def stock_items(location=1, ={}) get("stock_locations/#{location}/stock_items/", ) end |
#update_stock_item(stock_item, location = 1, options = {}) ⇒ Object
21 22 23 |
# File 'lib/spree-api-client/stock_items.rb', line 21 def update_stock_item(stock_item, location=1, ={}) put("stock_locations/#{location}/stock_items/#{stock_item}", ) end |