getSingle static method
Future<PcoWebhooksAvailableEvent?>
getSingle(
- String id, {
- PcoWebhooksAvailableEventQuery? query,
Will get a single PcoWebhooksAvailableEvent
object
using a path like this: /webhooks/v2/available_events/[id]
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.
Implementation
static Future<PcoWebhooksAvailableEvent?> getSingle(
String id, {
PcoWebhooksAvailableEventQuery? query,
}) async {
query ??= PcoWebhooksAvailableEventQuery();
var url = '/webhooks/v2/available_events/$id';
var retval = await PcoCollection.fromApiCall<PcoWebhooksAvailableEvent>(url,
query: query, apiVersion: kApiVersion);
return retval.items.isEmpty ? null : retval.items.first;
}