PcoPeoplePersonQuery constructor

PcoPeoplePersonQuery({
  1. bool includeAddresses = false,
  2. bool includeEmails = false,
  3. bool includeFieldData = false,
  4. bool includeHouseholds = false,
  5. bool includeInactiveReason = false,
  6. bool includeMaritalStatus = false,
  7. bool includeNamePrefix = false,
  8. bool includeNameSuffix = false,
  9. bool includeOrganization = false,
  10. bool includePersonApps = false,
  11. bool includePhoneNumbers = false,
  12. bool includePlatformNotifications = false,
  13. bool includePrimaryCampus = false,
  14. bool includeSchool = false,
  15. bool includeSocialProfiles = false,
  16. bool includeAllRelated = false,
  17. String? whereAccountingAdministrator,
  18. String? whereAnniversary,
  19. String? whereBirthdate,
  20. String? whereChild,
  21. String? whereCreatedAt,
  22. String? whereFirstName,
  23. String? whereGender,
  24. String? whereGivenName,
  25. String? whereGrade,
  26. String? whereGraduationYear,
  27. String? whereId,
  28. String? whereInactivatedAt,
  29. String? whereLastName,
  30. String? whereMedicalNotes,
  31. String? whereMembership,
  32. String? whereMiddleName,
  33. String? whereNickname,
  34. String? wherePeoplePermissions,
  35. String? whereRemoteId,
  36. String? whereSearchName,
  37. String? whereSearchNameOrEmail,
  38. String? whereSearchNameOrEmailOrPhoneNumber,
  39. String? whereSearchPhoneNumber,
  40. String? whereSearchPhoneNumberE164,
  41. String? whereSiteAdministrator,
  42. String? whereStatus,
  43. String? whereUpdatedAt,
  44. PcoPeoplePersonFilter? filterBy,
  45. PcoPeoplePersonOrder? orderBy,
  46. bool reverse = false,
  47. int perPage = 25,
  48. int pageOffset = 0,
  49. Map<String, String> extraParams = const {},
  50. List<PlanningCenterApiWhere>? where,
  51. Iterable<String> filter = const <String>[],
  52. String? order,
  53. Iterable<String> include = const <String>[],
})

Implementation

