getSingleFromPerson static method
Future<PcoCheckInsPass?>
getSingleFromPerson(
- String personId,
- String id, {
- PcoCheckInsPassQuery? query,
- bool includePerson = false,
Will get a single PcoCheckInsPass
object
using a path like this: /check-ins/v2/people/$personId/passes/[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<PcoCheckInsPass?> getSingleFromPerson(
String personId,
String id, {
PcoCheckInsPassQuery? query,
bool includePerson = false,
}) async {
query ??= PcoCheckInsPassQuery();
if (includePerson) query.include.add('person');
var url = '/check-ins/v2/people/$personId/passes/$id';
var retval = await PcoCollection.fromApiCall<PcoCheckInsPass>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}