getFromCheckInAndEventPeriodAndLocationEventPeriod static method
Will get a PcoCollection
of PcoCheckInsEventPeriod objects (expecting one)
using a path like this: /check-ins/v2/check_ins/$checkInId/event_period/$eventPeriodId/location_event_periods/$locationEventPeriodId/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>>
getFromCheckInAndEventPeriodAndLocationEventPeriod(
String checkInId,
String eventPeriodId,
String locationEventPeriodId, {
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/check_ins/$checkInId/event_period/$eventPeriodId/location_event_periods/$locationEventPeriodId/event_period';
return PcoCollection.fromApiCall<PcoCheckInsEventPeriod>(url,
query: query, apiVersion: kApiVersion);
}