PcoPeoplePersonQuery({
  /// include associated addresses
  /// when true, adds `?include=addresses` to url
  bool includeAddresses = false,

  /// include associated emails
  /// when true, adds `?include=emails` to url
  bool includeEmails = false,

  /// include associated field_data
  /// when true, adds `?include=field_data` to url
  bool includeFieldData = false,

  /// include associated households
  /// when true, adds `?include=households` to url
  bool includeHouseholds = false,

  /// include associated inactive_reason
  /// when true, adds `?include=inactive_reason` to url
  bool includeInactiveReason = false,

  /// include associated marital_status
  /// when true, adds `?include=marital_status` to url
  bool includeMaritalStatus = false,

  /// include associated name_prefix
  /// when true, adds `?include=name_prefix` to url
  bool includeNamePrefix = false,

  /// include associated name_suffix
  /// when true, adds `?include=name_suffix` to url
  bool includeNameSuffix = false,

  /// include associated organization
  /// when true, adds `?include=organization` to url
  bool includeOrganization = false,

  /// include associated person_apps
  /// when true, adds `?include=person_apps` to url
  bool includePersonApps = false,

  /// include associated phone_numbers
  /// when true, adds `?include=phone_numbers` to url
  bool includePhoneNumbers = false,

  /// include associated platform_notifications
  /// when true, adds `?include=platform_notifications` to url
  bool includePlatformNotifications = false,

  /// include associated primary_campus
  /// when true, adds `?include=primary_campus` to url
  bool includePrimaryCampus = false,

  /// include associated school
  /// when true, adds `?include=school` to url
  bool includeSchool = false,

  /// include associated social_profiles
  /// when true, adds `?include=social_profiles` to url
  bool includeSocialProfiles = false,

  /// when true, adds `?include=addresses,emails,field_data,households,inactive_reason,marital_status,name_prefix,name_suffix,organization,person_apps,phone_numbers,platform_notifications,primary_campus,school,social_profiles` to url parameters
  bool includeAllRelated = false,

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

  /// Query by `anniversary`
  /// query on a specific anniversary, url example: ?where[anniversary]=2000-01-01
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereAnniversary,

  /// Query by `birthdate`
  /// query on a specific birthdate, url example: ?where[birthdate]=2000-01-01
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereBirthdate,

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

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

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

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

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

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

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

  /// Query by `inactivated_at`
  /// Set to an ISO 8601 date or time to make the profile inactive. Set to "null" to reactivate the profile., url example: ?where[inactivated_at]=2000-01-01T12:00:00Z
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereInactivatedAt,

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

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

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

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

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

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

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

  /// Query by `search_name`
  /// Search by Name (first, last, combination), url example: ?where[search_name]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereSearchName,

  /// Query by `search_name_or_email`
  /// Search by Name (first, last, combination) or Email, url example: ?where[search_name_or_email]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereSearchNameOrEmail,

  /// Query by `search_name_or_email_or_phone_number`
  /// Search by Name (first, last, combination), Email, or Phone Number, url example: ?where[search_name_or_email_or_phone_number]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereSearchNameOrEmailOrPhoneNumber,

  /// Query by `search_phone_number`
  /// Search by Phone Number, url example: ?where[search_phone_number]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereSearchPhoneNumber,

  /// Query by `search_phone_number_e164`
  /// Search by Phone Number E164, url example: ?where[search_phone_number_e164]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereSearchPhoneNumberE164,

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

  /// Query by `status`
  /// Set to "inactive" to set "inactivated_at" to the current time and make the profile inactive. Set to anything else to clear "inactivated_at" and reactivate the profile., url example: ?where[status]=string
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereStatus,

  /// 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,
  PcoPeoplePersonFilter? filterBy,
  PcoPeoplePersonOrder? 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 || includeAddresses) include.add('addresses');
  if (includeAllRelated || includeEmails) include.add('emails');
  if (includeAllRelated || includeFieldData) include.add('field_data');
  if (includeAllRelated || includeHouseholds) include.add('households');
  if (includeAllRelated || includeInactiveReason)
    include.add('inactive_reason');
  if (includeAllRelated || includeMaritalStatus)
    include.add('marital_status');
  if (includeAllRelated || includeNamePrefix) include.add('name_prefix');
  if (includeAllRelated || includeNameSuffix) include.add('name_suffix');
  if (includeAllRelated || includeOrganization) include.add('organization');
  if (includeAllRelated || includePersonApps) include.add('person_apps');
  if (includeAllRelated || includePhoneNumbers) include.add('phone_numbers');
  if (includeAllRelated || includePlatformNotifications)
    include.add('platform_notifications');
  if (includeAllRelated || includePrimaryCampus)
    include.add('primary_campus');
  if (includeAllRelated || includeSchool) include.add('school');
  if (includeAllRelated || includeSocialProfiles)
    include.add('social_profiles');

  if (whereAccountingAdministrator != null)
    where.add(PlanningCenterApiWhere.parse(
        'accounting_administrator', whereAccountingAdministrator));
  if (whereAnniversary != null)
    where.add(PlanningCenterApiWhere.parse('anniversary', whereAnniversary));
  if (whereBirthdate != null)
    where.add(PlanningCenterApiWhere.parse('birthdate', whereBirthdate));
  if (whereChild != null)
    where.add(PlanningCenterApiWhere.parse('child', whereChild));
  if (whereCreatedAt != null)
    where.add(PlanningCenterApiWhere.parse('created_at', whereCreatedAt));
  if (whereFirstName != null)
    where.add(PlanningCenterApiWhere.parse('first_name', whereFirstName));
  if (whereGender != null)
    where.add(PlanningCenterApiWhere.parse('gender', whereGender));
  if (whereGivenName != null)
    where.add(PlanningCenterApiWhere.parse('given_name', whereGivenName));
  if (whereGrade != null)
    where.add(PlanningCenterApiWhere.parse('grade', whereGrade));
  if (whereGraduationYear != null)
    where.add(
        PlanningCenterApiWhere.parse('graduation_year', whereGraduationYear));
  if (whereId != null) where.add(PlanningCenterApiWhere.parse('id', whereId));
  if (whereInactivatedAt != null)
    where.add(
        PlanningCenterApiWhere.parse('inactivated_at', whereInactivatedAt));
  if (whereLastName != null)
    where.add(PlanningCenterApiWhere.parse('last_name', whereLastName));
  if (whereMedicalNotes != null)
    where.add(
        PlanningCenterApiWhere.parse('medical_notes', whereMedicalNotes));
  if (whereMembership != null)
    where.add(PlanningCenterApiWhere.parse('membership', whereMembership));
  if (whereMiddleName != null)
    where.add(PlanningCenterApiWhere.parse('middle_name', whereMiddleName));
  if (whereNickname != null)
    where.add(PlanningCenterApiWhere.parse('nickname', whereNickname));
  if (wherePeoplePermissions != null)
    where.add(PlanningCenterApiWhere.parse(
        'people_permissions', wherePeoplePermissions));
  if (whereRemoteId != null)
    where.add(PlanningCenterApiWhere.parse('remote_id', whereRemoteId));
  if (whereSearchName != null)
    where.add(PlanningCenterApiWhere.parse('search_name', whereSearchName));
  if (whereSearchNameOrEmail != null)
    where.add(PlanningCenterApiWhere.parse(
        'search_name_or_email', whereSearchNameOrEmail));
  if (whereSearchNameOrEmailOrPhoneNumber != null)
    where.add(PlanningCenterApiWhere.parse(
        'search_name_or_email_or_phone_number',
        whereSearchNameOrEmailOrPhoneNumber));
  if (whereSearchPhoneNumber != null)
    where.add(PlanningCenterApiWhere.parse(
        'search_phone_number', whereSearchPhoneNumber));
  if (whereSearchPhoneNumberE164 != null)
    where.add(PlanningCenterApiWhere.parse(
        'search_phone_number_e164', whereSearchPhoneNumberE164));
  if (whereSiteAdministrator != null)
    where.add(PlanningCenterApiWhere.parse(
        'site_administrator', whereSiteAdministrator));
  if (whereStatus != null)
    where.add(PlanningCenterApiWhere.parse('status', whereStatus));
  if (whereUpdatedAt != null)
    where.add(PlanningCenterApiWhere.parse('updated_at', whereUpdatedAt));

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