getAll static method
Future<PcoCollection<PcoServicesFolder> >
getAll({
- String? id,
- PcoServicesFolderQuery? query,
- bool includeServiceTypes = false,
Will get a PcoCollection
containing ALL PcoServicesFolder objects (expecting many)
using a path like this: /services/v2/folders
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<PcoServicesFolder>> getAll({
String? id,
PcoServicesFolderQuery? query,
bool includeServiceTypes = false,
}) async {
query ??= PcoServicesFolderQuery();
query.getAll = true;
if (includeServiceTypes) query.include.add('service_types');
var url = '/services/v2/folders';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoServicesFolder>(url,
query: query, apiVersion: kApiVersion);
}