Skip to content

get_agreement_payment_request

get_agreement_payment_request(
    payment_request_id: PaymentRequestId,
    agreement_id: AgreementId,
    *,
    config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
) -> GetAgreementPaymentRequestOutput

Retrieves detailed information about a specific payment request. Both sellers (proposers) and buyers (acceptors) can use this operation to view payment requests associated with their agreements. The response includes the current status, charge details, timestamps, and the charge ID if the request has been approved.

The calling identity must be either the acceptor or proposer of the payment request. A ResourceNotFoundException is returned if the payment request does not exist.

Parameters:

  • payment_request_id (PaymentRequestId) –

    The identifier of the payment request.

  • agreement_id (AgreementId) –

    The unique identifier of the agreement associated with the payment request.

Raises:

Source code in docs_src/capo_marketplace_agreement/_services/marketplace_agreement.py
def get_agreement_payment_request(
    self,
    payment_request_id: "capo_marketplace_agreement.types.payment_request_id.PaymentRequestId",
    agreement_id: "capo_marketplace_agreement.types.agreement_id.AgreementId",
    *,
    config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
) -> "capo_marketplace_agreement.types.get_agreement_payment_request_output.GetAgreementPaymentRequestOutput":
    """<p>Retrieves detailed information about a specific payment request. Both sellers (proposers) and buyers (acceptors) can use this operation to view payment requests associated with their agreements. The response includes the current status, charge details, timestamps, and the charge ID if the request has been approved.</p> <note> <p>The calling identity must be either the acceptor or proposer of the payment request. A <code>ResourceNotFoundException</code> is returned if the payment request does not exist.</p> </note>

    Args:
        payment_request_id: <p>The identifier of the payment request.</p>
        agreement_id: <p>The unique identifier of the agreement associated with the payment request.</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.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</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.get_agreement_payment_request_input.GetAgreementPaymentRequestInput]",
    ) -> OperationResponse[
        "capo_marketplace_agreement.types.get_agreement_payment_request_output.GetAgreementPaymentRequestOutput"
    ]:
        import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.get_agreement_payment_request

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

    def _redact_output(
        output: "capo_marketplace_agreement.types.get_agreement_payment_request_output.GetAgreementPaymentRequestOutput",
    ) -> dict[str, Any]:
        import capo_marketplace_agreement.types.get_agreement_payment_request_output

        return capo_marketplace_agreement.types.get_agreement_payment_request_output.redact_sensitive(
            output
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "GetAgreementPaymentRequest", redact_output=_redact_output
        ),
    )
    input_: capo_marketplace_agreement.types.get_agreement_payment_request_input.GetAgreementPaymentRequestInput = {
        "payment_request_id": payment_request_id,
        "agreement_id": agreement_id,
    }

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