lib/moysklad/resources/stock.rb in moysklad-0.1.2 vs lib/moysklad/resources/stock.rb in moysklad-0.1.3
- old
+ new
@@ -3,10 +3,14 @@
def listWithConsignments params={}
list params.merge(showConsignments: true)
end
+ def all
+ page.items
+ end
+
def find
raise 'no such method'
end
def list_path
@@ -21,10 +25,10 @@
:stock
end
private
- def parse_collection content
+ def parse_page content
items = Moysklad::Entities::StockTO.parse content
Moysklad::Entities::Page.new items, items.count, 0, items.count
end
end