listSettlementRecords method
Retrieves individual settlement transaction records for monetization. Each
record represents a single payment transaction between a client and your
protected resource. This operation is only available for
CLOUDFRONT scope. The maximum supported time window is 90
days. When no CurrencyMode filter is provided, results
default to REAL. To retrieve test data, include a
CurrencyMode filter with the value TEST.
May throw WAFInternalErrorException.
May throw WAFInvalidOperationException.
May throw WAFInvalidParameterException.
May throw WAFNonexistentItemException.
Parameter currency :
The currency for the amounts in the response.
Parameter scope :
Specifies whether this is for a Amazon CloudFront distribution
(CLOUDFRONT) or for a regional application
(REGIONAL).
Parameter timeWindow :
The time range for the query. Specify start and end timestamps.
Parameter filters :
Optional filters to narrow the results. You can filter by payer address,
status, source name, network, or other settlement fields.
Parameter limit :
The maximum number of settlement records to return. Minimum: 1. Maximum:
100.
Parameter nextMarker :
When you get a paginated response, this marker indicates that additional
results are available.
Parameter sortBy :
The field to sort settlement records by: TIMESTAMP,
AMOUNT, NAME, or STATUS.
Parameter sortOrder :
The sort order: ASC for ascending or DESC for
descending.
Implementation
Future<ListSettlementRecordsResponse> listSettlementRecords({
required Currency currency,
required Scope scope,
required TimeWindow timeWindow,
List<MonetizationFilter>? filters,
int? limit,
String? nextMarker,
SettlementSortBy? sortBy,
SortOrder? sortOrder,
}) async {
_s.validateNumRange(
'limit',
limit,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSWAF_20190729.ListSettlementRecords'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'Currency': currency.value,
'Scope': scope.value,
'TimeWindow': timeWindow,
if (filters != null) 'Filters': filters,
if (limit != null) 'Limit': limit,
if (nextMarker != null) 'NextMarker': nextMarker,
if (sortBy != null) 'SortBy': sortBy.value,
if (sortOrder != null) 'SortOrder': sortOrder.value,
},
);
return ListSettlementRecordsResponse.fromJson(jsonResponse.body);
}