Get the user balance details from MAM.
559498
def get_user_balance(self, username):
        
        cmd = ["gbalance", "-u", username, "--raw"]
        results = self._read_output(cmd)

        if len(results) == 0:
            return None

        return results
1335294
def get_balance(self):
        
        on_date = Datum()
        on_date.today()
        return self.get_balance_on(on_date.value)
55095
def get_aggregate_balance(self, _async=False):
        
        params = {}
        path = '/v1/subuser/aggregate-balance'
        return  api_key_get(params, path, _async=_async)
915691
async def user_info(self, loop=None, **kwargs):
        """"""
        if not self.user_info_url:
            raise NotImplementedError(
                'The provider doesnt support user_info method.')

        data = await self.request('GET', self.user_info_url, loop=loop, **kwargs)
        user = User(**dict(self.user_parse(data)))
        return user, data
1072556
def update_balance_data(self) -> None:
        """"""
        response = get(
            _url(
                "/accounts/{0}/balance".format(self._account_uid),
                self._sandbox
            ),
            headers=self._auth_headers
        )
        response.raise_for_status()

        response = response.json()
        self.cleared_balance = response['clearedBalance']['minorUnits']
        self.effective_balance = response['effectiveBalance']['minorUnits']
        self.pending_transactions \
            = response['pendingTransactions']['minorUnits']
        self.available_to_spend = response['availableToSpend']['minorUnits']
        self.accepted_overdraft = response['acceptedOverdraft']['minorUnits']
644144
def get_subaccounts(self):
        """"""
        method = 'GET'
        endpoint = '/rest/v1/users/{}/list-subaccounts'.format(
            self.client.sauce_username)
        return self.client.request(method, endpoint)
620574
def get_userinfo(self):
        """"""
        wanted_fields = ["name", "mobile", "orgEmail", "position", "avatar"]
        userinfo = {k: self.json_response.get(k, None) for k in wanted_fields}
        return userinfo
1015271
def get_account_details(self):
        
        return self.make_api_request(
            'Account',
            'getAccountDetails',
            utils.get_kwargs(locals()),
            model=models.AccountDetailsResponse,
        )
913550
def get_users(self, fetch=True):
        """"""
        return Users(self.resource.users, self.client, populate=fetch)
267679
def sum_to_balance(self):
        
        result = self.values("amount_currency").annotate(total=models.Sum("amount"))
        return Balance([Money(r["total"], r["amount_currency"]) for r in result])
335108
def getbalance(self, account=None, minconf=6):
        """"""
        if account:
            return self.req("getbalance", [account, minconf])
        else:
            return self.req("getbalance")
154165
def GetMemUsedMB(self):
        ''''''
        counter = c_uint()
        ret = vmGuestLib.VMGuestLib_GetMemUsedMB(self.handle.value, byref(counter))
        if ret != VMGUESTLIB_ERROR_SUCCESS: raise VMGuestLibException(ret)
        return counter.value
1188181
def get_income_total(self) -> Decimal:
        
        accounts = self.get_income_accounts()
        # log(DEBUG, "income accounts: %s", accounts)
        income = Decimal(0)
        for acct in accounts:
            income += acct.get_balance()
        return income
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]
        );
    }
814028
def GetMemReservationMB(self):
        ''''''
        counter = c_uint()
        ret = vmGuestLib.VMGuestLib_GetMemReservationMB(self.handle.value, byref(counter))
        if ret != VMGUESTLIB_ERROR_SUCCESS: raise VMGuestLibException(ret)
        return counter.value
984961
def GetMemSharedMB(self):
        ''''''
        counter = c_uint()
        ret = vmGuestLib.VMGuestLib_GetMemSharedMB(self.handle.value, byref(counter))
        if ret != VMGUESTLIB_ERROR_SUCCESS: raise VMGuestLibException(ret)
        return counter.value
1298225
def get_current_user(self, objectmask=None):
        """"""

        if objectmask is None:
            objectmask = "mask[userStatus[name], parent[id, username]]"
        return self.account_service.getCurrentUser(mask=objectmask)