PcoPeopleNoteCategoryQuery constructor

PcoPeopleNoteCategoryQuery(
  1. {bool includeShares = false,
  2. bool includeSubscribers = false,
  3. bool includeSubscriptions = false,
  4. bool includeAllRelated = false,
  5. String? whereCreatedAt,
  6. String? whereLocked,
  7. String? whereName,
  8. String? whereOrganizationId,
  9. String? whereUpdatedAt,
  10. PcoPeopleNoteCategoryFilter? filterBy,
  11. PcoPeopleNoteCategoryOrder? orderBy,
  12. bool reverse = false,
  13. int perPage = 25,
  14. int pageOffset = 0,
  15. Map<String, String> extraParams = const {},
  16. List<PlanningCenterApiWhere>? where,
  17. Iterable<String> filter = const <String>[],
  18. String? order,
  19. Iterable<String> include = const <String>[]}
)

Implementation

PcoPeopleNoteCategoryQuery({
  /// include associated shares
  /// when true, adds `?include=shares` to url
  bool includeShares = false,

  /// include associated subscribers
  /// when true, adds `?include=subscribers` to url
  bool includeSubscribers = false,

  /// include associated subscriptions
  /// when true, adds `?include=subscriptions` to url
  bool includeSubscriptions = false,

  /// when true, adds `?include=shares,subscribers,subscriptions` 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 `locked`
  /// query on a specific locked, url example: ?where[locked]=true
  /// include a prefix of `<`, `<=`, `>`, `>=` to query by comparisons
  String? whereLocked,

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

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

  /// 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,
  PcoPeopleNoteCategoryFilter? filterBy,
  PcoPeopleNoteCategoryOrder? 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 || includeShares) include.add('shares');
  if (includeAllRelated || includeSubscribers) include.add('subscribers');
  if (includeAllRelated || includeSubscriptions) include.add('subscriptions');

  if (whereCreatedAt != null)
    where.add(PlanningCenterApiWhere.parse('created_at', whereCreatedAt));
  if (whereLocked != null)
    where.add(PlanningCenterApiWhere.parse('locked', whereLocked));
  if (whereName != null)
    where.add(PlanningCenterApiWhere.parse('name', whereName));
  if (whereOrganizationId != null)
    where.add(
        PlanningCenterApiWhere.parse('organization_id', whereOrganizationId));
  if (whereUpdatedAt != null)
    where.add(PlanningCenterApiWhere.parse('updated_at', whereUpdatedAt));

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