getAllFromServiceTypeAndPlan static method
Future<PcoCollection<PcoServicesPlanTime> >
getAllFromServiceTypeAndPlan(
- String serviceTypeId,
- String planId, {
- String? id,
- PcoServicesPlanTimeQuery? query,
- bool includeSplitTeamRehearsalAssignments = false,
Will get a PcoCollection
containing ALL PcoServicesPlanTime objects (expecting many)
using a path like this: /services/v2/service_types/$serviceTypeId/plans/$planId/plan_times
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>>
getAllFromServiceTypeAndPlan(
String serviceTypeId,
String planId, {
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/plans/$planId/plan_times';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoServicesPlanTime>(url,
query: query, apiVersion: kApiVersion);
}