PcoGivingPersonQuery constructor

PcoGivingPersonQuery({
  1. String? whereFirstName,
  2. String? whereLastName,
  3. PcoGivingPersonFilter? filterBy,
  4. bool reverse = false,
  5. int perPage = 25,
  6. int pageOffset = 0,
  7. Map<String, String> extraParams = const {},
  8. List<PlanningCenterApiWhere>? where,
  9. Iterable<String> filter = const <String>[],
  10. String? order,
  11. Iterable<String> include = const <String>[],
})

Implementation

PcoGivingPersonQuery({
  /// Query by `first_name`
  /// query on a specific first_name, url example: ?where[first_name]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereFirstName,

  /// Query by `last_name`
  /// query on a specific last_name, url example: ?where[last_name]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereLastName,
  PcoGivingPersonFilter? filterBy,

  /// 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 (filterBy != null) filter.add(filterString(filterBy));

  if (whereFirstName != null)
    where.add(PlanningCenterApiWhere.parse('first_name', whereFirstName));
  if (whereLastName != null)
    where.add(PlanningCenterApiWhere.parse('last_name', whereLastName));
}