getSingleFromCheckInAndLocation static method
Will get a single PcoCheckInsLocationEventPeriod object
using a path like this: /check-ins/v2/check_ins/$checkInId/locations/$locationId/location_event_periods/[id]
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<PcoCheckInsLocationEventPeriod?>
getSingleFromCheckInAndLocation(
String checkInId,
String locationId,
String id, {
PcoCheckInsLocationEventPeriodQuery? query,
bool includeAllRelated = false,
bool includeEventPeriod = false,
bool includeLocation = false,
}) async {
query ??= PcoCheckInsLocationEventPeriodQuery();
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/locations/$locationId/location_event_periods/$id';
var retval =
await PcoCollection.fromApiCall<PcoCheckInsLocationEventPeriod>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}