many changes
This commit is contained in:
parent
126ede37a4
commit
661941a65c
7 changed files with 102 additions and 21 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue