from abc import ABC, abstractmethod
from models.payment_model import PaymentModel
from schemas.payment import PaymentDto


class Provider(ABC):
    @abstractmethod
    def create_payment(self, payment: PaymentDto):
        pass

    def capture(self, payment: PaymentModel):
        pass


class CouldNotInitialisePayment(Exception):
    def __init__(self, order_id, message):
        super(CouldNotInitialisePayment, self).__init__(
            "Payment {} could not be initalised: {} ".format(order_id, message))


class CouldNotCaptureOnPayment(Exception):
    def __init__(self, order_id, message):
        super(CouldNotCaptureOnPayment, self).__init__(
            "Payment {} could not be captured: {} ".format(order_id, message))


class CouldNotActivatePayment(Exception):
    def __init__(self, order_id, message):
        super(CouldNotActivatePayment, self).__init__(
            "Payment {} could not be activated: {} ".format(order_id, message))
86d71e2a0078a23f5ba88d4cf5f4ca0b1a07ee59
<mask token>


class CouldNotActivatePayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotActivatePayment, self).__init__(
            'Payment {} could not be activated: {} '.format(order_id, message))

<mask token>


class CouldNotInitialisePayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotInitialisePayment, self).__init__(
            'Payment {} could not be initalised: {} '.format(order_id, message)
            )


class CouldNotCaptureOnPayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotCaptureOnPayment, self).__init__(
            'Payment {} could not be captured: {} '.format(order_id, message))


class CouldNotActivatePayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotActivatePayment, self).__init__(
            'Payment {} could not be activated: {} '.format(order_id, message))

<mask token>


class Provider(ABC):
    <mask token>
    <mask token>


class CouldNotInitialisePayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotInitialisePayment, self).__init__(
            'Payment {} could not be initalised: {} '.format(order_id, message)
            )


class CouldNotCaptureOnPayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotCaptureOnPayment, self).__init__(
            'Payment {} could not be captured: {} '.format(order_id, message))


class CouldNotActivatePayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotActivatePayment, self).__init__(
            'Payment {} could not be activated: {} '.format(order_id, message))

<mask token>


class Provider(ABC):

    @abstractmethod
    def create_payment(self, payment: PaymentDto):
        pass

    def capture(self, payment: PaymentModel):
        pass


class CouldNotInitialisePayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotInitialisePayment, self).__init__(
            'Payment {} could not be initalised: {} '.format(order_id, message)
            )


class CouldNotCaptureOnPayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotCaptureOnPayment, self).__init__(
            'Payment {} could not be captured: {} '.format(order_id, message))


class CouldNotActivatePayment(Exception):

    def __init__(self, order_id, message):
        super(CouldNotActivatePayment, self).__init__(
            'Payment {} could not be activated: {} '.format(order_id, message))

from abc import ABC, abstractmethod
from models.payment_model import PaymentModel
from schemas.payment import PaymentDto


class Provider(ABC):
    @abstractmethod
    def create_payment(self, payment: PaymentDto):
        pass

    def capture(self, payment: PaymentModel):
        pass


class CouldNotInitialisePayment(Exception):
    def __init__(self, order_id, message):
        super(CouldNotInitialisePayment, self).__init__(
            "Payment {} could not be initalised: {} ".format(order_id, message))


class CouldNotCaptureOnPayment(Exception):
    def __init__(self, order_id, message):
        super(CouldNotCaptureOnPayment, self).__init__(
            "Payment {} could not be captured: {} ".format(order_id, message))


class CouldNotActivatePayment(Exception):
    def __init__(self, order_id, message):
        super(CouldNotActivatePayment, self).__init__(
            "Payment {} could not be activated: {} ".format(order_id, message))