getAll static method

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

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

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>> getAll({
  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';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCheckInsStation>(url,
      query: query, apiVersion: kApiVersion);
}