PcoPeopleHouseholdQuery constructor

PcoPeopleHouseholdQuery({
  1. bool includePeople = false,
  2. String? whereCreatedAt,
  3. String? whereMemberCount,
  4. String? whereName,
  5. String? wherePrimaryContactName,
  6. String? whereUpdatedAt,
  7. PcoPeopleHouseholdOrder? orderBy,
  8. bool reverse = false,
  9. int perPage = 25,
  10. int pageOffset = 0,
  11. Map<String, String> extraParams = const {},
  12. List<PlanningCenterApiWhere>? where,
  13. Iterable<String> filter = const <String>[],
  14. String? order,
  15. Iterable<String> include = const <String>[],
})

Implementation

PcoPeopleHouseholdQuery({
  /// include associated people
  /// when true, adds `?include=people` to url
  bool includePeople = false,

  /// 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 `member_count`
  /// query on a specific member_count, url example: ?where[member_count]=1
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereMemberCount,

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

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

  /// Query by `updated_at`
  /// query on a specific updated_at, url example: ?where[updated_at]=2000-01-01T12:00:00Z
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereUpdatedAt,
  PcoPeopleHouseholdOrder? 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 (includePeople) include.add('people');

  if (whereCreatedAt != null)
    where.add(PlanningCenterApiWhere.parse('created_at', whereCreatedAt));
  if (whereMemberCount != null)
    where.add(PlanningCenterApiWhere.parse('member_count', whereMemberCount));
  if (whereName != null)
    where.add(PlanningCenterApiWhere.parse('name', whereName));
  if (wherePrimaryContactName != null)
    where.add(PlanningCenterApiWhere.parse(
        'primary_contact_name', wherePrimaryContactName));
  if (whereUpdatedAt != null)
    where.add(PlanningCenterApiWhere.parse('updated_at', whereUpdatedAt));

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