getAllFromPerson static method

Will get a PcoCollection containing ALL PcoServicesSchedulingPreference objects (expecting many) using a path like this: /services/v2/people/$personId/scheduling_preferences

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<PcoServicesSchedulingPreference>>
    getAllFromPerson(
  String personId, {
  String? id,
  PcoServicesSchedulingPreferenceQuery? query,
}) async {
  query ??= PcoServicesSchedulingPreferenceQuery();
  query.getAll = true;

  var url = '/services/v2/people/$personId/scheduling_preferences';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoServicesSchedulingPreference>(url,
      query: query, apiVersion: kApiVersion);
}