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