Ejemplo n.º 1
0
def borrower_object_helper(borrower):
    new_borrower = Borrower()

    new_borrower.id = borrower['id']
    new_borrower.token = "AAAA"
    new_borrower.deed_token = "AAAA"
    new_borrower.forename = borrower['forename']
    new_borrower.middlename = borrower['middle_name']
    new_borrower.surname = borrower['surname']
    new_borrower.dob = borrower['dob']
    new_borrower.gender = borrower['gender']
    new_borrower.phonenumber = borrower['phone_number']
    new_borrower.address = borrower['address']
    new_borrower.esec_user_name = ""

    return new_borrower
Ejemplo n.º 2
0
def insert_borrower_row(self, verify_pid, borrower_id):
    with self.app.app_context():
        remove_verify_match_row(self, 999)
        remove_borrower_row(self, 999)
        borrower = Borrower()
        borrower.id = 999
        borrower.forename = 'some'
        borrower.middlename = 'nice'
        borrower.surname = 'guy'
        borrower.dob = 'a date'
        borrower.gender = 'a gender'
        borrower.phonenumber = '07777777777'
        borrower.address = 'an address'
        borrower.token = 'a token'
        borrower.deed_token = 'a deed token'
        borrower.esec_user_name = 'an esec user name'
        borrower.save()
Ejemplo n.º 3
0
    def saveBorrower(self, borrower, deed_token):
        borrowerModel = Borrower()
        borrowerModel.forename = borrower['forename']

        if 'middle_name' in borrower:
            borrowerModel.middlename = borrower['middle_name']

        borrowerModel.surname = borrower['surname']
        borrowerModel.dob = borrower['dob']
        borrowerModel.deed_token = deed_token

        if 'gender' in borrower:
            borrowerModel.gender = borrower['gender']

        borrowerModel.phonenumber = borrower['phone_number']
        borrowerModel.address = borrower['address']

        borrowerModel.token = borrowerModel.generate_token()

        borrowerModel.save()

        return borrowerModel