getDeclinedPlanTimesFromPersonAndSchedule static method
Future<PcoCollection<PcoServicesPlanTime> >
getDeclinedPlanTimesFromPersonAndSchedule(
- String personId,
- String scheduleId, {
- PcoServicesPlanTimeQuery? query,
- bool getAll = false,
- bool includeSplitTeamRehearsalAssignments = false,
Will get a PcoCollection
of PcoServicesPlanTime objects (expecting one)
using a path like this: /services/v2/people/$personId/schedules/$scheduleId/declined_plan_times
Getting a PcoCollection
is useful even when retrieving a single object
because it contains error data and helper functions.
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.
Implementation
static Future<PcoCollection<PcoServicesPlanTime>>
getDeclinedPlanTimesFromPersonAndSchedule(
String personId,
String scheduleId, {
PcoServicesPlanTimeQuery? query,
bool getAll = false,
bool includeSplitTeamRehearsalAssignments = false,
}) async {
query ??= PcoServicesPlanTimeQuery();
if (getAll) query.getAll = true;
if (includeSplitTeamRehearsalAssignments)
query.include.add('split_team_rehearsal_assignments');
var url =
'/services/v2/people/$personId/schedules/$scheduleId/declined_plan_times';
return PcoCollection.fromApiCall<PcoServicesPlanTime>(url,
query: query, apiVersion: kApiVersion);
}