当前位置: 首页>>代码示例>>Python>>正文


Python Account.number方法代码示例

本文整理汇总了Python中weboob.capabilities.bank.Account.number方法的典型用法代码示例。如果您正苦于以下问题:Python Account.number方法的具体用法?Python Account.number怎么用?Python Account.number使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在weboob.capabilities.bank.Account的用法示例。


在下文中一共展示了Account.number方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_cards

# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import number [as 别名]
    def get_cards(self, account_id):
        divs = self.doc.xpath('//div[@class="content-boxed"]')
        assert len(divs)
        msgs = re.compile(u'Vous avez fait opposition sur cette carte bancaire.' +
                           '|Votre carte bancaire a été envoyée.' +
                           '|BforBank a fait opposition sur votre carte' +
                           '|Pour des raisons de sécurité, la demande de réception du code confidentiel de votre carte par SMS est indisponible')
        divs = [d for d in divs if not msgs.search(CleanText('.//div[has-class("alert")]', default='')(d))]
        divs = [d.xpath('.//div[@class="m-card-infos"]')[0] for d in divs]
        divs = [d for d in divs if not d.xpath('.//div[@class="m-card-infos-body-text"][text()="Débit immédiat"]')]

        if not len(divs):
            self.logger.warning('all cards are cancelled, acting as if there is no card')
            return []

        cards = []
        for div in divs:
            label = CleanText('.//div[@class="m-card-infos-body-title"]')(div)
            number = CleanText('.//div[@class="m-card-infos-body-num"]', default='')(div)
            number = re.sub('[^\d*]', '', number).replace('*', 'x')
            debit = CleanText(u'.//div[@class="m-card-infos-body-text"][contains(text(),"Débit")]')(div)
            assert debit == u'Débit différé', 'unrecognized card type %s: %s' % (number, debit)

            card = Account()
            card.id = '%s.%s' % (account_id, number)
            card.label = label
            card.number = number
            card.type = Account.TYPE_CARD
            cards.append(card)

        return cards
开发者ID:laurentb,项目名称:weboob,代码行数:33,代码来源:pages.py

示例2: get_single_card

# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import number [as 别名]
    def get_single_card(self, parent_id):
        div, = self.doc.xpath('//div[@class="infosynthese"]')

        ret = Account()
        ret.type = Account.TYPE_CARD
        ret.coming = CleanDecimal(Regexp(CleanText('.'), r'En cours prélevé au \d+/\d+/\d+ : ([\d\s,-]+) euros'), replace_dots=True)(div)
        ret.number = Regexp(CleanText('.'), 'sur votre carte n°([\d*]+)')(div)
        ret.id = '%s.%s' % (parent_id, ret.number)
        ret.currency = 'EUR'
        ret.label = 'CARTE %s' % ret.number
        ret.url = self.url
        return ret
开发者ID:P4ncake,项目名称:weboob,代码行数:14,代码来源:accounthistory.py

示例3: get_accounts

# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import number [as 别名]
    def get_accounts(self):
        account = self.request('/api/accounts')

        a = Account()

        # Number26 only provides a checking account (as of sept 19th 2016).
        a.type = Account.TYPE_CHECKING
        a.label = u'Checking account'

        a.id = account["id"]
        a.number = NotAvailable
        a.balance = Decimal(str(account["availableBalance"]))
        a.iban = account["iban"]
        a.currency = u'EUR'

        return [a]
开发者ID:P4ncake,项目名称:weboob,代码行数:18,代码来源:browser.py

示例4: iter_accounts

# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import number [as 别名]
 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
开发者ID:P4ncake,项目名称:weboob,代码行数:21,代码来源:json_pages.py

示例5: iter_accounts

# 需要导入模块: from weboob.capabilities.bank import Account [as 别名]
# 或者: from weboob.capabilities.bank.Account import number [as 别名]
    def iter_accounts(self):
        if self.accounts:
            for account in self.accounts:
                yield account
            return

        waiting = False
        for project in self.users['projects']:
            self.open('/user/%s/project/%s/' % (self.users['userId'], project['projectId']), method="OPTIONS")
            me = self.request('/user/%s/project/%s/' % (self.users['userId'], project['projectId']), headers=self.request_headers)

            waiting = (me['status'] in self.waiting_statuses)

            # Check project in progress
            if not me['numeroContrat'] or not me['dateAdhesion']:
                continue

            a = Account()
            a.id = "".join(me['numeroContrat'].split())
            a.label = " ".join(me['supportEpargne'].split("_"))
            a.type = Account.TYPE_LIFE_INSURANCE if "assurance vie" in a.label.lower() else \
                     Account.TYPE_MARKET if "compte titre" in a.label.lower() else \
                     Account.TYPE_PEA if "pea" in a.label.lower() else \
                     Account.TYPE_UNKNOWN
            a.balance = CleanDecimal().filter(me['solde'])
            a.currency = u'EUR' # performanceEuro, montantEuro everywhere in Yomoni JSON
            a.iban = me['ibancompteTitre'] or NotAvailable
            a.number = project['projectId']
            a.valuation_diff = CleanDecimal().filter(me['performanceEuro'])
            a._startbalance = me['montantDepart']

            self.accounts.append(a)

            self.iter_investment(a, me['sousJacents'])

            yield a

        if not self.accounts and waiting:
            raise ActionNeeded("Le service client Yomoni est en attente d'un retour de votre part.")
开发者ID:P4ncake,项目名称:weboob,代码行数:41,代码来源:browser.py


注:本文中的weboob.capabilities.bank.Account.number方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。