get_balance


Description:

[ Version ( since = "0.15.1" ) ]
public bool get_balance (out int balance, out uint scale, out unowned string currency)

If this has a valid account balance, returns true and sets the variables pointed to by balance, scale and currency to the appropriate fields of the Balance.

AccountBalance property.

The monetary value of the balance is expressed as a fixed-point number, balance, with a decimal scale defined by scale ; for instance a balance of 1234 with scale of 2 represents a value of "12.34" in the currency represented by currency.

Requires TP_CONNECTION_FEATURE_BALANCE to be prepared.

Parameters:

this

a Connection

balance

a pointer to store the account balance (or null)

scale

a pointer to store the balance scale (or null)

currency

a pointer to store the balance currency (or null)

Returns:

true if the balance is valid (and the values set), false if the balance is invalid.




2022 vala-language.org