getFromPersonAndPlanPerson static method
Future<PcoCollection<PcoServicesPlanPersonTime> >
getFromPersonAndPlanPerson(
- String personId,
- String planPersonId,
- {String? id,
- PcoServicesPlanPersonTimeQuery? query,
- bool getAll = false}
Will get a PcoCollection
of PcoServicesPlanPersonTime objects (expecting many)
using a path like this: /services/v2/people/$personId/plan_people/$planPersonId/plan_person_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<PcoServicesPlanPersonTime>>
getFromPersonAndPlanPerson(
String personId,
String planPersonId, {
String? id,
PcoServicesPlanPersonTimeQuery? query,
bool getAll = false,
}) async {
query ??= PcoServicesPlanPersonTimeQuery();
if (getAll) query.getAll = true;
var url =
'/services/v2/people/$personId/plan_people/$planPersonId/plan_person_times';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoServicesPlanPersonTime>(url,
query: query, apiVersion: kApiVersion);
}