return a Transfer object insetad of only an ID

This commit is contained in:
Romain Bignon 2010-10-31 10:26:06 +01:00
commit 3860f87f76
3 changed files with 41 additions and 14 deletions

View file

@ -52,9 +52,10 @@ class BPBackend(BaseBackend, ICapBank):
for history in self.browser.get_history(account):
yield history
def transfer(self, id_from, id_to, amount):
def transfer(self, id_from, id_to, amount, reason=None):
from_account = self.get_account(id_from)
to_account = self.get_account(id_to)
#TODO: retourner le numero du virement
#TODO: support the 'reason' parameter
return self.browser.make_transfer(from_account, to_account, amount)