Skip to content

put_supplemental_tax_registration async

put_supplemental_tax_registration(
    tax_registration_entry: SupplementalTaxRegistrationEntry,
    *,
    config_overrides: Optional[AsyncTaxSettingsClientConfig] = None,
) -> PutSupplementalTaxRegistrationResponse

Stores supplemental tax registration for a single account.

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.

  • 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_supplemental_tax_registration(
    self,
    tax_registration_entry: "capo_taxsettings.types.supplemental_tax_registration_entry.SupplementalTaxRegistrationEntry",
    *,
    config_overrides: Optional[AsyncTaxSettingsClientConfig] = None,
) -> "capo_taxsettings.types.put_supplemental_tax_registration_response.PutSupplementalTaxRegistrationResponse":
    """<p> Stores supplemental tax registration for a single account. </p>

    Args:
        tax_registration_entry: <p> The supplemental TRN information that will be stored for the caller account ID. </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.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_supplemental_tax_registration_request.PutSupplementalTaxRegistrationRequest]",
    ) -> AsyncOperationResponse[
        "capo_taxsettings.types.put_supplemental_tax_registration_response.PutSupplementalTaxRegistrationResponse"
    ]:
        import capo_taxsettings._operations.tax_settings.put_supplemental_tax_registration

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

    def _redact_input(
        input_: "capo_taxsettings.types.put_supplemental_tax_registration_request.PutSupplementalTaxRegistrationRequest",
    ) -> dict[str, Any]:
        import capo_taxsettings.types.put_supplemental_tax_registration_request

        return capo_taxsettings.types.put_supplemental_tax_registration_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "PutSupplementalTaxRegistration", redact_input=_redact_input
        ),
    )
    input_: capo_taxsettings.types.put_supplemental_tax_registration_request.PutSupplementalTaxRegistrationRequest = {
        "tax_registration_entry": tax_registration_entry
    }

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