getAllFromBatchGroup static method
Will get a PcoCollection
containing ALL PcoGivingBatch objects (expecting many)
using a path like this: /giving/v2/batch_groups/$batchGroupId/batches
Available Query Filters:
committed
in_progress
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<PcoGivingBatch>> getAllFromBatchGroup(
String batchGroupId, {
String? id,
PcoGivingBatchQuery? query,
bool includeAllRelated = false,
bool includeBatchGroup = false,
bool includeOwner = false,
}) async {
query ??= PcoGivingBatchQuery();
query.getAll = true;
if (includeAllRelated) query.include.addAll(PcoGivingBatch.canInclude);
if (includeBatchGroup) query.include.add('batch_group');
if (includeOwner) query.include.add('owner');
var url = '/giving/v2/batch_groups/$batchGroupId/batches';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoGivingBatch>(url,
query: query, apiVersion: kApiVersion);
}