# Path: oaxmlapi/base.py
# class _Base(object):
#     """
#     A base class for defining helpful class methods.
# 
#     """
#     def __init__(self):
#         self._header = False
# 
#     def __str__(self):
#         return "<_Base>"
# 
#     def _main(self):
#         return None
# 
#     def tostring(self):
#         """
#         Return a bytestring containing XML tags.
# 
#         """
#         header, body = None, None
# 
#         if self._header:
#             header = b'<?xml version="1.0" encoding="utf-8"?>'
# 
#         if self._main() is not None:
#             body = ET.tostring(self._main(), 'utf-8')
# 
#         return (header if header else b'') + (body if body else b'')
# 
#     def prettify(self):
#         """
#         Return a formatted, prettified string containing XML tags. Note
#         that this also adds an XML declaration tag to the top of the XML
#         document, so this should only be used for debugging.
# 
#         """
#         reparsed = minidom.parseString(self.tostring())
#         return reparsed.toprettyxml(indent='  ', encoding='utf-8')
# 
# Path: oaxmlapi/utilities.py
# ADDRESS_FIELDS = ('first', 'middle', 'last', 'salutation', 'email', 'phone',
#     'fax', 'mobile', 'addr1', 'addr2', 'addr3', 'addr4', 'city', 'state',
#     'zip', 'country', )


    import xml.etree.cElementTree as ET
    import xml.etree.ElementTree as ET
from oaxmlapi.base import _Base
from oaxmlapi.utilities import ADDRESS_FIELDS
# -*- coding: utf-8
"""The datatypes.py module is used to generate XML API datatype
objects and tags.
"""

from __future__ import absolute_import, print_function

try:
except ImportError:



class Datatype(_Base):
    """
    Use the type object to create an XML type.

    type (str): a valid XML type
    fields (dict): a dict containing fieldnames and data

    """
    def __init__(self, type, fields):

# Path: oaxmlapi/base.py
# class _Base(object):
#     """
#     A base class for defining helpful class methods.
# 
#     """
#     def __init__(self):
#         self._header = False
# 
#     def __str__(self):
#         return "<_Base>"
# 
#     def _main(self):
#         return None
# 
#     def tostring(self):
#         """
#         Return a bytestring containing XML tags.
# 
#         """
#         header, body = None, None
# 
#         if self._header:
#             header = b'<?xml version="1.0" encoding="utf-8"?>'
# 
#         if self._main() is not None:
#             body = ET.tostring(self._main(), 'utf-8')
# 
#         return (header if header else b'') + (body if body else b'')
# 
#     def prettify(self):
#         """
#         Return a formatted, prettified string containing XML tags. Note
#         that this also adds an XML declaration tag to the top of the XML
#         document, so this should only be used for debugging.
# 
#         """
#         reparsed = minidom.parseString(self.tostring())
#         return reparsed.toprettyxml(indent='  ', encoding='utf-8')
# 
# Path: oaxmlapi/utilities.py
# ADDRESS_FIELDS = ('first', 'middle', 'last', 'salutation', 'email', 'phone',
#     'fax', 'mobile', 'addr1', 'addr2', 'addr3', 'addr4', 'city', 'state',
#     'zip', 'country', )


# Path: oaxmlapi/datatypes.py
    import xml.etree.cElementTree as ET
    import xml.etree.ElementTree as ET
from oaxmlapi.base import _Base
from oaxmlapi.utilities import ADDRESS_FIELDS

# -*- coding: utf-8
"""The datatypes.py module is used to generate XML API datatype
objects and tags.
"""

from __future__ import absolute_import, print_function

try:
except ImportError:



class Datatype(_Base):
    """
    Use the type object to create an XML type.

    type (str): a valid XML type
    fields (dict): a dict containing fieldnames and data

    """
    def __init__(self, type, fields):

        _Base.__init__(self)