Retrieves the tax registration of accounts listed in a consolidated billing family. This can be used to retrieve up to 100 accounts' tax registrations in one call (default 50).
Parameters:
Raises:
Source code in docs_src/capo_taxsettings/_services/async_tax_settings.py
| async def list_tax_registrations(
self,
*,
config_overrides: Optional[AsyncTaxSettingsClientConfig] = 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_tax_registrations_response.ListTaxRegistrationsResponse":
"""<p>Retrieves the tax registration of accounts listed in a consolidated billing family. This can be used to retrieve up to 100 accounts' tax registrations in one call (default 50). </p>
Args:
max_results: <p>Number of <code>accountDetails</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.
"""
async def _handler(
req: "AsyncOperationRequest[capo_taxsettings.types.list_tax_registrations_request.ListTaxRegistrationsRequest]",
) -> AsyncOperationResponse[
"capo_taxsettings.types.list_tax_registrations_response.ListTaxRegistrationsResponse"
]:
import capo_taxsettings._operations.tax_settings.list_tax_registrations
(
output,
http_response,
) = await capo_taxsettings._operations.tax_settings.list_tax_registrations.async_list_tax_registrations(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
def _redact_output(
output: "capo_taxsettings.types.list_tax_registrations_response.ListTaxRegistrationsResponse",
) -> dict[str, Any]:
import capo_taxsettings.types.list_tax_registrations_response
return (
capo_taxsettings.types.list_tax_registrations_response.redact_sensitive(
output
)
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("ListTaxRegistrations", redact_output=_redact_output),
)
input_: capo_taxsettings.types.list_tax_registrations_request.ListTaxRegistrationsRequest = {}
if max_results is not None:
input_["max_results"] = max_results
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|