import sysactions

from externals.repository import AlertsRepository
from services.model import POSAlertNotificationRequest


class POSAlertNotificationInteractor(object):
    def __init__(
        self,
        alerts_repository,  # type: AlertsRepository
    ):
        # type: (...) -> None

        self.mb_context = sysactions.mbcontext
        self.alerts_repository = alerts_repository

    def process_request(
        self,
        request,  # type: POSAlertNotificationRequest
    ):
        # type: (...) -> None

        self.alerts_repository.set_sent_status(
            event_id=request.event_id,
            sent_status=1,
        )
