Payments / Paginator / ListFinancialRecords

ListFinancialRecords

class Payments.Paginator.ListFinancialRecords
paginator = client.get_paginator('list_financial_records')
paginate(**kwargs)

Creates an iterator that will paginate through responses from Payments.Client.list_financial_records().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    types=[
        'INVOICE'|'CREDIT_MEMO',
    ],
    settlementStatuses=[
        'OPEN'|'CLOSED',
    ],
    issuedAfter=datetime(2015, 1, 1),
    issuedBefore=datetime(2015, 1, 1),
    sortBy='ISSUED_AT',
    sortOrder='ASCENDING'|'DESCENDING',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • types (list) –

    [REQUIRED]

    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.

    • (string) –

  • settlementStatuses (list) –

    The settlement statuses to filter by. OPEN returns records whose status is OUTSTANDING or PROCESSING. CLOSED returns records whose status is SETTLED or CANCELED. When you omit this member, the operation returns records with both settlement statuses.

    • (string) –

  • issuedAfter (datetime) – The earliest date and time to return records for, inclusive. The operation returns the records that were issued at or after this time.

  • issuedBefore (datetime) – 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 issuedAfter and issuedBefore, issuedBefore must be later than issuedAfter.

  • sortBy (string) – The field to sort the results by. The default is ISSUED_AT, the date and time when the record was issued.

  • sortOrder (string) – The order to sort the results in. The default is DESCENDING, which returns the newest records first. ASCENDING returns the oldest records first.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'financialRecordSummaries': [
        {
            'id': 'string',
            'type': 'INVOICE'|'CREDIT_MEMO',
            'businessUnit': {
                'merchantOfRecord': 'string',
                'lineOfBusiness': 'AWS_CLOUD_SERVICES'|'PROSERVE_MARKETING_AND_TRAINING'|'AWS_MARKETPLACE'
            },
            'amount': {
                'value': 'string',
                'currency': 'string'
            },
            'balances': {
                'outstanding': {
                    'value': 'string',
                    'currency': 'string'
                },
                'processing': {
                    'value': 'string',
                    'currency': 'string'
                },
                'settled': {
                    'value': 'string',
                    'currency': 'string'
                },
                'canceled': {
                    'value': 'string',
                    'currency': 'string'
                }
            },
            'settlementStatus': 'OPEN'|'CLOSED',
            'status': 'OUTSTANDING'|'PROCESSING'|'SETTLED'|'CANCELED',
            'issuedAt': datetime(2015, 1, 1),
            'closedAt': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • financialRecordSummaries (list) –

      The financial record summaries that match your filters, in the requested order. This list is empty when no record matches.

      • (dict) –

        A financial record as ListFinancialRecords returns it, without the details that are specific to its type. To get the full record, use GetFinancialRecord or BatchGetFinancialRecord.

        • id (string) –

          The ID that Amazon Web Services Payments issued for the record. To retrieve the full record, pass this value to GetFinancialRecord or BatchGetFinancialRecord as identifier.

        • type (string) –

          The type of the financial record. On the full record, the populated member of details matches this type. 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.

        • businessUnit (dict) –

          The Amazon Web Services business unit that issued the record: its merchant of record and its line of business.

          • merchantOfRecord (string) –

            The Amazon Web Services entity that issued the invoice and collects payment for it, such as Amazon Web Services, Inc. or Amazon Web Services EMEA SARL. This is the invoicing entity shown in the Amazon Web Services Billing and Cost Management console. For Amazon Web Services Marketplace purchases, it can differ from the seller of record.

          • lineOfBusiness (string) –

            The line of business within the merchant of record that issued the record. This member is absent when the line of business isn’t known for the record. The following values are valid:

            • AWS_CLOUD_SERVICES – Your usage of Amazon Web Services services.

            • PROSERVE_MARKETING_AND_TRAINING – Amazon Web Services Professional Services, marketing, and training: consulting, events, and training that Amazon Web Services sells.

            • AWS_MARKETPLACE – Products that you bought from sellers in Amazon Web Services Marketplace.

        • amount (dict) –

          The total amount of the financial record, in the currency that the record was issued in. The amount doesn’t change as the record is settled. balances shows how much of it is in each settlement state.

          • value (string) –

            The amount, as a decimal string, such as 10.99. The number of decimal places can differ between amounts, for example 0.0 and 1000.24.

          • currency (string) –

            The ISO 4217 currency code for the amount (for example, USD).

        • balances (dict) –

          How much of amount is outstanding, processing, settled, and canceled.

          • outstanding (dict) –

            The part of the amount that isn’t settled and has no settlement in progress. For an invoice, this is what remains to pay. For a credit memo, this is the credit that isn’t yet applied. This balance doesn’t include processing.

            • value (string) –

              The amount, as a decimal string, such as 10.99. The number of decimal places can differ between amounts, for example 0.0 and 1000.24.

            • currency (string) –

              The ISO 4217 currency code for the amount (for example, USD).

          • processing (dict) –

            The part of the amount with a settlement in progress, for example a payment that’s submitted but not yet confirmed. It moves to settled when the settlement completes, and back to outstanding when the settlement fails. This balance is more than 0 only when the status is PROCESSING.

            • value (string) –

              The amount, as a decimal string, such as 10.99. The number of decimal places can differ between amounts, for example 0.0 and 1000.24.

            • currency (string) –

              The ISO 4217 currency code for the amount (for example, USD).

          • settled (dict) –

            The part of the amount that is settled. For an invoice, this is the amount paid or covered by credit memos. For a credit memo, this is the amount applied to invoices. This balance is 0 when nothing is settled yet.

            • value (string) –

              The amount, as a decimal string, such as 10.99. The number of decimal places can differ between amounts, for example 0.0 and 1000.24.

            • currency (string) –

              The ISO 4217 currency code for the amount (for example, USD).

          • canceled (dict) –

            The part of the amount that was canceled and isn’t settled, for example when an invoice is voided. When a partly settled record is canceled, it keeps its settled balance, and the rest of the amount moves to canceled. This balance is more than 0 only when the status is CANCELED.

            • value (string) –

              The amount, as a decimal string, such as 10.99. The number of decimal places can differ between amounts, for example 0.0 and 1000.24.

            • currency (string) –

              The ISO 4217 currency code for the amount (for example, USD).

        • settlementStatus (string) –

          Whether the record is open or closed. If you receive a status value that you don’t recognize, use this member to tell open records from closed ones. The following values are valid:

          • OPEN – Part of the amount is outstanding or processing. The status is OUTSTANDING or PROCESSING.

          • CLOSED – The whole amount is settled or canceled. The status is SETTLED or CANCELED.

          A CLOSED record becomes OPEN again if a payment or credit applied to it is reversed. Its closedAt is then absent until the record closes again.

        • status (string) –

          The settlement stage of the record. The following values are valid:

          • OUTSTANDING – Part of the amount isn’t settled, and no settlement is in progress on the record. For an invoice, dueStatus shows whether it’s due or past due. The settlementStatus is OPEN.

          • PROCESSING – A settlement of part or all of the amount is in progress, for example a payment that’s submitted but not yet confirmed. PROCESSING takes precedence over OUTSTANDING: while any part of the amount is processing, the status is PROCESSING, even if another part is still outstanding. The settlementStatus is OPEN.

          • SETTLED – The whole amount is settled. The settlementStatus is CLOSED.

          • CANCELED – The record is canceled. The part of the amount that wasn’t settled isn’t collected or applied. The settlementStatus is CLOSED.

        • issuedAt (datetime) –

          The date and time, in UTC, when this record was issued.

        • closedAt (datetime) –

          The date and time, in UTC, when the record was last closed, that is, when its status last became SETTLED or CANCELED. This member is absent while the settlementStatus is OPEN, including after a closed record reopens.

    • NextToken (string) –

      A token to resume pagination.