Example #1
0
 def get_account(client_id):
     try:
         account = AccountService.get_account_by_id(int(client_id))
         return jsonify(account.json()), 200
     except ValueError as er:
         return "Not a Valid Id", 400
     except ResourceNotFound as rr:
         return rr.message, 404
Example #2
0
 def get_account_by_id(cl_id=None, account_id=None):
     try:
         account = AccountService.get_account_by_id(int(cl_id),
                                                    int(account_id))
         return jsonify(account.json()), 200
     except ValueError as e:
         return 'Not a valid ID', 400
     except ResourceNotFound as r:
         return r.message, 404