updatePartnership method

Future<UpdatePartnershipResponse> updatePartnership({
  1. required String partnershipId,
  2. List<String>? capabilities,
  3. CapabilityOptions? capabilityOptions,
  4. String? name,
})

Updates some of the parameters for a partnership between a customer and trading partner. 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 ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

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

Parameter capabilities : List of the capabilities associated with this partnership.

Parameter capabilityOptions : To update, specify the structure that contains the details for the associated capabilities.

Parameter name : The name of the partnership, used to identify it.

Implementation

Future<UpdatePartnershipResponse> updatePartnership({
  required String partnershipId,
  List<String>? capabilities,
  CapabilityOptions? capabilityOptions,
  String? name,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'B2BI.UpdatePartnership'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'partnershipId': partnershipId,
      if (capabilities != null) 'capabilities': capabilities,
      if (capabilityOptions != null) 'capabilityOptions': capabilityOptions,
      if (name != null) 'name': name,
    },
  );

  return UpdatePartnershipResponse.fromJson(jsonResponse.body);
}