예제 #1
0
    def iter_accounts(self, ibans):
        for f in self.path('data.infoUdc.familleCompte.*'):
            for a in f.get('compte'):
                iban = ibans.get(a.get('key'))
                if iban is not None and not is_iban_valid(iban):
                    iban = rib2iban(rebuild_rib(iban))

                yield Account.from_dict({
                    'id':
                    a.get('key'),
                    'label':
                    a.get('libellePersoProduit') or a.get('libelleProduit'),
                    'currency':
                    a.get('devise'),
                    'type':
                    self.LABEL_TO_TYPE.get(a.get('libelleProduit'))
                    or self.FAMILY_TO_TYPE.get(f.get('idFamilleCompte'))
                    or Account.TYPE_UNKNOWN,
                    'balance':
                    a.get('soldeDispo'),
                    'coming':
                    a.get('soldeAVenir'),
                    'iban':
                    iban,
                    'number':
                    a.get('value')
                })
예제 #2
0
파일: pages.py 프로젝트: guix77/weboob
    def iter_accounts(self, ibans):
        for f in self.path('data.infoUdc.familleCompte.*'):
            for a in f.get('compte'):
                iban = ibans.get(a.get('key'))
                if iban is not None and not is_iban_valid(iban):
                    iban = rib2iban(rebuild_rib(iban))

                acc = Account.from_dict({
                    'id': a.get('key'),
                    'label': a.get('libellePersoProduit') or a.get('libelleProduit'),
                    'currency': a.get('devise'),
                    'type': self.LABEL_TO_TYPE.get(' '.join(a.get('libelleProduit').split())) or \
                            self.FAMILY_TO_TYPE.get(f.get('idFamilleCompte')) or Account.TYPE_UNKNOWN,
                    'balance': a.get('soldeDispo'),
                    'coming': a.get('soldeAVenir'),
                    'iban': iban,
                    'number': a.get('value')
                })
                # softcap not used TODO don't pass this key when backend is ready
                # deferred cb can disappear the day after the appear, so 0 as day_for_softcap
                acc._bisoftcap = {
                    'deferred_cb': {
                        'softcap_day': 1000,
                        'day_for_softcap': 0,
                        'date_field': 'rdate'
                    }
                }
                yield acc
예제 #3
0
    def iter_accounts(self):

        for country in self.get('countriesAccountList'):
            for acc in country.get('acctLiteWrapper'):
                acc_prod = acc.get('prodCatCde')
                if acc_prod == "MST":
                    for subacc in acc.get('subAcctInfo'):
                        res = Account.from_dict(self.get_acc_dict(subacc))
                        if subacc.get('hasAcctDetails'):
                            yield res
                elif acc_prod == "CC":
                    res = Account.from_dict(self.get_acc_dict(acc))
                    if acc.get('hasAcctDetails'):
                        yield res
                else:
                    self.logger.error("Unknown account product code [%s]",
                                      acc_prod)
예제 #4
0
 def iter_accounts(self, ibans):
     for f in self.path('data.infoUdc.familleCompte.*'):
         for a in f.get('compte'):
             yield Account.from_dict({
                 'id': a.get('key'),
                 'label': a.get('libellePersoProduit') or a.get('libelleProduit'),
                 'currency': a.get('devise'),
                 'type': self.FAMILY_TO_TYPE.get(f.get('idFamilleCompte')) or Account.TYPE_UNKNOWN,
                 'balance': a.get('soldeDispo'),
                 'coming': a.get('soldeAVenir'),
                 'iban': ibans.get(a.get('key'))
             })
예제 #5
0
파일: pages.py 프로젝트: dasimon/weboob
 def iter_accounts(self):
     for f in self.path('tableauSoldes.listeGroupes'):
         for g in f:
             for a in g.get('listeComptes'):
                 yield Account.from_dict({
                     'id': a.get('numeroCompte'),
                     'iban': a.get('numeroCompte'),
                     'type': self.FAMILY_TO_TYPE.get(a.get('libelleType')) or Account.TYPE_UNKNOWN,
                     'label': '%s %s' % (a.get('libelleType'), a.get('libelleTitulaire')),
                     'currency': a.get('deviseTenue'),
                     'balance': Decimal(a.get('soldeComptable')) / 100,
                     'coming': Decimal(a.get('soldePrevisionnel')) / 100,
                 })
예제 #6
0
 def iter_accounts(self, ibans):
     for f in self.path('data.infoUdc.familleCompte.*'):
         for a in f.get('compte'):
             yield Account.from_dict({
                 'id': a.get('key'),
                 'label': a.get('libellePersoProduit') or a.get('libelleProduit'),
                 'currency': a.get('devise'),
                 'type': self.FAMILY_TO_TYPE.get(f.get('idFamilleCompte')) or Account.TYPE_UNKNOWN,
                 'balance': a.get('soldeDispo'),
                 'coming': a.get('soldeAVenir'),
                 'iban': ibans.get(a.get('key')),
                 'number': a.get('value')
             })
예제 #7
0
 def iter_accounts(self):
     for f in self.path('tableauSoldes.listeGroupes'):
         for g in f:
             for a in g.get('listeComptes'):
                 yield Account.from_dict({
                     'id':
                     a.get('numeroCompte'),
                     'iban':
                     a.get('numeroCompte'),
                     'type':
                     self.FAMILY_TO_TYPE.get(a.get('libelleType'))
                     or Account.TYPE_UNKNOWN,
                     'label':
                     '%s %s' %
                     (a.get('libelleType'), a.get('libelleTitulaire')),
                     'currency':
                     a.get('deviseTenue'),
                     'balance':
                     Decimal(a.get('soldeComptable')) / 100,
                     'coming':
                     Decimal(a.get('soldePrevisionnel')) / 100,
                 })
예제 #8
0
파일: pages.py 프로젝트: laurentb/weboob
    def iter_accounts(self, ibans):
        for f in self.path('data.infoUdc.familleCompte.*'):
            for a in f.get('compte'):
                iban = ibans.get(a.get('key'))
                if iban is not None and not is_iban_valid(iban):
                    iban = rib2iban(rebuild_rib(iban))

                acc = Account.from_dict({
                    'id': a.get('key'),
                    'label': a.get('libellePersoProduit') or a.get('libelleProduit'),
                    'currency': a.get('devise'),
                    'type': self.LABEL_TO_TYPE.get(' '.join(a.get('libelleProduit').split())) or \
                            self.FAMILY_TO_TYPE.get(f.get('idFamilleCompte')) or Account.TYPE_UNKNOWN,
                    'balance': a.get('soldeDispo'),
                    'coming': a.get('soldeAVenir'),
                    'iban': iban,
                    'number': a.get('value')
                })
                # softcap not used TODO don't pass this key when backend is ready
                # deferred cb can disappear the day after the appear, so 0 as day_for_softcap
                acc._bisoftcap = {'deferred_cb': {'softcap_day': 1000, 'day_for_softcap': 0, 'date_field': 'rdate'}}
                yield acc