getCapability method

Future<GetCapabilityResponse> getCapability({
  1. required String capabilityId,
})

Retrieves the details for the specified capability. A trading capability contains the information required to transform incoming EDI documents into JSON or XML outputs.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter capabilityId : Specifies a system-assigned unique identifier for the capability.

Implementation

Future<GetCapabilityResponse> getCapability({
  required String capabilityId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'B2BI.GetCapability'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'capabilityId': capabilityId,
    },
  );

  return GetCapabilityResponse.fromJson(jsonResponse.body);
}