Module: Spree::API::Client::StockLocations
- Included in:
- Spree::API::Client
- Defined in:
- lib/spree-api-client/stock_locations.rb
Instance Method Summary collapse
- #create_stock_location(options = {}) ⇒ Object
- #delete_stock_location(stock_location, options = {}) ⇒ Object
- #new_stock_location(options = {}) ⇒ Object
- #stock_location(stock_location, options = {}) ⇒ Object
- #stock_locations(options = {}) ⇒ Object
- #update_stock_location(stock_location, options = {}) ⇒ Object
Instance Method Details
#create_stock_location(options = {}) ⇒ Object
17 18 19 |
# File 'lib/spree-api-client/stock_locations.rb', line 17 def create_stock_location(={}) post("stock_locations", ) end |
#delete_stock_location(stock_location, options = {}) ⇒ Object
25 26 27 |
# File 'lib/spree-api-client/stock_locations.rb', line 25 def delete_stock_location(stock_location, ={}) delete("stock_locations/#{stock_location}", ) end |
#new_stock_location(options = {}) ⇒ Object
13 14 15 |
# File 'lib/spree-api-client/stock_locations.rb', line 13 def new_stock_location(={}) get("stock_locations/#{permalink_or_id}/new", ) end |
#stock_location(stock_location, options = {}) ⇒ Object
9 10 11 |
# File 'lib/spree-api-client/stock_locations.rb', line 9 def stock_location(stock_location, ={}) get("stock_locations/#{stock_location}", ) end |
#stock_locations(options = {}) ⇒ Object
5 6 7 |
# File 'lib/spree-api-client/stock_locations.rb', line 5 def stock_locations(={}) get('stock_locations', )['stock_locations'] end |
#update_stock_location(stock_location, options = {}) ⇒ Object
21 22 23 |
# File 'lib/spree-api-client/stock_locations.rb', line 21 def update_stock_location(stock_location, ={}) put("stock_locations/#{stock_location}", ) end |