import json

from update_api.dto import PosUpdaterDto


class BinariesUpdaterDto(PosUpdaterDto):

    def __init__(
        self,           # type: BinariesUpdaterDto
        pos_id,         # type: int
        user_id,        # type: str
        force_update,   # type: bool
    ):
        # type: (...) -> None

        super(BinariesUpdaterDto, self).__init__(
            pos_id=pos_id,
            user_id=user_id,
        )

        self.force_update = force_update

    def __str__(
        self,  # type: BinariesUpdaterDto
    ):
        # type: (...) -> str

        return json.dumps({
            "pos_id": self.pos_id,
            "user_id": self.user_id,
            "force_update": self.force_update,
        })
