Retrieves supplemental tax registrations for a single account.
Parameters:
Raises:
Source code in docs_src/capo_taxsettings/_services/tax_settings.py
| def list_supplemental_tax_registrations(
self,
*,
config_overrides: Optional[TaxSettingsClientConfig] = None,
max_results: Optional["capo_taxsettings.types.max_results.MaxResults"] = None,
next_token: Optional[
"capo_taxsettings.types.pagination_token_string.PaginationTokenString"
] = None,
) -> "capo_taxsettings.types.list_supplemental_tax_registrations_response.ListSupplementalTaxRegistrationsResponse":
"""<p> Retrieves supplemental tax registrations for a single account. </p>
Args:
max_results: <p> The number of <code>taxRegistrations</code> results you want in one response. </p>
next_token: <p> The token to retrieve the next set of results. </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.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.
"""
def _handler(
req: "OperationRequest[capo_taxsettings.types.list_supplemental_tax_registrations_request.ListSupplementalTaxRegistrationsRequest]",
) -> OperationResponse[
"capo_taxsettings.types.list_supplemental_tax_registrations_response.ListSupplementalTaxRegistrationsResponse"
]:
import capo_taxsettings._operations.tax_settings.list_supplemental_tax_registrations
output, http_response = (
capo_taxsettings._operations.tax_settings.list_supplemental_tax_registrations.list_supplemental_tax_registrations(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_taxsettings.types.list_supplemental_tax_registrations_response.ListSupplementalTaxRegistrationsResponse",
) -> dict[str, Any]:
import capo_taxsettings.types.list_supplemental_tax_registrations_response
return capo_taxsettings.types.list_supplemental_tax_registrations_response.redact_sensitive(
output
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging(
"ListSupplementalTaxRegistrations", redact_output=_redact_output
),
)
input_: capo_taxsettings.types.list_supplemental_tax_registrations_request.ListSupplementalTaxRegistrationsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|