예제 #1
0
 def iter_accounts(self):
     for classeur in self.doc.get('donnees', {}).get('classeurs', {}):
         title = classeur['title']
         for compte in classeur.get('comptes', []):
             a = Account()
             a.label = CleanText().filter(compte['libelle'])
             a._id = compte['id']
             a.iban = compte['iban'].replace(' ', '')
             # id based on iban to match ids in database.
             a.id = a.iban[4:-2] if len(a.iban) == 27 else a.iban
             a.type = self.obj_type(a.label)
             a._agency = compte['agenceGestionnaire']
             a._title = title
             yield a
예제 #2
0
 def iter_accounts(self):
     for classeur in self.doc['donnees']['classeurs']:
         title = classeur['title']
         for compte in classeur['comptes']:
             a = Account()
             a.label = compte['libelle']
             a._id = compte['id']
             a.iban = compte['iban'].replace(' ', '')
             # id based on iban to match ids in database.
             a.id = a.iban[4:-2]
             a.type = Account.TYPE_CHECKING
             a._agency = compte['agenceGestionnaire']
             a._title = title
             yield a
예제 #3
0
 def iter_accounts(self):
     for classeur in self.doc.get('donnees', {}).get('classeurs', {}):
         title = classeur['title']
         for compte in classeur.get('comptes', []):
             a = Account()
             a.label = CleanText().filter(compte['libelle'])
             a._id = compte['id']
             a.type = self.obj_type(a.label)
             a.number = compte['iban'].replace(' ', '')
             # for some account that don't have Iban the account number is store under this variable in the Json
             if not is_iban_valid(a.number):
                 a.iban = NotAvailable
             else:
                 a.iban = a.number
             # id based on iban to match ids in database.
             a.id = a.number[4:-2] if len(a.number) == 27 else a.number
             a._agency = compte['agenceGestionnaire']
             a._title = title
             yield a
예제 #4
0
 def iter_accounts(self):
     for classeur in self.doc.get('donnees', {}).get('classeurs', {}):
         title = classeur['title']
         for compte in classeur.get('comptes', []):
             a = Account()
             a.label = CleanText().filter(compte['libelle'])
             a._id = compte['id']
             a.type = self.obj_type(a.label)
             a.number = compte['iban'].replace(' ', '')
             # for some account that don't have Iban the account number is store under this variable in the Json
             if not is_iban_valid(a.number):
                 a.iban = NotAvailable
             else:
                 a.iban = a.number
             # id based on iban to match ids in database.
             a.id = a.number[4:-2] if len(a.number) == 27 else a.number
             a._agency = compte['agenceGestionnaire']
             a._title = title
             yield a