getCheckedOutByFromCheckIn static method

Future<PcoCollection<PcoCheckInsPerson>> getCheckedOutByFromCheckIn(
  1. String checkInId, {
  2. String? id,
  3. PcoCheckInsPersonQuery? query,
  4. bool getAll = false,
  5. bool includeOrganization = false,
})

Will get a PcoCollection of PcoCheckInsPerson objects (expecting many) using a path like this: /check-ins/v2/check_ins/$checkInId/checked_out_by

Getting a PcoCollection is useful even when retrieving a single object because it contains error data and helper functions.

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<PcoCollection<PcoCheckInsPerson>> getCheckedOutByFromCheckIn(
  String checkInId, {
  String? id,
  PcoCheckInsPersonQuery? query,
  bool getAll = false,
  bool includeOrganization = false,
}) async {
  query ??= PcoCheckInsPersonQuery();
  if (getAll) query.getAll = true;

  if (includeOrganization) query.include.add('organization');
  var url = '/check-ins/v2/check_ins/$checkInId/checked_out_by';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCheckInsPerson>(url,
      query: query, apiVersion: kApiVersion);
}