Commit f65ee537 authored by Maxime Pommier's avatar Maxime Pommier Committed by Romain Bignon

[societegenerale] Add account usage

parent 0eefd1ef
......@@ -25,7 +25,7 @@ from dateutil.relativedelta import relativedelta
from weboob.browser import LoginBrowser, URL, need_login, StatesMixin
from weboob.exceptions import BrowserIncorrectPassword, ActionNeeded, BrowserUnavailable
from weboob.capabilities.bank import Account, TransferBankError, AddRecipientStep, TransactionType
from weboob.capabilities.bank import Account, TransferBankError, AddRecipientStep, TransactionType, AccountOwnerType
from weboob.capabilities.base import find_object, NotAvailable
from weboob.browser.exceptions import BrowserHTTPNotFound, ClientError
from weboob.capabilities.profile import ProfileMissing
......@@ -164,6 +164,7 @@ class SocieteGenerale(LoginBrowser, StatesMixin):
card.currency = account.currency
card._internal_id = el['idTechnique']
card._prestation_id = el['id']
card.owner_type = AccountOwnerType.PRIVATE
yield card
@need_login
......@@ -202,8 +203,11 @@ class SocieteGenerale(LoginBrowser, StatesMixin):
for card in self.iter_cards(account):
card.parent = account
card.ownership = account.ownership
card.owner_type = AccountOwnerType.PRIVATE
yield card
account.owner_type = AccountOwnerType.PRIVATE
if account._prestation_id in account_ibans:
account.iban = account_ibans[account._prestation_id]
......
......@@ -29,7 +29,7 @@ from weboob.exceptions import BrowserIncorrectPassword, ActionNeeded, NoAccounts
from weboob.capabilities.base import find_object
from weboob.capabilities.bank import (
AccountNotFound, RecipientNotFound, AddRecipientStep, AddRecipientBankError,
Recipient, TransferBankError,
Recipient, TransferBankError, AccountOwnerType,
)
from weboob.tools.value import Value
......@@ -174,6 +174,7 @@ class SGEnterpriseBrowser(SGPEBrowser):
self.intraday_balances.go()
for acc in self.page.populate_balances(accounts):
acc.owner_type = AccountOwnerType.ORGANIZATION
yield acc
@need_login
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment