Skip to content

get_tax_registration_document

get_tax_registration_document(
    tax_document_metadata: TaxDocumentMetadata,
    *,
    config_overrides: Optional[TaxSettingsClientConfig] = None,
    destination_s3_location: Optional[DestinationS3Location] = None,
) -> GetTaxRegistrationDocumentResponse

Downloads your tax documents to the Amazon S3 bucket that you specify in your request.

Parameters:

Raises:

  • 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/tax_settings.py
def get_tax_registration_document(
    self,
    tax_document_metadata: "capo_taxsettings.types.tax_document_metadata.TaxDocumentMetadata",
    *,
    config_overrides: Optional[TaxSettingsClientConfig] = None,
    destination_s3_location: Optional[
        "capo_taxsettings.types.destination_s3_location.DestinationS3Location"
    ] = None,
) -> "capo_taxsettings.types.get_tax_registration_document_response.GetTaxRegistrationDocumentResponse":
    """<p>Downloads your tax documents to the Amazon S3 bucket that you specify in your request.</p>

    Args:
        destination_s3_location: <p>The Amazon S3 bucket that you specify to download your tax documents to.</p>
        tax_document_metadata: <p>The metadata for your tax document.</p>

    Raises:
        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.
    """

    def _handler(
        req: "OperationRequest[capo_taxsettings.types.get_tax_registration_document_request.GetTaxRegistrationDocumentRequest]",
    ) -> OperationResponse[
        "capo_taxsettings.types.get_tax_registration_document_response.GetTaxRegistrationDocumentResponse"
    ]:
        import capo_taxsettings._operations.tax_settings.get_tax_registration_document

        output, http_response = (
            capo_taxsettings._operations.tax_settings.get_tax_registration_document.get_tax_registration_document(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTaxRegistrationDocument")
    )
    input_: capo_taxsettings.types.get_tax_registration_document_request.GetTaxRegistrationDocumentRequest = {
        "tax_document_metadata": tax_document_metadata
    }
    if destination_s3_location is not None:
        input_["destination_s3_location"] = destination_s3_location

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