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