getAllFromCheckInAndEventPeriod static method

Future<PcoCollection<PcoCheckInsEventTime>> getAllFromCheckInAndEventPeriod(
  1. String checkInId,
  2. String eventPeriodId, {
  3. String? id,
  4. PcoCheckInsEventTimeQuery? query,
  5. bool includeAllRelated = false,
  6. bool includeEvent = false,
  7. bool includeEventPeriod = false,
  8. bool includeHeadcounts = false,
})

Will get a PcoCollection containing ALL PcoCheckInsEventTime objects (expecting many) using a path like this: /check-ins/v2/check_ins/$checkInId/event_period/$eventPeriodId/event_times

Available Query Filters:

  • available

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<PcoCheckInsEventTime>>
    getAllFromCheckInAndEventPeriod(
  String checkInId,
  String eventPeriodId, {
  String? id,
  PcoCheckInsEventTimeQuery? query,
  bool includeAllRelated = false,
  bool includeEvent = false,
  bool includeEventPeriod = false,
  bool includeHeadcounts = false,
}) async {
  query ??= PcoCheckInsEventTimeQuery();
  query.getAll = true;
  if (includeAllRelated)
    query.include.addAll(PcoCheckInsEventTime.canInclude);
  if (includeEvent) query.include.add('event');
  if (includeEventPeriod) query.include.add('event_period');
  if (includeHeadcounts) query.include.add('headcounts');
  var url =
      '/check-ins/v2/check_ins/$checkInId/event_period/$eventPeriodId/event_times';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCheckInsEventTime>(url,
      query: query, apiVersion: kApiVersion);
}