describeLedger method

Future<DescribeLedgerResponse> describeLedger({
  1. required String name,
})

Returns information about a ledger, including its state and when it was created.

May throw InvalidParameterException. May throw ResourceNotFoundException.

Parameter name : The name of the ledger that you want to describe.

Implementation

Future<DescribeLedgerResponse> describeLedger({
  required String name,
}) async {
  ArgumentError.checkNotNull(name, 'name');
  _s.validateStringLength(
    'name',
    name,
    1,
    32,
    isRequired: true,
  );
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/ledgers/${Uri.encodeComponent(name)}',
    exceptionFnMap: _exceptionFns,
  );
  return DescribeLedgerResponse.fromJson(response);
}