getConflictsFromPeopleImport static method

Future<PcoCollection<PcoPeoplePeopleImportConflict>> getConflictsFromPeopleImport(
  1. String peopleImportId, {
  2. String? id,
  3. PcoPeoplePeopleImportConflictQuery? query,
  4. bool getAll = false,
})

Will get a PcoCollection of PcoPeoplePeopleImportConflict objects (expecting many) using a path like this: /people/v2/people_imports/$peopleImportId/conflicts

Available Query Filters:

  • creates
  • creates_and_updates
  • errors
  • household_creates
  • household_updates
  • identical
  • ignored
  • not_ignored
  • 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<PcoPeoplePeopleImportConflict>>
    getConflictsFromPeopleImport(
  String peopleImportId, {
  String? id,
  PcoPeoplePeopleImportConflictQuery? query,
  bool getAll = false,
}) async {
  query ??= PcoPeoplePeopleImportConflictQuery();
  if (getAll) query.getAll = true;

  var url = '/people/v2/people_imports/$peopleImportId/conflicts';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoPeoplePeopleImportConflict>(url,
      query: query, apiVersion: kApiVersion);
}