getAllFromPerson static method

Future<PcoCollection<PcoPeoplePhoneNumber>> getAllFromPerson(
  1. String personId,
  2. {String? id,
  3. PcoPeoplePhoneNumberQuery? query}
)

Will get a PcoCollection containing ALL PcoPeoplePhoneNumber objects (expecting many) using a path like this: /people/v2/people/$personId/phone_numbers

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<PcoPeoplePhoneNumber>> getAllFromPerson(
  String personId, {
  String? id,
  PcoPeoplePhoneNumberQuery? query,
}) async {
  query ??= PcoPeoplePhoneNumberQuery();
  query.getAll = true;

  var url = '/people/v2/people/$personId/phone_numbers';
  if (id != null) url += '/$id';
  return PcoCollection.fromApiCall<PcoPeoplePhoneNumber>(url,
      query: query, apiVersion: kApiVersion);
}