getAllPrintStationFromStation static method

Future<PcoCollection<PcoCheckInsStation>> getAllPrintStationFromStation(
  1. String stationId, {
  2. String? id,
  3. PcoCheckInsStationQuery? query,
  4. bool includeAllRelated = false,
  5. bool includeEvent = false,
  6. bool includeLocation = false,
  7. bool includePrintStation = false,
  8. bool includeTheme = false,
})

Will get a PcoCollection containing ALL PcoCheckInsStation objects (expecting many) using a path like this: /check-ins/v2/stations/$stationId/print_station

Additional options may be specified by using the query argument, but some query options are also available as boolean flags in this function call too.

This function forces the query.getAll to be true.

Implementation

static Future<PcoCollection<PcoCheckInsStation>>
    getAllPrintStationFromStation(
  String stationId, {
  String? id,
  PcoCheckInsStationQuery? query,
  bool includeAllRelated = false,
  bool includeEvent = false,
  bool includeLocation = false,
  bool includePrintStation = false,
  bool includeTheme = false,
}) async {
  query ??= PcoCheckInsStationQuery();
  query.getAll = true;
  if (includeAllRelated) query.include.addAll(PcoCheckInsStation.canInclude);
  if (includeEvent) query.include.add('event');
  if (includeLocation) query.include.add('location');
  if (includePrintStation) query.include.add('print_station');
  if (includeTheme) query.include.add('theme');
  var url = '/check-ins/v2/stations/$stationId/print_station';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCheckInsStation>(url,
      query: query, apiVersion: kApiVersion);
}