deleteProcurementPortalPreference method

Future<DeleteProcurementPortalPreferenceResponse> deleteProcurementPortalPreference({
  1. required String procurementPortalPreferenceArn,
  2. String? clientToken,
})

This feature API is subject to changing at any time. For more information, see the Amazon Web Services Service Terms (Betas and Previews).

Deletes an existing procurement portal preference. This action cannot be undone. Active e-invoice delivery and PO retrieval configurations will be terminated.

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

Parameter procurementPortalPreferenceArn : The Amazon Resource Name (ARN) of the procurement portal preference to delete.

Parameter clientToken : A unique, case-sensitive identifier that you provide to ensure idempotency of the request.

Implementation

Future<DeleteProcurementPortalPreferenceResponse>
    deleteProcurementPortalPreference({
  required String procurementPortalPreferenceArn,
  String? clientToken,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'Invoicing.DeleteProcurementPortalPreference'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProcurementPortalPreferenceArn': procurementPortalPreferenceArn,
      'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
    },
  );

  return DeleteProcurementPortalPreferenceResponse.fromJson(
      jsonResponse.body);
}