getSingleFromPerson static method

Will get a single PcoServicesSchedulingPreference object using a path like this: /services/v2/people/$personId/scheduling_preferences/[id]

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

  var url = '/services/v2/people/$personId/scheduling_preferences/$id';
  var retval =
      await PcoCollection.fromApiCall<PcoServicesSchedulingPreference>(url,
          query: query, apiVersion: kApiVersion);
  return retval.items.isEmpty ? null : retval.items.first;
}