from .resources.card import Card
from .version import __version__

from .configuration import Configuration
from .requestor import Requestor
from .resources.payment import Payment
from .resources.project import Project


class LudiaLudom(object):
    def __init__(self, configuration: Configuration):
        self._requestor = Requestor(configuration)
        self._configuration = configuration

        self._project = Project(self._requestor, self._configuration)
        self._payment = Payment(self._requestor, self._configuration)
        self._card = Card(self._requestor, self._configuration)

    @property
    def version(self) -> str:
        return __version__

    @property
    def requestor(self) -> Requestor:
        return self._requestor

    @property
    def configuration(self) -> Configuration:
        return self._configuration

    @property
    def project(self) -> Project:
        return self._project

    @property
    def payment(self) -> Payment:
        return self._payment

    @property
    def card(self) -> Card:
        return self._card

    def __str__(self) -> str:
        return f"{self.requestor}"
