many changes

This commit is contained in:
Pablo Martin 2024-06-11 21:10:07 +02:00
parent 126ede37a4
commit 661941a65c
7 changed files with 102 additions and 21 deletions

View file

@ -10,6 +10,9 @@ from xexe.exchange_rates import ExchangeRate
class RateFetcher(ABC):
is_production_grade = False
@abstractmethod
def fetch_rate(
self, from_currency: Currency, to_currency: Currency, rate_date: datetime.date
@ -19,6 +22,8 @@ class RateFetcher(ABC):
class MockRateFetcher(RateFetcher):
is_production_grade = False
def __init__(self) -> None:
super().__init__()
@ -36,6 +41,8 @@ class MockRateFetcher(RateFetcher):
class XERateFetcher(RateFetcher):
is_production_grade = True
def __init__(self) -> None:
super().__init__()
self.xe_client = XecdClient(