Skip to content

get_one_time_price async

get_one_time_price(
    app_id: AppId,
    one_time_price_id: OneTimePriceId,
    scope: RequestScope,
    *,
    config_overrides: Optional[AsyncAppMonetizationClientConfig] = None,
) -> GetOneTimePriceResponse

Returns the details of a one-time price.

Parameters:

  • app_id (AppId) –

    The ID of the app the one-time price belongs to.

  • one_time_price_id (OneTimePriceId) –

    The ID of the one-time price to return.

  • scope (RequestScope) –

    Required. The environment: live or sandbox. live reads the published offering; sandbox reads the app's draft (what the sandbox runs).

Raises:

Source code in docs_src/capo_appmonetization/_services/async_app_monetization.py
async def get_one_time_price(
    self,
    app_id: "capo_appmonetization.types.app_id.AppId",
    one_time_price_id: "capo_appmonetization.types.one_time_price_id.OneTimePriceId",
    scope: "capo_appmonetization.types.request_scope.RequestScope",
    *,
    config_overrides: Optional[AsyncAppMonetizationClientConfig] = None,
) -> (
    "capo_appmonetization.types.get_one_time_price_response.GetOneTimePriceResponse"
):
    """Returns the details of a one-time price.

    Args:
        app_id: The ID of the app the one-time price belongs to.
        one_time_price_id: The ID of the one-time price to return.
        scope: Required. The environment: live or sandbox. live reads the published offering; sandbox reads the app's draft (what the sandbox runs).

    Raises:
        capo_appmonetization.errors.access_denied_exception.AccessDeniedException: The caller does not have sufficient permission to perform this action.
        capo_appmonetization.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_appmonetization.errors.resource_not_found_exception.ResourceNotFoundException: The referenced resource does not exist.
        capo_appmonetization.errors.throttling_exception.ThrottlingException: The request was denied due to request throttling.
        capo_appmonetization.errors.validation_exception.ValidationException: The request failed input validation.
        capo_appmonetization.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appmonetization.types.get_one_time_price_request.GetOneTimePriceRequest]",
    ) -> AsyncOperationResponse[
        "capo_appmonetization.types.get_one_time_price_response.GetOneTimePriceResponse"
    ]:
        import capo_appmonetization._operations.aws_monetization_ai_front_end.get_one_time_price

        (
            output,
            http_response,
        ) = await capo_appmonetization._operations.aws_monetization_ai_front_end.get_one_time_price.async_get_one_time_price(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetOneTimePrice")
    )
    input_: capo_appmonetization.types.get_one_time_price_request.GetOneTimePriceRequest = {
        "app_id": app_id,
        "one_time_price_id": one_time_price_id,
        "scope": scope,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output