getAllFromPledgeCampaign static method

Future<PcoCollection<PcoGivingFund>> getAllFromPledgeCampaign(
  1. String pledgeCampaignId, {
  2. String? id,
  3. PcoGivingFundQuery? query,
})

Will get a PcoCollection containing ALL PcoGivingFund objects (expecting many) using a path like this: /giving/v2/pledge_campaigns/$pledgeCampaignId/fund

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<PcoGivingFund>> getAllFromPledgeCampaign(
  String pledgeCampaignId, {
  String? id,
  PcoGivingFundQuery? query,
}) async {
  query ??= PcoGivingFundQuery();
  query.getAll = true;

  var url = '/giving/v2/pledge_campaigns/$pledgeCampaignId/fund';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoGivingFund>(url,
      query: query, apiVersion: kApiVersion);
}