PcoCheckInsCheckInQuery constructor

PcoCheckInsCheckInQuery({
  1. bool includeCheckInTimes = false,
  2. bool includeCheckedInAt = false,
  3. bool includeCheckedInBy = false,
  4. bool includeCheckedOutBy = false,
  5. bool includeEvent = false,
  6. bool includeEventPeriod = false,
  7. bool includeEventTimes = false,
  8. bool includeLocations = false,
  9. bool includeOptions = false,
  10. bool includePerson = false,
  11. bool includeAllRelated = false,
  12. String? whereCreatedAt,
  13. String? whereSecurityCode,
  14. String? whereUpdatedAt,
  15. PcoCheckInsCheckInFilter? filterBy,
  16. PcoCheckInsCheckInOrder? orderBy,
  17. bool reverse = false,
  18. int perPage = 25,
  19. int pageOffset = 0,
  20. Map<String, String> extraParams = const {},
  21. List<PlanningCenterApiWhere>? where,
  22. Iterable<String> filter = const <String>[],
  23. String? order,
  24. Iterable<String> include = const <String>[],
})

Implementation

PcoCheckInsCheckInQuery({
  /// include associated check_in_times
  /// when true, adds `?include=check_in_times` to url
  bool includeCheckInTimes = false,

  /// include associated checked_in_at
  /// when true, adds `?include=checked_in_at` to url
  bool includeCheckedInAt = false,

  /// include associated checked_in_by
  /// when true, adds `?include=checked_in_by` to url
  bool includeCheckedInBy = false,

  /// include associated checked_out_by
  /// when true, adds `?include=checked_out_by` to url
  bool includeCheckedOutBy = false,

  /// include associated event
  /// when true, adds `?include=event` to url
  bool includeEvent = false,

  /// include associated event_period
  /// when true, adds `?include=event_period` to url
  bool includeEventPeriod = false,

  /// include associated event_times
  /// when true, adds `?include=event_times` to url
  bool includeEventTimes = false,

  /// include associated locations
  /// when true, adds `?include=locations` to url
  bool includeLocations = false,

  /// include associated options
  /// when true, adds `?include=options` to url
  bool includeOptions = false,

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

  /// when true, adds `?include=check_in_times,checked_in_at,checked_in_by,checked_out_by,event,event_period,event_times,locations,options,person` to url parameters
  bool includeAllRelated = 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 `security_code`
  /// query on a specific security_code, url example: ?where[security_code]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereSecurityCode,

  /// 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,
  PcoCheckInsCheckInFilter? filterBy,
  PcoCheckInsCheckInOrder? 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 (filterBy != null) filter.add(filterString(filterBy));
  if (includeAllRelated || includeCheckInTimes) include.add('check_in_times');
  if (includeAllRelated || includeCheckedInAt) include.add('checked_in_at');
  if (includeAllRelated || includeCheckedInBy) include.add('checked_in_by');
  if (includeAllRelated || includeCheckedOutBy) include.add('checked_out_by');
  if (includeAllRelated || includeEvent) include.add('event');
  if (includeAllRelated || includeEventPeriod) include.add('event_period');
  if (includeAllRelated || includeEventTimes) include.add('event_times');
  if (includeAllRelated || includeLocations) include.add('locations');
  if (includeAllRelated || includeOptions) include.add('options');
  if (includeAllRelated || includePerson) include.add('person');

  if (whereCreatedAt != null)
    where.add(PlanningCenterApiWhere.parse('created_at', whereCreatedAt));
  if (whereSecurityCode != null)
    where.add(
        PlanningCenterApiWhere.parse('security_code', whereSecurityCode));
  if (whereUpdatedAt != null)
    where.add(PlanningCenterApiWhere.parse('updated_at', whereUpdatedAt));

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