list method

Future<ListMattersResponse> list({
  1. int? pageSize,
  2. String? pageToken,
  3. String? state,
  4. String? view,
  5. String? $fields,
})

Lists matters the requestor has access to.

Request parameters:

pageSize - The number of matters to return in the response. Default and maximum are 100.

pageToken - The pagination token as returned in the response.

state - If set, lists only matters with the specified state. The default lists matters of all states. Possible string values are:

  • "STATE_UNSPECIFIED" : The matter has no specified state.
  • "OPEN" : The matter is open.
  • "CLOSED" : The matter is closed.
  • "DELETED" : The matter is deleted.

view - Specifies how much information about the matter to return in response. Possible string values are:

  • "VIEW_UNSPECIFIED" : The amount of detail is unspecified. Same as BASIC.
  • "BASIC" : Returns the matter ID, name, description, and state. Default choice.
  • "FULL" : Returns the basic details and a list of matter owners and collaborators (see MatterPermissions).

$fields - Selector specifying which fields to include in a partial response.

Completes with a ListMattersResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<ListMattersResponse> list({
  core.int? pageSize,
  core.String? pageToken,
  core.String? state,
  core.String? view,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (pageSize != null) 'pageSize': ['${pageSize}'],
    if (pageToken != null) 'pageToken': [pageToken],
    if (state != null) 'state': [state],
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'v1/matters';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return ListMattersResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}