getAllFromCheckInAndLocation static method
Will get a PcoCollection
containing ALL PcoCheckInsLocationEventPeriod objects (expecting many)
using a path like this: /check-ins/v2/check_ins/$checkInId/locations/$locationId/location_event_periods
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<PcoCheckInsLocationEventPeriod>>
getAllFromCheckInAndLocation(
String checkInId,
String locationId, {
String? id,
PcoCheckInsLocationEventPeriodQuery? query,
bool includeAllRelated = false,
bool includeEventPeriod = false,
bool includeLocation = false,
}) async {
query ??= PcoCheckInsLocationEventPeriodQuery();
query.getAll = true;
if (includeAllRelated)
query.include.addAll(PcoCheckInsLocationEventPeriod.canInclude);
if (includeEventPeriod) query.include.add('event_period');
if (includeLocation) query.include.add('location');
var url =
'/check-ins/v2/check_ins/$checkInId/locations/$locationId/location_event_periods';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoCheckInsLocationEventPeriod>(url,
query: query, apiVersion: kApiVersion);
}