ofx4js
Version:
A javascript OFX library, ported from OFX4J
81 lines (80 loc) • 2.9 kB
TypeScript
import { BalanceList } from "./BalanceList";
/**
* Aggregate for the investment balance.
* @see "Section 13.9.2.7, OFX Spec"
*/
export declare class InvestmentBalance {
private availableCash;
private marginBalance;
private shortBalance;
private buyingPower;
private balanceList;
/**
* Gets the available cash balance across all sub-accounts, including sweep funds. This is
* required field according to the OFX spec.
*
* @return the available cash balance
*/
getAvailableCash(): number;
/**
* Sets the available cash balance across all sub-accounts, including sweep funds. This is
* required field according to the OFX spec.
*
* @param availableCash the available cash balance
*/
setAvailableCash(availableCash: number): void;
/**
* Gets the margin account balance. A positive balance indicates a positive cash balance, while
* a negative balance indicates the customer borrowed funds. This is a required field according
* to the OFX spec.
*
* @return the margin account balance
*/
getMarginBalance(): number;
/**
* Sets the margin account balance. A positive balance indicates a positive cash balance, while
* a negative balance indicates the customer borrowed funds. This is a required field according
* to the OFX spec.
*
* @param marginBalance the margin account balance
*/
setMarginBalance(marginBalance: number): void;
/**
* Gets the market value of all short positions. This is a positive balance. This is a required
* field according to the OFX spec.
*
* @return the market value of all short positions
*/
getShortBalance(): number;
/**
* Sets the market value of all short positions. This is a positive balance. This is a required
* field according to the OFX spec.
*
* @param shortBalance the market value of all short positions
*/
setShortBalance(shortBalance: number): void;
/**
* Gets the buying power amount. This is an optional field according to the OFX spec.
*
* @return the buying power
*/
getBuyingPower(): number;
/**
* Sets the buying power amount. This is an optional field according to the OFX spec.
*
* @param buyingPower the buying power
*/
setBuyingPower(buyingPower: number): void;
/**
* Gets the investment balance list. This is an optional field according to the OFX spec.
*
* @return the investment balance list
*/
getBalanceList(): BalanceList;
/**
* Sets the investment balance list. This is an optional field according to the OFX spec.
*
* @param balanceList the investment balance list
*/
setBalanceList(balanceList: BalanceList): void;
}