getHistoriesFromPeopleImport static method
Will get a PcoCollection
of PcoPeoplePeopleImportHistory objects (expecting many)
using a path like this: /people/v2/people_imports/$peopleImportId/histories
Available Query Filters:
creates
household_creates
household_updates
identical
updates
Getting a PcoCollection
is useful even when retrieving a single object
because it contains error data and helper functions.
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<PcoCollection<PcoPeoplePeopleImportHistory>>
getHistoriesFromPeopleImport(
String peopleImportId, {
String? id,
PcoPeoplePeopleImportHistoryQuery? query,
bool getAll = false,
bool includeAllRelated = false,
bool includeHousehold = false,
bool includePerson = false,
}) async {
query ??= PcoPeoplePeopleImportHistoryQuery();
if (getAll) query.getAll = true;
if (includeAllRelated)
query.include.addAll(PcoPeoplePeopleImportHistory.canInclude);
if (includeHousehold) query.include.add('household');
if (includePerson) query.include.add('person');
var url = '/people/v2/people_imports/$peopleImportId/histories';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoPeoplePeopleImportHistory>(url,
query: query, apiVersion: kApiVersion);
}