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