getAllFromServiceType static method
Will get a PcoCollection
containing ALL PcoServicesTeamPosition objects (expecting many)
using a path like this: /services/v2/service_types/$serviceTypeId/team_positions
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<PcoServicesTeamPosition>> getAllFromServiceType(
String serviceTypeId, {
String? id,
PcoServicesTeamPositionQuery? query,
bool includeAllRelated = false,
bool includeTags = false,
bool includeTeam = false,
}) async {
query ??= PcoServicesTeamPositionQuery();
query.getAll = true;
if (includeAllRelated)
query.include.addAll(PcoServicesTeamPosition.canInclude);
if (includeTags) query.include.add('tags');
if (includeTeam) query.include.add('team');
var url = '/services/v2/service_types/$serviceTypeId/team_positions';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoServicesTeamPosition>(url,
query: query, apiVersion: kApiVersion);
}