Documentation
This commit is contained in:
parent
9c5f3db41d
commit
7d2b192b34
|
@ -109,25 +109,30 @@ class DepoFetcher(abc.ABC):
|
|||
|
||||
@enforce_typing.enforce_types
|
||||
class DoubleRegister(abc.ABC):
|
||||
"""Information about some movement of assets."""
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def input(self) -> AssetAmount | None:
|
||||
"""How much and what kind of asset have been placed into the depository."""
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def output(self) -> AssetAmount | None:
|
||||
"""How much and what kind of asset have been removed from the depository."""
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def fee(self) -> AssetAmount | None:
|
||||
"""How much and what kind of asset was spent as a service fee."""
|
||||
raise NotImplementedError
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def executed_time(self) -> datetime.datetime:
|
||||
"""The precise point in time when the asset transaction was executed."""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
|
@ -163,6 +168,15 @@ class TradeOrderDetails(DoubleRegister):
|
|||
@enforce_typing.enforce_types
|
||||
@dataclassabc.dataclassabc(frozen=True)
|
||||
class WithdrawalDetails(DoubleRegister):
|
||||
"""Information about a withdrawal of assets from a specific service.
|
||||
|
||||
Withdraw assets may appear in another depository as a `DepositDetails`, but
|
||||
these cannot be automatically linked by `fin-depo`.
|
||||
|
||||
Includes both well-structured data about the order, and unstructured data
|
||||
from the backend. The unstructured data might be needed for tax purposes.
|
||||
"""
|
||||
|
||||
withdrawn: AssetAmount
|
||||
fee: AssetAmount
|
||||
executed_time: datetime.datetime
|
||||
|
@ -180,6 +194,15 @@ class WithdrawalDetails(DoubleRegister):
|
|||
@enforce_typing.enforce_types
|
||||
@dataclassabc.dataclassabc(frozen=True)
|
||||
class DepositDetails(DoubleRegister):
|
||||
"""Information about a deposit of assets to a specific service.
|
||||
|
||||
Deposited assets may appear in another depository as a `WithdrawalDetails`, but
|
||||
these cannot be automatically linked by `fin-depo`.
|
||||
|
||||
Includes both well-structured data about the order, and unstructured data
|
||||
from the backend. The unstructured data might be needed for tax purposes.
|
||||
"""
|
||||
|
||||
deposit: AssetAmount
|
||||
fee: AssetAmount
|
||||
executed_time: datetime.datetime
|
||||
|
|
Loading…
Reference in New Issue
Block a user