getAllFromCheckInAndLocation static method
Will get a PcoCollection
containing ALL PcoCheckInsLocation objects (expecting many)
using a path like this: /check-ins/v2/check_ins/$checkInId/locations/$locationId/locations
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<PcoCheckInsLocation>>
getAllFromCheckInAndLocation(
String checkInId,
String locationId, {
String? id,
PcoCheckInsLocationQuery? query,
bool includeAllRelated = false,
bool includeEvent = false,
bool includeLocations = false,
bool includeOptions = false,
bool includeParent = false,
}) async {
query ??= PcoCheckInsLocationQuery();
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/locations/$locationId/locations';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoCheckInsLocation>(url,
query: query, apiVersion: kApiVersion);
}