PcoPeoplePersonMergerQuery constructor

PcoPeoplePersonMergerQuery({
  1. String? whereCreatedAt,
  2. String? wherePersonToKeepId,
  3. String? wherePersonToRemoveId,
  4. PcoPeoplePersonMergerOrder? orderBy,
  5. bool reverse = false,
  6. int perPage = 25,
  7. int pageOffset = 0,
  8. Map<String, String> extraParams = const {},
  9. List<PlanningCenterApiWhere>? where,
  10. Iterable<String> filter = const <String>[],
  11. String? order,
  12. Iterable<String> include = const <String>[],
})

Implementation

PcoPeoplePersonMergerQuery({
  /// Query by `created_at`
  /// query on a specific created_at, url example: ?where[created_at]=2000-01-01T12:00:00Z
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereCreatedAt,

  /// Query by `person_to_keep_id`
  /// query on a specific person_to_keep_id, url example: ?where[person_to_keep_id]=primary_key
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? wherePersonToKeepId,

  /// Query by `person_to_remove_id`
  /// query on a specific person_to_remove_id, url example: ?where[person_to_remove_id]=primary_key
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? wherePersonToRemoveId,
  PcoPeoplePersonMergerOrder? orderBy,

  /// reverse the ordering
  bool reverse = false,

  // direct access to super class params
  super.perPage,
  super.pageOffset,
  super.extraParams,
  super.where,
  super.filter,
  super.order,
  super.include,
}) : super() {
  if (whereCreatedAt != null)
    where.add(PlanningCenterApiWhere.parse('created_at', whereCreatedAt));
  if (wherePersonToKeepId != null)
    where.add(PlanningCenterApiWhere.parse(
        'person_to_keep_id', wherePersonToKeepId));
  if (wherePersonToRemoveId != null)
    where.add(PlanningCenterApiWhere.parse(
        'person_to_remove_id', wherePersonToRemoveId));

  if (orderBy != null) order = orderString(orderBy, reverse: reverse);
}