listStock method

Future<StockPage> listStock({
  1. String? locationId,
  2. String? articleId,
  3. bool? belowMinimum,
  4. DateTime? changedSince,
  5. int? limit,
  6. String? cursor,
})

Eine Seite Bestandszeilen. belowMinimum: nur Zeilen, deren onHand unter dem Mindestbestand ihres Standorts liegt (dieselbe Regel wie stock.below_minimum). changedSince (inklusive), nach updatedAt aufsteigend.

Implementation

Future<StockPage> listStock({
  String? locationId,
  String? articleId,
  bool? belowMinimum,
  DateTime? changedSince,
  int? limit,
  String? cursor,
}) async {
  const name = Aufrufe.listStock;
  final daten = await _transport.call(
      name,
      _abfrage(name, {
        'locationId': locationId,
        'articleId': articleId,
        'belowMinimum': belowMinimum,
        'changedSince': _zeit(changedSince),
        'limit': limit,
        'cursor': cursor,
      }));
  return StockPage(
    stock: liste(name, daten, 'stock', bestand),
    values: _werte(name, daten),
    nextCursor: naechsterCursor(name, daten),
  );
}