InventoryService class
Service for inventory management operations
Constructors
- InventoryService(ApiClient _apiClient)
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
adjustStock(
StockAdjustmentRequest request) → Future< StockMovement> - Adjust stock quantity
-
approveStockAdjustment(
String adjustmentId, {String? notes}) → Future< StockAdjustment> - Approve stock adjustment
-
cancelPhysicalInventory(
String inventoryId) → Future< PhysicalInventory> - Cancel physical inventory
-
completePhysicalInventory(
String inventoryId) → Future< PhysicalInventory> - Complete physical inventory
-
consumeStockReservation(
String reservationId, ConsumeStockReservationRequest request) → Future< StockReservation> - Consume stock reservation
-
createItem(
ItemRequest request) → Future< Item> - Create new item
-
createLocation(
{required String name, required String code, String? description, String? type, String? parentId, Address? address, ContactInfo? contactInfo, Map< String, dynamic> ? metadata}) → Future<Location> - Create new location
-
createLotGenealogy(
{required String lotNumber, required String itemId, required String locationId, required double quantity, DateTime? expiryDate, String? parentLotId, String? supplierLotNumber, String? supplierName, String? receiptNumber, String? notes, Map< String, dynamic> ? attributes}) → Future<LotGenealogy> - Create lot genealogy
-
createPhysicalInventory(
CreatePhysicalInventoryRequest request) → Future< PhysicalInventory> - Create physical inventory
-
createStockAdjustment(
CreateStockAdjustmentRequest request) → Future< StockAdjustment> - Create stock adjustment
-
createStockReservation(
CreateStockReservationRequest request) → Future< StockReservation> - Create stock reservation
-
deleteItem(
String itemId) → Future< void> - Delete item
-
deleteLocation(
String locationId) → Future< void> - Delete location
-
deletePhysicalInventory(
String inventoryId) → Future< void> - Delete physical inventory
-
deleteStockAdjustment(
String adjustmentId) → Future< void> - Delete stock adjustment
-
deleteStockReservation(
String reservationId) → Future< void> - Delete stock reservation
-
generatePhysicalInventoryAdjustments(
String inventoryId) → Future< List< PhysicalInventoryAdjustment> > - Generate physical inventory adjustments
-
getExpiringLots(
{int? daysAhead = 30, String? locationId, String? itemId}) → Future< List< ExpiringLot> > - Get expiring lots
-
getInventoryTurnover(
{DateTime? startDate, DateTime? endDate}) → Future< Map< String, dynamic> > - Get inventory turnover
-
getItem(
String itemId) → Future< Item> - Get item by ID
-
getItems(
{QueryParams? query}) → Future< PaginatedResponse< Item> > - Get all items
-
getItemStock(
String itemId) → Future< List< StockEntry> > - Get stock levels for an item
-
getLocation(
String locationId) → Future< Location> - Get location by ID
-
getLocations(
{QueryParams? query}) → Future< PaginatedResponse< Location> > - Get all locations
-
getLocationStock(
String locationId, {QueryParams? query}) → Future< PaginatedResponse< StockEntry> > - Get stock by location
-
getLotChildren(
String parentLotId) → Future< List< LotGenealogy> > - Get lot children
-
getLotGenealogies(
{LotGenealogyFilters? filters}) → Future< PaginatedResponse< LotGenealogy> > - Get lot genealogies
-
getLotParents(
String lotId) → Future< List< LotGenealogy> > - Get lot parents
-
getLotTrackingHistory(
{LotTrackingHistoryFilters? filters}) → Future< PaginatedResponse< LotTrackingHistory> > - Get lot tracking history
-
getLowStockItems(
) → Future< List< StockEntry> > - Get low stock items
-
getPhysicalInventories(
{PhysicalInventoryFilters? filters}) → Future< PaginatedResponse< PhysicalInventory> > - Get physical inventories
-
getPhysicalInventory(
String inventoryId) → Future< PhysicalInventory> - Get physical inventory by ID
-
getPhysicalInventoryItems(
String inventoryId, {QueryParams? query}) → Future< PaginatedResponse< PhysicalInventoryItem> > - Get physical inventory items
-
getStockAdjustment(
String adjustmentId) → Future< StockAdjustment> - Get stock adjustment by ID
-
getStockAdjustmentItems(
String adjustmentId, {QueryParams? query}) → Future< PaginatedResponse< StockAdjustmentItem> > - Get stock adjustment items
-
getStockAdjustments(
{StockAdjustmentFilters? filters}) → Future< PaginatedResponse< StockAdjustment> > - Get stock adjustments
-
getStockMovements(
{String? itemId, String? locationId, QueryParams? query}) → Future< PaginatedResponse< StockMovement> > - Get stock movements
-
getStockReservation(
String reservationId) → Future< StockReservation> - Get stock reservation by ID
-
getStockReservations(
{StockReservationFilters? filters}) → Future< PaginatedResponse< StockReservation> > - Get stock reservations
-
getStockValueByLocation(
) → Future< Map< String, double> > - Get stock value by location
-
mergeLots(
MergeLotsRequest request) → Future< LotGenealogy> - Merge multiple lots into one
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
quarantineLot(
String lotId, QuarantineLotRequest request) → Future< LotGenealogy> - Quarantine lot
-
rejectStockAdjustment(
String adjustmentId, RejectStockAdjustmentRequest request) → Future< StockAdjustment> - Reject stock adjustment
-
releaseLot(
String lotId, ReleaseLotRequest request) → Future< LotGenealogy> - Release lot from quarantine
-
releaseStockReservation(
String reservationId, {String? notes}) → Future< StockReservation> - Release stock reservation
-
searchItems(
String query) → Future< List< Item> > - Search items by name or code
-
splitLot(
SplitLotRequest request) → Future< List< LotGenealogy> > - Split lot into multiple lots
-
startPhysicalInventory(
String inventoryId) → Future< PhysicalInventory> - Start physical inventory
-
toString(
) → String -
A string representation of this object.
inherited
-
transferStock(
StockTransferRequest request) → Future< StockMovement> - Transfer stock between locations
-
updateItem(
String itemId, ItemRequest request) → Future< Item> - Update item
-
updateLocation(
String locationId, {String? name, String? code, String? description, String? type, String? parentId, Address? address, ContactInfo? contactInfo, bool? isActive, Map< String, dynamic> ? metadata}) → Future<Location> - Update location
-
updateLotTracking(
String lotId, UpdateLotTrackingRequest request) → Future< LotGenealogy> - Update lot tracking
-
updatePhysicalInventory(
String inventoryId, UpdatePhysicalInventoryRequest request) → Future< PhysicalInventory> - Update physical inventory
-
updatePhysicalInventoryItem(
String inventoryId, String itemId, UpdatePhysicalInventoryItemRequest request) → Future< PhysicalInventoryItem> - Update physical inventory item
-
updateStockAdjustment(
String adjustmentId, UpdateStockAdjustmentRequest request) → Future< StockAdjustment> - Update stock adjustment
-
updateStockReservation(
String reservationId, UpdateStockReservationRequest request) → Future< StockReservation> - Update stock reservation
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited