getFromCheckInAndEventPeriodAndLocationEventPeriod static method
Will get a PcoCollection
of PcoCheckInsLocation objects (expecting one)
using a path like this: /check-ins/v2/check_ins/$checkInId/event_period/$eventPeriodId/location_event_periods/$locationEventPeriodId/location
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<PcoCheckInsLocation>>
getFromCheckInAndEventPeriodAndLocationEventPeriod(
String checkInId,
String eventPeriodId,
String locationEventPeriodId, {
PcoCheckInsLocationQuery? query,
bool getAll = false,
bool includeAllRelated = false,
bool includeEvent = false,
bool includeLocations = false,
bool includeOptions = false,
bool includeParent = false,
}) async {
query ??= PcoCheckInsLocationQuery();
if (getAll) query.getAll = true;
if (includeAllRelated) query.include.addAll(PcoCheckInsLocation.canInclude);
if (includeEvent) query.include.add('event');
if (includeLocations) query.include.add('locations');
if (includeOptions) query.include.add('options');
if (includeParent) query.include.add('parent');
var url =
'/check-ins/v2/check_ins/$checkInId/event_period/$eventPeriodId/location_event_periods/$locationEventPeriodId/location';
return PcoCollection.fromApiCall<PcoCheckInsLocation>(url,
query: query, apiVersion: kApiVersion);
}