getAllFromDonation static method
Future<PcoCollection<PcoGivingRefund> >
getAllFromDonation(
- String donationId, {
- String? id,
- PcoGivingRefundQuery? query,
- bool includeDesignationRefunds = false,
Will get a PcoCollection
containing ALL PcoGivingRefund objects (expecting many)
using a path like this: /giving/v2/donations/$donationId/refund
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<PcoGivingRefund>> getAllFromDonation(
String donationId, {
String? id,
PcoGivingRefundQuery? query,
bool includeDesignationRefunds = false,
}) async {
query ??= PcoGivingRefundQuery();
query.getAll = true;
if (includeDesignationRefunds) query.include.add('designation_refunds');
var url = '/giving/v2/donations/$donationId/refund';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoGivingRefund>(url,
query: query, apiVersion: kApiVersion);
}