getFromHeadcount static method
Future<PcoCollection<PcoCheckInsAttendanceType> >
getFromHeadcount(
- String headcountId,
- {PcoCheckInsAttendanceTypeQuery? query,
- bool getAll = false,
- bool includeEvent = false}
Will get a PcoCollection
of PcoCheckInsAttendanceType objects (expecting one)
using a path like this: /check-ins/v2/headcounts/$headcountId/attendance_type
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<PcoCheckInsAttendanceType>> getFromHeadcount(
String headcountId, {
PcoCheckInsAttendanceTypeQuery? query,
bool getAll = false,
bool includeEvent = false,
}) async {
query ??= PcoCheckInsAttendanceTypeQuery();
if (getAll) query.getAll = true;
if (includeEvent) query.include.add('event');
var url = '/check-ins/v2/headcounts/$headcountId/attendance_type';
return PcoCollection.fromApiCall<PcoCheckInsAttendanceType>(url,
query: query, apiVersion: kApiVersion);
}