"""Interface to the ows-royalties microservice.""" from owsrequest import request from collaborator.constants import error, service_name from collaborator.utils import owsrequest def get_current_abacus_statement_period(): """Get current Abacus statement period.""" endpoint_url = "/statement-period/current" res = request.get( service_name.OWS_ROYALTIES, endpoint_url, headers=owsrequest.get_default_ows_headers(), ) return owsrequest.unwrap_data_or_error(res, error.ERROR_CODE_OWS_ABACUS_STATE)