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