getAllFromOption static method

Future<PcoCollection<PcoCheckInsLabel>> getAllFromOption(
  1. String optionId, {
  2. String? id,
  3. PcoCheckInsLabelQuery? query,
})

Will get a PcoCollection containing ALL PcoCheckInsLabel objects (expecting many) using a path like this: /check-ins/v2/options/$optionId/label

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.

This function forces the query.getAll to be true.

Implementation

static Future<PcoCollection<PcoCheckInsLabel>> getAllFromOption(
  String optionId, {
  String? id,
  PcoCheckInsLabelQuery? query,
}) async {
  query ??= PcoCheckInsLabelQuery();
  query.getAll = true;

  var url = '/check-ins/v2/options/$optionId/label';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoCheckInsLabel>(url,
      query: query, apiVersion: kApiVersion);
}