"""Financial data Oracle service methods.""" from __future__ import annotations from libs.oracle_client.client import OracleClient from libs.oracle_client.models import CompanyInfo, FinancialDataResponse class FinancialService: def __init__(self, client: OracleClient) -> None: self._client = client async def get_financial_data( self, ticker: str, quarters: int = 8 ) -> FinancialDataResponse: params: dict[str, str | int] = {"ticker": ticker, "quarters": quarters} data = await self._client.get("/financial/data", params=params) return FinancialDataResponse.model_validate(data) async def get_company_info(self, ticker: str) -> CompanyInfo: data = await self._client.get(f"/financial/company/{ticker}") return CompanyInfo.model_validate(data)