putAllianceLeadContact method

Future<PutAllianceLeadContactResponse> putAllianceLeadContact({
  1. required AllianceLeadContact allianceLeadContact,
  2. required String catalog,
  3. required String identifier,
  4. String? emailVerificationCode,
})

Creates or updates the alliance lead contact information for a partner account.

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

Parameter allianceLeadContact : The alliance lead contact information to set for the partner account.

Parameter catalog : The catalog identifier for the partner account.

Parameter identifier : The unique identifier of the partner account.

Parameter emailVerificationCode : The verification code sent to the alliance lead contact's email to confirm the update.

Implementation

Future<PutAllianceLeadContactResponse> putAllianceLeadContact({
  required AllianceLeadContact allianceLeadContact,
  required String catalog,
  required String identifier,
  String? emailVerificationCode,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PartnerCentralAccount.PutAllianceLeadContact'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'AllianceLeadContact': allianceLeadContact,
      'Catalog': catalog,
      'Identifier': identifier,
      if (emailVerificationCode != null)
        'EmailVerificationCode': emailVerificationCode,
    },
  );

  return PutAllianceLeadContactResponse.fromJson(jsonResponse.body);
}