(self)
return dict(ledgers)
Dict of ledgers, keyed by entity ID, from the sync body
Dict of ledgers, keyed by entity ID, from the sync body
Dict of ledgers keyed by entity ID from the sync body
def ledgers(self):
        """Dict of ledgers, keyed by entity ID, from the sync body"""
        ledgers = defaultdict(list)
        balance_nodes = self.xml.findall("{%s}balance" % COMMTRACK_REPORT_XMLNS)
        for balance_node in balance_nodes:
            balance_obj = Balance.from_xml(balance_node)
            ledgers[balance_obj.entity_id].append(balance_obj)
        return dict(ledgers)
def ledgers ( self ) : ledgers = defaultdict ( list ) balance_nodes = self . xml . findall ( "{%s}balance" % COMMTRACK_REPORT_XMLNS ) for balance_node in balance_nodes : balance_obj = Balance . from_xml ( balance_node ) ledgers [ balance_obj . entity_id ] . append ( balance_obj ) return dict ( ledgers )