Add a transfer capability and implante it in bp and boobank

Make a transfer in boobank like that:

>transfer fromaccountid toaccoundid amount

Signed-off-by: Nicolas Duhamel <nicolas@jombi.fr>
Signed-off-by: Romain Bignon <romain@peerfuse.org>
This commit is contained in:
Nicolas Duhamel 2010-09-24 18:07:06 +02:00 committed by Romain Bignon
commit 81706f23ad
4 changed files with 59 additions and 1 deletions

View file

@ -29,6 +29,9 @@ __all__ = ['Account', 'AccountNotFound', 'ICapBank', 'Operation']
class AccountNotFound(Exception):
pass
class NotEnoughMoney(Exception):
pass
class Account(CapBaseObject):
@ -100,3 +103,6 @@ class ICapBank(IBaseCap):
def iter_history(self, id):
raise NotImplementedError()
def transfer(self, id_from, id_to, amount):
raise NotImplementedError()