from xml.etree import cElementTree as eTree
from abc import (
    ABCMeta,
    abstractmethod,
)

from posot import OrderTaker

from messagebus import Message
from typing import Optional


class ElectronicPaymentServiceModel(object):
    __metaclass__ = ABCMeta

    @abstractmethod
    def finish_transaction(
        self,
        model,                  # type: eTree
        pos_ot,                 # type: OrderTaker
        electronic_type_id,     # type: int
        pos_id,                 # type: str
        status,                 # type: str
        order_id="",            # type: Optional[str]
    ):
        # type: (...) -> Optional[Message]

        raise NotImplementedError
