getSinglePrintStationFromCheckInAndCheckInGroup static method

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

Will get a single PcoCheckInsStation object using a path like this: /check-ins/v2/check_ins/$checkInId/check_in_group/$checkInGroupId/print_station/[id]

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.

Implementation

static Future<PcoCheckInsStation?>
    getSinglePrintStationFromCheckInAndCheckInGroup(
  String checkInId,
  String checkInGroupId,
  String id, {
  PcoCheckInsStationQuery? query,
  bool includeAllRelated = false,
  bool includeEvent = false,
  bool includeLocation = false,
  bool includePrintStation = false,
  bool includeTheme = false,
}) async {
  query ??= PcoCheckInsStationQuery();
  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/check_ins/$checkInId/check_in_group/$checkInGroupId/print_station/$id';
  var retval = await PcoCollection.fromApiCall<PcoCheckInsStation>(url,
      query: query, apiVersion: kApiVersion);
  return retval.items.isEmpty ? null : retval.items.first;
}