Skip to content

Commit

Permalink
enchantment: make ExchangeRate hashable and add handful properties
Browse files Browse the repository at this point in the history
  • Loading branch information
GLEF1X committed Apr 24, 2022
1 parent 95a6437 commit a788f35
Show file tree
Hide file tree
Showing 3 changed files with 1,429 additions and 3 deletions.
18 changes: 18 additions & 0 deletions aiomonobank/types/arbitrary/currency.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from typing import Optional, Union

from pydantic import BaseModel, BaseConfig, Field


class Currency(BaseModel):
code: str
decimal_digits: int
name: str
name_plural: str
rounding: Union[int, float]
symbol: str
symbol_native: str
iso_format: Optional[str] = Field(..., alias="isoformat")

class Config(BaseConfig):
frozen = True
allow_mutation = False
Loading

0 comments on commit a788f35

Please sign in to comment.