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