Commit faf68df8 authored by Karel Slaný's avatar Karel Slaný

Merge branch 'fix-data-box-owner' into 'master'

Fix DataBoxOwner class

See merge request !16
parents bb0478e6 6f17c535
Pipeline #58679 failed with stages
in 5 minutes and 5 seconds
......@@ -276,7 +276,7 @@ class DataBoxType(IntEnum):
FO = isds.DBTYPE_FO
class _PersonName:
class _PersonName(object):
"""Name of a person.
Attributes:
......@@ -285,14 +285,15 @@ class _PersonName:
last_name (str): Last name.
last_name_at_birth (str): Last name at birth.
"""
def __init__(self, first_name=None, middle_name=None, last_name=None, last_name_at_birth=None, **kwargs):
self.first_name = first_name
self.middle_name = middle_name
self.last_name = last_name
self.last_name_at_birth = last_name_at_birth
super(_PersonName, self).__init__(**kwargs)
first_name = None
middle_name = None
last_name = None
last_name_at_birth = None
class _BirthInfo:
class _BirthInfo(object):
"""Information about birth.
Attributes:
......@@ -301,14 +302,15 @@ class _BirthInfo:
birth_country (str): Country of birth.
birth_state (str): State of birth.
"""
birth_date = None
birth_city = None
birth_country = None
birth_state = None
def __init__(self, birth_date=None, birth_city=None, birth_country=None, birth_state=None, **kwargs):
self.birth_date = birth_date
self.birth_city = birth_city
self.birth_country = birth_country
self.birth_state = birth_state
super(_BirthInfo, self).__init__(**kwargs)
class _Address:
class _Address(object):
"""Information about address.
Attributes:
......@@ -319,13 +321,15 @@ class _Address:
zip_code (str): Zip code.
state (str): Country.
"""
street = None
conscription_number = None # adNumberInMunicipality
orientation_number = None # adNumberInStreet
city = None
zip_code = None
state = None
def __init__(self, street=None, conscription_number=None, orientation_number=None, city=None, zip_code=None,
state=None, **kwargs):
self.street = street
self.conscription_number = conscription_number # adNumberInMunicipality
self.orientation_number = orientation_number # adNumberInStreet
self.city = city
self.zip_code = zip_code
self.state = state
super(_Address, self).__init__(**kwargs)
class DataBoxOwner(_PersonName, _BirthInfo, _Address):
......@@ -345,19 +349,23 @@ class DataBoxOwner(_PersonName, _BirthInfo, _Address):
is_effective_ovm (bool): Whether data box represent a public office.
has_open_addressing (bool): Whether data box has enabled open addressing.
"""
ic = None
firm_name = None
nationality = None
email = None
telephone = None
identifier = None
registry_code = None
db_id = None
db_type = None
db_state = None
is_effective_ovm = None # dbEffectiveOVM
has_open_addressing = None # dbOpenAddressing
def __init__(
self, ic=None, firm_name=None, nationality=None, email=None, telephone=None, identifier=None,
registry_code=None, db_id=None, db_type=None, db_state=None, is_effective_ovm=None,
has_open_addressing=None, **kwargs):
self.ic = ic
self.firm_name = firm_name
self.nationality = nationality
self.email = email
self.telephone = telephone
self.identifier = identifier
self.registry_code = registry_code
self.db_id = db_id
self.db_type = db_type
self.db_state = db_state
self.is_effective_ovm = is_effective_ovm # dbEffectiveOVM
self.has_open_addressing = has_open_addressing # dbOpenAddressing
super(DataBoxOwner, self).__init__(**kwargs)
class DataBoxList(list):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment