updateCampaignOutboundCallConfig method

Future<void> updateCampaignOutboundCallConfig({
  1. required String id,
  2. AnswerMachineDetectionConfig? answerMachineDetectionConfig,
  3. String? connectContactFlowId,
  4. String? connectSourcePhoneNumber,
})

Updates the outbound call config of a campaign. This API is idempotent.

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

Implementation

Future<void> updateCampaignOutboundCallConfig({
  required String id,
  AnswerMachineDetectionConfig? answerMachineDetectionConfig,
  String? connectContactFlowId,
  String? connectSourcePhoneNumber,
}) async {
  final $payload = <String, dynamic>{
    if (answerMachineDetectionConfig != null)
      'answerMachineDetectionConfig': answerMachineDetectionConfig,
    if (connectContactFlowId != null)
      'connectContactFlowId': connectContactFlowId,
    if (connectSourcePhoneNumber != null)
      'connectSourcePhoneNumber': connectSourcePhoneNumber,
  };
  await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/campaigns/${Uri.encodeComponent(id)}/outbound-call-config',
    exceptionFnMap: _exceptionFns,
  );
}