getCustomerDevices method

Future<PageData<Device>> getCustomerDevices(
  1. String customerId,
  2. PageLink pageLink, {
  3. String type = '',
  4. RequestConfig? requestConfig,
})

Implementation

Future<PageData<Device>> getCustomerDevices(
    String customerId, PageLink pageLink,
    {String type = '', RequestConfig? requestConfig}) async {
  var queryParams = pageLink.toQueryParameters();
  queryParams['type'] = type;
  var response = await _tbClient.get<Map<String, dynamic>>(
      '/api/customer/$customerId/devices',
      queryParameters: queryParams,
      options: defaultHttpOptionsFromConfig(requestConfig));
  return _tbClient.compute(parseDevicePageData, response.data!);
}