Sums up all the balances of the account and returns them.
767547
def getDebt(self):
        
        debt = float(self['principalBalance']) + float(self['interestBalance'])
        debt += float(self['feesBalance']) + float(self['penaltyBalance'])

        return debt
771488
def get_balance(self, address):
        
        spendables = self.get_unspent_outputs(address)
        if not spendables:
            logging.warning('address %s has a balance of 0', address)
            return 0

        balance = sum(s.coin_value for s in spendables)
        return balance
169118
def normalise(self, to_currency):
        
        out = Money(currency=to_currency)
        for money in self._money_obs:
            out += converter.convert(money, to_currency)
        return Balance([out])
821961
public function balance() 
    {
        $url = self::HOST . self::BALANCE;

        $params = $this->get_default_params();
        $result = $this->request($url, $params);
        $result = explode("\n", $result);

        return array(
            'code' => $result[0],
            'balance' => $result[1]
        );
    }
1335294
def get_balance(self):
        
        on_date = Datum()
        on_date.today()
        return self.get_balance_on(on_date.value)
1214538
def get_balance_on(self, on_date: datetime) -> Decimal:
        
        assert isinstance(on_date, datetime)

        total = Decimal(0)

        splits = self.get_splits_up_to(on_date)

        for split in splits:
            total += split.quantity * self.account.sign
        return total
943260
def balance(self):
        """"""
        self.check()
        if not sum(map(lambda x: x.amount, self.src)) == -self.amount:
            raise XnBalanceError("Sum of source amounts "
                                 "not equal to transaction amount")
        if not sum(map(lambda x: x.amount, self.dst)) == self.amount:
            raise XnBalanceError("Sum of destination amounts "
                                 "not equal to transaction amount")
        return True
345597
public function getBalance()
	{
		$result = $this->execute('balance');
		if(count(@$result['errors']))
			$this->_errors = $result['errors'];
		return @$result['balance'];		
	}
904440
def compute_amount(self):
        """"""
        self.amount = self.base_amount * self.aliquot / 100
        return self.amount
355904
def account(self):
        
        resp = self._call(endpoint='account')
        return Account(resp['credits'], resp['jobs_completed'], resp['jobs_processing'])
72121
def total_exchange_balances(services=None, verbose=None, timeout=None, by_service=False):
    
    balances = defaultdict(lambda: 0)
    if not services:
        services = [
            x(verbose=verbose, timeout=timeout)
            for x in ExchangeUniverse.get_authenticated_services()
        ]

    for e in services:
        try:
            more_balances = e.get_total_exchange_balances()
            if by_service:
                balances[e.__class__] = more_balances
            else:
                for code, bal in more_balances.items():
                    balances[code] += bal
        except NotImplementedError:
            if verbose:
                print(e.name, "total balance not implemented")
        except Exception as exc:
            if verbose:
                print(e.name, "failed:", exc.__class__.__name__, str(exc))

    return balances
478078
def get_end_balance(self, after: date) -> Decimal:
        
        # create a new date without hours
        #date_corrected = datetimeutils.end_of_day(after)
        datum = Datum()
        datum.from_date(after)
        datum.end_of_day()
        #log(DEBUG, "getting balance on %s", date_corrected)
        return self.get_balance_on(datum.value)
622756
function Balance(amount, balanceDate, description, affectingActor) {
  this.amount = amount;
  this.balanceDate = balanceDate;
  this.description = description;
  this.affectingActor = affectingActor;
}
1341378
def totals(iter, keyfunc, sumfunc):
    
    data = sorted(iter, key=keyfunc)
    res = {}

    for k, group in groupby(data, keyfunc):
        res[k] = sum([sumfunc(entry) for entry in group])

    return res
978560
def all(self, data={}, **kwargs):
        "
        return super(Invoice, self).all(data, **kwargs)
372974
def get_accounts(self, fetch=False):
        """"""
        return Accounts(self.resource.accounts, self.client, wallet=self, populate=fetch)
801794
def get_balance(self, acc_id, site='Pro'):
        
        assert site in ['Pro', 'HADAX']
        path = f'/v1{"/" if site == "Pro" else "/hadax/"}account/accounts/{acc_id}/balance'
        # params = {'account-id': self.acct_id}
        params = {}

        def _wrapper(_func):
            @wraps(_func)
            def handle():
                _func(api_key_get(params, path))

            return handle

        return _wrapper