getAllFromServiceType static method

Future<PcoCollection<PcoServicesPlanTime>> getAllFromServiceType(
  1. String serviceTypeId, {
  2. String? id,
  3. PcoServicesPlanTimeQuery? query,
  4. bool includeSplitTeamRehearsalAssignments = false,
})

Will get a PcoCollection containing ALL PcoServicesPlanTime objects (expecting many) using a path like this: /services/v2/service_types/$serviceTypeId/plan_times

Available Query Filters:

  • future
  • named
  • past

Additional options may be specified by using the query argument, but some query options are also available as boolean flags in this function call too.

This function forces the query.getAll to be true.

Implementation

static Future<PcoCollection<PcoServicesPlanTime>> getAllFromServiceType(
  String serviceTypeId, {
  String? id,
  PcoServicesPlanTimeQuery? query,
  bool includeSplitTeamRehearsalAssignments = false,
}) async {
  query ??= PcoServicesPlanTimeQuery();
  query.getAll = true;

  if (includeSplitTeamRehearsalAssignments)
    query.include.add('split_team_rehearsal_assignments');
  var url = '/services/v2/service_types/$serviceTypeId/plan_times';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoServicesPlanTime>(url,
      query: query, apiVersion: kApiVersion);
}