Skip to content

list_agreement_payment_requests

list_agreement_payment_requests(
    party_type: PartyType,
    *,
    config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
    agreement_type: Optional[AgreementType] = None,
    catalog: Optional[Catalog] = None,
    agreement_id: Optional[AgreementId] = None,
    status: Optional[PaymentRequestStatus] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListAgreementPaymentRequestsOutput

Lists payment requests available to you as a seller or buyer. Both sellers (proposers) and buyers (acceptors) can use this operation to find payment requests by specifying their party type and applying optional parameters.

PartyType is a required parameter. A ValidationException is returned if PartyType is not provided. Pagination is supported through maxResults (1-50, default 50) and nextToken parameters.

Parameters:

  • party_type (PartyType) –

    The party type for the payment requests. Required parameter. Use Proposer to list payment requests where you are the seller, or Acceptor to list payment requests where you are the buyer.

  • agreement_type (Optional[AgreementType], default: None ) –

    An optional parameter to list payment requests by agreement type (e.g., PurchaseAgreement).

  • catalog (Optional[Catalog], default: None ) –

    An optional parameter to list payment requests by catalog (e.g., AWSMarketplace).

  • agreement_id (Optional[AgreementId], default: None ) –

    An optional parameter to list payment requests for a specific agreement.

  • status (Optional[PaymentRequestStatus], default: None ) –

    An optional parameter to list payment requests by status. Valid values include VALIDATING, VALIDATION_FAILED, PENDING_APPROVAL, APPROVED, REJECTED, and CANCELLED.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of payment requests to return in a single response (1-50). Default is 50.

  • next_token (Optional[NextToken], default: None ) –

    A token to specify where to start pagination.

Raises:

Source code in docs_src/capo_marketplace_agreement/_services/marketplace_agreement.py
def list_agreement_payment_requests(
    self,
    party_type: "capo_marketplace_agreement.types.party_type.PartyType",
    *,
    config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
    agreement_type: Optional[
        "capo_marketplace_agreement.types.agreement_type.AgreementType"
    ] = None,
    catalog: Optional["capo_marketplace_agreement.types.catalog.Catalog"] = None,
    agreement_id: Optional[
        "capo_marketplace_agreement.types.agreement_id.AgreementId"
    ] = None,
    status: Optional[
        "capo_marketplace_agreement.types.payment_request_status.PaymentRequestStatus"
    ] = None,
    max_results: Optional[
        "capo_marketplace_agreement.types.max_results.MaxResults"
    ] = None,
    next_token: Optional[
        "capo_marketplace_agreement.types.next_token.NextToken"
    ] = None,
) -> "capo_marketplace_agreement.types.list_agreement_payment_requests_output.ListAgreementPaymentRequestsOutput":
    """<p>Lists payment requests available to you as a seller or buyer. Both sellers (proposers) and buyers (acceptors) can use this operation to find payment requests by specifying their party type and applying optional parameters.</p> <note> <p> <code>PartyType</code> is a required parameter. A <code>ValidationException</code> is returned if <code>PartyType</code> is not provided. Pagination is supported through <code>maxResults</code> (1-50, default 50) and <code>nextToken</code> parameters.</p> </note>

    Args:
        party_type: <p>The party type for the payment requests. Required parameter. Use <code>Proposer</code> to list payment requests where you are the seller, or <code>Acceptor</code> to list payment requests where you are the buyer.</p>
        agreement_type: <p>An optional parameter to list payment requests by agreement type (e.g., <code>PurchaseAgreement</code>).</p>
        catalog: <p>An optional parameter to list payment requests by catalog (e.g., <code>AWSMarketplace</code>).</p>
        agreement_id: <p>An optional parameter to list payment requests for a specific agreement.</p>
        status: <p>An optional parameter to list payment requests by status. Valid values include <code>VALIDATING</code>, <code>VALIDATION_FAILED</code>, <code>PENDING_APPROVAL</code>, <code>APPROVED</code>, <code>REJECTED</code>, and <code>CANCELLED</code>.</p>
        max_results: <p>The maximum number of payment requests to return in a single response (1-50). Default is 50.</p>
        next_token: <p>A token to specify where to start pagination.</p>

    Raises:
        capo_marketplace_agreement.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_marketplace_agreement.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_marketplace_agreement.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_marketplace_agreement.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_marketplace_agreement.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_marketplace_agreement.types.list_agreement_payment_requests_input.ListAgreementPaymentRequestsInput]",
    ) -> OperationResponse[
        "capo_marketplace_agreement.types.list_agreement_payment_requests_output.ListAgreementPaymentRequestsOutput"
    ]:
        import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.list_agreement_payment_requests

        output, http_response = (
            capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.list_agreement_payment_requests.list_agreement_payment_requests(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAgreementPaymentRequests")
    )
    input_: capo_marketplace_agreement.types.list_agreement_payment_requests_input.ListAgreementPaymentRequestsInput = {
        "party_type": party_type
    }
    if agreement_type is not None:
        input_["agreement_type"] = agreement_type
    if catalog is not None:
        input_["catalog"] = catalog
    if agreement_id is not None:
        input_["agreement_id"] = agreement_id
    if status is not None:
        input_["status"] = status
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output