from typing import Any

from messageprocessorutil import UuidMessageProcessor

from dailygoals_services.interactor.update_total_sold import UpdateTotalSoldTableInteractor


class UpdateTotalSoldTableProcessor(UuidMessageProcessor):
    def __init__(self, interactor):
        # type: (UpdateTotalSoldTableInteractor) -> None

        super(UpdateTotalSoldTableProcessor, self).__init__()
        self.interactor = interactor

    def parse_data(self, data, event_type):
        # type: (Any, str) -> Any

        return data

    def call_business(self, params):
        # type: (Any) -> None

        self.interactor.update(params)

    def format_response(self, message_bus, message, event, request, response):
        return

    def format_exception(self, message_bus, message, event, request, exception):
        return

    def format_parse_exception(self, message_bus, message, event, data, exception):
        return
