listBillingAdjustmentRequests method

Future<ListBillingAdjustmentRequestsOutput> listBillingAdjustmentRequests({
  1. String? agreementId,
  2. String? agreementType,
  3. String? catalog,
  4. DateTime? createdAfter,
  5. DateTime? createdBefore,
  6. int? maxResults,
  7. String? nextToken,
  8. BillingAdjustmentStatus? status,
})

Lists billing adjustment requests for a specific agreement. Sellers (proposers) can use this operation to view all billing adjustment requests associated with an agreement.

May throw AccessDeniedException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter agreementId : The unique identifier of the agreement to list billing adjustment requests for.

Parameter agreementType : An optional filter to return billing adjustment requests by agreement type (e.g., PurchaseAgreement).

Parameter catalog : An optional filter to return billing adjustment requests by catalog (e.g., AWSMarketplace).

Parameter createdAfter : An optional filter to return billing adjustment requests created after the specified timestamp.

Parameter createdBefore : An optional filter to return billing adjustment requests created before the specified timestamp.

Parameter maxResults : The maximum number of billing adjustment requests to return in the response.

Parameter nextToken : A token to specify where to start pagination.

Parameter status : An optional filter to return billing adjustment requests with the specified status.

Implementation

Future<ListBillingAdjustmentRequestsOutput> listBillingAdjustmentRequests({
  String? agreementId,
  String? agreementType,
  String? catalog,
  DateTime? createdAfter,
  DateTime? createdBefore,
  int? maxResults,
  String? nextToken,
  BillingAdjustmentStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'AWSMPCommerceService_v20200301.ListBillingAdjustmentRequests'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      if (agreementId != null) 'agreementId': agreementId,
      if (agreementType != null) 'agreementType': agreementType,
      if (catalog != null) 'catalog': catalog,
      if (createdAfter != null)
        'createdAfter': unixTimestampToJson(createdAfter),
      if (createdBefore != null)
        'createdBefore': unixTimestampToJson(createdBefore),
      if (maxResults != null) 'maxResults': maxResults,
      if (nextToken != null) 'nextToken': nextToken,
      if (status != null) 'status': status.value,
    },
  );

  return ListBillingAdjustmentRequestsOutput.fromJson(jsonResponse.body);
}