"""Interface to the ows-abacus-state microservice.""" from owsrequest import request from collaborator.constants import error, service_name from collaborator.utils import owsrequest def get_abacus_states(account_payee_id: str): """Get abacus states for an account payee. Args: account_payee_id (str): ID of the account payee. """ abacus_state_url = f"/abacus-state/account_payee/{account_payee_id}" res = request.get( service_name.OWS_ABACUS_STATE, abacus_state_url, headers=owsrequest.get_default_ows_headers(), ) return owsrequest.unwrap_data_or_error(res, error.ERROR_CODE_OWS_ABACUS_STATE)