PcoPeopleAddressQuery constructor

PcoPeopleAddressQuery({
  1. String? whereCity,
  2. String? whereLocation,
  3. String? wherePrimary,
  4. String? whereState,
  5. String? whereStreet,
  6. String? whereZip,
  7. PcoPeopleAddressOrder? 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

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

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

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

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

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

  /// Query by `zip`
  /// query on a specific zip, url example: ?where[zip]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereZip,
  PcoPeopleAddressOrder? 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 (whereCity != null)
    where.add(PlanningCenterApiWhere.parse('city', whereCity));
  if (whereLocation != null)
    where.add(PlanningCenterApiWhere.parse('location', whereLocation));
  if (wherePrimary != null)
    where.add(PlanningCenterApiWhere.parse('primary', wherePrimary));
  if (whereState != null)
    where.add(PlanningCenterApiWhere.parse('state', whereState));
  if (whereStreet != null)
    where.add(PlanningCenterApiWhere.parse('street', whereStreet));
  if (whereZip != null)
    where.add(PlanningCenterApiWhere.parse('zip', whereZip));

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