# Path: exactonline/elements/base.py
# class ExactElement(object):
#     def __init__(self, api=None, **kwargs):
#         super(ExactElement, self).__init__(**kwargs)
# 
#         self._api = api
# 
#     def get_guid(self):
#         # Raises ObjectDoesNotExist if it cannot be found remotely.
#         raise NotImplementedError()
# 
#     def commit(self):
#         # This needs API specific work.
#         raise NotImplementedError()
# 
# Path: exactonline/exceptions.py
# class ObjectDoesNotExist(ExactOnlineError):
#     """
#     Exception named Django style.
#     """
#     pass


from .base import ExactElement
from ..exceptions import ObjectDoesNotExist
Example usage::

    class BossoExactCustomer(ExactCustomer):
        def __init__(self, bosso_relation=None, **kwargs):
            super(BossoExactRelation, self).__init__(**kwargs)

            self._bosso_relation = bosso_relation

        def get_code(self):
            return self._bosso_relation.code

        def get_name(self):
            return self._bosso_relation.name

        def get_address(self):
            address = self._bosso_relation.billing_address
            if address:
                return {
                    'AddressLine1': address.street_and_number(),
                    'Postcode': address.zipcode,
                    'City': address.city.name,
                }
            return {}

This file is part of the Exact Online REST API Library in Python
(EORALP), licensed under the LGPLv3+.
Copyright (C) 2015 Walter Doekes, OSSO B.V.
"""



# Path: exactonline/elements/base.py
# class ExactElement(object):
#     def __init__(self, api=None, **kwargs):
#         super(ExactElement, self).__init__(**kwargs)
# 
#         self._api = api
# 
#     def get_guid(self):
#         # Raises ObjectDoesNotExist if it cannot be found remotely.
#         raise NotImplementedError()
# 
#     def commit(self):
#         # This needs API specific work.
#         raise NotImplementedError()
# 
# Path: exactonline/exceptions.py
# class ObjectDoesNotExist(ExactOnlineError):
#     """
#     Exception named Django style.
#     """
#     pass


# Path: exactonline/elements/relation.py
from .base import ExactElement
from ..exceptions import ObjectDoesNotExist

Example usage::

    class BossoExactCustomer(ExactCustomer):
        def __init__(self, bosso_relation=None, **kwargs):
            super(BossoExactRelation, self).__init__(**kwargs)

            self._bosso_relation = bosso_relation

        def get_code(self):
            return self._bosso_relation.code

        def get_name(self):
            return self._bosso_relation.name

        def get_address(self):
            address = self._bosso_relation.billing_address
            if address:
                return {
                    'AddressLine1': address.street_and_number(),
                    'Postcode': address.zipcode,
                    'City': address.city.name,
                }
            return {}

This file is part of the Exact Online REST API Library in Python
(EORALP), licensed under the LGPLv3+.
Copyright (C) 2015 Walter Doekes, OSSO B.V.
"""



class ExactRelation(ExactElement):