listStockMovements method

Future<StockMovementPage> listStockMovements({
  1. String? articleId,
  2. String? locationId,
  3. DateTime? from,
  4. DateTime? to,
  5. String? type,
  6. String? source,
  7. int? limit,
  8. String? cursor,
})

Das Lagerprotokoll, neueste zuerst. Nur nach articleId oder locationId filtern, nicht beides (sonst validation). type aus stockMovementTypes, source aus stockMovementSources.

Implementation

Future<StockMovementPage> listStockMovements({
  String? articleId,
  String? locationId,
  DateTime? from,
  DateTime? to,
  String? type,
  String? source,
  int? limit,
  String? cursor,
}) async {
  const name = Aufrufe.listStockMovements;
  final daten = await _transport.call(
      name,
      _abfrage(name, {
        'articleId': articleId,
        'locationId': locationId,
        'from': _zeit(from),
        'to': _zeit(to),
        'type': type,
        'source': source,
        'limit': limit,
        'cursor': cursor,
      }));
  return StockMovementPage(movements: liste(name, daten, 'movements', bewegung), nextCursor: naechsterCursor(name, daten));
}