from logging import Logger

from model.config import Config
from model.electronic_message import ElectronicMessage
from interactor.route.electronic_payment.cache.dto import CacheRequest
from typing import List


class CacheInteractor(object):
    def __init__(self, logger, config, electronic_messages):
        # type: (Logger, Config, List[ElectronicMessage]) -> None

        self.logger = logger
        self.config = config
        self.electronic_messages = electronic_messages

    def execute(self, request):
        # type: (CacheRequest) -> None

        self.electronic_messages.append(request.electronic_message)
