From 0bf02dad64158c132427c5563d997ec5b096bd49 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Wed, 1 Apr 2020 10:04:55 +1100 Subject: [PATCH] Add endpoint for StockLocation model --- lib/inventree/stock.dart | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart index 326c2868..53f59386 100644 --- a/lib/inventree/stock.dart +++ b/lib/inventree/stock.dart @@ -19,4 +19,25 @@ class InvenTreeStockItem extends InvenTreeModel { return item; } +} + + +class InvenTreeStockLocation extends InvenTreeModel { + @override + String URL = "stock/location/"; + + InvenTreeStockLocation() : super(); + + InvenTreeStockLocation.fromJson(Map json) : super.fromJson(json) { + + } + + @override + InvenTreeModel createFromJson(Map json) { + + var loc = InvenTreeStockLocation.fromJson(json); + + return loc; + + } } \ No newline at end of file