listInvoiceSummaries method
Retrieves your invoice details programmatically, without line item details.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter selector :
The option to retrieve details for a specific invoice by providing its
unique ID. Alternatively, access information for all invoices linked to
the account by providing an account ID.
Parameter filter :
Filters you can use to customize your invoice summary.
Parameter maxResults :
The maximum number of invoice summaries a paginated response can contain.
Parameter nextToken :
The token for the next set of results. (You received this token from a
previous call.)
Implementation
Future<ListInvoiceSummariesResponse> listInvoiceSummaries({
required InvoiceSummariesSelector selector,
InvoiceSummariesFilter? filter,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'Invoicing.ListInvoiceSummaries'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Selector': selector,
if (filter != null) 'Filter': filter,
if (maxResults != null) 'MaxResults': maxResults,
if (nextToken != null) 'NextToken': nextToken,
},
);
return ListInvoiceSummariesResponse.fromJson(jsonResponse.body);
}