getSingleFromPerson static method
Will get a single PcoPeopleWorkflowCard
object
using a path like this: /people/v2/people/$personId/workflow_cards/[id]
Available Query Filters:
assigned
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<PcoPeopleWorkflowCard?> getSingleFromPerson(
String personId,
String id, {
PcoPeopleWorkflowCardQuery? query,
bool includeAllRelated = false,
bool includeAssignee = false,
bool includeCurrentStep = false,
bool includePerson = false,
bool includeWorkflow = false,
}) async {
query ??= PcoPeopleWorkflowCardQuery();
if (includeAllRelated)
query.include.addAll(PcoPeopleWorkflowCard.canInclude);
if (includeAssignee) query.include.add('assignee');
if (includeCurrentStep) query.include.add('current_step');
if (includePerson) query.include.add('person');
if (includeWorkflow) query.include.add('workflow');
var url = '/people/v2/people/$personId/workflow_cards/$id';
var retval = await PcoCollection.fromApiCall<PcoPeopleWorkflowCard>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}