getPartnership method

Future<GetPartnershipResponse> getPartnership({
  1. required String partnershipId,
})

Retrieves the details for a partnership, based on the partner and profile IDs specified. A partnership represents the connection between you and your trading partner. It ties together a profile and one or more trading capabilities.

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

Parameter partnershipId : Specifies the unique, system-generated identifier for a partnership.

Implementation

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

  return GetPartnershipResponse.fromJson(jsonResponse.body);
}