PcoPeopleFormSubmissionQuery constructor

PcoPeopleFormSubmissionQuery({
  1. bool includeForm = false,
  2. bool includeFormFields = false,
  3. bool includeFormSubmissionValues = false,
  4. bool includePerson = false,
  5. bool includeAllRelated = false,
  6. PcoPeopleFormSubmissionOrder? 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

PcoPeopleFormSubmissionQuery({
  /// include associated form
  /// when true, adds `?include=form` to url
  bool includeForm = false,

  /// include associated form_fields
  /// when true, adds `?include=form_fields` to url
  bool includeFormFields = false,

  /// include associated form_submission_values
  /// when true, adds `?include=form_submission_values` to url
  bool includeFormSubmissionValues = false,

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

  /// when true, adds `?include=form,form_fields,form_submission_values,person` to url parameters
  bool includeAllRelated = false,
  PcoPeopleFormSubmissionOrder? 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 || includeForm) include.add('form');
  if (includeAllRelated || includeFormFields) include.add('form_fields');
  if (includeAllRelated || includeFormSubmissionValues)
    include.add('form_submission_values');
  if (includeAllRelated || includePerson) include.add('person');

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