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/tax_settings.py
| def put_supplemental_tax_registration(
self,
tax_registration_entry: "capo_taxsettings.types.supplemental_tax_registration_entry.SupplementalTaxRegistrationEntry",
*,
config_overrides: Optional[TaxSettingsClientConfig] = 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.
"""
def _handler(
req: "OperationRequest[capo_taxsettings.types.put_supplemental_tax_registration_request.PutSupplementalTaxRegistrationRequest]",
) -> OperationResponse[
"capo_taxsettings.types.put_supplemental_tax_registration_response.PutSupplementalTaxRegistrationResponse"
]:
import capo_taxsettings._operations.tax_settings.put_supplemental_tax_registration
output, http_response = (
capo_taxsettings._operations.tax_settings.put_supplemental_tax_registration.put_supplemental_tax_registration(
req.options, req.input
)
)
return OperationResponse(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 = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|