Source code for q2_cores.SOA.models.soa_data

[docs] class SOAData(object): def __init__( self, primary_cif: str, list_of_portfolios: list, list_of_name_lines: list, address_name_mapping: dict, ): self.primary_cif = primary_cif self.portfolios = self._get_uniques(list_of_portfolios) self.name_lines = self._get_uniques(list_of_name_lines) self.address_name_mapping = address_name_mapping @staticmethod def _get_uniques(full_list: list): unique_list = [] for item in full_list: if item not in unique_list: unique_list.append(item) return unique_list def __eq__(self, other): return vars(self) == vars(other) def __repr__(self): return str(vars(self))