Class: MoySklad::Model::Warehouse

Inherits:
Client::Base show all
Defined in:
lib/moy_sklad/model/warehouse.rb

Instance Method Summary collapse

Methods inherited from Client::Base

#applicable?, collection_name, #create, #destroy, element_path, find, new_element_path, #save

Methods inherited from ActiveResource::Base

#find_object

Constructor Details

#initialize(*args) ⇒ Warehouse

Returns a new instance of Warehouse.



3
4
5
6
# File 'lib/moy_sklad/model/warehouse.rb', line 3

def initialize(*args)
  super(*args)
  create_nested_collection(:slots)
end

Instance Method Details

#items(mode = 'POSITIVE_ONLY') ⇒ Object



8
9
10
# File 'lib/moy_sklad/model/warehouse.rb', line 8

def items(mode = 'POSITIVE_ONLY')
  StockTo.find(:all, params: {storeUuid: self.uuid, stockMode: mode})
end