from application.repository.api import APIRepository
from .dto import UnlockVoucherRequest


class UnlockVoucherInteractor(object):
    def __init__(
        self,               # type: UnlockVoucherInteractor
        api_repository,     # type: APIRepository
    ):
        # type: (...) -> None

        self.api_repository = api_repository

    def unlock_benefit(
        self,           # type: UnlockVoucherInteractor
        request,        # type: UnlockVoucherRequest
    ):
        # type: (...) -> None

        self.api_repository.unlock_benefit(
            benefit_id=request.benefit_id,
            order_picture=request.order_picture,
            table_picture=request.table_picture,
        )
