Beispiel #1
0
 def get_account(client_id, account_id):
     try:
         account = AccountService.get_account(client_id, account_id)
         return jsonify(account.json()), 200
     except ValueError as e:
         return "Invalid ID", 400
     except ResourceNotFound as r:
         return r.message, 404
 def test_02_get_one(self):
     self.assertTrue(
         AccountService.get_account(1, AccountServiceTest.account.id))
Beispiel #3
0
 def get_account(client_id, account_id):
     try:
         account = Account(account_id, "", 0, client_id)
         return jsonify(AccountService.get_account(account)), 200
     except ResourceNotFound as r:
         return r.message, 404
Beispiel #4
0
 def get_account(account_balance):
     amount_less_than = request.args["amountLessThan"]
     amount_greater_than = request.args["amountGreaterThan"]
     if amount_less_than < account_balance < amount_greater_than:
         account = AccountService.get_account(int(account_balance))
     return jsonify(account), 200
Beispiel #5
0
 def get_account(client_id, account_id):
     return AccountService.get_account(client_id, account_id)