deleteInvoiceUnit method
This deletes an invoice unit with the provided invoice unit ARN.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter invoiceUnitArn :
The ARN to identify an invoice unit. This information can't be modified or
deleted.
Parameter clientToken :
A unique, case-sensitive identifier that you provide to ensure idempotency
of the request.
Implementation
Future<DeleteInvoiceUnitResponse> deleteInvoiceUnit({
required String invoiceUnitArn,
String? clientToken,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'Invoicing.DeleteInvoiceUnit'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'InvoiceUnitArn': invoiceUnitArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
},
);
return DeleteInvoiceUnitResponse.fromJson(jsonResponse.body);
}