list method
Lists the holds in a matter.
Request parameters:
matterId
- The matter ID.
pageSize
- The number of holds to return in the response, between 0 and
100 inclusive. Leaving this empty, or as 0, is the same as page_size =
100.
pageToken
- The pagination token as returned in the response. An empty
token means start from the beginning.
view
- The amount of detail to return for a hold.
Possible string values are:
- "HOLD_VIEW_UNSPECIFIED" : Not specified. Defaults to FULL_HOLD.
- "BASIC_HOLD" : Returns the hold ID, name, update time, service, and query.
- "FULL_HOLD" : Returns all details of BASIC_HOLD and the entities the hold applies to, such as accounts or organizational unit.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a ListHoldsResponse.
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<ListHoldsResponse> list(
core.String matterId, {
core.int? pageSize,
core.String? pageToken,
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 (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/matters/' + commons.escapeVariable('$matterId') + '/holds';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListHoldsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}