class SpreeClient::API::V1::StockItems

Stock Movements @see SpreeClient::API:V1::Resources

Constants

ENDPOINT
NAME
RESOURCE

Public Instance Methods

destroy(_) click to toggle source
   # File lib/spree_client/api/v1/stock_items.rb
12 def destroy(_); end
stock_movements(**args) click to toggle source

@return [SpreeClient::API::V1::StockMovements]

   # File lib/spree_client/api/v1/stock_items.rb
15 def stock_movements(**args)
16   stock_location_id = default_args.dig(:stock_location_id) || args.dig(:stock_location_id)
17   stock_item_id = default_args.dig(:id) || args.dig(:stock_item_id)
18 
19   raise ArgumentError, 'Needs a stock location ID' unless stock_location_id
20 
21   @stock_movements ||= {}
22   @stock_movements[stock_location_id.to_s.to_sym] ||= StockMovements.new **{ api: api, stock_location_id: stock_location_id, stock_item_id: stock_item_id }.merge(args)
23 end
update(_) click to toggle source
   # File lib/spree_client/api/v1/stock_items.rb
11 def update(_); end