Ejemplo n.º 1
0
 def payout_reports(self, request):
     try:
         reports = json.loads(request.body)
     except:
         return build_response(request, 400, 'The provided data is not a valid JSON object')
     # Check reports?
     payouteng = PayoutEngine()
     payouteng.process_reports(reports)
     return build_response(request, 201)
 def payout_reports(self, request):
     try:
         reports = json.loads(request.body)
     except:
         return build_response(request, 400, 'The provided data is not a valid JSON object')
     # Check reports?
     payouteng = PayoutEngine()
     payouteng.process_reports(reports)
     return build_response(request, 201)
Ejemplo n.º 3
0
    def create(self, request):
        try:
            order = json.loads(request.body)
        except:
            return build_response(request, 400, 'The provided data is not a valid JSON object')

        if order.get('status') != 'COMPLETED':
            print("Order status: {}".format(order.get('status')))
            return build_response(request, 200)
        payouteng = PayoutEngine()
        payouteng.process_unpaid()
        return build_response(request, 200)
    def create(self, request):
        try:
            order = json.loads(request.body)
        except:
            return build_response(request, 400, 'The provided data is not a valid JSON object')

        if order.get('status') != 'COMPLETED':
            print("Order status: {}".format(order.get('status')))
            return build_response(request, 200)
        payouteng = PayoutEngine()
        payouteng.process_unpaid()
        return build_response(request, 200)
 def handle(self, *args, **kargs):
     engine = PayoutEngine()
     engine.process_unpaid()
 def handle(self, *args, **kargs):
     payout = PayoutEngine()
     payout.process_unpaid()