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