"""Requests to ows-royalties.""" from src.models import StatementPeriod from src.requests import get from .exceptions import OwsPaymentException SERVICE = 'ows-royalties' def get_current_statement_period() -> StatementPeriod: """Get current statement period.""" path = '/statement-period/current' response = get(SERVICE, path) if response.status_code != 200: raise OwsPaymentException(f'ERROR in GET {path}') return StatementPeriod.model_validate(response.json())