getAllFromSubscription static method
Future<PcoCollection<PcoWebhooksEvent> >
getAllFromSubscription(
- String subscriptionId,
- {String? id,
- PcoWebhooksEventQuery? query}
Will get a PcoCollection
containing ALL PcoWebhooksEvent objects (expecting many)
using a path like this: /webhooks/v2/subscriptions/$subscriptionId/events
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<PcoWebhooksEvent>> getAllFromSubscription(
String subscriptionId, {
String? id,
PcoWebhooksEventQuery? query,
}) async {
query ??= PcoWebhooksEventQuery();
query.getAll = true;
var url = '/webhooks/v2/subscriptions/$subscriptionId/events';
if (id != null) url += '/$id';
return PcoCollection.fromApiCall<PcoWebhooksEvent>(url,
query: query, apiVersion: kApiVersion);
}