list_financial_records
¶
list_financial_records(
types: FinancialRecordTypeList,
*,
config_overrides: Optional[PaymentsClientConfig] = None,
settlement_statuses: Optional[SettlementStatusList] = None,
issued_after: Optional[datetime] = None,
issued_before: Optional[datetime] = None,
sort_by: Optional[FinancialRecordSortField] = None,
sort_order: Optional[SortOrder] = None,
next_token: Optional[PaginationToken] = None,
max_results: Optional[MaxResults] = None,
) -> ListFinancialRecordsResponse
Lists the financial records on your account, with the newest first by default. A financial record is an invoice or a credit memo. You must specify at least one record type in types. You can narrow the results further by settlement status and issue date. This operation returns summaries. To get the details that are specific to a record's type, use GetFinancialRecord or BatchGetFinancialRecord. Results are paginated. Use nextToken to retrieve more results.
To use this operation, you must have Amazon Web Services Identity and Access Management (IAM) permission for both payments:ListFinancialRecords and payments:GetPaymentStatus.
Parameters:
-
types(FinancialRecordTypeList) –The financial record types to return. The following values are valid:
-
INVOICE– An invoice: a bill from Amazon Web Services. Payments and credit memos applied to the invoice settle it. -
CREDIT_MEMO– A credit memo: a credit issued to your account, for example for a billing correction or a service credit. Applying it to one or more invoices settles it.
-
-
settlement_statuses(Optional[SettlementStatusList], default:None) –The settlement statuses to filter by.
OPENreturns records whosestatusisOUTSTANDINGorPROCESSING.CLOSEDreturns records whosestatusisSETTLEDorCANCELED. When you omit this member, the operation returns records with both settlement statuses. -
issued_after(Optional[datetime], default:None) –The earliest date and time to return records for, inclusive. The operation returns the records that were issued at or after this time.
-
issued_before(Optional[datetime], default:None) –The latest date and time to return records for, exclusive. The operation returns the records that were issued before this time. When you specify both
issuedAfterandissuedBefore,issuedBeforemust be later thanissuedAfter. -
sort_by(Optional[FinancialRecordSortField], default:None) –The field to sort the results by. The default is
ISSUED_AT, the date and time when the record was issued. -
sort_order(Optional[SortOrder], default:None) –The order to sort the results in. The default is
DESCENDING, which returns the newest records first.ASCENDINGreturns the oldest records first. -
next_token(Optional[PaginationToken], default:None) –The pagination token from the
nextTokenof the previous response. Omit it to get the first page. Tokens expire. If the token is malformed or expired, or doesn't match the original request, the request fails withValidationExceptionand the reasonINVALID_PAGINATION_TOKEN. In that case, start again from the first page. -
max_results(Optional[MaxResults], default:None) –The maximum number of results to return in one page. The default is 100. A page can contain fewer results even when more remain. Use
nextTokento find out whether more results are available.
Raises:
-
AccessDeniedException–The request is denied because you don't have sufficient access to perform this operation. Verify that you have the required permissions and try again. This error is also returned, instead of
ResourceNotFoundException, when you aren't authorized for the resource, so the response doesn't reveal whether the resource exists. -
InternalServerException–The request processing failed because of an unknown error, exception, or failure. Retry your request.
-
ThrottlingException–The request was denied due to request throttling. Reduce the frequency of your requests and try again.
-
ValidationException–The request isn't valid. Check
reasonandfieldListfor the cause, correct the request, and try again. -
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Invoke ListFinancialRecords
>>> client.list_financial_records(types=['INVOICE'], settlement_statuses=['CLOSED'], sort_by='ISSUED_AT', sort_order='DESCENDING', max_results=5)
Source code in docs_src/capo_payments/_services/payments.py
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 | |