getServices method

Future<List<Service>> getServices({
  1. bool includeCapability = false,
})

Returns information about services on the device.

Access Class: PRE_AUTH

Implementation

Future<List<Service>> getServices({
  bool includeCapability = false,
}) async {
  loggy.debug('getServices');

  final responseEnvelope = await requestFunction(
      uri,
      soap.Body(
        request: DeviceManagementRequest.getServices(includeCapability),
      ));

  if (responseEnvelope.body.hasFault) {
    throw Exception(responseEnvelope.body.fault.toString());
  }

  return GetServicesResponse.fromJson(responseEnvelope.body.response!)
      .services;
}