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