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