Commit a6517670 authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Vincent A

[caissedepargne] Implemented Market Orders on Linebourse

parent b373e90d
......@@ -1217,6 +1217,24 @@ class CaisseEpargne(LoginBrowser, StatesMixin):
if self.market.is_here():
self.page.come_back()
@need_login
def iter_market_orders(self, account):
if account.type not in (Account.TYPE_MARKET, Account.TYPE_PEA):
return
self.home.go()
self.deleteCTX()
self.page.go_history(account._info)
if "Bourse" in self.url:
self.page.submit()
if 'offrebourse.com' in self.url:
# Some users may not have access to this.
if self.page.is_error():
return
self.linebourse.session.cookies.update(self.session.cookies)
self.update_linebourse_token()
for order in self.linebourse.iter_market_orders(account.id):
yield order
@need_login
def get_advisor(self):
raise NotImplementedError()
......
......@@ -87,6 +87,9 @@ class CaisseEpargneModule(Module, CapBankWealth, CapBankTransferAddRecipient, Ca
def iter_investment(self, account):
return self.browser.get_investment(account)
def iter_market_orders(self, account):
return self.browser.iter_market_orders(account)
def iter_contacts(self):
return self.browser.get_advisor()
......
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