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