PcoPeopleHouseholdMembershipQuery constructor

PcoPeopleHouseholdMembershipQuery(
  1. {bool includeHousehold = false,
  2. bool includePerson = false,
  3. bool includeAllRelated = false,
  4. String? wherePending,
  5. String? wherePersonName,
  6. PcoPeopleHouseholdMembershipOrder? orderBy,
  7. bool reverse = false,
  8. int perPage = 25,
  9. int pageOffset = 0,
  10. Map<String, String> extraParams = const {},
  11. List<PlanningCenterApiWhere>? where,
  12. Iterable<String> filter = const <String>[],
  13. String? order,
  14. Iterable<String> include = const <String>[]}
)

Implementation

PcoPeopleHouseholdMembershipQuery({
  /// include associated household
  /// when true, adds `?include=household` to url
  bool includeHousehold = false,

  /// include associated person
  /// when true, adds `?include=person` to url
  bool includePerson = false,

  /// when true, adds `?include=household,person` to url parameters
  bool includeAllRelated = false,

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

  /// Query by `person_name`
  /// query on a specific person_name, url example: ?where[person_name]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? wherePersonName,
  PcoPeopleHouseholdMembershipOrder? 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 (includeAllRelated || includeHousehold) include.add('household');
  if (includeAllRelated || includePerson) include.add('person');

  if (wherePending != null)
    where.add(PlanningCenterApiWhere.parse('pending', wherePending));
  if (wherePersonName != null)
    where.add(PlanningCenterApiWhere.parse('person_name', wherePersonName));

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