experimental-accounting-api/accounting/storage/__init__.py

36 lines
783 B
Python
Raw Normal View History

2013-12-17 10:14:45 +00:00
from abc import ABCMeta, abstractmethod
2013-12-17 10:14:45 +00:00
class Storage():
'''
ABC for accounting storage
'''
2013-12-17 10:14:45 +00:00
__metaclass__ = ABCMeta
def __init__(self, *args, **kw):
2013-12-17 10:14:45 +00:00
pass
2013-12-17 10:14:45 +00:00
@abstractmethod
def get_transactions(self, *args, **kw):
2013-12-17 10:14:45 +00:00
raise NotImplementedError
2013-12-17 10:14:45 +00:00
@abstractmethod
def get_transaction(self, *args, **kw):
2013-12-17 10:14:45 +00:00
raise NotImplementedError
2013-12-17 10:14:45 +00:00
@abstractmethod
def get_account(self, *args, **kw):
2013-12-17 10:14:45 +00:00
raise NotImplementedError
2013-12-17 10:14:45 +00:00
@abstractmethod
def get_accounts(self, *args, **kw):
2013-12-17 10:14:45 +00:00
raise NotImplementedError
@abstractmethod
def update_transaction(self, transaction):
raise NotImplementedError
@abstractmethod
def reverse_transaction(self, transaction_id):
raise NotImplementedError