Skip to content

put_tax_inheritance async

put_tax_inheritance(
    *,
    config_overrides: Optional[AsyncTaxSettingsClientConfig] = None,
    heritage_status: Optional[HeritageStatus] = None,
) -> PutTaxInheritanceResponse

The updated tax inheritance status.

Parameters:

Raises:

  • ConflictException –

    The exception when the input is creating conflict with the given state.

  • InternalServerException –

    The exception thrown when an unexpected error occurs when processing a request.

  • ResourceNotFoundException –

    The exception thrown when the input doesn't have a resource associated to it.

  • ValidationException –

    The exception when the input doesn't pass validation for at least one of the input parameters.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_taxsettings/_services/async_tax_settings.py
async def put_tax_inheritance(
    self,
    *,
    config_overrides: Optional[AsyncTaxSettingsClientConfig] = None,
    heritage_status: Optional[
        "capo_taxsettings.types.heritage_status.HeritageStatus"
    ] = None,
) -> (
    "capo_taxsettings.types.put_tax_inheritance_response.PutTaxInheritanceResponse"
):
    """<p>The updated tax inheritance status. </p>

    Args:
        heritage_status: <p>The tax inheritance status. </p>

    Raises:
        capo_taxsettings.errors.conflict_exception.ConflictException: <p>The exception when the input is creating conflict with the given state.</p>
        capo_taxsettings.errors.internal_server_exception.InternalServerException: <p>The exception thrown when an unexpected error occurs when processing a request.</p>
        capo_taxsettings.errors.resource_not_found_exception.ResourceNotFoundException: <p>The exception thrown when the input doesn't have a resource associated to it.</p>
        capo_taxsettings.errors.validation_exception.ValidationException: <p>The exception when the input doesn't pass validation for at least one of the input parameters. </p>
        capo_taxsettings.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_taxsettings.types.put_tax_inheritance_request.PutTaxInheritanceRequest]",
    ) -> AsyncOperationResponse[
        "capo_taxsettings.types.put_tax_inheritance_response.PutTaxInheritanceResponse"
    ]:
        import capo_taxsettings._operations.tax_settings.put_tax_inheritance

        (
            output,
            http_response,
        ) = await capo_taxsettings._operations.tax_settings.put_tax_inheritance.async_put_tax_inheritance(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutTaxInheritance")
    )
    input_: capo_taxsettings.types.put_tax_inheritance_request.PutTaxInheritanceRequest = {}
    if heritage_status is not None:
        input_["heritage_status"] = heritage_status

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