updateInvoiceUnit method
You can update the invoice unit configuration at any time, and Amazon Web Services will use the latest configuration at the end of the month.
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.
Parameter description :
The assigned description for an invoice unit. This information can't be
modified or deleted.
Parameter rule :
The InvoiceUnitRule object used to update invoice units.
Parameter taxInheritanceDisabled :
Whether the invoice unit based tax inheritance is/ should be enabled or
disabled.
Implementation
Future<UpdateInvoiceUnitResponse> updateInvoiceUnit({
required String invoiceUnitArn,
String? clientToken,
String? description,
InvoiceUnitRule? rule,
bool? taxInheritanceDisabled,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'Invoicing.UpdateInvoiceUnit'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'InvoiceUnitArn': invoiceUnitArn,
'ClientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'Description': description,
if (rule != null) 'Rule': rule,
if (taxInheritanceDisabled != null)
'TaxInheritanceDisabled': taxInheritanceDisabled,
},
);
return UpdateInvoiceUnitResponse.fromJson(jsonResponse.body);
}