示例#1
0
    def __init__(self, id, username=None, description=None):
        dsn = bank_config(id)

        self.id = id
        self.username = username
        self.dsn = dsn
        self.description = description or dsn['name']
        self.password = security.get_password( self.keyring_id() )
示例#2
0
    def __init__(self, institution=None, routing_number=None, account_type=None, broker_id=None, number=None, description=None, guid=None ):
        if guid is None and number is None:
            raise Exception("must provide either a guid or a number")

        self.institution = institution
        self.number = number or security.get_password( guid )
        self.guid = guid or account_number_hash(number)
        self.routing_number = routing_number
        self.account_type = account_type
        self.broker_id = broker_id

        default_desc = institution.description + ' ****' + self.number[-4:]
        self.description = description or default_desc

        self._statements = {}