Skip to content

list_agreement_charges

list_agreement_charges(
    *,
    config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
    catalog: Optional[Catalog] = None,
    agreement_id: Optional[ResourceId] = None,
    agreement_type: Optional[AgreementType] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
) -> ListAgreementChargesOutput

Allows acceptors to view charges and purchase orders that are associated with an agreement. The response includes details about all charges regardless of whether a purchase order is linked to each charge.

Parameters:

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

    The catalog in which the charges were created.

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

    The unique identifier of the agreement.

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

    Filter to retrieve charges of a specific agreement type (for example, PurchaseAgreement).

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

    The maximum number of charges to return in the response.

  • 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_charges(
    self,
    *,
    config_overrides: Optional[MarketplaceAgreementClientConfig] = None,
    catalog: Optional["capo_marketplace_agreement.types.catalog.Catalog"] = None,
    agreement_id: Optional[
        "capo_marketplace_agreement.types.resource_id.ResourceId"
    ] = None,
    agreement_type: Optional[
        "capo_marketplace_agreement.types.agreement_type.AgreementType"
    ] = 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_charges_output.ListAgreementChargesOutput":
    """<p>Allows acceptors to view charges and purchase orders that are associated with an agreement. The response includes details about all charges regardless of whether a purchase order is linked to each charge.</p>

    Args:
        catalog: <p>The catalog in which the charges were created.</p>
        agreement_id: <p>The unique identifier of the agreement.</p>
        agreement_type: <p>Filter to retrieve charges of a specific agreement type (for example, <code>PurchaseAgreement</code>).</p>
        max_results: <p>The maximum number of charges to return in the response.</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_charges_input.ListAgreementChargesInput]",
    ) -> OperationResponse[
        "capo_marketplace_agreement.types.list_agreement_charges_output.ListAgreementChargesOutput"
    ]:
        import capo_marketplace_agreement._operations.awsmp_commerce_service_v20200301.list_agreement_charges

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListAgreementCharges")
    )
    input_: capo_marketplace_agreement.types.list_agreement_charges_input.ListAgreementChargesInput = {}
    if catalog is not None:
        input_["catalog"] = catalog
    if agreement_id is not None:
        input_["agreement_id"] = agreement_id
    if agreement_type is not None:
        input_["agreement_type"] = agreement_type
    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