Module: Spree::API::Client::StockLocations

Included in:
Spree::API::Client
Defined in:
lib/spree-api-client/stock_locations.rb

Instance Method Summary collapse

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(options={})
  post("stock_locations", options)
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, options={})
  delete("stock_locations/#{stock_location}", options)
end

#new_stock_location(options = {}) ⇒ Object



13
14
15
# File 'lib/spree-api-client/stock_locations.rb', line 13

def new_stock_location(options={})
  get("stock_locations/#{permalink_or_id}/new", options)
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, options={})
  get("stock_locations/#{stock_location}", options)
end

#stock_locations(options = {}) ⇒ Object



5
6
7
# File 'lib/spree-api-client/stock_locations.rb', line 5

def stock_locations(options={})
  get('stock_locations', options)['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, options={})
  put("stock_locations/#{stock_location}", options)
end