from model import FinishPaymentData

from ._CommonProcessor import _CommonProcessor


class FinishPaymentProcessor(_CommonProcessor):
    def parse_data(self, data, event_type):
        return FinishPaymentData(*data.split(';'))

    def call_business(self, finish_payment_data):
        # type: (FinishPaymentData) -> str
        return self.payment_router.finish_all_payments(finish_payment_data)
