getCustomers method

Future<List<CustomerModel>> getCustomers({
  1. Object? authorization,
  2. bool? excludeImages,
})

Parameters:

Implementation

Future<List<CustomerModel>> getCustomers({
  Object? authorization,
  bool? excludeImages,
}) async {
  final response = await getCustomersWithHttpInfo(
    authorization: authorization,
    excludeImages: excludeImages,
  );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }

  final responseBody = await _decodeBodyBytes(response);
  return (await apiClient.deserializeAsync(
          responseBody, 'List<CustomerModel>') as List)
      .cast<CustomerModel>()
      .toList(growable: false);
}