IPWorks OFX 2020 Node.js Edition

Questions / Feedback?

LedgerBalance Property

Amount of the ledger balance.

Syntax

 ccstatement.getLedgerBalance([callback])

Default Value

""

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getLedgerBalance([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setLedgerBalance([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This value reflects the account balance as posted in the financial institution's records.

Credit card balances differ from bank account balances in that they are always negative. Since credit is money-on-loan and must be paid back, it is best thought of as a negative. The LedgerBalance reflects how much money the user has already spent under that account and must pay back to the financial institution. AvailableBalance indicates how much more money is available to the user to borrow until they must pay the ledger balance.

Note: the financial institution usually returns amounts as a string that includes the sign (+/-) of the amount. However, the server may sometimes leave out a particular field if it is not required by the OFX specification. To avoid confusion that can be caused by returning integers, the class will return all amount types as a string, with the empty string ("") for fields not returned by the server.

Where there is a value returned by the server, the class will attempt to convert the string into a format that can be easily parsed into an integer value. This behavior can be controlled by the CurrencyFormat config setting. .

This property is read-only.

Data Type

String

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks OFX 2020 Node.js Edition - Version 20.0 [Build 7941]