getFromEventTime static method
Will get a PcoCollection
of PcoCheckInsEventPeriod objects (expecting one)
using a path like this: /check-ins/v2/event_times/$eventTimeId/event_period
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<PcoCheckInsEventPeriod>> getFromEventTime(
String eventTimeId, {
PcoCheckInsEventPeriodQuery? query,
bool getAll = false,
bool includeAllRelated = false,
bool includeEvent = false,
bool includeEventTimes = false,
}) async {
query ??= PcoCheckInsEventPeriodQuery();
if (getAll) query.getAll = true;
if (includeAllRelated)
query.include.addAll(PcoCheckInsEventPeriod.canInclude);
if (includeEvent) query.include.add('event');
if (includeEventTimes) query.include.add('event_times');
var url = '/check-ins/v2/event_times/$eventTimeId/event_period';
return PcoCollection.fromApiCall<PcoCheckInsEventPeriod>(url,
query: query, apiVersion: kApiVersion);
}