get method

Future<Hold> get(
  1. String matterId,
  2. String holdId, {
  3. String? view,
  4. String? $fields,
})

Gets the specified hold.

Request parameters:

matterId - The matter ID.

holdId - The hold ID.

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 Hold.

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<Hold> get(
  core.String matterId,
  core.String holdId, {
  core.String? view,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (view != null) 'view': [view],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/matters/' +
      commons.escapeVariable('$matterId') +
      '/holds/' +
      commons.escapeVariable('$holdId');

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