listStocktakes method

Future<StocktakePage> listStocktakes({
  1. String? status,
  2. String? locationId,
  3. DateTime? updatedSince,
  4. int? limit,
  5. String? cursor,
})

Eine Seite Inventuren des Kontos. Ohne updatedSince zuletzt geaenderte zuerst (updatedAt absteigend; offene stehen dabei nicht zwingend oben, dafuer gibt es status). Mit updatedSince aufsteigend und inklusive: ein Abgleich mit dem groessten gesehenen updatedAt als naechstem updatedSince ist lueckenlos (der Eintrag an der Grenze kommt noch einmal).

Implementation

Future<StocktakePage> listStocktakes({
  String? status,
  String? locationId,
  DateTime? updatedSince,
  int? limit,
  String? cursor,
}) async {
  const name = Aufrufe.listStocktakes;
  final daten = await _transport.call(
      name,
      _abfrage(name, {
        'status': status,
        'locationId': locationId,
        'updatedSince': _zeit(updatedSince),
        'limit': limit,
        'cursor': cursor,
      }));
  return StocktakePage(stocktakes: liste(name, daten, 'stocktakes', inventur), nextCursor: naechsterCursor(name, daten));
}