getAllFromPerson static method
Will get a PcoCollection
containing ALL PcoPeopleWorkflowCard objects (expecting many)
using a path like this: /people/v2/people/$personId/workflow_cards
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.
This function forces the query.getAll
to be true.
Implementation
static Future<PcoCollection<PcoPeopleWorkflowCard>> getAllFromPerson(
String personId, {
String? id,
PcoPeopleWorkflowCardQuery? query,
bool includeAllRelated = false,
bool includeAssignee = false,
bool includeCurrentStep = false,
bool includePerson = false,
bool includeWorkflow = false,
}) async {
query ??= PcoPeopleWorkflowCardQuery();
query.getAll = true;
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';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoPeopleWorkflowCard>(url,
query: query, apiVersion: kApiVersion);
}